@getlupa/client 1.17.10 → 1.17.13

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.
@@ -14298,8 +14298,8 @@ var __async = (__this, __arguments, generator) => {
14298
14298
  const _hoisted_1$1i = { id: "lupa-search-box-input-container" };
14299
14299
  const _hoisted_2$T = { class: "lupa-input-clear" };
14300
14300
  const _hoisted_3$C = { id: "lupa-search-box-input" };
14301
- const _hoisted_4$s = ["value"];
14302
- const _hoisted_5$i = ["aria-label", "placeholder"];
14301
+ const _hoisted_4$u = ["value"];
14302
+ const _hoisted_5$k = ["aria-label", "placeholder"];
14303
14303
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
14304
14304
  const _hoisted_7$7 = [
14305
14305
  _hoisted_6$9
@@ -14405,7 +14405,7 @@ var __async = (__this, __arguments, generator) => {
14405
14405
  "aria-hidden": "true",
14406
14406
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
14407
14407
  disabled: ""
14408
- }, null, 8, _hoisted_4$s),
14408
+ }, null, 8, _hoisted_4$u),
14409
14409
  withDirectives(createBaseVNode("input", mergeProps({
14410
14410
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
14411
14411
  }, inputAttributes.value, {
@@ -14419,7 +14419,7 @@ var __async = (__this, __arguments, generator) => {
14419
14419
  placeholder: labels.value.placeholder,
14420
14420
  onInput: handleInput,
14421
14421
  onFocus: handleFocus
14422
- }), null, 16, _hoisted_5$i), [
14422
+ }), null, 16, _hoisted_5$k), [
14423
14423
  [vModelText, inputValue.value]
14424
14424
  ]),
14425
14425
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -14631,11 +14631,11 @@ var __async = (__this, __arguments, generator) => {
14631
14631
  class: "lupa-suggestion-facet",
14632
14632
  "data-cy": "lupa-suggestion-facet"
14633
14633
  };
14634
- const _hoisted_4$r = {
14634
+ const _hoisted_4$t = {
14635
14635
  class: "lupa-suggestion-facet-label",
14636
14636
  "data-cy": "lupa-suggestion-facet-label"
14637
14637
  };
14638
- const _hoisted_5$h = {
14638
+ const _hoisted_5$j = {
14639
14639
  class: "lupa-suggestion-facet-value",
14640
14640
  "data-cy": "lupa-suggestion-facet-value"
14641
14641
  };
@@ -14677,8 +14677,8 @@ var __async = (__this, __arguments, generator) => {
14677
14677
  innerHTML: _ctx.suggestion.displayHighlight
14678
14678
  }, null, 8, _hoisted_1$1e)) : (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(_ctx.suggestion.display), 1)),
14679
14679
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$B, [
14680
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
14681
- createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
14680
+ createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
14681
+ createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
14682
14682
  ])) : createCommentVNode("", true)
14683
14683
  ]);
14684
14684
  };
@@ -24171,8 +24171,8 @@ and ensure you are accounting for this risk.
24171
24171
  const _hoisted_1$18 = ["innerHTML"];
24172
24172
  const _hoisted_2$N = { key: 0 };
24173
24173
  const _hoisted_3$A = { key: 1 };
24174
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
24175
- const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
24174
+ const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
24175
+ const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
24176
24176
  const _sfc_main$1h = /* @__PURE__ */ defineComponent({
24177
24177
  __name: "SearchBoxProductCustom",
24178
24178
  props: {
@@ -24204,8 +24204,8 @@ and ensure you are accounting for this risk.
24204
24204
  class: [className.value, "lupa-search-box-product-custom"]
24205
24205
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
24206
24206
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$A, [
24207
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
24208
- createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
24207
+ createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
24208
+ createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
24209
24209
  ]))
24210
24210
  ], 16));
24211
24211
  };
@@ -24298,13 +24298,11 @@ and ensure you are accounting for this risk.
24298
24298
  const relatedCategoryChildren = ref([]);
24299
24299
  const lastRequestId = ref("");
24300
24300
  const searchRequestResults = ref({});
24301
+ const lastResultsSource = ref(void 0);
24301
24302
  const optionsStore = useOptionsStore();
24302
24303
  const paramsStore = useParamsStore();
24303
24304
  const screenStore = useScreenStore();
24304
24305
  const { searchResultOptions } = storeToRefs(optionsStore);
