@nosto/search-js 3.1.1 → 3.2.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.
Files changed (138) hide show
  1. package/dist/BaseElement-Ds4INJSy.cjs +1 -0
  2. package/dist/BaseElement-fZSwbg09.js +17 -0
  3. package/dist/{InfiniteScrollWithObserver-B6k7NAW1.js → InfiniteScrollWithObserver-BsydJKFj.js} +61 -63
  4. package/dist/InfiniteScrollWithObserver-wzwXCrZ7.cjs +1 -0
  5. package/dist/baseConfig-CTN0CcW-.js +48 -0
  6. package/dist/baseConfig-KREDcxnC.cjs +1 -0
  7. package/dist/core/core.cjs.js +1 -1
  8. package/dist/core/core.es.js +6 -6
  9. package/dist/currencies/currencies.cjs.js +1 -1
  10. package/dist/currencies/currencies.es.js +32 -32
  11. package/dist/eventBusSubscribe-B75y7otR.cjs +1 -0
  12. package/dist/eventBusSubscribe-Cxw0xUAm.js +25 -0
  13. package/dist/{unique-m1TIDWdl.js → isBot-C58Y7eiv.js} +12 -36
  14. package/dist/{unique-Blp-K9zG.cjs → isBot-CheH1DcZ.cjs} +1 -1
  15. package/dist/preact/autocomplete/autocomplete.cjs.js +1 -0
  16. package/dist/preact/autocomplete/autocomplete.d.ts +5 -0
  17. package/dist/preact/autocomplete/autocomplete.es.js +49 -0
  18. package/dist/preact/{src/config/pages/autocomplete/config.d.ts → autocomplete/src/AutocompleteConfig.d.ts} +5 -5
  19. package/dist/preact/{src/config/pages/autocomplete/provider.d.ts → autocomplete/src/AutocompletePageProvider.d.ts} +2 -2
  20. package/dist/preact/{src → autocomplete/src}/components/AutocompleteElement.d.ts +2 -2
  21. package/dist/preact/category/category.cjs.js +1 -0
  22. package/dist/preact/category/category.d.ts +3 -0
  23. package/dist/preact/category/category.es.js +25 -0
  24. package/dist/preact/{src/config/pages/category/config.d.ts → category/src/CategoryConfig.d.ts} +5 -5
  25. package/dist/preact/{src/config/pages/category/provider.d.ts → category/src/CategoryPageProvider.d.ts} +2 -2
  26. package/dist/preact/common/common.cjs.js +1 -0
  27. package/dist/preact/{common.d.ts → common/common.d.ts} +3 -3
  28. package/dist/preact/{common.es.js → common/common.es.js} +6 -6
  29. package/dist/preact/{src → common/src}/actions/newSearch.d.ts +2 -2
  30. package/dist/preact/{src → common/src}/actions/replaceFilter.d.ts +1 -1
  31. package/dist/preact/{src → common/src}/actions/toggleProductFilter.d.ts +1 -1
  32. package/dist/preact/{src → common/src}/actions/updateSearch.d.ts +2 -2
  33. package/dist/preact/{src/search/defaults.d.ts → common/src/actions/withDefaultQuery.d.ts} +2 -4
  34. package/dist/preact/{src/config/base → common/src/config}/baseConfig.d.ts +1 -2
  35. package/dist/preact/common/src/config/config.d.ts +4 -0
  36. package/dist/preact/common/src/config/configContext.d.ts +6 -0
  37. package/dist/preact/common/src/store/components/StoreActionsListener.d.ts +1 -0
  38. package/dist/preact/{src/api → common/src}/types.d.ts +6 -0
  39. package/dist/preact/events/events.cjs.js +1 -0
  40. package/dist/preact/events/events.d.ts +3 -0
  41. package/dist/preact/events/events.es.js +23 -0
  42. package/dist/preact/events/src/eventBusDispatch.d.ts +10 -0
  43. package/dist/preact/events/src/eventBusSubscribe.d.ts +8 -0
  44. package/dist/preact/events/src/types.d.ts +26 -0
  45. package/dist/preact/hooks/hooks.cjs.js +1 -0
  46. package/dist/preact/hooks/hooks.d.ts +18 -0
  47. package/dist/preact/hooks/hooks.es.js +414 -0
  48. package/dist/preact/{src/hooks → hooks/src}/useNostoAppState.d.ts +1 -1
  49. package/dist/preact/legacy/legacy.cjs.js +1 -0
  50. package/dist/preact/legacy/legacy.d.ts +6 -0
  51. package/dist/preact/legacy/legacy.es.js +10 -0
  52. package/dist/preact/serp/serp.cjs.js +1 -0
  53. package/dist/preact/serp/serp.d.ts +4 -0
  54. package/dist/preact/serp/serp.es.js +39 -0
  55. package/dist/preact/{src/config/pages/serp/config.d.ts → serp/src/SerpConfig.d.ts} +5 -5
  56. package/dist/preact/{src/config/pages/serp/provider.d.ts → serp/src/SerpPageProvider.d.ts} +2 -2
  57. package/dist/preact/{src → serp/src}/components/SerpElement.d.ts +2 -2
  58. package/dist/search-DweKaGAI.js +162 -0
  59. package/dist/search-sG5OjNAe.cjs +1 -0
  60. package/dist/thumbnails/thumbnails.cjs.js +1 -1
  61. package/dist/thumbnails/thumbnails.es.js +26 -27
  62. package/dist/unique-3gEanSFU.cjs +1 -0
  63. package/dist/unique-DxrT0M20.js +39 -0
  64. package/dist/useActions-B-wWOcHo.cjs +1 -0
  65. package/dist/useActions-BIIcXXS6.js +229 -0
  66. package/dist/useLoadMore-BWgWw24W.cjs +1 -0
  67. package/dist/useLoadMore-Dw7GDu8a.js +31 -0
  68. package/dist/utils/utils.cjs.js +1 -1
  69. package/dist/utils/utils.es.js +24 -24
  70. package/package.json +45 -39
  71. package/dist/BaseElement-B0hSjDTT.cjs +0 -1
  72. package/dist/BaseElement-IyqEeIiJ.js +0 -18
  73. package/dist/InfiniteScrollWithObserver-DtlqmHSY.cjs +0 -1
  74. package/dist/baseConfig-BFFqFSg5.cjs +0 -1
  75. package/dist/baseConfig-Bafl02NY.js +0 -21
  76. package/dist/configContext-BR7w4VlU.cjs +0 -1
  77. package/dist/configContext-GuZOIX3o.js +0 -63
  78. package/dist/deepMerge-CZwCJzEe.js +0 -17
  79. package/dist/deepMerge-lDscDfII.cjs +0 -1
  80. package/dist/preact/autocomplete.cjs.js +0 -1
  81. package/dist/preact/autocomplete.d.ts +0 -5
  82. package/dist/preact/autocomplete.es.js +0 -46
  83. package/dist/preact/category.cjs.js +0 -1
  84. package/dist/preact/category.d.ts +0 -3
  85. package/dist/preact/category.es.js +0 -22
  86. package/dist/preact/common.cjs.js +0 -1
  87. package/dist/preact/hooks.cjs.js +0 -1
  88. package/dist/preact/hooks.d.ts +0 -18
  89. package/dist/preact/hooks.es.js +0 -453
  90. package/dist/preact/legacy.cjs.js +0 -1
  91. package/dist/preact/legacy.d.ts +0 -6
  92. package/dist/preact/legacy.es.js +0 -9
  93. package/dist/preact/preact.d.ts +0 -30
  94. package/dist/preact/serp.cjs.js +0 -1
  95. package/dist/preact/serp.d.ts +0 -4
  96. package/dist/preact/serp.es.js +0 -36
  97. package/dist/preact/src/actions/types.d.ts +0 -6
  98. package/dist/preact/src/config/config.d.ts +0 -4
  99. package/dist/preact/src/config/configContext.d.ts +0 -6
  100. package/dist/search-Bhebxu8K.cjs +0 -1
  101. package/dist/search-BrR80UbS.js +0 -164
  102. package/dist/useLoadMore-CeqFdxt1.cjs +0 -1
  103. package/dist/useLoadMore-FglaJn2W.js +0 -204
  104. /package/dist/preact/{src → autocomplete/src}/components/SearchInput.d.ts +0 -0
  105. /package/dist/preact/{src/components → autocomplete/src}/types.d.ts +0 -0
  106. /package/dist/preact/{src → common/src}/components/BaseElement.d.ts +0 -0
  107. /package/dist/preact/{src → common/src}/components/InfiniteScroll/InfiniteScroll.d.ts +0 -0
  108. /package/dist/preact/{src → common/src}/components/InfiniteScroll/InfiniteScrollWithLink.d.ts +0 -0
  109. /package/dist/preact/{src → common/src}/components/InfiniteScroll/InfiniteScrollWithObserver.d.ts +0 -0
  110. /package/dist/preact/{src → common/src}/components/InfiniteScroll/LoadMoreLink.d.ts +0 -0
  111. /package/dist/preact/{src → common/src}/components/InfiniteScroll/utils.d.ts +0 -0
  112. /package/dist/preact/{src → common/src/store}/store.d.ts +0 -0
  113. /package/dist/preact/{src → common/src/store}/storeContext.d.ts +0 -0
  114. /package/dist/preact/{src → common/src/store}/storeExtensions.d.ts +0 -0
  115. /package/dist/preact/{src/hooks → hooks/src}/types.d.ts +0 -0
  116. /package/dist/preact/{src/hooks → hooks/src}/useActions.d.ts +0 -0
  117. /package/dist/preact/{src/hooks → hooks/src}/useCheckClientScript.d.ts +0 -0
  118. /package/dist/preact/{src/hooks → hooks/src}/useDecoratedSearchResults.d.ts +0 -0
  119. /package/dist/preact/{src/hooks → hooks/src}/useFacet.d.ts +0 -0
  120. /package/dist/preact/{src/hooks → hooks/src}/useFacets.d.ts +0 -0
  121. /package/dist/preact/{src/hooks → hooks/src}/useLoadMore/getNextPageQuery.d.ts +0 -0
  122. /package/dist/preact/{src/hooks → hooks/src}/useLoadMore/useLoadMore.d.ts +0 -0
  123. /package/dist/preact/{src/hooks → hooks/src}/usePagination.d.ts +0 -0
  124. /package/dist/preact/{src/hooks → hooks/src}/usePersonalization.d.ts +0 -0
  125. /package/dist/preact/{src/hooks → hooks/src}/useProductFilters/useProductFilters.d.ts +0 -0
  126. /package/dist/preact/{src/hooks → hooks/src}/useProductFilters/useProductFiltersUtils.d.ts +0 -0
  127. /package/dist/preact/{src/hooks → hooks/src}/useRange.d.ts +0 -0
  128. /package/dist/preact/{src/hooks → hooks/src}/useRangeSelector.d.ts +0 -0
  129. /package/dist/preact/{src/hooks → hooks/src}/useResponse.d.ts +0 -0
  130. /package/dist/preact/{src/hooks → hooks/src}/useSelectedFiltersCount.d.ts +0 -0
  131. /package/dist/preact/{src/hooks → hooks/src}/useSizeOptions.d.ts +0 -0
  132. /package/dist/preact/{src/hooks → hooks/src}/useSort/useSort.d.ts +0 -0
  133. /package/dist/preact/{src/hooks → hooks/src}/useSort/utils.d.ts +0 -0
  134. /package/dist/preact/{src/hooks → hooks/src}/useSpeechToText.d.ts +0 -0
  135. /package/dist/preact/{src/hooks → hooks/src}/useSwatches/aggregateSwatches.d.ts +0 -0
  136. /package/dist/preact/{src/hooks → hooks/src}/useSwatches/applySelectionStates.d.ts +0 -0
  137. /package/dist/preact/{src/hooks → hooks/src}/useSwatches/sortOptions.d.ts +0 -0
  138. /package/dist/preact/{src/hooks → hooks/src}/useSwatches/useSwatches.d.ts +0 -0
