@searchcraft/javascript-sdk 0.10.4 → 0.10.6

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 (65) hide show
  1. package/dist/components/index.d.ts +52 -20
  2. package/dist/components/index.js +4 -4
  3. package/dist/components/{p-9d2e55a7.js → p-2735dceb.js} +3 -3
  4. package/dist/components/{p-9d2e55a7.js.map → p-2735dceb.js.map} +1 -1
  5. package/dist/components/p-4dd1995c.js +193 -0
  6. package/dist/components/p-4dd1995c.js.map +1 -0
  7. package/dist/components/{p-35ee16e2.js → p-6e5ed641.js} +2 -2
  8. package/dist/components/{p-35ee16e2.js.map → p-6e5ed641.js.map} +1 -1
  9. package/dist/components/{p-4c610bc4.js → p-75134ca7.js} +2 -2
  10. package/dist/components/{p-4c610bc4.js.map → p-75134ca7.js.map} +1 -1
  11. package/dist/components/{p-eb633481.js → p-9f4c50ed.js} +3 -3
  12. package/dist/components/{p-eb633481.js.map → p-9f4c50ed.js.map} +1 -1
  13. package/dist/components/{p-6065aee1.js → p-a7d611cd.js} +17 -12
  14. package/dist/components/p-a7d611cd.js.map +1 -0
  15. package/dist/components/{p-6ed5cca1.js → p-aba24c85.js} +4 -4
  16. package/dist/components/{p-6ed5cca1.js.map → p-aba24c85.js.map} +1 -1
  17. package/dist/components/p-b194d081.js +406 -0
  18. package/dist/components/p-b194d081.js.map +1 -0
  19. package/dist/components/{p-60fd824d.js → p-b54873ff.js} +371 -348
  20. package/dist/components/p-b54873ff.js.map +1 -0
  21. package/dist/components/p-d54771ef.js +182 -0
  22. package/dist/components/p-d54771ef.js.map +1 -0
  23. package/dist/components/{p-2d975f19.js → p-f2976b33.js} +2 -2
  24. package/dist/components/{p-2d975f19.js.map → p-f2976b33.js.map} +1 -1
  25. package/dist/components/searchcraft-ad.js +1 -1
  26. package/dist/components/searchcraft-facet-list.js +1 -1
  27. package/dist/components/searchcraft-filter-panel.js +13 -18
  28. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  29. package/dist/components/searchcraft-input-form.js +1 -1
  30. package/dist/components/searchcraft-pagination.js +1 -1
  31. package/dist/components/searchcraft-popover-button.js +1 -1
  32. package/dist/components/searchcraft-popover-footer.js +1 -1
  33. package/dist/components/searchcraft-popover-form.js +6 -6
  34. package/dist/components/searchcraft-popover-list-item.js +1 -1
  35. package/dist/components/searchcraft-popover-list-view.js +1 -1
  36. package/dist/components/searchcraft-results-info.js +2 -2
  37. package/dist/components/searchcraft-search-result.js +1 -1
  38. package/dist/components/searchcraft-search-results-per-page.js +1 -1
  39. package/dist/components/searchcraft-search-results.js +3 -3
  40. package/dist/components/searchcraft-slider.js +1 -1
  41. package/dist/components/searchcraft-theme.js +1 -1
  42. package/dist/components/searchcraft-theme.js.map +1 -1
  43. package/dist/components/searchcraft-toggle-button.js +1 -1
  44. package/dist/hydrate/index.js +710 -434
  45. package/dist/hydrate/index.mjs +710 -434
  46. package/dist/themes/hologram.css +1 -1
  47. package/dist/themes/hologram.css.map +1 -1
  48. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +33 -14
  49. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +2 -2
  50. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +6 -0
  51. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +10 -4
  52. package/dist/types/components.d.ts +23 -7
  53. package/dist/types/store/SearchcraftStore.types.d.ts +5 -3
  54. package/dist/types/utils/facets.d.ts +30 -3
  55. package/dist/types/utils/throttle.d.ts +14 -0
  56. package/dist/types/utils/units.d.ts +33 -0
  57. package/package.json +3 -3
  58. package/dist/components/p-163402fb.js +0 -291
  59. package/dist/components/p-163402fb.js.map +0 -1
  60. package/dist/components/p-4d37616e.js +0 -105
  61. package/dist/components/p-4d37616e.js.map +0 -1
  62. package/dist/components/p-6065aee1.js.map +0 -1
  63. package/dist/components/p-60fd824d.js.map +0 -1
  64. package/dist/components/p-7c650118.js +0 -110
  65. package/dist/components/p-7c650118.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  var B = Object.defineProperty;