24305
- computed(
24306
- () => loading.value || loadingFacets.value || loadingRefiners.value
24307
- );
24308
24306
  const facets2 = computed(() => searchResult.value.facets);
24309
24307
  const filters = computed(() => searchResult.value.filters);
24310
24308
  const currentQueryText = computed(() => searchResult.value.searchText);
@@ -24401,13 +24399,14 @@ and ensure you are accounting for this risk.
24401
24399
  });
24402
24400
  searchResult.value = updatedResult;
24403
24401
  });
24404
- const saveRequestResult = (requestId, result2) => {
24402
+ const saveRequestResult = (requestId, result2, source = "items") => {
24405
24403
  var _a;
24406
24404
  const existingResult = (_a = searchRequestResults.value[requestId]) != null ? _a : {};
24407
24405
  const combinedResult = __spreadValues2(__spreadValues2({}, existingResult), result2);
24408
24406
  searchRequestResults.value = __spreadProps2(__spreadValues2({}, searchRequestResults.value), {
24409
24407
  [requestId]: combinedResult
24410
24408
  });
24409
+ lastResultsSource.value = source;
24411
24410
  searchResult.value = combinedResult;
24412
24411
  };
24413
24412
  const setLastRequestId = (requestId) => {
@@ -24433,14 +24432,13 @@ and ensure you are accounting for this risk.
24433
24432
  } else {
24434
24433
  saveRequestResult(requestId, newSearchResult);
24435
24434
  }
24436
- saveRequestResult(requestId, newSearchResult);
24437
24435
  return { searchResult: newSearchResult };
24438
24436
  };
24439
- const addPartial = (requestId, newSearchResult) => {
24437
+ const addPartial = (requestId, newSearchResult, source) => {
24440
24438
  if (lastRequestId.value !== requestId || !newSearchResult) {
24441
24439
  return;
24442
24440
  }
24443
- saveRequestResult(requestId, newSearchResult);
24441
+ saveRequestResult(requestId, newSearchResult, source);
24444
24442
  return { searchResult: searchResult.value };
24445
24443
  };
24446
24444
  const setColumnCount = ({ width, grid }) => {
@@ -24507,6 +24505,7 @@ and ensure you are accounting for this risk.
24507
24505
  hideFiltersOnExactMatchForKeys,
24508
24506
  relatedCategoryChildren,
24509
24507
  searchRequestResults,
24508
+ lastResultsSource,
24510
24509
  setSidebarState,
24511
24510
  queryFacet,
24512
24511
  setLastRequestId,
@@ -24523,14 +24522,17 @@ and ensure you are accounting for this risk.
24523
24522
  });
24524
24523
  const _hoisted_1$16 = { class: "lupa-search-box-add-to-cart-wrapper" };
24525
24524
  const _hoisted_2$M = { class: "lupa-search-box-product-addtocart" };
24526
- const _hoisted_3$z = ["onClick", "disabled"];
24525
+ const _hoisted_3$z = ["disabled"];
24526
+ const _hoisted_4$r = ["href"];
24527
+ const _hoisted_5$h = ["onClick", "disabled"];
24527
24528
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24528
24529
  __name: "SearchBoxProductAddToCart",
24529
24530
  props: {
24530
24531
  item: {},
24531
24532
  options: {},
24532
24533
  inStock: { type: Boolean },
24533
- dynamicAttributes: {}
24534
+ dynamicAttributes: {},
24535
+ link: {}
24534
24536
  },
24535
24537
  emits: ["productEvent"],
24536
24538
  setup(__props, { emit: emit2 }) {
@@ -24557,16 +24559,27 @@ and ensure you are accounting for this risk.
24557
24559
  emit2("productEvent", { type: "addToCart" });
24558
24560
  loading.value = false;
24559
24561
  });