@@ -0,0 +1 @@
1
+ "use strict";const n=require("./jsxRuntime.module-B3sGoTIU.cjs"),r=require("preact/hooks");function c({onClick:s,as:u,children:i,componentProps:e}){const t={...e,onClick:r.useCallback(l=>{s(),e?.onClick?.(l)},[s,e])},a=u??(e&&"href"in e?"a":"span");return n.u(a,{...t,children:i})}exports.BaseElement=c;
@@ -0,0 +1,17 @@
1
+ import { u as e } from "./jsxRuntime.module-Bzuv3cXw.js";
2
+ import { useCallback as s } from "preact/hooks";
3
+ function m({ onClick: i, as: r, children: f, componentProps: a }) {
4
+ const l = {
5
+ ...a,
6
+ onClick: s(
7
+ (u) => {
8
+ i(), a?.onClick?.(u);
9
+ },
10
+ [i, a]
11
+ )
12
+ }, t = r ?? (a && "href" in a ? "a" : "span");
13
+ return /* @__PURE__ */ e(t, { ...l, children: f });
14
+ }
15
+ export {
16
+ m as B
17
+ };
@@ -1,37 +1,44 @@
1
- import { u as b } from "./jsxRuntime.module-Bzuv3cXw.js";
2
- import { b as U, a as I } from "./useLoadMore-FglaJn2W.js";
3
- import { i as A } from "./logger-DVwg4Wor.js";
4
- import { p as M } from "./pick-DReBictn.js";
5
- import { Component as c, options as l, createElement as d, Fragment as h, toChildArray as m } from "preact";
6
- import { useRef as W, useEffect as V } from "preact/hooks";
1
+ import { u as y } from "./jsxRuntime.module-Bzuv3cXw.js";
2
+ import { a as x, u as U } from "./useLoadMore-Dw7GDu8a.js";
3
+ import { i as I } from "./logger-DVwg4Wor.js";
4
+ import { p as A } from "./pick-DReBictn.js";
5
+ import { Component as c, options as l, createElement as v, Fragment as d, toChildArray as h } from "preact";
6
+ import { useRef as M, useEffect as W } from "preact/hooks";
7
+ function V(e, r) {
8
+ const t = r.products?.total ?? 0, o = e.products?.from ?? 0, n = e.products?.size ?? 0;
9
+ return t > 0 && t > o + n;
10
+ }
11
+ function ne() {
12
+ return !!(window.IntersectionObserver && window.IntersectionObserverEntry && "intersectionRatio" in window.IntersectionObserverEntry.prototype);
13
+ }
7
14
  function H(e, r) {
8
15
  for (var t in r) e[t] = r[t];
9
16
  return e;
10
17
  }