2
2
  var N = (a, e, n) => e in a ? B(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
3
- var l = (a, e, n) => N(a, typeof e != "symbol" ? e + "" : e, n);
3
+ var h = (a, e, n) => N(a, typeof e != "symbol" ? e + "" : e, n);
4
4
  var O = /* @__PURE__ */ ((a) => (a[a.DEBUG = 0] = "DEBUG", a[a.INFO = 1] = "INFO", a[a.WARN = 2] = "WARN", a[a.ERROR = 3] = "ERROR", a))(O || {});
5
5
  class pe {
6
6
  constructor(e) {
7
- l(this, "logLevel");
8
- l(this, "logFormatter");
7
+ h(this, "logLevel");
8
+ h(this, "logFormatter");
9
9
  this.logLevel = e.logLevel || 1, this.logFormatter = e.logFormatter || this.defaultFormatter;
10
10
  }
11
11
  defaultFormatter(e, n) {
@@ -40,87 +40,87 @@ class pe {
40
40
  }
41
41
  }
42
42
  }
43
- function w(a, e, n, r) {
44
- return new (n || (n = Promise))(function(i, o) {
45
- function t(c) {
43
+ function y(a, e, n, r) {
44
+ return new (n || (n = Promise))(function(o, i) {
45
+ function t(s) {
46
46
  try {
47
- d(r.next(c));
48
- } catch (s) {
49
- o(s);
47
+ l(r.next(s));
48
+ } catch (c) {
49
+ i(c);
50
50
  }
51
51
  }
52
- function u(c) {
52
+ function u(s) {
53
53
  try {
54
- d(r.throw(c));
55
- } catch (s) {
56
- o(s);
54
+ l(r.throw(s));
55
+ } catch (c) {
56
+ i(c);
57
57
  }
58
58
  }
59
- function d(c) {
60
- var s;
61
- c.done ? i(c.value) : (s = c.value, s instanceof n ? s : new n(function(p) {
62
- p(s);
59
+ function l(s) {
60
+ var c;
61
+ s.done ? o(s.value) : (c = s.value, c instanceof n ? c : new n(function(g) {
62
+ g(c);
63
63
  })).then(t, u);
64
64
  }
65
- d((r = r.apply(a, [])).next());
65
+ l((r = r.apply(a, [])).next());
66
66
  });
67
67
  }
68
- function y(a, e) {
69
- var n, r, i, o, t = { label: 0, sent: function() {
70
- if (1 & i[0]) throw i[1];
71
- return i[1];
68
+ function w(a, e) {
69
+ var n, r, o, i, t = { label: 0, sent: function() {
70
+ if (1 & o[0]) throw o[1];
71
+ return o[1];
72
72
  }, trys: [], ops: [] };
73
- return o = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
73
+ return i = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (i[Symbol.iterator] = function() {
74
74
  return this;
75
- }), o;
76
- function u(d) {
77
- return function(c) {
78
- return function(s) {
75
+ }), i;
76
+ function u(l) {
77
+ return function(s) {
78
+ return function(c) {
79
79
  if (n) throw new TypeError("Generator is already executing.");
80
- for (; o && (o = 0, s[0] && (t = 0)), t; ) try {
81
- if (n = 1, r && (i = 2 & s[0] ? r.return : s[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, s[1])).done) return i;
82
- switch (r = 0, i && (s = [2 & s[0], i.value]), s[0]) {
80
+ for (; i && (i = 0, c[0] && (t = 0)), t; ) try {
81
+ if (n = 1, r && (o = 2 & c[0] ? r.return : c[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, c[1])).done) return o;
82
+ switch (r = 0, o && (c = [2 & c[0], o.value]), c[0]) {
83
83
  case 0:
84
84
  case 1:
85
- i = s;
85
+ o = c;
86
86
  break;
87
87
  case 4:
88
- return t.label++, { value: s[1], done: !1 };
88
+ return t.label++, { value: c[1], done: !1 };
89
89
  case 5:
90
- t.label++, r = s[1], s = [0];
90
+ t.label++, r = c[1], c = [0];
91
91
  continue;
92
92
  case 7:
93
- s = t.ops.pop(), t.trys.pop();
93
+ c = t.ops.pop(), t.trys.pop();
94
94
  continue;
95
95
  default:
96
- if (i = t.trys, !((i = i.length > 0 && i[i.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
96
+ if (o = t.trys, !((o = o.length > 0 && o[o.length - 1]) || c[0] !== 6 && c[0] !== 2)) {
97
97
  t = 0;
98
98
  continue;
99
99
  }
100
- if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
101
- t.label = s[1];
100
+ if (c[0] === 3 && (!o || c[1] > o[0] && c[1] < o[3])) {
101
+ t.label = c[1];
102
102
  break;
103
103
  }
104
- if (s[0] === 6 && t.label < i[1]) {
105
- t.label = i[1], i = s;
104
+ if (c[0] === 6 && t.label < o[1]) {
105
+ t.label = o[1], o = c;
106
106
  break;
107
107
  }
108
- if (i && t.label < i[2]) {
109
- t.label = i[2], t.ops.push(s);
108
+ if (o && t.label < o[2]) {
109
+ t.label = o[2], t.ops.push(c);
110
110
  break;
111
111
  }
112
- i[2] && t.ops.pop(), t.trys.pop();
112
+ o[2] && t.ops.pop(), t.trys.pop();
113
113
  continue;
114
114
  }
115
- s = e.call(a, t);
116
- } catch (p) {
117
- s = [6, p], r = 0;
115
+ c = e.call(a, t);
116
+ } catch (g) {
117
+ c = [6, g], r = 0;
118
118
  } finally {
119
- n = i = 0;
119
+ n = o = 0;
120
120
  }
121
- if (5 & s[0]) throw s[1];
122
- return { value: s[0] ? s[1] : void 0, done: !0 };
123
- }([d, c]);
121
+ if (5 & c[0]) throw c[1];
122
+ return { value: c[0] ? c[1] : void 0, done: !0 };
123
+ }([l, s]);
124
124
  };
125
125
  }
126
126
  }
@@ -138,58 +138,58 @@ function T(a) {
138
138
  return a ^= a >>> 16, a = Math.imul(a, 2246822507), a ^= a >>> 13, a = Math.imul(a, 3266489909), (a ^= a >>> 16) >>> 0;
139
139
  }
140
140
  var m = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
141
- function g(a, e) {
141
+ function p(a, e) {
142
142
  return a << e | a >>> 32 - e;
143
143
  }
144
- function I(a, e) {
144
+ function _(a, e) {
145
145
  var n;
146
146
  if (e === void 0 && (e = 0), e = e ? 0 | e : 0, typeof a == "string" && (n = a, a = new TextEncoder().encode(n).buffer), !(a instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
147
147
  var r = new Uint32Array([e, e, e, e]);
148
- ((function(o, t) {
149
- for (var u = o.byteLength / 16 | 0, d = new Uint32Array(o, 0, 4 * u), c = 0; c < u; c++) {
150
- var s = d.subarray(4 * c, 4 * (c + 1));
151
- s[0] = Math.imul(s[0], m[0]), s[0] = g(s[0], 15), s[0] = Math.imul(s[0], m[1]), t[0] = t[0] ^ s[0], t[0] = g(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, s[1] = Math.imul(s[1], m[1]), s[1] = g(s[1], 16), s[1] = Math.imul(s[1], m[2]), t[1] = t[1] ^ s[1], t[1] = g(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, s[2] = Math.imul(s[2], m[2]), s[2] = g(s[2], 17), s[2] = Math.imul(s[2], m[3]), t[2] = t[2] ^ s[2], t[2] = g(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, s[3] = Math.imul(s[3], m[3]), s[3] = g(s[3], 18), s[3] = Math.imul(s[3], m[0]), t[3] = t[3] ^ s[3], t[3] = g(t[3], 13), t[3] = t[3] + t[0], t[3] = Math.imul(t[3], 5) + 850148119;
148
+ ((function(i, t) {
149
+ for (var u = i.byteLength / 16 | 0, l = new Uint32Array(i, 0, 4 * u), s = 0; s < u; s++) {
150
+ var c = l.subarray(4 * s, 4 * (s + 1));
151
+ c[0] = Math.imul(c[0], m[0]), c[0] = p(c[0], 15), c[0] = Math.imul(c[0], m[1]), t[0] = t[0] ^ c[0], t[0] = p(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, c[1] = Math.imul(c[1], m[1]), c[1] = p(c[1], 16), c[1] = Math.imul(c[1], m[2]), t[1] = t[1] ^ c[1], t[1] = p(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, c[2] = Math.imul(c[2], m[2]), c[2] = p(c[2], 17), c[2] = Math.imul(c[2], m[3]), t[2] = t[2] ^ c[2], t[2] = p(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, c[3] = Math.imul(c[3], m[3]), c[3] = p(c[3], 18), c[3] = Math.imul(c[3], m[0]), t[3] = t[3] ^ c[3], t[3] = p(t[3], 13), t[3] = t[3] + t[0], t[3] = Math.imul(t[3], 5) + 850148119;
152
152
  }
153
- }))(a, r), function(o, t) {
154
- var u = o.byteLength / 16 | 0, d = o.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(o, 16 * u, d);
155
- switch (d) {
153
+ }))(a, r), function(i, t) {
154
+ var u = i.byteLength / 16 | 0, l = i.byteLength % 16, s = new Uint32Array(4), c = new Uint8Array(i, 16 * u, l);
155
+ switch (l) {
156
156
  case 15:
157
- c[3] = c[3] ^ s[14] << 16;
157
+ s[3] = s[3] ^ c[14] << 16;
158
158
  case 14:
159
- c[3] = c[3] ^ s[13] << 8;
159
+ s[3] = s[3] ^ c[13] << 8;
160
160
  case 13:
161
- c[3] = c[3] ^ s[12] << 0, c[3] = Math.imul(c[3], m[3]), c[3] = g(c[3], 18), c[3] = Math.imul(c[3], m[0]), t[3] = t[3] ^ c[3];
161
+ s[3] = s[3] ^ c[12] << 0, s[3] = Math.imul(s[3], m[3]), s[3] = p(s[3], 18), s[3] = Math.imul(s[3], m[0]), t[3] = t[3] ^ s[3];
162
162
  case 12:
163
- c[2] = c[2] ^ s[11] << 24;
163
+ s[2] = s[2] ^ c[11] << 24;
164
164
  case 11:
165
- c[2] = c[2] ^ s[10] << 16;
165
+ s[2] = s[2] ^ c[10] << 16;
166
166
  case 10:
167
- c[2] = c[2] ^ s[9] << 8;
167
+ s[2] = s[2] ^ c[9] << 8;
168
168
  case 9:
169
- c[2] = c[2] ^ s[8] << 0, c[2] = Math.imul(c[2], m[2]), c[2] = g(c[2], 17), c[2] = Math.imul(c[2], m[3]), t[2] = t[2] ^ c[2];
169
+ s[2] = s[2] ^ c[8] << 0, s[2] = Math.imul(s[2], m[2]), s[2] = p(s[2], 17), s[2] = Math.imul(s[2], m[3]), t[2] = t[2] ^ s[2];
170
170
  case 8:
171
- c[1] = c[1] ^ s[7] << 24;
171
+ s[1] = s[1] ^ c[7] << 24;
172
172
  case 7:
173
- c[1] = c[1] ^ s[6] << 16;
173
+ s[1] = s[1] ^ c[6] << 16;
174
174
  case 6:
175
- c[1] = c[1] ^ s[5] << 8;
175
+ s[1] = s[1] ^ c[5] << 8;
176
176
  case 5:
177
- c[1] = c[1] ^ s[4] << 0, c[1] = Math.imul(c[1], m[1]), c[1] = g(c[1], 16), c[1] = Math.imul(c[1], m[2]), t[1] = t[1] ^ c[1];
177
+ s[1] = s[1] ^ c[4] << 0, s[1] = Math.imul(s[1], m[1]), s[1] = p(s[1], 16), s[1] = Math.imul(s[1], m[2]), t[1] = t[1] ^ s[1];
178
178
  case 4:
179
- c[0] = c[0] ^ s[3] << 24;
179
+ s[0] = s[0] ^ c[3] << 24;
180
180
  case 3:
181
- c[0] = c[0] ^ s[2] << 16;
181
+ s[0] = s[0] ^ c[2] << 16;
182
182
  case 2:
183
- c[0] = c[0] ^ s[1] << 8;
183
+ s[0] = s[0] ^ c[1] << 8;
184
184
  case 1:
185
- c[0] = c[0] ^ s[0] << 0, c[0] = Math.imul(c[0], m[0]), c[0] = g(c[0], 15), c[0] = Math.imul(c[0], m[1]), t[0] = t[0] ^ c[0];
185
+ s[0] = s[0] ^ c[0] << 0, s[0] = Math.imul(s[0], m[0]), s[0] = p(s[0], 15), s[0] = Math.imul(s[0], m[1]), t[0] = t[0] ^ s[0];
186
186
  }
187
- }(a, r), function(o, t) {
188
- t[0] = t[0] ^ o.byteLength, t[1] = t[1] ^ o.byteLength, t[2] = t[2] ^ o.byteLength, t[3] = t[3] ^ o.byteLength, t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0, t[0] = T(t[0]), t[1] = T(t[1]), t[2] = T(t[2]), t[3] = T(t[3]), t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0;
187
+ }(a, r), function(i, t) {
188
+ t[0] = t[0] ^ i.byteLength, t[1] = t[1] ^ i.byteLength, t[2] = t[2] ^ i.byteLength, t[3] = t[3] ^ i.byteLength, t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0, t[0] = T(t[0]), t[1] = T(t[1]), t[2] = T(t[2]), t[3] = T(t[3]), t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0;
189
189
  }(a, r);
190
- var i = new Uint8Array(r.buffer);
191
- return Array.from(i).map(function(o) {
192
- return o.toString(16).padStart(2, "0");
190
+ var o = new Uint8Array(r.buffer);
191
+ return Array.from(o).map(function(i) {
192
+ return i.toString(16).padStart(2, "0");
193
193
  }).join("");
194
194
  }
195
195
  function W(a, e) {
@@ -205,20 +205,20 @@ function V(a, e, n) {
205
205
  }));
206
206
  }
207
207
  function $() {
208
- return w(this, void 0, void 0, function() {
209
- var a, e, n, r, i;
210
- return y(this, function(o) {
211
- switch (o.label) {
208
+ return y(this, void 0, void 0, function() {
209
+ var a, e, n, r, o;
210
+ return w(this, function(i) {
211
+ switch (i.label) {
212
212
  case 0:
213
- return o.trys.push([0, 2, , 3]), a = G(), e = Object.keys(a), [4, V(Object.values(a), (S == null ? void 0 : S.timeout) || 1e3, j)];
213
+ return i.trys.push([0, 2, , 3]), a = G(), e = Object.keys(a), [4, V(Object.values(a), (S == null ? void 0 : S.timeout) || 1e3, j)];
214
214
  case 1:
215
- return n = o.sent(), r = n.filter(function(t) {
215
+ return n = i.sent(), r = n.filter(function(t) {
216
216
  return t !== void 0;
217
- }), i = {}, r.forEach(function(t, u) {
218
- i[e[u]] = t;
219
- }), [2, U(i, S.exclude || [])];
217
+ }), o = {}, r.forEach(function(t, u) {
218
+ o[e[u]] = t;
219
+ }), [2, U(o, S.exclude || [])];
220
220
  case 2:
221
- throw o.sent();
221
+ throw i.sent();
222
222
  case 3:
223
223
  return [2];
224
224
  }
@@ -226,30 +226,30 @@ function $() {
226
226
  });
227
227
  }
228
228
  function U(a, e) {
229
- var n = {}, r = function(o) {
230
- if (a.hasOwnProperty(o)) {
231
- var t = a[o];
232
- if (typeof t != "object" || Array.isArray(t)) e.includes(o) || (n[o] = t);
229
+ var n = {}, r = function(i) {
230
+ if (a.hasOwnProperty(i)) {
231
+ var t = a[i];
232
+ if (typeof t != "object" || Array.isArray(t)) e.includes(i) || (n[i] = t);
233
233
  else {
234
- var u = U(t, e.map(function(d) {
235
- return d.startsWith(o + ".") ? d.slice(o.length + 1) : d;
234
+ var u = U(t, e.map(function(l) {
235
+ return l.startsWith(i + ".") ? l.slice(i.length + 1) : l;
236
236
  }));
237
- Object.keys(u).length > 0 && (n[o] = u);
237
+ Object.keys(u).length > 0 && (n[i] = u);
238
238
  }
239
239
  }
240
240
  };
241
- for (var i in a) r(i);
241
+ for (var o in a) r(o);
242
242
  return n;
243
243
  }
244
244
  function z(a) {
245
- return w(this, void 0, void 0, function() {
245
+ return y(this, void 0, void 0, function() {
246
246
  var e, n;
247
- return y(this, function(r) {
247
+ return w(this, function(r) {
248
248
  switch (r.label) {
249
249
  case 0:
250
250
  return r.trys.push([0, 2, , 3]), [4, $()];
251
251
  case 1:
252
- return e = r.sent(), n = I(JSON.stringify(e)), [2, n.toString()];
252
+ return e = r.sent(), n = _(JSON.stringify(e)), [2, n.toString()];
253
253
  case 2:
254
254
  throw r.sent();
255
255
  case 3:
@@ -262,10 +262,10 @@ function H(a) {
262
262
  for (var e = 0, n = 0; n < a.length; ++n) e += Math.abs(a[n]);
263
263
  return e;
264
264
  }
265
- function L(a, e, n) {
266
- for (var r = [], i = 0; i < a[0].data.length; i++) {
267
- for (var o = [], t = 0; t < a.length; t++) o.push(a[t].data[i]);
268
- r.push(Q(o));
265
+ function q(a, e, n) {
266
+ for (var r = [], o = 0; o < a[0].data.length; o++) {
267
+ for (var i = [], t = 0; t < a.length; t++) i.push(a[t].data[o]);
268
+ r.push(Q(i));
269
269
  }
270
270
  var u = new Uint8ClampedArray(r);
271
271
  return new ImageData(u, e, n);
@@ -273,32 +273,32 @@ function L(a, e, n) {
273
273
  function Q(a) {
274
274
  if (a.length === 0) return 0;
275
275
  for (var e = {}, n = 0, r = a; n < r.length; n++)
276
- e[o = r[n]] = (e[o] || 0) + 1;
277
- var i = a[0];
278
- for (var o in e) e[o] > e[i] && (i = parseInt(o, 10));
279
- return i;
276
+ e[i = r[n]] = (e[i] || 0) + 1;
277
+ var o = a[0];
278
+ for (var i in e) e[i] > e[o] && (o = parseInt(i, 10));
279
+ return o;
280
280
  }
281
281
  function C() {
282
282
  if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
283
283
  for (var a = navigator.userAgent, e = { Edg: "Edge", OPR: "Opera" }, n = 0, r = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; n < r.length; n++) {
284
- var i = r[n], o = a.match(i);
285
- if (o && o.groups) return { name: e[o.groups.name] || o.groups.name, version: o.groups.version };
284
+ var o = r[n], i = a.match(o);
285
+ if (i && i.groups) return { name: e[i.groups.name] || i.groups.name, version: i.groups.version };
286
286
  }
287
287
  return { name: "unknown", version: "unknown" };
288
288
  }
289
289
  v("audio", function() {
290
- return w(this, void 0, void 0, function() {
291
- return y(this, function(a) {
290
+ return y(this, void 0, void 0, function() {
291
+ return w(this, function(a) {
292
292
  return [2, new Promise(function(e, n) {
293
293
  try {
294
- var r = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), i = r.createBufferSource(), o = r.createOscillator();
295
- o.frequency.value = 1e3;
294
+ var r = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), o = r.createBufferSource(), i = r.createOscillator();
295
+ i.frequency.value = 1e3;
296
296
  var t, u = r.createDynamicsCompressor();
297
- u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, o.connect(u), u.connect(r.destination), o.start(), r.oncomplete = function(d) {
298
- t = d.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: o.type, maxChannels: r.destination.maxChannelCount, channelCountMode: i.channelCountMode });
297
+ u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, i.connect(u), u.connect(r.destination), i.start(), r.oncomplete = function(l) {
298
+ t = l.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: i.type, maxChannels: r.destination.maxChannelCount, channelCountMode: o.channelCountMode });
299
299
  }, r.startRendering();
300
- } catch (d) {
301
- console.error("Error creating audio fingerprint:", d), n(d);
300
+ } catch (l) {
301
+ console.error("Error creating audio fingerprint:", l), n(l);
302
302
  }
303
303
  })];
304
304
  });
@@ -312,18 +312,18 @@ C().name != "Firefox" && v("canvas", function() {
312
312
  var n = document.createElement("canvas"), r = n.getContext("2d");
313
313
  if (!r) return new ImageData(1, 1);
314
314
  n.width = P, n.height = k;
315
- var i = r.createLinearGradient(0, 0, n.width, n.height);
316
- i.addColorStop(0, "red"), i.addColorStop(0.16666666666666666, "orange"), i.addColorStop(0.3333333333333333, "yellow"), i.addColorStop(0.5, "green"), i.addColorStop(0.6666666666666666, "blue"), i.addColorStop(0.8333333333333334, "indigo"), i.addColorStop(1, "violet"), r.fillStyle = i, r.fillRect(0, 0, n.width, n.height);
317
- var o = "Random Text WMwmil10Oo";
318
- r.font = "23.123px Arial", r.fillStyle = "black", r.fillText(o, -5, 15), r.fillStyle = "rgba(0, 0, 255, 0.5)", r.fillText(o, -3.3, 17.7), r.beginPath(), r.moveTo(0, 0), r.lineTo(2 * n.width / 7, n.height), r.strokeStyle = "white", r.lineWidth = 2, r.stroke();
315
+ var o = r.createLinearGradient(0, 0, n.width, n.height);
316
+ o.addColorStop(0, "red"), o.addColorStop(0.16666666666666666, "orange"), o.addColorStop(0.3333333333333333, "yellow"), o.addColorStop(0.5, "green"), o.addColorStop(0.6666666666666666, "blue"), o.addColorStop(0.8333333333333334, "indigo"), o.addColorStop(1, "violet"), r.fillStyle = o, r.fillRect(0, 0, n.width, n.height);
317
+ var i = "Random Text WMwmil10Oo";
318
+ r.font = "23.123px Arial", r.fillStyle = "black", r.fillText(i, -5, 15), r.fillStyle = "rgba(0, 0, 255, 0.5)", r.fillText(i, -3.3, 17.7), r.beginPath(), r.moveTo(0, 0), r.lineTo(2 * n.width / 7, n.height), r.strokeStyle = "white", r.lineWidth = 2, r.stroke();
319
319
  var t = r.getImageData(0, 0, n.width, n.height);
320
320
  return t;
321
321
  }();
322
322
  });
323
- a({ commonImageDataHash: I(L(e, P, k).data.toString()).toString() });
323
+ a({ commonImageDataHash: _(q(e, P, k).data.toString()).toString() });
324
324
  });
325
325
  });
326
- var A, X = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], J = ["monospace", "sans-serif", "serif"];
326
+ var I, X = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], J = ["monospace", "sans-serif", "serif"];
327
327
  function F(a, e) {
328
328
  if (!a) throw new Error("Canvas context not supported");
329
329
  return a.font = "72px ".concat(e), a.measureText("WwMmLli0Oo").width;
@@ -331,15 +331,15 @@ function F(a, e) {
331
331
  function Y() {
332
332
  var a, e = document.createElement("canvas"), n = (a = e.getContext("webgl")) !== null && a !== void 0 ? a : e.getContext("experimental-webgl");
333
333
  if (n && "getParameter" in n) try {
334
- var r = (n.getParameter(n.VENDOR) || "").toString(), i = (n.getParameter(n.RENDERER) || "").toString(), o = { vendor: r, renderer: i, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
- if (!i.length || !r.length) {
334
+ var r = (n.getParameter(n.VENDOR) || "").toString(), o = (n.getParameter(n.RENDERER) || "").toString(), i = { vendor: r, renderer: o, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
+ if (!o.length || !r.length) {
336
336
  var t = n.getExtension("WEBGL_debug_renderer_info");
337
337
  if (t) {
338
- var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), d = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
339
- u && (o.vendorUnmasked = u), d && (o.rendererUnmasked = d);
338
+ var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), l = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
339
+ u && (i.vendorUnmasked = u), l && (i.rendererUnmasked = l);
340
340
  }
341
341
  }
342
- return o;
342
+ return i;
343
343
  } catch {
344
344
  }
345
345
  return "undefined";
@@ -351,23 +351,23 @@ function Z() {
351
351
  function ee(a, e) {
352
352
  var n = {};
353
353
  return e.forEach(function(r) {
354
- var i = function(o) {
355
- if (o.length === 0) return null;
354
+ var o = function(i) {
355
+ if (i.length === 0) return null;
356
356
  var t = {};
357
- o.forEach(function(c) {
358
- var s = String(c);
359
- t[s] = (t[s] || 0) + 1;
357
+ i.forEach(function(s) {
358
+ var c = String(s);
359
+ t[c] = (t[c] || 0) + 1;
360
360
  });
361
- var u = o[0], d = 1;
362
- return Object.keys(t).forEach(function(c) {
363
- t[c] > d && (u = c, d = t[c]);
361
+ var u = i[0], l = 1;
362
+ return Object.keys(t).forEach(function(s) {
363
+ t[s] > l && (u = s, l = t[s]);
364
364
  }), u;
365
- }(a.map(function(o) {
366
- return r in o ? o[r] : void 0;
367
- }).filter(function(o) {
368
- return o !== void 0;
365
+ }(a.map(function(i) {
366
+ return r in i ? i[r] : void 0;
367
+ }).filter(function(i) {
368
+ return i !== void 0;
369
369
  }));
370
- i && (n[r] = i);
370
+ o && (n[r] = o);
371
371
  }), n;
372
372
  }
373
373
  function te() {
@@ -391,37 +391,37 @@ C().name != "Firefox" && v("fonts", function() {
391
391
  return new Promise(function(e, n) {
392
392
  try {
393
393
  (function(r) {
394
- var i;
395
- w(this, void 0, void 0, function() {
396
- var o, t, u;
397
- return y(this, function(d) {
398
- switch (d.label) {
394
+ var o;
395
+ y(this, void 0, void 0, function() {
396
+ var i, t, u;
397
+ return w(this, function(l) {
398
+ switch (l.label) {
399
399
  case 0:
400
- return document.body ? [3, 2] : [4, (c = 50, new Promise(function(p) {
401
- return setTimeout(p, c, s);
400
+ return document.body ? [3, 2] : [4, (s = 50, new Promise(function(g) {
401
+ return setTimeout(g, s, c);
402
402
  }))];
403
403
  case 1:
404
- return d.sent(), [3, 0];
404
+ return l.sent(), [3, 0];
405
405
  case 2:
406
- if ((o = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = o.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), o.src = "about:blank", document.body.appendChild(o), !(u = o.contentDocument || ((i = o.contentWindow) === null || i === void 0 ? void 0 : i.document))) throw new Error("Iframe document is not accessible");
406
+ if ((i = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = i.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), i.src = "about:blank", document.body.appendChild(i), !(u = i.contentDocument || ((o = i.contentWindow) === null || o === void 0 ? void 0 : o.document))) throw new Error("Iframe document is not accessible");
407
407
  return r({ iframe: u }), setTimeout(function() {
408
- document.body.removeChild(o);
408
+ document.body.removeChild(i);
409
409
  }, 0), [2];
410
410
  }
411
- var c, s;
411
+ var s, c;
412
412
  });
413
413
  });
414
414
  })(function(r) {
415
- var i = r.iframe;
416
- return w(a, void 0, void 0, function() {
417
- var o, t, u, d;
418
- return y(this, function(c) {
419
- return o = i.createElement("canvas"), t = o.getContext("2d"), u = J.map(function(s) {
420
- return F(t, s);
421
- }), d = {}, X.forEach(function(s) {
422
- var p = F(t, s);
423
- u.includes(p) || (d[s] = p);
424
- }), e(d), [2];
415
+ var o = r.iframe;
416
+ return y(a, void 0, void 0, function() {
417
+ var i, t, u, l;
418
+ return w(this, function(s) {
419
+ return i = o.createElement("canvas"), t = i.getContext("2d"), u = J.map(function(c) {
420
+ return F(t, c);
421
+ }), l = {}, X.forEach(function(c) {
422
+ var g = F(t, c);
423
+ u.includes(g) || (l[c] = g);
424
+ }), e(l), [2];
425
425
  });
426
426
  });
427
427
  });
@@ -439,24 +439,24 @@ C().name != "Firefox" && v("fonts", function() {
439
439
  a({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
440
440
  });
441
441
  }), v("permissions", function() {
442
- return w(this, void 0, void 0, function() {
442
+ return y(this, void 0, void 0, function() {
443
443
  var a;
444
- return y(this, function(e) {
445
- return A = (S == null ? void 0 : S.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], a = Array.from({ length: (S == null ? void 0 : S.retries) || 3 }, function() {
444
+ return w(this, function(e) {
445
+ return I = (S == null ? void 0 : S.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], a = Array.from({ length: (S == null ? void 0 : S.retries) || 3 }, function() {
446
446
  return function() {
447
- return w(this, void 0, void 0, function() {
448
- var n, r, i, o, t;
449
- return y(this, function(u) {
447
+ return y(this, void 0, void 0, function() {
448
+ var n, r, o, i, t;
449
+ return w(this, function(u) {
450
450
  switch (u.label) {
451
451
  case 0:
452
- n = {}, r = 0, i = A, u.label = 1;
452
+ n = {}, r = 0, o = I, u.label = 1;
453
453
  case 1:
454
- if (!(r < i.length)) return [3, 6];
455
- o = i[r], u.label = 2;
454
+ if (!(r < o.length)) return [3, 6];
455
+ i = o[r], u.label = 2;
456
456
  case 2:
457
- return u.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: o })];
457
+ return u.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: i })];
458
458
  case 3:
459
- return t = u.sent(), n[o] = t.state.toString(), [3, 5];
459
+ return t = u.sent(), n[i] = t.state.toString(), [3, 5];
460
460
  case 4:
461
461
  return u.sent(), [3, 5];
462
462
  case 5:
@@ -468,7 +468,7 @@ C().name != "Firefox" && v("fonts", function() {
468
468
  });
469
469
  }();
470
470
  }), [2, Promise.all(a).then(function(n) {
471
- return ee(n, A);
471
+ return ee(n, I);
472
472
  })];
473
473
  });
474
474
  });
@@ -491,18 +491,18 @@ C().name != "Firefox" && v("fonts", function() {
491
491
  a({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: e.name, version: e.version }, applePayVersion: ne() });
492
492
  });
493
493
  });
494
- var f, re = C().name !== "SamsungBrowser" ? 1 : 3, h = null;
494
+ var f, re = C().name !== "SamsungBrowser" ? 1 : 3, d = null;
495
495
  v("webgl", function() {
496
- return w(this, void 0, void 0, function() {
496
+ return y(this, void 0, void 0, function() {
497
497
  var a;
498
- return y(this, function(e) {
499
- typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, h = f.getContext("webgl"));
498
+ return w(this, function(e) {
499
+ typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, d = f.getContext("webgl"));
500
500
  try {
501
- if (!h) throw new Error("WebGL not supported");
501
+ if (!d) throw new Error("WebGL not supported");
502
502
  return a = Array.from({ length: re }, function() {
503
503
  return function() {
504
504
  try {
505
- if (!h) throw new Error("WebGL not supported");
505
+ if (!d) throw new Error("WebGL not supported");
506
506
  var n = `
507
507
  attribute vec2 position;
508
508
  void main() {
@@ -513,31 +513,31 @@ v("webgl", function() {
513
513
  void main() {
514
514
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
515
515
  }
516
- `, i = h.createShader(h.VERTEX_SHADER), o = h.createShader(h.FRAGMENT_SHADER);
517
- if (!i || !o) throw new Error("Failed to create shaders");
518
- if (h.shaderSource(i, n), h.shaderSource(o, r), h.compileShader(i), !h.getShaderParameter(i, h.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + h.getShaderInfoLog(i));
519
- if (h.compileShader(o), !h.getShaderParameter(o, h.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + h.getShaderInfoLog(o));
520
- var t = h.createProgram();
516
+ `, o = d.createShader(d.VERTEX_SHADER), i = d.createShader(d.FRAGMENT_SHADER);
517
+ if (!o || !i) throw new Error("Failed to create shaders");
518
+ if (d.shaderSource(o, n), d.shaderSource(i, r), d.compileShader(o), !d.getShaderParameter(o, d.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + d.getShaderInfoLog(o));
519
+ if (d.compileShader(i), !d.getShaderParameter(i, d.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + d.getShaderInfoLog(i));
520
+ var t = d.createProgram();
521
521
  if (!t) throw new Error("Failed to create shader program");
522
- if (h.attachShader(t, i), h.attachShader(t, o), h.linkProgram(t), !h.getProgramParameter(t, h.LINK_STATUS)) throw new Error("Shader program linking failed: " + h.getProgramInfoLog(t));
523
- h.useProgram(t);
524
- for (var u = 137, d = new Float32Array(4 * u), c = 2 * Math.PI / u, s = 0; s < u; s++) {
525
- var p = s * c;
526
- d[4 * s] = 0, d[4 * s + 1] = 0, d[4 * s + 2] = Math.cos(p) * (f.width / 2), d[4 * s + 3] = Math.sin(p) * (f.height / 2);
522
+ if (d.attachShader(t, o), d.attachShader(t, i), d.linkProgram(t), !d.getProgramParameter(t, d.LINK_STATUS)) throw new Error("Shader program linking failed: " + d.getProgramInfoLog(t));
523
+ d.useProgram(t);
524
+ for (var u = 137, l = new Float32Array(4 * u), s = 2 * Math.PI / u, c = 0; c < u; c++) {
525
+ var g = c * s;
526
+ l[4 * c] = 0, l[4 * c + 1] = 0, l[4 * c + 2] = Math.cos(g) * (f.width / 2), l[4 * c + 3] = Math.sin(g) * (f.height / 2);
527
527
  }
528
- var q = h.createBuffer();
529
- h.bindBuffer(h.ARRAY_BUFFER, q), h.bufferData(h.ARRAY_BUFFER, d, h.STATIC_DRAW);
530
- var R = h.getAttribLocation(t, "position");
531
- h.enableVertexAttribArray(R), h.vertexAttribPointer(R, 2, h.FLOAT, !1, 0, 0), h.viewport(0, 0, f.width, f.height), h.clearColor(0, 0, 0, 1), h.clear(h.COLOR_BUFFER_BIT), h.drawArrays(h.LINES, 0, 2 * u);
528
+ var L = d.createBuffer();
529
+ d.bindBuffer(d.ARRAY_BUFFER, L), d.bufferData(d.ARRAY_BUFFER, l, d.STATIC_DRAW);
530
+ var R = d.getAttribLocation(t, "position");
531
+ d.enableVertexAttribArray(R), d.vertexAttribPointer(R, 2, d.FLOAT, !1, 0, 0), d.viewport(0, 0, f.width, f.height), d.clearColor(0, 0, 0, 1), d.clear(d.COLOR_BUFFER_BIT), d.drawArrays(d.LINES, 0, 2 * u);
532
532
  var x = new Uint8ClampedArray(f.width * f.height * 4);
533
- return h.readPixels(0, 0, f.width, f.height, h.RGBA, h.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
533
+ return d.readPixels(0, 0, f.width, f.height, d.RGBA, d.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
534
534
  } catch {
535
535
  return new ImageData(1, 1);
536
536
  } finally {
537
- h && (h.bindBuffer(h.ARRAY_BUFFER, null), h.useProgram(null), h.viewport(0, 0, h.drawingBufferWidth, h.drawingBufferHeight), h.clearColor(0, 0, 0, 0));
537
+ d && (d.bindBuffer(d.ARRAY_BUFFER, null), d.useProgram(null), d.viewport(0, 0, d.drawingBufferWidth, d.drawingBufferHeight), d.clearColor(0, 0, 0, 0));
538
538
  }
539
539
  }();
540
- }), [2, { commonImageHash: I(L(a, f.width, f.height).data.toString()).toString() }];
540
+ }), [2, { commonImageHash: _(q(a, f.width, f.height).data.toString()).toString() }];
541
541
  } catch {
542
542
  return [2, { webgl: "unsupported" }];
543
543
  }
@@ -546,13 +546,13 @@ v("webgl", function() {
546
546
  });
547
547
  });
548
548
  var b = function(a, e, n, r) {
549
- for (var i = (n - e) / r, o = 0, t = 0; t < r; t++)
550
- o += a(e + (t + 0.5) * i);
551
- return o * i;
549
+ for (var o = (n - e) / r, i = 0, t = 0; t < r; t++)
550
+ i += a(e + (t + 0.5) * o);
551
+ return i * o;
552
552
  };
553
553
  v("math", function() {
554
- return w(void 0, void 0, void 0, function() {
555
- return y(this, function(a) {
554
+ return y(void 0, void 0, void 0, function() {
555
+ return w(this, function(a) {
556
556
  return [2, { acos: Math.acos(0.5), asin: b(Math.asin, -1, 1, 97), atan: b(Math.atan, -1, 1, 97), cos: b(Math.cos, 0, Math.PI, 97), cosh: Math.cosh(9 / 7), e: Math.E, largeCos: Math.cos(1e20), largeSin: Math.sin(1e20), largeTan: Math.tan(1e20), log: Math.log(1e3), pi: Math.PI, sin: b(Math.sin, -Math.PI, Math.PI, 97), sinh: b(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: b(Math.tan, 0, 2 * Math.PI, 97), tanh: b(Math.tanh, -9 / 7, 7 / 9, 97) }];
557
557
  });
558
558
  });
@@ -566,7 +566,7 @@ let E = (a = 21) => {
566
566
  };
567
567
  class M {
568
568
  constructor(e) {
569
- l(this, "config");
569
+ h(this, "config");
570
570
  this.config = e;
571
571
  }
572
572
  async getAds(e) {
@@ -598,18 +598,18 @@ class oe extends M {
598
598
  rfr: "searchcraft.io",
599
599
  "results-ta": `${this.config.admTextAdQuantity || 0}`,
600
600
  "results-pa": `${this.config.admProductAdQuantity || 0}`
601
- }).toString()}`, o = await (await fetch(r, { method: "GET" })).json(), t = o.product_ads.map(
602
- (c) => ({
601
+ }).toString()}`, i = await (await fetch(r, { method: "GET" })).json(), t = i.product_ads.map(
602
+ (s) => ({
603
603
  id: E(),
604
604
  adSource: "adMarketplace",
605
605
  admAdType: "adm-product-ad",
606
- admAd: c
606
+ admAd: s
607
607
  })
608
- ), u = o.text_ads.map((c) => ({
608
+ ), u = i.text_ads.map((s) => ({
609
609
  id: E(),
610
610
  adSource: "adMarketplace",
611
611
  admAdType: "adm-text-ad",
612
- admAd: c
612
+ admAd: s
613
613
  }));
614
614
  return t.concat(u);
615
615
  }
@@ -628,15 +628,15 @@ const se = 1e3;
628
628
  class ce extends M {
629
629
  constructor(n) {
630
630
  super(n);
631
- l(this, "adCallTimeout");
631
+ h(this, "adCallTimeout");
632
632
  this.addScriptTagToDocument();
633
633
  }
634
634
  async onQuerySubmitted(n) {
635
635
  this.addScriptTagToDocument();
636
636
  }
637
637
  async onQueryFetched(n, r) {
638
- var i;
639
- if ((((i = r.data.hits) == null ? void 0 : i.length) || 0) === 0) {
638
+ var o;
639
+ if ((((o = r.data.hits) == null ? void 0 : o.length) || 0) === 0) {
640
640
  this.removeScriptTagFromDocument();
641
641
  return;
642
642
  }
@@ -672,12 +672,12 @@ class ce extends M {
672
672
  const ue = 600;
673
673
  class de {
674
674
  constructor(e, n, r) {
675
- l(this, "measureRequestTimeout");
676
- l(this, "measureRequestsBatched", []);
677
- l(this, "config");
678
- l(this, "sdkInfo");
679
- l(this, "userId");
680
- l(this, "sessionId");
675
+ h(this, "measureRequestTimeout");
676
+ h(this, "measureRequestsBatched", []);
677
+ h(this, "config");
678
+ h(this, "sdkInfo");
679
+ h(this, "userId");
680
+ h(this, "sessionId");
681
681
  /**
682
682
  * Sends a measure event to the `/measure/event` endpoint for analytics purposes.
683
683
  *
@@ -685,8 +685,8 @@ class de {
685
685
  * @param {Partial<MeasureRequestProperties>} properties - Additional properties to send with the event.
686
686
  * @param {Partial<MeasureRequestUser>} user - Additional user properites to send with the event.
687
687
  */
688
- l(this, "sendMeasureEvent", async (e, n = {}, r = {}) => {
689
- const i = {
688
+ h(this, "sendMeasureEvent", async (e, n = {}, r = {}) => {
689
+ const o = {
690
690
  event_name: e,
691
691
  properties: {
692
692
  searchcraft_index_names: this.config.index,
@@ -699,7 +699,7 @@ class de {
699
699
  }
700
700
  };
701
701
  if (e === "document_clicked") {
702
- const o = JSON.stringify(i), t = `${this.baseMeasureUrl}/event`;
702
+ const i = JSON.stringify(o), t = `${this.baseMeasureUrl}/event`;
703
703
  try {
704
704
  const u = await fetch(t, {
705
705
  method: "POST",
@@ -709,7 +709,7 @@ class de {
709
709
  "X-Sc-User-Id": this.userId,
710
710
  "X-Sc-Session-Id": this.sessionId
711
711
  },
712
- body: o,
712
+ body: i,
713
713
  keepalive: !0
714
714
  });
715
715
  if (!u.ok)
@@ -720,8 +720,8 @@ class de {
720
720
  throw console.error("Error sending MeasureRequest:", u), u;
721
721
  }
722
722
  } else
723
- this.measureRequestsBatched.push(i), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
724
- const o = JSON.stringify({ items: this.measureRequestsBatched }), t = `${this.baseMeasureUrl}/batch`;
723
+ this.measureRequestsBatched.push(o), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
724
+ const i = JSON.stringify({ items: this.measureRequestsBatched }), t = `${this.baseMeasureUrl}/batch`;
725
725
  try {
726
726
  const u = await fetch(t, {
727
727
  method: "POST",
@@ -731,7 +731,7 @@ class de {
731
731
  "X-Sc-User-Id": this.userId,
732
732
  "X-Sc-Session-Id": this.sessionId
733
733
  },
734
- body: o,
734
+ body: i,
735
735
  keepalive: !0
736
736
  });
737
737
  if (this.measureRequestsBatched = [], !u.ok)
@@ -767,7 +767,7 @@ class de {
767
767
  };
768
768
  }
769
769
  }
770
- const he = (a) => a.endsWith("/") ? a.slice(0, -1) : a, _ = (a) => {
770
+ const le = (a) => a.endsWith("/") ? a.slice(0, -1) : a, A = (a) => {
771
771
  let e = "";
772
772
  if (e = a.trim(), e = e.replace(/[‘’“”]/g, (r) => ({
773
773
  "‘": "'",
@@ -779,58 +779,58 @@ const he = (a) => a.endsWith("/") ? a.slice(0, -1) : a, _ = (a) => {
779
779
  "The search term contains an uneven number of quote characters."
780
780
  );
781
781
  return e;
782
- }, le = 500;
782
+ }, he = 500;
783
783
  class me {
784
784
  constructor(e, n, r) {
785
- l(this, "config");
786
- l(this, "userId");
787
- l(this, "parent");
788
- l(this, "searchCompletedEventTimeout");
785
+ h(this, "config");
786
+ h(this, "userId");
787
+ h(this, "parent");
788
+ h(this, "searchCompletedEventTimeout");
789
+ h(this, "abortController");
789
790
  /**
790
791
  * Make the request to get the search results.
791
792
  * @param {properties} properties - The properties for the search.
793
+ * @param sendTelemetry - Whether or not to emit measure and subscription events for this search.
792
794
  * @returns
793
795
  */
794
- l(this, "getSearchResponseItems", async (e) => {
795
- var i, o, t, u, d;
796
- let n;
797
- const r = typeof e == "string" ? e : e.searchTerm;
798
- try {
799
- return (i = this.parent.measureClient) == null || i.sendMeasureEvent("search_requested", {
800
- search_term: r
801
- }), this.parent.emitEvent("query_submitted", {
802
- name: "query_submitted",
803
- data: {
804
- searchTerm: r
805
- }
806
- }), (o = this.parent.adClient) == null || o.onQuerySubmitted(
807
- typeof e == "string" ? { searchTerm: r, mode: "exact" } : e
808
- ), typeof e == "string" ? n = await this.handleGetSearchResponseItemsWithString(e) : n = await this.handleGetSearchResponseItemsWithObject(e), (t = this.parent.measureClient) == null || t.sendMeasureEvent("search_response_received", {
809
- search_term: r,
810
- number_of_documents: n.data.count
811
- }), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
812
- var c;
813
- (c = this.parent.measureClient) == null || c.sendMeasureEvent("search_completed", {
814
- search_term: r,
815
- number_of_documents: n.data.count
816
- });
817
- }, le), this.parent.emitEvent("query_fetched", {
818
- name: "query_fetched",
819
- data: {
820
- searchTerm: r
821
- }
822
- }), (((u = n.data.hits) == null ? void 0 : u.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
823
- name: "no_results_returned"
824
- }), (d = this.parent.adClient) == null || d.onQueryFetched(
825
- typeof e == "string" ? { searchTerm: r, mode: "exact" } : e,
826
- n
827
- ), n;
828
- } catch (c) {
829
- throw console.error("Error parsing response:", c), c;
830
- }
796
+ h(this, "getSearchResponseItems", async (e, n = !0) => {
797
+ var i, t, u, l, s, c;
798
+ (i = this.abortController) == null || i.abort(
799
+ "A newer search request has replaced this one."
800
+ ), this.abortController = new AbortController();
801
+ let r, o = "";
802
+ return typeof e == "string" ? o = A(e) : (e.searchTerm = A(e.searchTerm), o = e.searchTerm), (t = this.parent.measureClient) == null || t.sendMeasureEvent("search_requested", {
803
+ search_term: o
804
+ }), this.parent.emitEvent("query_submitted", {
805
+ name: "query_submitted",
806
+ data: {
807
+ searchTerm: o
808
+ }
809
+ }), (u = this.parent.adClient) == null || u.onQuerySubmitted(
810
+ typeof e == "string" ? { searchTerm: o, mode: "exact" } : e
811
+ ), typeof e == "string" ? r = await this.handleGetSearchResponseItemsWithString(o) : r = await this.handleGetSearchResponseItemsWithObject(e), n && ((l = this.parent.measureClient) == null || l.sendMeasureEvent("search_response_received", {
812
+ search_term: o,
813
+ number_of_documents: r.data.count
814
+ }), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
815
+ var g;
816
+ (g = this.parent.measureClient) == null || g.sendMeasureEvent("search_completed", {
817
+ search_term: o,
818
+ number_of_documents: r.data.count
819
+ });
820
+ }, he), this.parent.emitEvent("query_fetched", {
821
+ name: "query_fetched",
822
+ data: {
823
+ searchTerm: o
824
+ }
825
+ }), (((s = r.data.hits) == null ? void 0 : s.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
826
+ name: "no_results_returned"
827
+ }), (c = this.parent.adClient) == null || c.onQueryFetched(
828
+ typeof e == "string" ? { searchTerm: o, mode: "exact" } : e,
829
+ r
830
+ )), r;
831
831
  });
832
- l(this, "handleGetSearchResponseItemsWithString", async (e) => {
833
- var i;
832
+ h(this, "handleGetSearchResponseItemsWithString", async (e) => {
833
+ var o, i;
834
834
  let n;
835
835
  try {
836
836
  n = JSON.parse(e), n = {
@@ -846,9 +846,10 @@ class me {
846
846
  Authorization: this.config.readKey,
847
847
  "Content-Type": "application/json",
848
848
  "X-Sc-User-Id": this.userId,
849
- "X-Sc-Session-Id": ((i = this.parent.measureClient) == null ? void 0 : i.sessionId) || E()
849
+ "X-Sc-Session-Id": ((o = this.parent.measureClient) == null ? void 0 : o.sessionId) || E()
850
850
  },
851
- body: JSON.stringify(n)
851
+ body: JSON.stringify(n),
852
+ signal: (i = this.abortController) == null ? void 0 : i.signal
852
853
  });
853
854
  if (!r.ok)
854
855
  throw new Error(
@@ -856,37 +857,34 @@ class me {
856
857
  );
857
858
  return await r.json();
858
859
  });
859
- l(this, "handleGetSearchResponseItemsWithObject", async (e) => {
860
- var n;
861
- try {
862
- const r = await fetch(this.baseSearchUrl, {
863
- method: "POST",
864
- headers: {
865
- Authorization: this.config.readKey,
866
- "Content-Type": "application/json",
867
- "X-Sc-User-Id": this.userId,
868
- "X-Sc-Session-Id": ((n = this.parent.measureClient) == null ? void 0 : n.sessionId) || E()
860
+ h(this, "handleGetSearchResponseItemsWithObject", async (e) => {
861
+ var r, o;
862
+ const n = await fetch(this.baseSearchUrl, {
863
+ method: "POST",
864
+ headers: {
865
+ Authorization: this.config.readKey,
866
+ "Content-Type": "application/json",
867
+ "X-Sc-User-Id": this.userId,
868
+ "X-Sc-Session-Id": ((r = this.parent.measureClient) == null ? void 0 : r.sessionId) || E()
869
+ },
870
+ body: JSON.stringify({
871
+ query: this.formatParamsForRequest(e),
872
+ offset: e.offset || 0,
873
+ limit: e.limit || this.config.searchResultsPerPage || 20,
874
+ ...e.order_by && {
875
+ order_by: e.order_by
869
876
  },
870
- body: JSON.stringify({
871
- query: this.formatParamsForRequest(e),
872
- offset: e.offset || 0,
873
- limit: e.limit || this.config.searchResultsPerPage || 20,
874
- ...e.order_by && {
875
- order_by: e.order_by
876
- },
877
- ...e.sort && {
878
- sort: e.sort
879
- }
880
- })
881
- });
882
- if (!r.ok)
883
- throw new Error(
884
- `Error: ${r.statusText} (Status: ${r.status})`
885
- );
886
- return await r.json();
887
- } catch (r) {
888
- throw console.error("Error parsing response:", r), r;
889
- }
877
+ ...e.sort && {
878
+ sort: e.sort
879
+ }
880
+ }),
881
+ signal: (o = this.abortController) == null ? void 0 : o.signal
882
+ });
883
+ if (!n.ok)
884
+ throw new Error(
885
+ `Error: ${n.statusText} (Status: ${n.status})`
886
+ );
887
+ return await n.json();
890
888
  });
891
889
  this.parent = e, this.config = n, this.userId = r;
892
890
  }
@@ -905,70 +903,96 @@ class me {
905
903
  const n = [];
906
904
  let r = "should";
907
905
  e.facetPathsForIndexFields && Object.keys(e.facetPathsForIndexFields).forEach((t) => {
908
- var d;
909
- const u = (d = e.facetPathsForIndexFields) == null ? void 0 : d[t];
906
+ var l;
907
+ const u = (l = e.facetPathsForIndexFields) == null ? void 0 : l[t];
910
908
  u && (r = "must", n.push({
911
909
  occur: "must",
912
910
  exact: {
913
- ctx: _(u.value)
911
+ ctx: A(u.value)
914
912
  }
915
913
  }));
916
914
  }), e.rangeValueForIndexFields && Object.keys(e.rangeValueForIndexFields).forEach((t) => {
917
- var d;
918
- const u = (d = e.rangeValueForIndexFields) == null ? void 0 : d[t];
915
+ var l;
916
+ const u = (l = e.rangeValueForIndexFields) == null ? void 0 : l[t];
919
917
  u && (r = "must", n.push({
920
918
  occur: "must",
921
919
  exact: {
922
- ctx: _(u.value)
920
+ ctx: A(u.value)
923
921
  }
924
922
  }));
925
923
  });
926
- const i = _(e.searchTerm), o = e.mode === "fuzzy" ? { fuzzy: { ctx: i } } : {
924
+ const o = e.searchTerm, i = e.mode === "fuzzy" ? { fuzzy: { ctx: o } } : {
927
925
  exact: {
928
- ctx: `${i.startsWith('"') ? i : `"${i}"`}`
926
+ ctx: `${o.startsWith('"') ? o : `"${o}"`}`
929
927
  }
930
928
  };
931
929
  return n.push({
932
930
  occur: e.mode === "exact" ? "must" : r,
933
931
  // Valid, as 'occur' is a required property in SearchClientQuery
934
- ...o
932
+ ...i
935
933
  }), n;
936
934
  }
937
935
  }
938
936
  class ve {
939
937
  constructor(e, n) {
940
- l(this, "config");
941
- l(this, "measureClient");
942
- l(this, "searchClient");
943
- l(this, "adClient");
944
- l(this, "userId");
945
- l(this, "requestTimeout");
946
- l(this, "subscriptionEvents", {});
947
- l(this, "getResponseItems", (e, n, r) => {
948
- const i = async () => {
938
+ h(this, "config");
939
+ h(this, "measureClient");
940
+ h(this, "searchClient");
941
+ h(this, "adClient");
942
+ h(this, "userId");
943
+ h(this, "requestTimeout");
944
+ h(this, "subscriptionEvents", {});
945
+ h(this, "getResponseItems", (e, n, r) => {
946
+ const o = async () => {
949
947
  (async () => {
950
- var u;
951
- const o = await ((u = this == null ? void 0 : this.searchClient) == null ? void 0 : u.getSearchResponseItems(e));
952
- if (!o)
953
- throw new Error("Search client was not initialized.");
954
- const t = (o.data.hits || []).filter((d) => !!d.doc).map((d) => ({
948
+ var l;
949
+ if (!this.searchClient) {
950
+ console.error("Search client was not initialized.");
951
+ return;
952
+ }
953
+ let i;
954
+ try {
955
+ i = await this.searchClient.getSearchResponseItems(e);
956
+ } catch (s) {
957
+ console.info(`Search request error: ${s}`);
958
+ return;
959
+ }
960
+ if (!i) {
961
+ console.error("Search request error: Search response was undefined");
962
+ return;
963
+ }
964
+ const t = (i.data.hits || []).filter((s) => !!s.doc).map((s) => ({
955
965
  id: E(),
956
- document: d.doc || { id: -1 },
957
- source_index: d.source_index,
966
+ document: s.doc || { id: -1 },
967
+ source_index: s.source_index,
958
968
  type: "SearchDocument"
959
969
  }));
960
- n(o, t);
970
+ let u;
971
+ if (typeof e == "object") {
972
+ const s = structuredClone(
973
+ e
974
+ );
975
+ if (s.facetPathsForIndexFields && Object.keys(s.facetPathsForIndexFields).length > 0) {
976
+ s.facetPathsForIndexFields = void 0;
977
+ try {
978
+ u = await ((l = this == null ? void 0 : this.searchClient) == null ? void 0 : l.getSearchResponseItems(s, !1));
979
+ } catch (c) {
980
+ console.info(`Search request error: ${c}`);
981
+ }
982
+ }
983
+ }
984
+ n(e, i, t, u);
961
985
  })(), (async () => {
962
986
  if (this.adClient && typeof e != "string") {
963
- const o = await this.adClient.getAds(e);
964
- r(o);
987
+ const i = await this.adClient.getAds(e);
988
+ r(i);
965
989
  }
966
990
  })();
967
991
  };
968
992
  clearTimeout(this.requestTimeout), this.config.searchDebounceDelay ? this.requestTimeout = setTimeout(
969
- i,
993
+ o,
970
994
  this.config.searchDebounceDelay
971
- ) : i();
995
+ ) : o();
972
996
  });
973
997
  if (!e.endpointURL || !e.index || !e.readKey)
974
998
  throw new Error(
@@ -977,7 +1001,7 @@ class ve {
977
1001
  this.config = {
978
1002
  ...e,
979
1003
  // Strips off the trailing '/' from an endpointURL if one is accidentally added
980
- endpointURL: he(e.endpointURL)
1004
+ endpointURL: le(e.endpointURL)
981
1005
  }, this.userId = "", typeof window < "u" && typeof customElements < "u" && n.sdkName === "@searchcraft/javascript-sdk" && globalThis.__scDefineCustomElements__ && globalThis.__scDefineCustomElements__(), typeof window < "u" && (this.initClients(this.config, n), this.initInputForms(), this.startObservingMutations());
982
1006
  }
983
1007
  initInputForms() {
@@ -995,12 +1019,12 @@ class ve {
995
1019
  */
996
1020
  startObservingMutations() {
997
1021
  new MutationObserver((n, r) => {
998
- let i = !1;
999
- for (const o of n)
1000
- o.type === "childList" && o.addedNodes.forEach((t) => {
1001
- t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (i = !0);
1022
+ let o = !1;
1023
+ for (const i of n)
1024
+ i.type === "childList" && i.addedNodes.forEach((t) => {
1025
+ t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (o = !0);
1002
1026
  });
1003
- i && this.initInputForms();
1027
+ o && this.initInputForms();
1004
1028
  }).observe(document.body, { childList: !0, subtree: !0 });
1005
1029
  }
1006
1030
  initClients(e, n) {
@@ -1024,8 +1048,8 @@ class ve {
1024
1048
  }
1025
1049
  emitEvent(e, n) {
1026
1050
  var r;
1027
- (r = this.subscriptionEvents[e]) == null || r.forEach((i) => {
1028
- i(n);
1051
+ (r = this.subscriptionEvents[e]) == null || r.forEach((o) => {
1052
+ o(n);
1029
1053
  });
1030
1054
  }
1031
1055
  subscribe(e, n) {
@@ -1709,9 +1733,11 @@ const initialSearchcraftStateValues = {
1709
1733
  rangeValueForIndexFields: {},
1710
1734
  searchTerm: '',
1711
1735
  searchMode: 'fuzzy',
1736
+ searchClientRequest: undefined,
1712
1737
  searchClientResponseItems: [],
1713
1738
  searchResponseTimeTaken: undefined,
1714
1739
  searchResponseFacetPrime: undefined,
1740
+ supplementalFacetPrime: undefined,
1715
1741
  searchResultsCount: 0,
1716
1742
  searchResultsPerPage: 20,
1717
1743
  searchResultsPage: 1,
@@ -1811,7 +1837,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1811
1837
  }, functions.setSearchClientResponseItemsFromResponse, functions.setAdClientResponseItems);
1812
1838
  },
1813
1839
  setAdClientResponseItems: (items) => functions.set({ adClientResponseItems: items }),
1814
- setSearchClientResponseItemsFromResponse: (response, items) => {
1840
+ setSearchClientResponseItemsFromResponse: (request, response, items, supplementalResponse) => {
1815
1841
  const { facets, count = 0, time_taken = 0 } = response.data;
1816
1842
  const state = functions.set((state) => {
1817
1843
  return {
@@ -1823,12 +1849,14 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1823
1849
  count === state.searchResultsCount ? state.searchResultsPage : 1,
1824
1850
  searchResultsCount: count,
1825
1851
  searchResponseFacetPrime: facets,
1852
+ supplementalFacetPrime: supplementalResponse?.data.facets,
1853
+ searchClientRequest: request,
1826
1854
  };
1827
1855
  });
1828
1856
  state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
1829
1857
  state.logger?.log(O.DEBUG, `Facets from response: ${JSON.stringify(facets)}`);
1830
1858
  },
1831
- setInitialSearchClientResponseItemsFromResponse: (response, items) => {
1859
+ setInitialSearchClientResponseItemsFromResponse: (request, response, items) => {
1832
1860
  const state = get();
1833
1861
  const { count = 0, time_taken = 0 } = response.data;
1834
1862
  functions.set((state) => {
@@ -1840,6 +1868,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1840
1868
  // Reset to first page when response count changes
1841
1869
  count === state.searchResultsCount ? state.searchResultsPage : 1,
1842
1870
  searchResultsCount: count,
1871
+ searchClientRequest: request,
1843
1872
  };
1844
1873
  });
1845
1874
  state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
@@ -1867,12 +1896,6 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1867
1896
  */
1868
1897
  functions.set({
1869
1898
  searchTerm,
1870
- facetPathsForIndexFields: {},
1871
- ...(searchTerm.trim().length === 0 && {
1872
- searchMode: 'fuzzy',
1873
- sortType: null,
1874
- orderByField: null,
1875
- }),
1876
1899
  });
1877
1900
  },
1878
1901
  setSearchClientResponseItems: (items) => functions.set({ searchClientResponseItems: items }),
@@ -1902,4 +1925,4 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1902
1925
 
1903
1926
  export { searchcraftStore as s, ve as v };
1904
1927
 
1905
- //# sourceMappingURL=p-60fd824d.js.map
1928
+ //# sourceMappingURL=p-b54873ff.js.map