24562
+ const hasLink = computed(() => {
24563
+ return Boolean(props.link && props.options.link);
24564
+ });
24560
24565
  return (_ctx, _cache) => {
24561
24566
  return openBlock(), createElementBlock("div", _hoisted_1$16, [
24562
24567
  createBaseVNode("div", _hoisted_2$M, [
24563
- createBaseVNode("button", mergeProps({
24568
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
24569
+ key: 0,
24570
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24571
+ "data-cy": "lupa-add-to-cart",
24572
+ disabled: !inStockValue.value || loading.value
24573
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
24574
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
24575
+ ], 16, _hoisted_3$z)) : (openBlock(), createElementBlock("button", mergeProps({
24576
+ key: 1,
24564
24577
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
24565
24578
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24566
24579
  "data-cy": "lupa-add-to-cart",
24567
24580
  type: "button",
24568
24581
  disabled: !inStockValue.value || loading.value
24569
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_3$z)
24582
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
24570
24583
  ])
24571
24584
  ]);
24572
24585
  };
@@ -24594,7 +24607,8 @@ and ensure you are accounting for this risk.
24594
24607
  item: {},
24595
24608
  element: {},
24596
24609
  labels: {},
24597
- isInStock: { type: Boolean }
24610
+ isInStock: { type: Boolean },
24611
+ link: {}
24598
24612
  },
24599
24613
  setup(__props) {
24600
24614
  const props = __props;
@@ -24656,17 +24670,19 @@ and ensure you are accounting for this risk.
24656
24670
  labels: _ctx.labels,
24657
24671
  class: { "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) },
24658
24672
  inStock: _ctx.isInStock,
24659
- "dynamic-attributes": dynamicAttributes.value
24660
- }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes"])) : createCommentVNode("", true)
24673
+ "dynamic-attributes": dynamicAttributes.value,
24674
+ link: _ctx.link
24675
+ }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
24661
24676
  ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$15, [
24662
24677
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
24663
24678
  key: 0,
24664
24679
  item: enhancedItem.value,
24665
24680
  options: _ctx.element,
24666
24681
  labels: _ctx.labels,
24682
+ link: _ctx.link,
24667
24683
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_b = _ctx.item) == null ? void 0 : _b.id) }),
24668
24684
  inStock: _ctx.isInStock
24669
- }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true),
24685
+ }, null, 8, ["item", "options", "labels", "link", "class", "inStock"])) : createCommentVNode("", true),
24670
24686
  renderSlot(_ctx.$slots, "badges")
24671
24687
  ]));
24672
24688
  };
@@ -24675,7 +24691,7 @@ and ensure you are accounting for this risk.
24675
24691
  const _hoisted_1$14 = { class: "lupa-badge-title" };
24676
24692
  const _hoisted_2$L = ["src"];
24677
24693
  const _hoisted_3$y = { key: 1 };
24678
- const _hoisted_4$p = {
24694
+ const _hoisted_4$q = {
24679
24695
  key: 0,
24680
24696
  class: "lupa-badge-full-text"
24681
24697
  };
@@ -24719,7 +24735,7 @@ and ensure you are accounting for this risk.
24719
24735
  }, null, 8, _hoisted_2$L)) : createCommentVNode("", true),
24720
24736
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$y, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
24721
24737
  ]),
24722
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24738
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24723
24739
  ], 6);
24724
24740
  };
24725
24741
  }
@@ -25363,6 +25379,8 @@ and ensure you are accounting for this risk.
25363
25379
  return extractFromStorage(options);
25364
25380
  case "htmlElementText":
25365
25381
  return extractFromHtmlElementText(options);
25382
+ case "htmlElementAttribute":
25383
+ return extractFromHtmlElementAttribute(options);
25366
25384
  case "cookie":
25367
25385
  return extractFromCookie(options);
25368
25386
  default:
@@ -25406,6 +25424,17 @@ and ensure you are accounting for this risk.
25406
25424
  const element = document.querySelector(options.querySelector);
25407
25425
  return element ? ((_a = element.textContent) == null ? void 0 : _a.trim()) || options.default : options.default;
25408
25426
  };
25427
+ const extractFromHtmlElementAttribute = (options) => {
25428
+ const element = document.querySelector(options.querySelector);
25429
+ if (!element) {
25430
+ return options.default;
25431
+ }
25432
+ const attr = options.attribute;
25433
+ if (attr === "value" && (element == null ? void 0 : element.value)) {
25434
+ return element.value;
25435
+ }
25436
+ return element.getAttribute(attr) || options.default;
25437
+ };
25409
25438
  const getValueFromPath = (obj, path) => {
25410
25439
  return path.split(".").reduce((value, key) => value && value[key] || null, obj);
25411
25440
  };
@@ -25621,11 +25650,11 @@ and ensure you are accounting for this risk.
25621
25650
  key: 0,
25622
25651
  class: "lupa-panel-title lupa-panel-title-top-results"
25623
25652
  };