11
- function y(e, r) {
18
+ function m(e, r) {
12
19
  for (var t in e) if (t !== "__source" && !(t in r)) return !0;
13
20
  for (var o in r) if (o !== "__source" && e[o] !== r[o]) return !0;
14
21
  return !1;
15
22
  }
16
- function g(e, r) {
23
+ function b(e, r) {
17
24
  this.props = e, this.context = r;
18
25
  }
19
26
  function j(e, r) {
20
27
  function t(n) {
21
28
  var i = this.props.ref, u = i == n.ref;
22
- return !u && i && (i.call ? i(null) : i.current = null), r ? !r(this.props, n) || !u : y(this.props, n);
29
+ return !u && i && (i.call ? i(null) : i.current = null), r ? !r(this.props, n) || !u : m(this.props, n);
23
30
  }
24
31
  function o(n) {
25
- return this.shouldComponentUpdate = t, d(e, n);
32
+ return this.shouldComponentUpdate = t, v(e, n);
26
33
  }
27
34
  return o.displayName = "Memo(" + (e.displayName || e.name) + ")", o.prototype.isReactComponent = !0, o.__f = !0, o;
28
35
  }
29
- (g.prototype = new c()).isPureReactComponent = !0, g.prototype.shouldComponentUpdate = function(e, r) {
30
- return y(this.props, e) || y(this.state, r);
36
+ (b.prototype = new c()).isPureReactComponent = !0, b.prototype.shouldComponentUpdate = function(e, r) {
37
+ return m(this.props, e) || m(this.state, r);
31
38
  };
32
- var k = l.__b;
39
+ var g = l.__b;
33
40
  l.__b = function(e) {
34
- e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), k && k(e);
41
+ e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), g && g(e);
35
42
  };
36
43
  var z = l.__e;
37
44
  l.__e = function(e, r, t, o) {
@@ -40,23 +47,23 @@ l.__e = function(e, r, t, o) {
40
47
  }
41
48
  z(e, r, t, o);
42
49
  };
43
- var O = l.unmount;
44
- function C(e, r, t) {
50
+ var k = l.unmount;
51
+ function S(e, r, t) {
45
52
  return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(o) {
46
53
  typeof o.__c == "function" && o.__c();
47
54
  }), e.__c.__H = null), (e = H({}, e)).__c != null && (e.__c.__P === t && (e.__c.__P = r), e.__c = null), e.__k = e.__k && e.__k.map(function(o) {
48
- return C(o, r, t);
55
+ return S(o, r, t);
49
56
  })), e;
50
57
  }