25624
- const _hoisted_4$o = {
25653
+ const _hoisted_4$p = {
25625
25654
  key: 1,
25626
25655
  class: "lupa-panel-title"
25627
25656
  };
25628
- const _hoisted_5$f = {
25657
+ const _hoisted_5$g = {
25629
25658
  key: 1,
25630
25659
  id: "lupa-search-box-panel"
25631
25660
  };
@@ -25814,7 +25843,7 @@ and ensure you are accounting for this risk.
25814
25843
  "data-cy": "lupa-panel-" + panel.type + "-index"
25815
25844
  }, [
25816
25845
  ((_a = panel.labels) == null ? void 0 : _a.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
25817
- ((_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),
25846
+ ((_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),
25818
25847
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
25819
25848
  key: 2,
25820
25849
  panel,
@@ -25849,7 +25878,7 @@ and ensure you are accounting for this risk.
25849
25878
  options: _ctx.options,
25850
25879
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
25851
25880
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
25852
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
25881
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
25853
25882
  createVNode(_sfc_main$1s, {
25854
25883
  options: _ctx.options.history,
25855
25884
  history: history.value,
@@ -26312,7 +26341,7 @@ and ensure you are accounting for this risk.
26312
26341
  key: 1,
26313
26342
  "data-cy": "did-you-mean-label"
26314
26343
  };
26315
- const _hoisted_4$n = { key: 1 };
26344
+ const _hoisted_4$o = { key: 1 };
26316
26345
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26317
26346
  __name: "SearchResultsDidYouMean",
26318
26347
  props: {
@@ -26363,7 +26392,7 @@ and ensure you are accounting for this risk.
26363
26392
  class: "lupa-did-you-mean lupa-highlighted-search-text",
26364
26393
  "data-cy": "did-you-mean-value",
26365
26394
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
26366
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
26395
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
26367
26396
  ]);
26368
26397
  }), 128))
26369
26398
  ])) : createCommentVNode("", true)
@@ -26413,8 +26442,8 @@ and ensure you are accounting for this risk.
26413
26442
  key: 1,
26414
26443
  class: "lupa-results-total-count"
26415
26444
  };
26416
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
26417
- const _hoisted_5$e = ["innerHTML"];
26445
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
26446
+ const _hoisted_5$f = ["innerHTML"];
26418
26447
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26419
26448
  __name: "SearchResultsTitle",
26420
26449
  props: {
@@ -26463,7 +26492,7 @@ and ensure you are accounting for this risk.
26463
26492
  queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
26464
26493
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, [
26465
26494
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
26466
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
26495
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
26467
26496
  createTextVNode(")")
26468
26497
  ])) : createCommentVNode("", true)
26469
26498
  ])) : createCommentVNode("", true),
@@ -26475,7 +26504,7 @@ and ensure you are accounting for this risk.
26475
26504
  key: 2,
26476
26505
  class: "lupa-result-page-description-top",
26477
26506
  innerHTML: descriptionTop.value
26478
- }, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
26507
+ }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
26479
26508
  ]);
26480
26509
  };
26481
26510
  }
@@ -26525,7 +26554,7 @@ and ensure you are accounting for this risk.
26525
26554
  key: 0,
26526
26555
  class: "filter-values"
26527
26556
  };
26528
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
26557
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
26529
26558
  const _sfc_main$X = /* @__PURE__ */ defineComponent({
26530
26559
  __name: "CurrentFilters",
26531
26560
  props: {
@@ -26609,7 +26638,7 @@ and ensure you are accounting for this risk.
26609
26638
  }, null, 2)) : createCommentVNode("", true)
26610
26639
  ]),
26611
26640
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
26612
- createBaseVNode("div", _hoisted_4$l, [
26641
+ createBaseVNode("div", _hoisted_4$m, [
26613
26642
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
26614
26643
  return openBlock(), createBlock(_sfc_main$Y, {
26615
26644
  key: filter2.key + "_" + filter2.value,
@@ -26677,8 +26706,8 @@ and ensure you are accounting for this risk.
26677
26706
  };
26678
26707
  const _hoisted_2$B = { class: "lupa-category-back" };
26679
26708
  const _hoisted_3$s = ["href"];
26680
- const _hoisted_4$k = ["href"];
26681
- const _hoisted_5$d = { class: "lupa-child-category-list" };
26709
+ const _hoisted_4$l = ["href"];
26710
+ const _hoisted_5$e = { class: "lupa-child-category-list" };
26682
26711
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
26683
26712
  __name: "CategoryFilter",
26684
26713
  props: {
@@ -26784,9 +26813,9 @@ and ensure you are accounting for this risk.
26784
26813
  href: parentUrlLink.value,
26785
26814
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
26786
26815
  onClick: handleNavigationParent
26787
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
26816
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
26788
26817
  ], 2),
26789
- createBaseVNode("div", _hoisted_5$d, [
26818
+ createBaseVNode("div", _hoisted_5$e, [
26790
26819
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
26791
26820
  return openBlock(), createBlock(_sfc_main$W, {
26792
26821
  key: getCategoryKey(child),
@@ -26805,8 +26834,8 @@ and ensure you are accounting for this risk.
26805
26834
  };
26806
26835
  const _hoisted_2$A = ["placeholder"];
26807
26836
  const _hoisted_3$r = { class: "lupa-terms-list" };
26808
- const _hoisted_4$j = ["onClick"];
26809
- const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
26837
+ const _hoisted_4$k = ["onClick"];
26838
+ const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
26810
26839
  const _hoisted_6$8 = { class: "lupa-term-label" };
26811
26840
  const _hoisted_7$6 = {
26812
26841
  key: 0,
@@ -26921,7 +26950,7 @@ and ensure you are accounting for this risk.
26921
26950
  key: item.title,
26922
26951
  onClick: ($event) => handleFacetClick(item)
26923
26952
  }, [
26924
- createBaseVNode("div", _hoisted_5$c, [
26953
+ createBaseVNode("div", _hoisted_5$d, [
26925
26954
  createBaseVNode("span", {
26926
26955
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
26927
26956
  }, null, 2)
@@ -26932,7 +26961,7 @@ and ensure you are accounting for this risk.
26932
26961
  createBaseVNode("span", _hoisted_6$8, toDisplayString(getItemLabel(item)), 1),
26933
26962
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$6, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
26934
26963
  ], 2)
26935
- ], 10, _hoisted_4$j);
26964
+ ], 10, _hoisted_4$k);
26936
26965
  }), 128))
26937
26966
  ]),
26938
26967
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -27932,11 +27961,11 @@ and ensure you are accounting for this risk.
27932
27961
  key: 1,
27933
27962
  class: "lupa-stats-facet-summary-input"
27934
27963
  };
27935
- const _hoisted_4$i = {
27964
+ const _hoisted_4$j = {
27936
27965
  key: 0,
27937
27966
  class: "lupa-stats-range-label"
27938
27967
  };
27939
- const _hoisted_5$b = { class: "lupa-stats-from" };
27968
+ const _hoisted_5$c = { class: "lupa-stats-from" };
27940
27969
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
27941
27970
  const _hoisted_7$5 = { key: 0 };
27942
27971
  const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
@@ -28135,8 +28164,8 @@ and ensure you are accounting for this risk.
28135
28164
  return openBlock(), createElementBlock("div", _hoisted_1$N, [
28136
28165
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
28137
28166
  createBaseVNode("div", null, [
28138
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28139
- createBaseVNode("div", _hoisted_5$b, [
28167
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28168
+ createBaseVNode("div", _hoisted_5$c, [
28140
28169
  withDirectives(createBaseVNode("input", {
28141
28170
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
28142
28171
  type: "text",
@@ -28205,7 +28234,7 @@ and ensure you are accounting for this risk.
28205
28234
  key: 0,
28206
28235
  class: "lupa-term-count"
28207
28236
  };
28208
- const _hoisted_4$h = {
28237
+ const _hoisted_4$i = {
28209
28238
  key: 0,
28210
28239
  class: "lupa-facet-level"
28211
28240
  };
@@ -28274,7 +28303,7 @@ and ensure you are accounting for this risk.
28274
28303
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$p, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
28275
28304
  ], 2)
28276
28305
  ]),
28277
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
28306
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
28278
28307
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
28279
28308
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
28280
28309
  key: itemChild.title,
@@ -28807,8 +28836,8 @@ and ensure you are accounting for this risk.
28807
28836
  };
28808
28837
  const _hoisted_2$u = ["onClick"];
28809
28838
  const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
28810
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
28811
- const _hoisted_5$a = { class: "lupa-sidebar-title" };
28839
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
28840
+ const _hoisted_5$b = { class: "lupa-sidebar-title" };
28812
28841
  const _hoisted_6$6 = {
28813
28842
  key: 0,
28814
28843
  class: "lupa-sidebar-filter-count"
@@ -28851,8 +28880,8 @@ and ensure you are accounting for this risk.
28851
28880
  onClick: withModifiers(handleMobileToggle, ["stop"])
28852
28881
  }, null, 8, _hoisted_2$u),
28853
28882
  createBaseVNode("div", _hoisted_3$n, [
28854
- createBaseVNode("div", _hoisted_4$g, [
28855
- createBaseVNode("div", _hoisted_5$a, [
28883
+ createBaseVNode("div", _hoisted_4$h, [
28884
+ createBaseVNode("div", _hoisted_5$b, [
28856
28885
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
28857
28886
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28858
28887
  ]),
@@ -28879,7 +28908,7 @@ and ensure you are accounting for this risk.
28879
28908
  key: 1,
28880
28909
  class: "lupa-search-results-breadcrumb-text"
28881
28910
  };
28882
- const _hoisted_4$f = { key: 2 };
28911
+ const _hoisted_4$g = { key: 2 };
28883
28912
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
28884
28913
  __name: "SearchResultsBreadcrumbs",
28885
28914
  props: {
@@ -28921,7 +28950,7 @@ and ensure you are accounting for this risk.
28921
28950
  return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
28922
28951
  }
28923
28952
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
28924
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28953
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28925
28954
  ]);
28926
28955
  }), 128))
28927
28956
  ]);
@@ -29083,7 +29112,7 @@ and ensure you are accounting for this risk.
29083
29112
  class: "lupa-page-number-separator"
29084
29113
  };
29085
29114
  const _hoisted_3$l = ["onClick"];
29086
- const _hoisted_4$e = {
29115
+ const _hoisted_4$f = {
29087
29116
  key: 0,
29088
29117
  class: "lupa-page-number-separator"
29089
29118
  };
@@ -29189,7 +29218,7 @@ and ensure you are accounting for this risk.
29189
29218
  }, toDisplayString(page), 11, _hoisted_3$l);
29190
29219
  }), 128)),