51
- function N(e, r, t) {
58
+ function C(e, r, t) {
52
59
  return e && t && (e.__v = null, e.__k = e.__k && e.__k.map(function(o) {
53
- return N(o, r, t);
60
+ return C(o, r, t);
54
61
  }), e.__c && e.__c.__P === r && (e.__e && t.appendChild(e.__e), e.__c.__e = !0, e.__c.__P = t)), e;
55
62
  }
56
- function v() {
63
+ function p() {
57
64
  this.__u = 0, this.o = null, this.__b = null;
58
65
  }
59
- function x(e) {
66
+ function N(e) {
60
67
  var r = e.__.__c;
61
68
  return r && r.__a && r.__a(e);
62
69
  }
@@ -65,11 +72,11 @@ function f() {
65
72
  }
66
73
  l.unmount = function(e) {
67
74
  var r = e.__c;
68
- r && r.__R && r.__R(), r && 32 & e.__u && (e.type = null), O && O(e);
69
- }, (v.prototype = new c()).__c = function(e, r) {
75
+ r && r.__R && r.__R(), r && 32 & e.__u && (e.type = null), k && k(e);
76
+ }, (p.prototype = new c()).__c = function(e, r) {
70
77
  var t = r.__c, o = this;
71
78
  o.o == null && (o.o = []), o.o.push(t);
72
- var n = x(o.__v), i = !1, u = function() {
79
+ var n = N(o.__v), i = !1, u = function() {
73
80
  i || (i = !0, t.__R = null, n ? n(_) : _());
74
81
  };
75
82
  t.__R = u;
@@ -77,27 +84,27 @@ l.unmount = function(e) {
77
84
  if (!--o.__u) {
78
85
  if (o.state.__a) {
79
86
  var a = o.state.__a;
80
- o.__v.__k[0] = N(a, a.__c.__P, a.__c.__O);
87
+ o.__v.__k[0] = C(a, a.__c.__P, a.__c.__O);
81
88
  }
82
89
  var s;
83
90
  for (o.setState({ __a: o.__b = null }); s = o.o.pop(); ) s.forceUpdate();
84
91
  }
85
92
  };
86
93
  o.__u++ || 32 & r.__u || o.setState({ __a: o.__b = o.__v.__k[0] }), e.then(u, u);
87
- }, v.prototype.componentWillUnmount = function() {
94
+ }, p.prototype.componentWillUnmount = function() {
88
95
  this.o = [];
89
- }, v.prototype.render = function(e, r) {
96
+ }, p.prototype.render = function(e, r) {
90
97
  if (this.__b) {
91
98
  if (this.__v.__k) {
92
99
  var t = document.createElement("div"), o = this.__v.__k[0].__c;
93
- this.__v.__k[0] = C(this.__b, t, o.__O = o.__P);
100
+ this.__v.__k[0] = S(this.__b, t, o.__O = o.__P);
94
101
  }
95
102
  this.__b = null;
96
103
  }
97
- var n = r.__a && d(h, null, e.fallback);
98
- return n && (n.__u &= -33), [d(h, null, r.__a ? null : e.children), n];
104
+ var n = r.__a && v(d, null, e.fallback);
105
+ return n && (n.__u &= -33), [v(d, null, r.__a ? null : e.children), n];
99
106
  };
100
- var w = function(e, r, t) {
107
+ var O = function(e, r, t) {
101
108
  if (++t[1] === t[0] && e.l.delete(r), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.l.size)) for (t = e.i; t; ) {
102
109
  for (; t.length > 3; ) t.pop()();
103
110
  if (t[1] < t[0]) break;
@@ -105,23 +112,23 @@ var w = function(e, r, t) {
105
112
  }
106
113
  };
107
114
  (f.prototype = new c()).__a = function(e) {
108
- var r = this, t = x(r.__v), o = r.l.get(e);
115
+ var r = this, t = N(r.__v), o = r.l.get(e);
109
116
  return o[0]++, function(n) {
110
117
  var i = function() {
111
- r.props.revealOrder ? (o.push(n), w(r, e, o)) : n();
118
+ r.props.revealOrder ? (o.push(n), O(r, e, o)) : n();
112
119
  };
113
120
  t ? t(i) : i();
114
121
  };
115
122
  }, f.prototype.render = function(e) {
116
123
  this.i = null, this.l = /* @__PURE__ */ new Map();
117
- var r = m(e.children);
124
+ var r = h(e.children);
118
125
  e.revealOrder && e.revealOrder[0] === "b" && r.reverse();
119
126
  for (var t = r.length; t--; ) this.l.set(r[t], this.i = [1, 0, this.i]);
120
127
  return e.children;
121
128
  }, f.prototype.componentDidUpdate = f.prototype.componentDidMount = function() {
122
129
  var e = this;
123
130
  this.l.forEach(function(r, t) {
124
- w(e, t, r);
131
+ O(e, t, r);
125
132
  });
126
133
  };
127
134
  var B = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, L = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, q = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, D = /[A-Z0-9]/g, F = typeof document < "u", T = function(e) {
@@ -134,7 +141,7 @@ c.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveP
134
141
  Object.defineProperty(this, e, { configurable: !0, writable: !0, value: r });
135
142
  } });
136
143
  });
137
- var P = l.event;
144
+ var w = l.event;
138
145
  function $() {
139
146
  }
140
147
  function Z() {
@@ -144,11 +151,11 @@ function G() {
144
151
  return this.defaultPrevented;
145
152
  }
146
153
  l.event = function(e) {
147
- return P && (e = P(e)), e.persist = $, e.isPropagationStopped = Z, e.isDefaultPrevented = G, e.nativeEvent = e;
154
+ return w && (e = w(e)), e.persist = $, e.isPropagationStopped = Z, e.isDefaultPrevented = G, e.nativeEvent = e;
148
155
  };
149
156
  var J = { enumerable: !1, configurable: !0, get: function() {
150
157
  return this.class;
151
- } }, E = l.vnode;
158
+ } }, P = l.vnode;
152
159
  l.vnode = function(e) {
153
160
  typeof e.type == "string" && function(r) {
154
161
  var t = r.props, o = r.type, n = {}, i = o.indexOf("-") === -1;
@@ -159,49 +166,40 @@ l.vnode = function(e) {
159
166
  u === "defaultValue" && "value" in t && t.value == null ? u = "value" : u === "download" && _ === !0 ? _ = "" : a === "translate" && _ === "no" ? _ = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? u = "ondblclick" : a !== "onchange" || o !== "input" && o !== "textarea" || T(t.type) ? a === "onfocus" ? u = "onfocusin" : a === "onblur" ? u = "onfocusout" : q.test(u) && (u = a) : a = u = "oninput" : i && L.test(u) ? u = u.replace(D, "-$&").toLowerCase() : _ === null && (_ = void 0), a === "oninput" && n[u = a] && (u = "oninputCapture"), n[u] = _;
160
167
  }
161
168
  }
162
- o == "select" && n.multiple && Array.isArray(n.value) && (n.value = m(t.children).forEach(function(s) {
169
+ o == "select" && n.multiple && Array.isArray(n.value) && (n.value = h(t.children).forEach(function(s) {
163
170
  s.props.selected = n.value.indexOf(s.props.value) != -1;
164
- })), o == "select" && n.defaultValue != null && (n.value = m(t.children).forEach(function(s) {
171
+ })), o == "select" && n.defaultValue != null && (n.value = h(t.children).forEach(function(s) {
165
172
  s.props.selected = n.multiple ? n.defaultValue.indexOf(s.props.value) != -1 : n.defaultValue == s.props.value;
166
173
  })), t.class && !t.className ? (n.class = t.class, Object.defineProperty(n, "className", J)) : (t.className && !t.class || t.class && t.className) && (n.class = n.className = t.className), r.props = n;
167
- }(e), e.$$typeof = B, E && E(e);
174
+ }(e), e.$$typeof = B, P && P(e);
168
175
  };
169
- var R = l.__r;
176
+ var E = l.__r;
170
177
  l.__r = function(e) {
171
- R && R(e), e.__c;
178
+ E && E(e), e.__c;
172
179
  };
173
- var S = l.diffed;
180
+ var R = l.diffed;
174
181
  l.diffed = function(e) {
175
- S && S(e);
182
+ R && R(e);
176
183
  var r = e.props, t = e.__e;
177
184
  t != null && e.type === "textarea" && "value" in r && r.value !== t.value && (t.value = r.value == null ? "" : r.value);
178
185
  };
179
- function K(e, r) {
180
- var i, u, _;
181
- const t = ((i = r.products) == null ? void 0 : i.total) ?? 0, o = ((u = e.products) == null ? void 0 : u.from) ?? 0, n = ((_ = e.products) == null ? void 0 : _.size) ?? 0;
182
- return t > 0 && t > o + n;
183
- }
184
- function ne() {
185
- return !!(window.IntersectionObserver && window.IntersectionObserverEntry && "intersectionRatio" in window.IntersectionObserverEntry.prototype);
186
- }
187
- function Q({ children: e, pageSize: r, observerOptions: t }) {
188
- const o = W(null), { query: n, response: i } = U((_) => M(_, "query", "response")), { loadMore: u } = I(r);
189
- return V(() => {
186
+ function K({ children: e, pageSize: r, observerOptions: t }) {
187
+ const o = M(null), { query: n, response: i } = x((_) => A(_, "query", "response")), { loadMore: u } = U(r);
188
+ return W(() => {
190
189
  let _, a;
191
- return K(n, i) && (_ = o.current, a = new IntersectionObserver((s) => {
192
- const p = s[0];
193
- p != null && p.isIntersecting && u();
190
+ return V(n, i) && (_ = o.current, a = new IntersectionObserver((s) => {
191
+ s[0]?.isIntersecting && u();
194
192
  }, t), _ && a.observe(_)), () => {
195
193
  _ && a.unobserve(_);
196
194
  };
197
- }, [i]), /* @__PURE__ */ b(h, { children: [
195
+ }, [i]), /* @__PURE__ */ y(d, { children: [
198
196
  e,
199
- /* @__PURE__ */ b("div", { ref: o, style: { height: "1px" } })
197
+ /* @__PURE__ */ y("div", { ref: o, style: { height: "1px" } })
200
198
  ] });
201
199
  }
202
- const ue = j(Q, A);
200
+ const ue = j(K, I);
203
201
  export {
204
202
  ue as I,
205
- K as h,
203
+ V as h,
206
204
  ne as i
207
205
  };
@@ -0,0 +1 @@
1
+ "use strict";const v=require("./jsxRuntime.module-B3sGoTIU.cjs"),d=require("./useLoadMore-BWgWw24W.cjs"),N=require("./logger-BcHMZObS.cjs"),x=require("./pick-rYi1lc2m.cjs"),u=require("preact"),h=require("preact/hooks");function E(e,r){const t=r.products?.total??0,o=e.products?.from??0,n=e.products?.size??0;return t>0&&t>o+n}function A(){return!!(window.IntersectionObserver&&window.IntersectionObserverEntry&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)}function M(e,r){for(var t in r)e[t]=r[t];return e}function f(e,r){for(var t in e)if(t!=="__source"&&!(t in r))return!0;for(var o in r)if(o!=="__source"&&e[o]!==r[o])return!0;return!1}function m(e,r){this.props=e,this.context=r}function U(e,r){function t(n){var s=this.props.ref,i=s==n.ref;return!i&&s&&(s.call?s(null):s.current=null),r?!r(this.props,n)||!i:f(this.props,n)}function o(n){return this.shouldComponentUpdate=t,u.createElement(e,n)}return o.displayName="Memo("+(e.displayName||e.name)+")",o.prototype.isReactComponent=!0,o.__f=!0,o}(m.prototype=new u.Component).isPureReactComponent=!0,m.prototype.shouldComponentUpdate=function(e,r){return f(this.props,e)||f(this.state,r)};var y=u.options.__b;u.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),y&&y(e)};var q=u.options.__e;u.options.__e=function(e,r,t,o){if(e.then){for(var n,s=r;s=s.__;)if((n=s.__c)&&n.__c)return r.__e==null&&(r.__e=t.__e,r.__k=t.__k),n.__c(e,r)}q(e,r,t,o)};var b=u.options.unmount;function P(e,r,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(o){typeof o.__c=="function"&&o.__c()}),e.__c.__H=null),(e=M({},e)).__c!=null&&(e.__c.__P===t&&(e.__c.__P=r),e.__c=null),e.__k=e.__k&&e.__k.map(function(o){return P(o,r,t)})),e}function R(e,r,t){return e&&t&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(o){return R(o,r,t)}),e.__c&&e.__c.__P===r&&(e.__e&&t.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=t)),e}function p(){this.__u=0,this.o=null,this.__b=null}function S(e){var r=e.__.__c;return r&&r.__a&&r.__a(e)}function c(){this.i=null,this.l=null}u.options.unmount=function(e){var r=e.__c;r&&r.__R&&r.__R(),r&&32&e.__u&&(e.type=null),b&&b(e)},(p.prototype=new u.Component).__c=function(e,r){var t=r.__c,o=this;o.o==null&&(o.o=[]),o.o.push(t);var n=S(o.__v),s=!1,i=function(){s||(s=!0,t.__R=null,n?n(_):_())};t.__R=i;var _=function(){if(!--o.__u){if(o.state.__a){var l=o.state.__a;o.__v.__k[0]=R(l,l.__c.__P,l.__c.__O)}var a;for(o.setState({__a:o.__b=null});a=o.o.pop();)a.forceUpdate()}};o.__u++||32&r.__u||o.setState({__a:o.__b=o.__v.__k[0]}),e.then(i,i)},p.prototype.componentWillUnmount=function(){this.o=[]},p.prototype.render=function(e,r){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=P(this.__b,t,o.__O=o.__P)}this.__b=null}var n=r.__a&&u.createElement(u.Fragment,null,e.fallback);return n&&(n.__u&=-33),[u.createElement(u.Fragment,null,r.__a?null:e.children),n]};var g=function(e,r,t){if(++t[1]===t[0]&&e.l.delete(r),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(t=e.i;t;){for(;t.length>3;)t.pop()();if(t[1]<t[0])break;e.i=t=t[2]}};(c.prototype=new u.Component).__a=function(e){var r=this,t=S(r.__v),o=r.l.get(e);return o[0]++,function(n){var s=function(){r.props.revealOrder?(o.push(n),g(r,e,o)):n()};t?t(s):s()}},c.prototype.render=function(e){this.i=null,this.l=new Map;var r=u.toChildArray(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&r.reverse();for(var t=r.length;t--;)this.l.set(r[t],this.i=[1,0,this.i]);return e.children},c.prototype.componentDidUpdate=c.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(r,t){g(e,t,r)})};var I=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,W=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,V=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,j=/[A-Z0-9]/g,F=typeof document<"u",H=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};u.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(u.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(r){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:r})}})});var k=u.options.event;function L(){}function z(){return this.cancelBubble}function B(){return this.defaultPrevented}u.options.event=function(e){return k&&(e=k(e)),e.persist=L,e.isPropagationStopped=z,e.isDefaultPrevented=B,e.nativeEvent=e};var D={enumerable:!1,configurable:!0,get:function(){return this.class}},O=u.options.vnode;u.options.vnode=function(e){typeof e.type=="string"&&function(r){var t=r.props,o=r.type,n={},s=o.indexOf("-")===-1;for(var i in t){var _=t[i];if(!(i==="value"&&"defaultValue"in t&&_==null||F&&i==="children"&&o==="noscript"||i==="class"||i==="className")){var l=i.toLowerCase();i==="defaultValue"&&"value"in t&&t.value==null?i="value":i==="download"&&_===!0?_="":l==="translate"&&_==="no"?_=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?i="ondblclick":l!=="onchange"||o!=="input"&&o!=="textarea"||H(t.type)?l==="onfocus"?i="onfocusin":l==="onblur"?i="onfocusout":V.test(i)&&(i=l):l=i="oninput":s&&W.test(i)?i=i.replace(j,"-$&").toLowerCase():_===null&&(_=void 0),l==="oninput"&&n[i=l]&&(i="oninputCapture"),n[i]=_}}o=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=u.toChildArray(t.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),o=="select"&&n.defaultValue!=null&&(n.value=u.toChildArray(t.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",D)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),r.props=n}(e),e.$$typeof=I,O&&O(e)};var C=u.options.__r;u.options.__r=function(e){C&&C(e),e.__c};var w=u.options.diffed;u.options.diffed=function(e){w&&w(e);var r=e.props,t=e.__e;t!=null&&e.type==="textarea"&&"value"in r&&r.value!==t.value&&(t.value=r.value==null?"":r.value)};function T({children:e,pageSize:r,observerOptions:t}){const o=h.useRef(null),{query:n,response:s}=d.useNostoAppState(_=>x.pick(_,"query","response")),{loadMore:i}=d.useLoadMore(r);return h.useEffect(()=>{let _,l;return E(n,s)&&(_=o.current,l=new IntersectionObserver(a=>{a[0]?.isIntersecting&&i()},t),_&&l.observe(_)),()=>{_&&l.unobserve(_)}},[s]),v.u(u.Fragment,{children:[e,v.u("div",{ref:o,style:{height:"1px"}})]})}const $=U(T,N.isEqual);exports.InfiniteScrollWithObserver=$;exports.hasMoreResults=E;exports.intersectionObserverSupported=A;
@@ -0,0 +1,48 @@
1
+ import { e as i, b as n } from "./useActions-BIIcXXS6.js";
2
+ import { u as r } from "./eventBusSubscribe-Cxw0xUAm.js";
3
+ import { s as c } from "./index.es-B8mbAxS4.js";
4
+ import { l as u } from "./logger-DVwg4Wor.js";
5
+ import { useEffect as l } from "preact/hooks";
6
+ function S() {
7
+ const { pageType: t } = i(), o = n();
8
+ return r({
9
+ event: "actions/newSearch",
10
+ callback: (e) => {
11
+ t === e.targetStore && o.newSearch(e.query, e.options);
12
+ }
13
+ }), r({
14
+ event: "actions/updateSearch",
15
+ callback: (e) => {
16
+ t === e.targetStore && o.updateSearch(e.query, e.options);
17
+ }
18
+ }), r({
19
+ event: "actions/replaceFilter",
20
+ callback: (e) => {
21
+ t === e.targetStore && o.replaceFilter(e.field, e.value);
22
+ }
23
+ }), r({
24
+ event: "actions/toggleProductFilter",
25
+ callback: (e) => {
26
+ t === e.targetStore && o.toggleProductFilter(e.field, e.value, e.active);
27
+ }
28
+ }), null;
29
+ }
30
+ function v() {
31
+ l(() => {
32
+ const t = window.setTimeout(() => {
33
+ u.error("Nosto client script has not loaded after 3 seconds.");
34
+ }, 3e3);
35
+ c(() => {
36
+ window.clearTimeout(t);
37
+ });
38
+ }, []);
39
+ }
40
+ const b = {
41
+ defaultCurrency: "EUR",
42
+ queryModifications: (t) => t
43
+ };
44
+ export {
45
+ S,
46
+ b as d,
47
+ v as u
48
+ };
@@ -0,0 +1 @@
1
+ "use strict";const i=require("./useActions-B-wWOcHo.cjs"),r=require("./eventBusSubscribe-B75y7otR.cjs"),c=require("./index.es-DlUp67LT.cjs"),o=require("./logger-BcHMZObS.cjs"),u=require("preact/hooks");function s(){const{pageType:t}=i.useConfig(),n=i.useActions();return r.useEventBusSubscribe({event:"actions/newSearch",callback:e=>{t===e.targetStore&&n.newSearch(e.query,e.options)}}),r.useEventBusSubscribe({event:"actions/updateSearch",callback:e=>{t===e.targetStore&&n.updateSearch(e.query,e.options)}}),r.useEventBusSubscribe({event:"actions/replaceFilter",callback:e=>{t===e.targetStore&&n.replaceFilter(e.field,e.value)}}),r.useEventBusSubscribe({event:"actions/toggleProductFilter",callback:e=>{t===e.targetStore&&n.toggleProductFilter(e.field,e.value,e.active)}}),null}function l(){u.useEffect(()=>{const t=window.setTimeout(()=>{o.logger.error("Nosto client script has not loaded after 3 seconds.")},3e3);c.s(()=>{window.clearTimeout(t)})},[])}const a={defaultCurrency:"EUR",queryModifications:t=>t};exports.StoreActionsListener=s;exports.defaultBaseConfig=a;exports.useCheckClientScript=l;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.es-DlUp67LT.cjs"),o=require("../search-Bhebxu8K.cjs");async function d(r,a,t=1){await e.L(a,void 0,t),await e.s(async c=>await c.recordSearchAddToCart(r,a))}exports.search=o.search;exports.addToCart=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index.es-DlUp67LT.cjs"),o=require("../search-sG5OjNAe.cjs");async function i(r,a,t=1){await e.L(a,void 0,t),await(await new Promise(e.s)).recordSearchAddToCart(r,a)}exports.search=o.search;exports.addToCart=i;
@@ -1,9 +1,9 @@
1
- import { L as c, s as d } from "../index.es-B8mbAxS4.js";
2
- import { s as f } from "../search-BrR80UbS.js";
3
- async function e(r, a, o = 1) {
4
- await c(a, void 0, o), await d(async (t) => await t.recordSearchAddToCart(r, a));
1
+ import { L as t, s as i } from "../index.es-B8mbAxS4.js";
2
+ import { s as p } from "../search-DweKaGAI.js";
3
+ async function c(o, a, r = 1) {
4
+ await t(a, void 0, r), await (await new Promise(i)).recordSearchAddToCart(o, a);
5
5
  }
6
6
  export {
7
- e as addToCart,
8
- f as search
7
+ c as addToCart,
8
+ p as search
9
9
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../index.es-DlUp67LT.cjs"),g={defaultCurrency:"EUR",defaultLocale:"en-US",currencySettings:{}},p={EUR:"de-DE",GBP:"en-GB",USD:"en-US",AUD:"en-AU",CAD:"en-CA",INR:"en-IN",AFN:"en-IN",BDT:"en-IN",BTN:"en-IN",MMK:"en-IN",NPR:"en-IN",PKR:"en-IN"};function y(u={}){const o={...g,...u};u.currencySettings||d.s(c=>{o.currencySettings=c.internal.getSettings().currencySettings??{}});function a(c,n){const{defaultCurrency:t,currencySettings:r,defaultLocale:i}=o,s=n??t,f=p[s]??i;if(s in r){const e=r[s],l=new Intl.NumberFormat(f,{useGrouping:!!e.groupingSeparator,minimumFractionDigits:e.decimalPlaces,maximumFractionDigits:e.decimalPlaces}).formatToParts(c).map(m=>m.type==="group"?e.groupingSeparator:m.type==="decimal"?e.decimalCharacter:m.value).join("");return e!=null&&e.currencyBeforeAmount?`${e.currencyToken}${l}`:`${l}${e==null?void 0:e.currencyToken}`}return new Intl.NumberFormat(f,{style:"currency",currency:s}).format(c)}return{formatCurrency:a}}function C(u){const{formatCurrency:o}=y(u);function a(n,t){const r={};return n.price!==void 0&&(r.priceText=o(n.price,t)),n.listPrice!==void 0&&(r.listPriceText=o(n.listPrice,t)),Object.assign({},n,r)}function c(n){return n.price!==void 0||n.listPrice!==void 0}return function(t){if(!c(t))return t;const r=a(t,t.priceCurrencyCode);return r.skus&&r.skus.some(c)&&(r.skus=r.skus.map(i=>c(i)?a(i,t.priceCurrencyCode):i)),r}}exports.getCurrencyFormatting=y;exports.priceDecorator=C;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../index.es-DlUp67LT.cjs"),d={defaultCurrency:"EUR",defaultLocale:"en-US",currencySettings:{}},p={EUR:"de-DE",GBP:"en-GB",USD:"en-US",AUD:"en-AU",CAD:"en-CA",INR:"en-IN",AFN:"en-IN",BDT:"en-IN",BTN:"en-IN",MMK:"en-IN",NPR:"en-IN",PKR:"en-IN"};function g(u={}){const i={...d,...u};u.currencySettings||y.s(t=>{i.currencySettings=t.internal.getSettings().currencySettings??{}});function s(t,r){const{defaultCurrency:n,currencySettings:e,defaultLocale:o}=i,a=r??n,f=p[a]??o;if(a in e){const c=e[a],l=new Intl.NumberFormat(f,{useGrouping:!!c.groupingSeparator,minimumFractionDigits:c.decimalPlaces,maximumFractionDigits:c.decimalPlaces}).formatToParts(t).map(m=>m.type==="group"?c.groupingSeparator:m.type==="decimal"?c.decimalCharacter:m.value).join("");return c?.currencyBeforeAmount?`${c.currencyToken}${l}`:`${l}${c?.currencyToken}`}return new Intl.NumberFormat(f,{style:"currency",currency:a}).format(t)}return{formatCurrency:s}}function C(u){const{formatCurrency:i}=g(u);function s(r,n){const e={};return r.price!==void 0&&(e.priceText=i(r.price,n)),r.listPrice!==void 0&&(e.listPriceText=i(r.listPrice,n)),Object.assign({},r,e)}function t(r){return r.price!==void 0||r.listPrice!==void 0}return function(n){if(!t(n))return n;const e=s(n,n.priceCurrencyCode);return e.skus&&e.skus.some(t)&&(e.skus=e.skus.map(o=>t(o)?s(o,n.priceCurrencyCode):o)),e}}exports.getCurrencyFormatting=g;exports.priceDecorator=C;
@@ -1,10 +1,10 @@
1
1
  import { s as y } from "../index.es-B8mbAxS4.js";
2
- const p = {
2
+ const g = {
3
3
  defaultCurrency: "EUR",
4
4
  defaultLocale: "en-US",
5
5
  /** @hidden */
6
6
  currencySettings: {}
7
- }, d = {
7
+ }, p = {
8
8
  EUR: "de-DE",
9
9
  GBP: "en-GB",
10
10
  USD: "en-US",
@@ -19,50 +19,50 @@ const p = {
19
19
  NPR: "en-IN",
20
20
  PKR: "en-IN"
21
21
  };
22
- function g(i = {}) {
23
- const o = {
24
- ...p,
25
- ...i
22
+ function d(u = {}) {
23
+ const i = {
24
+ ...g,
25
+ ...u
26
26
  };
27
- i.currencySettings || y((c) => {
28
- o.currencySettings = c.internal.getSettings().currencySettings ?? {};
27
+ u.currencySettings || y((t) => {
28
+ i.currencySettings = t.internal.getSettings().currencySettings ?? {};
29
29
  });
30
- function a(c, n) {
31
- const { defaultCurrency: t, currencySettings: r, defaultLocale: u } = o, s = n ?? t, f = d[s] ?? u;
32
- if (s in r) {
33
- const e = r[s], l = new Intl.NumberFormat(f, {
34
- useGrouping: !!e.groupingSeparator,
35
- minimumFractionDigits: e.decimalPlaces,
36
- maximumFractionDigits: e.decimalPlaces
37
- }).formatToParts(c).map((m) => m.type === "group" ? e.groupingSeparator : m.type === "decimal" ? e.decimalCharacter : m.value).join("");
38
- return e != null && e.currencyBeforeAmount ? `${e.currencyToken}${l}` : `${l}${e == null ? void 0 : e.currencyToken}`;
30
+ function s(t, e) {
31
+ const { defaultCurrency: n, currencySettings: r, defaultLocale: o } = i, a = e ?? n, f = p[a] ?? o;
32
+ if (a in r) {
33
+ const c = r[a], l = new Intl.NumberFormat(f, {
34
+ useGrouping: !!c.groupingSeparator,
35
+ minimumFractionDigits: c.decimalPlaces,
36
+ maximumFractionDigits: c.decimalPlaces
37
+ }).formatToParts(t).map((m) => m.type === "group" ? c.groupingSeparator : m.type === "decimal" ? c.decimalCharacter : m.value).join("");
38
+ return c?.currencyBeforeAmount ? `${c.currencyToken}${l}` : `${l}${c?.currencyToken}`;
39
39
  }
40
40
  return new Intl.NumberFormat(f, {
41
41
  style: "currency",
42
- currency: s
43
- }).format(c);
42
+ currency: a
43
+ }).format(t);
44
44
  }
45
45
  return {
46
- formatCurrency: a
46
+ formatCurrency: s
47
47
  };
48
48
  }
49
- function S(i) {
50
- const { formatCurrency: o } = g(i);
51
- function a(n, t) {
49
+ function S(u) {
50
+ const { formatCurrency: i } = d(u);
51
+ function s(e, n) {
52
52
  const r = {};
53
- return n.price !== void 0 && (r.priceText = o(n.price, t)), n.listPrice !== void 0 && (r.listPriceText = o(n.listPrice, t)), Object.assign({}, n, r);
53
+ return e.price !== void 0 && (r.priceText = i(e.price, n)), e.listPrice !== void 0 && (r.listPriceText = i(e.listPrice, n)), Object.assign({}, e, r);
54
54
  }
55
- function c(n) {
56
- return n.price !== void 0 || n.listPrice !== void 0;
55
+ function t(e) {
56
+ return e.price !== void 0 || e.listPrice !== void 0;
57
57
  }
58
- return function(t) {
59
- if (!c(t))
60
- return t;
61
- const r = a(t, t.priceCurrencyCode);
62
- return r.skus && r.skus.some(c) && (r.skus = r.skus.map((u) => c(u) ? a(u, t.priceCurrencyCode) : u)), r;
58
+ return function(n) {
59
+ if (!t(n))
60
+ return n;
61
+ const r = s(n, n.priceCurrencyCode);
62
+ return r.skus && r.skus.some(t) && (r.skus = r.skus.map((o) => t(o) ? s(o, n.priceCurrencyCode) : o)), r;
63
63
  };
64
64
  }
65
65
  export {
66
- g as getCurrencyFormatting,
66
+ d as getCurrencyFormatting,
67
67
  S as priceDecorator
68
68
  };
@@ -0,0 +1 @@
1
+ "use strict";const r=require("preact/hooks"),c=({event:s,callback:o})=>{const e=t=>{const n=t.detail;o(n)};return window.addEventListener(`@nosto/search-js/${s}`,e),()=>{window.removeEventListener(`@nosto/search-js/${s}`,e)}},i=({event:s,callback:o})=>{const e=r.useCallback(t=>{const n=t.detail;o(n)},[o]);r.useEffect(()=>(window.addEventListener(`@nosto/search-js/${s}`,e),()=>{window.removeEventListener(`@nosto/search-js/${s}`,e)}),[s,e])};exports.subscribeToNostoEvent=c;exports.useEventBusSubscribe=i;
@@ -0,0 +1,25 @@
1
+ import { useCallback as r, useEffect as a } from "preact/hooks";
2
+ const c = ({ event: s, callback: o }) => {
3
+ const e = (n) => {
4
+ const t = n.detail;
5
+ o(t);
6
+ };
7
+ return window.addEventListener(`@nosto/search-js/${s}`, e), () => {
8
+ window.removeEventListener(`@nosto/search-js/${s}`, e);
9
+ };
10
+ }, d = ({ event: s, callback: o }) => {
11
+ const e = r(
12
+ (n) => {
13
+ const t = n.detail;
14
+ o(t);
15
+ },
16
+ [o]
17
+ );
18
+ a(() => (window.addEventListener(`@nosto/search-js/${s}`, e), () => {
19
+ window.removeEventListener(`@nosto/search-js/${s}`, e);
20
+ }), [s, e]);
21
+ };
22
+ export {
23
+ c as s,
24
+ d as u
25
+ };
@@ -1,44 +1,20 @@
1
- var s = " daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/", i = /bot|crawl|http|lighthouse|scan|search|spider/i, t;
2
- function c() {
3
- if (t instanceof RegExp)
4
- return t;
1
+ var r = " daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/", t = /bot|crawl|http|lighthouse|scan|search|spider/i, e;
2
+ function o() {
3
+ if (e instanceof RegExp)
4
+ return e;
5
5
  try {
6
- t = new RegExp(s, "i");
6
+ e = new RegExp(r, "i");
7
7
  } catch {
8
- t = i;
8
+ e = t;
9
9
  }
10
- return t;
10
+ return e;
11
11
  }
12
- function d(e) {
13
- return !!e && c().test(e);
12
+ function s(a) {
13
+ return !!a && o().test(a);
14
14
  }
15
- function u() {
16
- return d(navigator.userAgent);
17
- }
18
- function m(...e) {
19
- if (!e.every((r) => r == null))
20
- return e.filter((r) => Array.isArray(r)).reduce((r, a) => r.concat(a), []);
21
- }
22
- const n = "nosto.search.";
23
- function l(e) {
24
- var a;
25
- const r = `${n}${e}`;
26
- (a = window.performance) == null || a.mark(`${r}.start`);
27
- }
28
- function p(e) {
29
- var a, o;
30
- const r = `${n}${e}`;
31
- (a = window.performance) == null || a.mark(`${r}.end`), (o = window.performance) == null || o.measure(r, `${r}.start`, `${r}.end`);
32
- }
33
- function h(e) {
34
- return l(e), () => p(e);
35
- }
36
- function w(e) {
37
- return Array.from(new Set(e));
15
+ function i() {
16
+ return s(navigator.userAgent);
38
17
  }
39
18
  export {
40
- h as a,
41
- u as i,
42
- m,
43
- w as u
19
+ i
44
20
  };
@@ -1 +1 @@
1
- "use strict";var s=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",i=/bot|crawl|http|lighthouse|scan|search|spider/i,t;function c(){if(t instanceof RegExp)return t;try{t=new RegExp(s,"i")}catch{t=i}return t}function d(e){return!!e&&c().test(e)}function u(){return d(navigator.userAgent)}function l(...e){if(!e.every(r=>r==null))return e.filter(r=>Array.isArray(r)).reduce((r,a)=>r.concat(a),[])}const n="nosto.search.";function p(e){var a;const r=`${n}${e}`;(a=window.performance)==null||a.mark(`${r}.start`)}function m(e){var a,o;const r=`${n}${e}`;(a=window.performance)==null||a.mark(`${r}.end`),(o=window.performance)==null||o.measure(r,`${r}.start`,`${r}.end`)}function h(e){return p(e),()=>m(e)}function w(e){return Array.from(new Set(e))}exports.isBot=u;exports.measure=h;exports.mergeArrays=l;exports.unique=w;
1
+ "use strict";var r=" daum[ /]| deusu/| yadirectfetcher|(?:^|[^g])news(?!sapphire)|(?<! (?:channel/|google/))google(?!(app|/google| pixel))|(?<! cu)bots?(?:\\b|_)|(?<!(?:lib))http|(?<![hg]m)score|(?<!cam)scan|@[a-z][\\w-]+\\.|\\(\\)|\\.com\\b|\\btime/|\\||^<|^[\\w \\.\\-\\(?:\\):%]+(?:/v?\\d+(?:\\.\\d+)?(?:\\.\\d{1,10})*?)?(?:,|$)|^[^ ]{50,}$|^\\d+\\b|^\\w*search\\b|^\\w+/[\\w\\(\\)]*$|^active|^ad muncher|^amaya|^avsdevicesdk/|^biglotron|^bot|^bw/|^clamav[ /]|^client/|^cobweb/|^custom|^ddg[_-]android|^discourse|^dispatch/\\d|^downcast/|^duckduckgo|^email|^facebook|^getright/|^gozilla/|^hobbit|^hotzonu|^hwcdn/|^igetter/|^jeode/|^jetty/|^jigsaw|^microsoft bits|^movabletype|^mozilla/\\d\\.\\d\\s[\\w\\.-]+$|^mozilla/\\d\\.\\d\\s\\(compatible;?(?:\\s\\w+\\/\\d+\\.\\d+)?\\)$|^navermailapp|^netsurf|^offline|^openai/|^owler|^php|^postman|^python|^rank|^read|^reed|^rest|^rss|^snapchat|^space bison|^svn|^swcd |^taringa|^thumbor/|^track|^w3c|^webbandit/|^webcopier|^wget|^whatsapp|^wordpress|^xenu link sleuth|^yahoo|^yandex|^zdm/\\d|^zoom marketplace/|^{{.*}}$|analyzer|archive|ask jeeves/teoma|audit|bit\\.ly/|bluecoat drtr|browsex|burpcollaborator|capture|catch|check\\b|checker|chrome-lighthouse|chromeframe|classifier|cloudflare|convertify|crawl|cypress/|dareboost|datanyze|dejaclick|detect|dmbrowser|download|evc-batch/|exaleadcloudview|feed|firephp|functionize|gomezagent|grab|headless|httrack|hubspot marketing grader|hydra|ibisbrowser|infrawatch|insight|inspect|iplabel|ips-agent|java(?!;)|library|linkcheck|mail\\.ru/|manager|measure|neustar wpm|node|nutch|offbyone|onetrust|optimize|pageburst|pagespeed|parser|perl|phantomjs|pingdom|powermarks|preview|proxy|ptst[ /]\\d|retriever|rexx;|rigor|rss\\b|scrape|server|sogou|sparkler/|speedcurve|spider|splash|statuscake|supercleaner|synapse|synthetic|tools|torrent|transcoder|url|validator|virtuoso|wappalyzer|webglance|webkit2png|whatcms/|xtate/",t=/bot|crawl|http|lighthouse|scan|search|spider/i,e;function o(){if(e instanceof RegExp)return e;try{e=new RegExp(r,"i")}catch{e=t}return e}function s(a){return!!a&&o().test(a)}function i(){return s(navigator.userAgent)}exports.isBot=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../jsxRuntime.module-B3sGoTIU.cjs"),i=require("../../useActions-B-wWOcHo.cjs"),s=require("../../baseConfig-KREDcxnC.cjs"),a=require("../../index.es-DlUp67LT.cjs"),p=require("../../BaseElement-Ds4INJSy.cjs"),m=require("preact/hooks"),d={...s.defaultBaseConfig,memoryCache:!1};function f(e){return{pageType:"autocomplete",...d,...e}}function C({config:e,store:t,children:o}){const n=t??i.createStore();return s.useCheckClientScript(),r.u(i.ConfigContext,{value:f(e),children:r.u(i.StoreContext,{value:n,children:[r.u(s.StoreActionsListener,{}),o]})})}function g({children:e,hit:t,as:o,componentProps:n}){const u=m.useCallback(()=>{t&&"productId"in t&&a.s(c=>c.recordSearchClick("autocomplete",t))},[t]);return r.u(p.BaseElement,{onClick:u,as:o,componentProps:n,children:e})}function S({as:e,componentProps:t,onSearchInput:o,children:n}){const u={...t,onInput:l=>{o(l.target)}},c=e??"input";return e||(u.type="search"),r.u(c,{...u,children:n})}exports.AutocompleteElement=g;exports.AutocompletePageProvider=C;exports.SearchInput=S;
@@ -0,0 +1,5 @@
1
+ /** @module preact/autocomplete */
2
+ export type { PublicAutocompleteConfig as AutocompleteConfig } from './src/AutocompleteConfig.ts';
3
+ export { AutocompletePageProvider } from './src/AutocompletePageProvider.tsx';
4
+ export { AutocompleteElement, type AutocompleteElementProps } from './src/components/AutocompleteElement.tsx';
5
+ export { SearchInput } from './src/components/SearchInput.tsx';