29191
29220
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
29192
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
29221
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
29193
29222
  createBaseVNode("div", {
29194
29223
  class: "lupa-page-number lupa-page-number-last",
29195
29224
  onClick: _cache[2] || (_cache[2] = () => {
@@ -29214,8 +29243,8 @@ and ensure you are accounting for this risk.
29214
29243
  };
29215
29244
  const _hoisted_2$r = { id: "lupa-select" };
29216
29245
  const _hoisted_3$k = { class: "lupa-select-label" };
29217
- const _hoisted_4$d = ["aria-label"];
29218
- const _hoisted_5$9 = ["value"];
29246
+ const _hoisted_4$e = ["aria-label"];
29247
+ const _hoisted_5$a = ["value"];
29219
29248
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
29220
29249
  __name: "SearchResultsPageSize",
29221
29250
  props: {
@@ -29259,9 +29288,9 @@ and ensure you are accounting for this risk.
29259
29288
  return openBlock(), createElementBlock("option", {
29260
29289
  key: option,
29261
29290
  value: option
29262
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
29291
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
29263
29292
  }), 128))
29264
- ], 40, _hoisted_4$d)
29293
+ ], 40, _hoisted_4$e)
29265
29294
  ])
29266
29295
  ]);
29267
29296
  };
@@ -29273,8 +29302,8 @@ and ensure you are accounting for this risk.
29273
29302
  };
29274
29303
  const _hoisted_2$q = { id: "lupa-select" };
29275
29304
  const _hoisted_3$j = { class: "lupa-select-label" };
29276
- const _hoisted_4$c = ["aria-label"];
29277
- const _hoisted_5$8 = ["value"];
29305
+ const _hoisted_4$d = ["aria-label"];
29306
+ const _hoisted_5$9 = ["value"];
29278
29307
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
29279
29308
  __name: "SearchResultsSort",
29280
29309
  props: {
@@ -29339,9 +29368,9 @@ and ensure you are accounting for this risk.
29339
29368
  return openBlock(), createElementBlock("option", {
29340
29369
  key: option.key,
29341
29370
  value: option.key
29342
- }, toDisplayString(option.label), 9, _hoisted_5$8);
29371
+ }, toDisplayString(option.label), 9, _hoisted_5$9);
29343
29372
  }), 128))
29344
- ], 40, _hoisted_4$c), [
29373
+ ], 40, _hoisted_4$d), [
29345
29374
  [vModelSelect, selectedKey.value]
29346
29375
  ])
29347
29376
  ])
@@ -29355,8 +29384,8 @@ and ensure you are accounting for this risk.
29355
29384
  class: "lupa-toolbar-right-title"
29356
29385
  };
29357
29386
  const _hoisted_3$i = { key: 2 };
29358
- const _hoisted_4$b = { key: 4 };
29359
- const _hoisted_5$7 = { key: 6 };
29387
+ const _hoisted_4$c = { key: 4 };
29388
+ const _hoisted_5$8 = { key: 6 };
29360
29389
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
29361
29390
  const _hoisted_7$3 = {
29362
29391
  key: 0,
@@ -29483,13 +29512,13 @@ and ensure you are accounting for this risk.
29483
29512
  label: searchSummaryLabel.value,
29484
29513
  clearable: unref(hasAnyFilter) && showFilterClear.value,
29485
29514
  onClear: handleClearAll
29486
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
29515
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
29487
29516
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
29488
29517
  key: 5,
29489
29518
  options: paginationOptions.value.pageSelect,
29490
29519
  "last-page-label": paginationOptions.value.labels.showMore,
29491
29520
  "first-page-label": paginationOptions.value.labels.showLess
29492
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
29521
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
29493
29522
  ]),
29494
29523
  createBaseVNode("div", _hoisted_6$5, [
29495
29524
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
@@ -29536,8 +29565,8 @@ and ensure you are accounting for this risk.
29536
29565
  const _hoisted_1$w = ["title", "innerHTML"];
29537
29566
  const _hoisted_2$o = ["title"];
29538
29567
  const _hoisted_3$h = ["href", "innerHTML"];
29539
- const _hoisted_4$a = ["title"];
29540
- const _hoisted_5$6 = {
29568
+ const _hoisted_4$b = ["title"];
29569
+ const _hoisted_5$7 = {
29541
29570
  key: 0,
29542
29571
  class: "lupa-search-results-product-title-text"
29543
29572
  };
@@ -29597,14 +29626,14 @@ and ensure you are accounting for this risk.
29597
29626
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29598
29627
  title: title.value
29599
29628
  }, [
29600
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29629
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29601
29630
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
29602
29631
  key: 1,
29603
29632
  href: _ctx.link,
29604
29633
  class: "lupa-search-results-product-title-text lupa-title-link",
29605
29634
  onClick: handleNavigation
29606
29635
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
29607
- ], 12, _hoisted_4$a));
29636
+ ], 12, _hoisted_4$b));
29608
29637
  };
29609
29638
  }
29610
29639
  });
@@ -29647,8 +29676,8 @@ and ensure you are accounting for this risk.
29647
29676
  const _hoisted_1$u = { id: "lupa-search-results-rating" };
29648
29677
  const _hoisted_2$n = { class: "lupa-ratings" };
29649
29678
  const _hoisted_3$g = { class: "lupa-ratings-base" };
29650
- const _hoisted_4$9 = ["innerHTML"];
29651
- const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
29679
+ const _hoisted_4$a = ["innerHTML"];
29680
+ const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
29652
29681
  const _hoisted_6$3 = ["innerHTML"];
29653
29682
  const _hoisted_7$2 = ["href"];
29654
29683
  const STAR_COUNT = 5;
@@ -29697,10 +29726,10 @@ and ensure you are accounting for this risk.
29697
29726
  key: index,
29698
29727
  innerHTML: star,
29699
29728
  class: "lupa-rating lupa-rating-not-highlighted"
29700
- }, null, 8, _hoisted_4$9);
29729
+ }, null, 8, _hoisted_4$a);
29701
29730
  }), 128))
29702
29731
  ]),
29703
- createBaseVNode("div", _hoisted_5$5, [
29732
+ createBaseVNode("div", _hoisted_5$6, [
29704
29733
  createBaseVNode("div", {
29705
29734
  class: "lupa-ratings-highlighted",
29706
29735
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -29783,14 +29812,17 @@ and ensure you are accounting for this risk.
29783
29812
  });
29784
29813
  const _hoisted_1$s = { class: "lupa-search-results-add-to-cart-wrapper" };
29785
29814
  const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
29786
- const _hoisted_3$f = ["id", "disabled", "onClick"];
29815
+ const _hoisted_3$f = ["disabled"];
29816
+ const _hoisted_4$9 = ["href"];
29817
+ const _hoisted_5$5 = ["id", "disabled", "onClick"];
29787
29818
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
29788
29819
  __name: "SearchResultsProductAddToCart",
29789
29820
  props: {
29790
29821
  item: {},
29791
29822
  options: {},
29792
29823
  inStock: { type: Boolean },
29793
- dynamicAttributes: {}
29824
+ dynamicAttributes: {},
29825
+ link: {}
29794
29826
  },
29795
29827
  emits: ["productEvent"],
29796
29828
  setup(__props, { emit: emit2 }) {
@@ -29822,17 +29854,28 @@ and ensure you are accounting for this risk.
29822
29854
  emit2("productEvent", { type: "addToCart" });
29823
29855
  loading.value = false;
29824
29856
  });
29857
+ const hasLink = computed(() => {
29858
+ return Boolean(props.link && props.options.link);
29859
+ });
29825
29860
  return (_ctx, _cache) => {
29826
29861
  return openBlock(), createElementBlock("div", _hoisted_1$s, [
29827
29862
  createBaseVNode("div", _hoisted_2$m, [
29828
- createBaseVNode("button", mergeProps({
29863
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
29864
+ key: 0,
29865
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29866
+ "data-cy": "lupa-add-to-cart",
29867
+ disabled: !inStockValue.value || loading.value
29868
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
29869
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
29870
+ ], 16, _hoisted_3$f)) : (openBlock(), createElementBlock("button", mergeProps({
29871
+ key: 1,
29829
29872
  id: id.value,
29830
29873
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29831
29874
  "data-cy": "lupa-add-to-cart",
29832
29875
  disabled: !inStockValue.value || loading.value
29833
29876
  }, _ctx.dynamicAttributes, {
29834
29877
  onClick: withModifiers(handleClick, ["stop"])
29835
- }), toDisplayString(label.value), 17, _hoisted_3$f)
29878
+ }), toDisplayString(label.value), 17, _hoisted_5$5))
29836
29879
  ])
29837
29880
  ]);
29838
29881
  };
@@ -30845,7 +30888,7 @@ and ensure you are accounting for this risk.
30845
30888
  const searchResultStore = useSearchResultStore();
30846
30889
  const paramsStore = useParamsStore();
30847
30890
  const optionsStore = useOptionsStore();
30848
- const { searchResult } = storeToRefs(searchResultStore);
30891
+ const { searchResult, lastResultsSource } = storeToRefs(searchResultStore);
30849
30892
  const { searchResultOptions } = storeToRefs(optionsStore);
30850
30893
  const relatedQueries = ref([]);
30851
30894
  const allDisplayItems = ref({});
@@ -30871,8 +30914,12 @@ and ensure you are accounting for this risk.
30871
30914
  return filters;
30872
30915
  });
30873
30916
  watch(searchResult, () => __async2(this, null, function* () {
30917
+ var _a;
30874
30918
  allDisplayItems.value = {};
30875
30919
  querySourceResultMap.value = {};
30920
+ if (((_a = searchResult.value) == null ? void 0 : _a.searchText) === void 0 || lastResultsSource.value !== "items") {
30921
+ return;
30922
+ }
30876
30923
  if (!props.options || !searchResult.value) {
30877
30924
  relatedQueries.value = [];
30878
30925
  }
@@ -31532,7 +31579,7 @@ and ensure you are accounting for this risk.
31532
31579
  if (!res.success) {
31533
31580
  return;
31534
31581
  }
31535
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31582
+ searchResultStore.addPartial(requestId, __spreadValues2({}, res), "facets");
31536
31583
  }).catch((err) => {
31537
31584
  console.error(err);
31538
31585
  }).finally(() => {
@@ -31550,7 +31597,11 @@ and ensure you are accounting for this risk.
31550
31597
  if (!res.success) {
31551
31598
  return;
31552
31599
  }
31553
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31600
+ searchResultStore.addPartial(
31601
+ requestId,
31602
+ __spreadValues2({}, res),
31603
+ "refiners"
31604
+ );
31554
31605
  }).catch((err) => {
31555
31606
  console.error(err);
31556
31607
  }).finally(() => {