@searchcraft/javascript-sdk 0.10.5 → 0.10.7

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 (49) hide show
  1. package/dist/components/index.d.ts +16 -7
  2. package/dist/components/index.js +4 -4
  3. package/dist/components/{p-7c10ca44.js → p-062d6b80.js} +388 -365
  4. package/dist/components/p-062d6b80.js.map +1 -0
  5. package/dist/components/{p-b72015a6.js → p-274c5cc8.js} +2 -2
  6. package/dist/components/{p-b72015a6.js.map → p-274c5cc8.js.map} +1 -1
  7. package/dist/components/{p-6c471ee0.js → p-320e3895.js} +2 -2
  8. package/dist/components/{p-6c471ee0.js.map → p-320e3895.js.map} +1 -1
  9. package/dist/components/{p-bfad84c6.js → p-acab4d41.js} +8 -12
  10. package/dist/components/p-acab4d41.js.map +1 -0
  11. package/dist/components/{p-f1afb299.js → p-adc6236e.js} +80 -35
  12. package/dist/components/p-adc6236e.js.map +1 -0
  13. package/dist/components/{p-d9222264.js → p-b01f8216.js} +11 -11
  14. package/dist/components/p-b01f8216.js.map +1 -0
  15. package/dist/components/{p-f4b0ff45.js → p-b4cac872.js} +2 -2
  16. package/dist/components/{p-f4b0ff45.js.map → p-b4cac872.js.map} +1 -1
  17. package/dist/components/{p-bb700499.js → p-e99cd628.js} +104 -36
  18. package/dist/components/p-e99cd628.js.map +1 -0
  19. package/dist/components/{p-8a4cfe99.js → p-ea48ccae.js} +2 -2
  20. package/dist/components/{p-8a4cfe99.js.map → p-ea48ccae.js.map} +1 -1
  21. package/dist/components/searchcraft-ad.js +1 -1
  22. package/dist/components/searchcraft-facet-list.js +1 -1
  23. package/dist/components/searchcraft-filter-panel.js +3 -3
  24. package/dist/components/searchcraft-input-form.js +1 -1
  25. package/dist/components/searchcraft-pagination.js +1 -1
  26. package/dist/components/searchcraft-popover-button.js +1 -1
  27. package/dist/components/searchcraft-popover-footer.js +1 -1
  28. package/dist/components/searchcraft-popover-form.js +6 -6
  29. package/dist/components/searchcraft-popover-list-item.js +1 -1
  30. package/dist/components/searchcraft-popover-list-view.js +1 -1
  31. package/dist/components/searchcraft-results-info.js +1 -1
  32. package/dist/components/searchcraft-search-result.js +1 -1
  33. package/dist/components/searchcraft-search-results-per-page.js +1 -1
  34. package/dist/components/searchcraft-search-results.js +10 -10
  35. package/dist/components/searchcraft-search-results.js.map +1 -1
  36. package/dist/components/searchcraft-toggle-button.js +1 -1
  37. package/dist/hydrate/index.js +402 -296
  38. package/dist/hydrate/index.mjs +402 -296
  39. package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +22 -2
  40. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +17 -6
  41. package/dist/types/components.d.ts +8 -2
  42. package/dist/types/store/SearchcraftStore.types.d.ts +4 -3
  43. package/dist/types/utils/facets.d.ts +11 -1
  44. package/package.json +3 -3
  45. package/dist/components/p-7c10ca44.js.map +0 -1
  46. package/dist/components/p-bb700499.js.map +0 -1
  47. package/dist/components/p-bfad84c6.js.map +0 -1
  48. package/dist/components/p-d9222264.js.map +0 -1
  49. package/dist/components/p-f1afb299.js.map +0 -1
@@ -1,7 +1,7 @@
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
3
  var h = (a, e, n) => N(a, typeof e != "symbol" ? e + "" : e, n);
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 || {});
4
+ var D = /* @__PURE__ */ ((a) => (a[a.DEBUG = 0] = "DEBUG", a[a.INFO = 1] = "INFO", a[a.WARN = 2] = "WARN", a[a.ERROR = 3] = "ERROR", a))(D || {});
5
5
  class pe {
6
6
  constructor(e) {
7
7
  h(this, "logLevel");
@@ -9,7 +9,7 @@ class pe {
9
9
  this.logLevel = e.logLevel || 1, this.logFormatter = e.logFormatter || this.defaultFormatter;
10
10
  }
11
11
  defaultFormatter(e, n) {
12
- return `[${O[e]}] ${( new Date()).toISOString()}: ${n}`;
12
+ return `[${D[e]}] ${( new Date()).toISOString()}: ${n}`;
13
13
  }
14
14
  debug(e) {
15
15
  this.logLevel <= 0 && console.log(this.logFormatter(0, e));
@@ -40,216 +40,216 @@ class pe {
40
40
  }
41
41
  }
42
42
  }
43
- function y(a, e, n, r) {
44
- return new (n || (n = Promise))(function(s, o) {
45
- function t(c) {
43
+ function w(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 (i) {
49
- o(i);
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 (i) {
56
- o(i);
54
+ l(r.throw(s));
55
+ } catch (c) {
56
+ i(c);
57
57
  }
58
58
  }
59
- function d(c) {
60
- var i;
61
- c.done ? s(c.value) : (i = c.value, i instanceof n ? i : new n(function(p) {
62
- p(i);
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 w(a, e) {
69
- var n, r, s, o, t = { label: 0, sent: function() {
70
- if (1 & s[0]) throw s[1];
71
- return s[1];
68
+ function y(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(i) {
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, i[0] && (t = 0)), t; ) try {
81
- if (n = 1, r && (s = 2 & i[0] ? r.return : i[0] ? r.throw || ((s = r.return) && s.call(r), 0) : r.next) && !(s = s.call(r, i[1])).done) return s;
82
- switch (r = 0, s && (i = [2 & i[0], s.value]), i[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
- s = i;
85
+ o = c;
86
86
  break;
87
87
  case 4:
88
- return t.label++, { value: i[1], done: !1 };
88
+ return t.label++, { value: c[1], done: !1 };
89
89
  case 5:
90
- t.label++, r = i[1], i = [0];
90
+ t.label++, r = c[1], c = [0];
91
91
  continue;
92
92
  case 7:
93
- i = t.ops.pop(), t.trys.pop();
93
+ c = t.ops.pop(), t.trys.pop();
94
94
  continue;
95
95
  default:
96
- if (s = t.trys, !((s = s.length > 0 && s[s.length - 1]) || i[0] !== 6 && i[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 (i[0] === 3 && (!s || i[1] > s[0] && i[1] < s[3])) {
101
- t.label = i[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 (i[0] === 6 && t.label < s[1]) {
105
- t.label = s[1], s = i;
104
+ if (c[0] === 6 && t.label < o[1]) {
105
+ t.label = o[1], o = c;
106
106
  break;
107
107
  }
108
- if (s && t.label < s[2]) {
109
- t.label = s[2], t.ops.push(i);
108
+ if (o && t.label < o[2]) {
109
+ t.label = o[2], t.ops.push(c);
110
110
  break;
111
111
  }
112
- s[2] && t.ops.pop(), t.trys.pop();
112
+ o[2] && t.ops.pop(), t.trys.pop();
113
113
  continue;
114
114
  }
115
- i = e.call(a, t);
116
- } catch (p) {
117
- i = [6, p], r = 0;
115
+ c = e.call(a, t);
116
+ } catch (g) {
117
+ c = [6, g], r = 0;
118
118
  } finally {
119
- n = s = 0;
119
+ n = o = 0;
120
120
  }
121
- if (5 & i[0]) throw i[1];
122
- return { value: i[0] ? i[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
  }
127
- var S = { exclude: [] }, D = {}, j = { timeout: "true" }, v = function(a, e) {
128
- typeof window < "u" && (D[a] = e);
127
+ var S = { exclude: [] }, U = {}, j = { timeout: "true" }, v = function(a, e) {
128
+ typeof window < "u" && (U[a] = e);
129
129
  }, G = function() {
130
- return Object.fromEntries(Object.entries(D).filter(function(a) {
130
+ return Object.fromEntries(Object.entries(U).filter(function(a) {
131
131
  var e, n = a[0];
132
132
  return !(!((e = S == null ? void 0 : S.exclude) === null || e === void 0) && e.includes(n));
133
133
  }).map(function(a) {
134
134
  return [a[0], (0, a[1])()];
135
135
  }));
136
136
  };
137
- function T(a) {
137
+ function I(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 _(a, e) {
144
+ function R(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 i = d.subarray(4 * c, 4 * (c + 1));
151
- i[0] = Math.imul(i[0], m[0]), i[0] = g(i[0], 15), i[0] = Math.imul(i[0], m[1]), t[0] = t[0] ^ i[0], t[0] = g(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, i[1] = Math.imul(i[1], m[1]), i[1] = g(i[1], 16), i[1] = Math.imul(i[1], m[2]), t[1] = t[1] ^ i[1], t[1] = g(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, i[2] = Math.imul(i[2], m[2]), i[2] = g(i[2], 17), i[2] = Math.imul(i[2], m[3]), t[2] = t[2] ^ i[2], t[2] = g(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, i[3] = Math.imul(i[3], m[3]), i[3] = g(i[3], 18), i[3] = Math.imul(i[3], m[0]), t[3] = t[3] ^ i[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), i = 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] ^ i[14] << 16;
157
+ s[3] = s[3] ^ c[14] << 16;
158
158
  case 14:
159
- c[3] = c[3] ^ i[13] << 8;
159
+ s[3] = s[3] ^ c[13] << 8;
160
160
  case 13:
161
- c[3] = c[3] ^ i[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] ^ i[11] << 24;
163
+ s[2] = s[2] ^ c[11] << 24;
164
164
  case 11:
165
- c[2] = c[2] ^ i[10] << 16;
165
+ s[2] = s[2] ^ c[10] << 16;
166
166
  case 10:
167
- c[2] = c[2] ^ i[9] << 8;
167
+ s[2] = s[2] ^ c[9] << 8;
168
168
  case 9:
169
- c[2] = c[2] ^ i[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] ^ i[7] << 24;
171
+ s[1] = s[1] ^ c[7] << 24;
172
172
  case 7:
173
- c[1] = c[1] ^ i[6] << 16;
173
+ s[1] = s[1] ^ c[6] << 16;
174
174
  case 6:
175
- c[1] = c[1] ^ i[5] << 8;
175
+ s[1] = s[1] ^ c[5] << 8;
176
176
  case 5:
177
- c[1] = c[1] ^ i[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] ^ i[3] << 24;
179
+ s[0] = s[0] ^ c[3] << 24;
180
180
  case 3:
181
- c[0] = c[0] ^ i[2] << 16;
181
+ s[0] = s[0] ^ c[2] << 16;
182
182
  case 2:
183
- c[0] = c[0] ^ i[1] << 8;
183
+ s[0] = s[0] ^ c[1] << 8;
184
184
  case 1:
185
- c[0] = c[0] ^ i[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] = I(t[0]), t[1] = I(t[1]), t[2] = I(t[2]), t[3] = I(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 s = new Uint8Array(r.buffer);
191
- return Array.from(s).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
- function V(a, e) {
195
+ function W(a, e) {
196
196
  return new Promise(function(n) {
197
197
  setTimeout(function() {
198
198
  return n(e);
199
199
  }, a);
200
200
  });
201
201
  }
202
- function W(a, e, n) {
202
+ function V(a, e, n) {
203
203
  return Promise.all(a.map(function(r) {
204
- return Promise.race([r, V(e, n)]);
204
+ return Promise.race([r, W(e, n)]);
205
205
  }));
206
206
  }
207
207
  function $() {
208
- return y(this, void 0, void 0, function() {
209
- var a, e, n, r, s;
210
- return w(this, function(o) {
211
- switch (o.label) {
208
+ return w(this, void 0, void 0, function() {
209
+ var a, e, n, r, o;
210
+ return y(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, W(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
- }), s = {}, r.forEach(function(t, u) {
218
- s[e[u]] = t;
219
- }), [2, U(s, S.exclude || [])];
217
+ }), o = {}, r.forEach(function(t, u) {
218
+ o[e[u]] = t;
219
+ }), [2, q(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
  }
225
225
  });
226
226
  });
227
227
  }
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);
228
+ function q(a, e) {
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 = q(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 s in a) r(s);
241
+ for (var o in a) r(o);
242
242
  return n;
243
243
  }
244
244
  function z(a) {
245
- return y(this, void 0, void 0, function() {
245
+ return w(this, void 0, void 0, function() {
246
246
  var e, n;
247
- return w(this, function(r) {
247
+ return y(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 = _(JSON.stringify(e)), [2, n.toString()];
252
+ return e = r.sent(), n = R(JSON.stringify(e)), [2, n.toString()];
253
253
  case 2:
254
254
  throw r.sent();
255
255
  case 3:
@@ -263,9 +263,9 @@ function H(a) {
263
263
  return e;
264
264
  }
265
265
  function L(a, e, n) {
266
- for (var r = [], s = 0; s < a[0].data.length; s++) {
267
- for (var o = [], t = 0; t < a.length; t++) o.push(a[t].data[s]);
268
- r.push(Q(o));
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,73 +273,73 @@ 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 s = a[0];
278
- for (var o in e) e[o] > e[s] && (s = parseInt(o, 10));
279
- return s;
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
- function C() {
281
+ function A() {
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 s = r[n], o = a.match(s);
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 y(this, void 0, void 0, function() {
291
- return w(this, function(a) {
290
+ return w(this, void 0, void 0, function() {
291
+ return y(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), s = 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: s.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
  });
305
305
  });
306
306
  });
307
- var K = C().name !== "SamsungBrowser" ? 1 : 3, P = 280, F = 20;
308
- C().name != "Firefox" && v("canvas", function() {
307
+ var K = A().name !== "SamsungBrowser" ? 1 : 3, k = 280, F = 20;
308
+ A().name != "Firefox" && v("canvas", function() {
309
309
  return document.createElement("canvas").getContext("2d"), new Promise(function(a) {
310
310
  var e = Array.from({ length: K }, function() {
311
311
  return function() {
312
312
  var n = document.createElement("canvas"), r = n.getContext("2d");
313
313
  if (!r) return new ImageData(1, 1);
314
- n.width = P, n.height = F;
315
- var s = r.createLinearGradient(0, 0, n.width, n.height);
316
- s.addColorStop(0, "red"), s.addColorStop(0.16666666666666666, "orange"), s.addColorStop(0.3333333333333333, "yellow"), s.addColorStop(0.5, "green"), s.addColorStop(0.6666666666666666, "blue"), s.addColorStop(0.8333333333333334, "indigo"), s.addColorStop(1, "violet"), r.fillStyle = s, 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();
314
+ n.width = k, n.height = F;
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: _(L(e, P, F).data.toString()).toString() });
323
+ a({ commonImageDataHash: R(L(e, k, F).data.toString()).toString() });
324
324
  });
325
325
  });
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
- function k(a, e) {
326
+ var M, 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
+ function O(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;
330
330
  }
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(), s = (n.getParameter(n.RENDERER) || "").toString(), o = { vendor: r, renderer: s, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
- if (!s.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 s = 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 i = String(c);
359
- t[i] = (t[i] || 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
- s && (n[r] = s);
370
+ o && (n[r] = o);
371
371
  }), n;
372
372
  }
373
373
  function te() {
@@ -386,42 +386,42 @@ function ne() {
386
386
  }
387
387
  return 0;
388
388
  }
389
- C().name != "Firefox" && v("fonts", function() {
389
+ A().name != "Firefox" && v("fonts", function() {
390
390
  var a = this;
391
391
  return new Promise(function(e, n) {
392
392
  try {
393
393
  (function(r) {
394
- var s;
395
- y(this, void 0, void 0, function() {
396
- var o, t, u;
397
- return w(this, function(d) {
398
- switch (d.label) {
394
+ var o;
395
+ w(this, void 0, void 0, function() {
396
+ var i, t, u;
397
+ return y(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, i);
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 || ((s = o.contentWindow) === null || s === void 0 ? void 0 : s.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, i;
411
+ var s, c;
412
412
  });
413
413
  });
414
414
  })(function(r) {
415
- var s = r.iframe;
416
- return y(a, void 0, void 0, function() {
417
- var o, t, u, d;
418
- return w(this, function(c) {
419
- return o = s.createElement("canvas"), t = o.getContext("2d"), u = J.map(function(i) {
420
- return k(t, i);
421
- }), d = {}, X.forEach(function(i) {
422
- var p = k(t, i);
423
- u.includes(p) || (d[i] = p);
424
- }), e(d), [2];
415
+ var o = r.iframe;
416
+ return w(a, void 0, void 0, function() {
417
+ var i, t, u, l;
418
+ return y(this, function(s) {
419
+ return i = o.createElement("canvas"), t = i.getContext("2d"), u = J.map(function(c) {
420
+ return O(t, c);
421
+ }), l = {}, X.forEach(function(c) {
422
+ var g = O(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 y(this, void 0, void 0, function() {
442
+ return w(this, void 0, void 0, function() {
443
443
  var a;
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() {
444
+ return y(this, function(e) {
445
+ return M = (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 y(this, void 0, void 0, function() {
448
- var n, r, s, o, t;
449
- return w(this, function(u) {
447
+ return w(this, void 0, void 0, function() {
448
+ var n, r, o, i, t;
449
+ return y(this, function(u) {
450
450
  switch (u.label) {
451
451
  case 0:
452
- n = {}, r = 0, s = I, u.label = 1;
452
+ n = {}, r = 0, o = M, u.label = 1;
453
453
  case 1:
454
- if (!(r < s.length)) return [3, 6];
455
- o = s[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, I);
471
+ return ee(n, M);
472
472
  })];
473
473
  });
474
474
  });
@@ -487,22 +487,22 @@ C().name != "Firefox" && v("fonts", function() {
487
487
  });
488
488
  }), v("system", function() {
489
489
  return new Promise(function(a) {
490
- var e = C();
490
+ var e = A();
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, l = null;
494
+ var f, re = A().name !== "SamsungBrowser" ? 1 : 3, d = null;
495
495
  v("webgl", function() {
496
- return y(this, void 0, void 0, function() {
496
+ return w(this, void 0, void 0, function() {
497
497
  var a;
498
- return w(this, function(e) {
499
- typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, l = f.getContext("webgl"));
498
+ return y(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 (!l) 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 (!l) 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
- `, s = l.createShader(l.VERTEX_SHADER), o = l.createShader(l.FRAGMENT_SHADER);
517
- if (!s || !o) throw new Error("Failed to create shaders");
518
- if (l.shaderSource(s, n), l.shaderSource(o, r), l.compileShader(s), !l.getShaderParameter(s, l.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + l.getShaderInfoLog(s));
519
- if (l.compileShader(o), !l.getShaderParameter(o, l.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + l.getShaderInfoLog(o));
520
- var t = l.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 (l.attachShader(t, s), l.attachShader(t, o), l.linkProgram(t), !l.getProgramParameter(t, l.LINK_STATUS)) throw new Error("Shader program linking failed: " + l.getProgramInfoLog(t));
523
- l.useProgram(t);
524
- for (var u = 137, d = new Float32Array(4 * u), c = 2 * Math.PI / u, i = 0; i < u; i++) {
525
- var p = i * c;
526
- d[4 * i] = 0, d[4 * i + 1] = 0, d[4 * i + 2] = Math.cos(p) * (f.width / 2), d[4 * i + 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 = l.createBuffer();
529
- l.bindBuffer(l.ARRAY_BUFFER, q), l.bufferData(l.ARRAY_BUFFER, d, l.STATIC_DRAW);
530
- var R = l.getAttribLocation(t, "position");
531
- l.enableVertexAttribArray(R), l.vertexAttribPointer(R, 2, l.FLOAT, !1, 0, 0), l.viewport(0, 0, f.width, f.height), l.clearColor(0, 0, 0, 1), l.clear(l.COLOR_BUFFER_BIT), l.drawArrays(l.LINES, 0, 2 * u);
532
- var x = new Uint8ClampedArray(f.width * f.height * 4);
533
- return l.readPixels(0, 0, f.width, f.height, l.RGBA, l.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
528
+ var T = d.createBuffer();
529
+ d.bindBuffer(d.ARRAY_BUFFER, T), d.bufferData(d.ARRAY_BUFFER, l, d.STATIC_DRAW);
530
+ var E = d.getAttribLocation(t, "position");
531
+ d.enableVertexAttribArray(E), d.vertexAttribPointer(E, 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
+ var P = new Uint8ClampedArray(f.width * f.height * 4);
533
+ return d.readPixels(0, 0, f.width, f.height, d.RGBA, d.UNSIGNED_BYTE, P), new ImageData(P, f.width, f.height);
534
534
  } catch {
535
535
  return new ImageData(1, 1);
536
536
  } finally {
537
- l && (l.bindBuffer(l.ARRAY_BUFFER, null), l.useProgram(null), l.viewport(0, 0, l.drawingBufferWidth, l.drawingBufferHeight), l.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: _(L(a, f.width, f.height).data.toString()).toString() }];
540
+ }), [2, { commonImageHash: R(L(a, f.width, f.height).data.toString()).toString() }];
541
541
  } catch {
542
542
  return [2, { webgl: "unsupported" }];
543
543
  }
@@ -546,25 +546,25 @@ v("webgl", function() {
546
546
  });
547
547
  });
548
548
  var b = function(a, e, n, r) {
549
- for (var s = (n - e) / r, o = 0, t = 0; t < r; t++)
550
- o += a(e + (t + 0.5) * s);
551
- return o * s;
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 y(void 0, void 0, void 0, function() {
555
- return w(this, function(a) {
554
+ return w(void 0, void 0, void 0, function() {
555
+ return y(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
  });
559
559
  });
560
560
  const ae = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
561
- let E = (a = 21) => {
561
+ let C = (a = 21) => {
562
562
  let e = "", n = crypto.getRandomValues(new Uint8Array(a |= 0));
563
563
  for (; a--; )
564
564
  e += ae[n[a] & 63];
565
565
  return e;
566
566
  };
567
- class M {
567
+ class x {
568
568
  constructor(e) {
569
569
  h(this, "config");
570
570
  this.config = e;
@@ -583,7 +583,7 @@ class M {
583
583
  async onAdContainerViewed(e) {
584
584
  }
585
585
  }
586
- class oe extends M {
586
+ class oe extends x {
587
587
  /**
588
588
  * Gets ads from the adMarketplace API based on the search term.
589
589
  */
@@ -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) => ({
603
- id: E(),
601
+ }).toString()}`, i = await (await fetch(r, { method: "GET" })).json(), t = i.product_ads.map(
602
+ (s) => ({
603
+ id: C(),
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) => ({
609
- id: E(),
608
+ ), u = i.text_ads.map((s) => ({
609
+ id: C(),
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
  }
@@ -619,13 +619,13 @@ class oe extends M {
619
619
  (r = n.admAd) != null && r.impression_url && fetch(n.admAd.impression_url);
620
620
  }
621
621
  }
622
- class ie extends M {
622
+ class ie extends x {
623
623
  async getAds(e) {
624
624
  return [];
625
625
  }
626
626
  }
627
627
  const se = 1e3;
628
- class ce extends M {
628
+ class ce extends x {
629
629
  constructor(n) {
630
630
  super(n);
631
631
  h(this, "adCallTimeout");
@@ -635,8 +635,8 @@ class ce extends M {
635
635
  this.addScriptTagToDocument();
636
636
  }
637
637
  async onQueryFetched(n, r) {
638
- var s;
639
- if ((((s = r.data.hits) == null ? void 0 : s.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
  }
@@ -686,7 +686,7 @@ class de {
686
686
  * @param {Partial<MeasureRequestUser>} user - Additional user properites to send with the event.
687
687
  */
688
688
  h(this, "sendMeasureEvent", async (e, n = {}, r = {}) => {
689
- const s = {
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(s), 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(s), 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)
@@ -744,7 +744,7 @@ class de {
744
744
  }
745
745
  }, ue);
746
746
  });
747
- this.config = e, this.sdkInfo = n, this.userId = r, this.sessionId = E(), this.sendMeasureEvent("sdk_initialized");
747
+ this.config = e, this.sdkInfo = n, this.userId = r, this.sessionId = C(), this.sendMeasureEvent("sdk_initialized");
748
748
  }
749
749
  /**
750
750
  * Getter for the base url used by the /measure endpoints.
@@ -767,7 +767,7 @@ class de {
767
767
  };
768
768
  }
769
769
  }
770
- const le = (a) => a.endsWith("/") ? a.slice(0, -1) : a, A = (a) => {
770
+ const le = (a) => a.endsWith("/") ? a.slice(0, -1) : a, _ = (a) => {
771
771
  let e = "";
772
772
  if (e = a.trim(), e = e.replace(/[‘’“”]/g, (r) => ({
773
773
  "‘": "'",
@@ -786,72 +786,107 @@ class me {
786
786
  h(this, "userId");
787
787
  h(this, "parent");
788
788
  h(this, "searchCompletedEventTimeout");
789
+ h(this, "abortController");
790
+ h(this, "supplementalAbortController");
789
791
  /**
790
792
  * Make the request to get the search results.
791
793
  * @param {properties} properties - The properties for the search.
792
- * @param sendTelemetry - Whether or not to emit measure and subscription events for this search.
794
+ * @param isSupplemental - Whether or not this is a supplemental search request (for the purpose of getting top-level facet counts)
793
795
  * @returns
794
796
  */
795
- h(this, "getSearchResponseItems", async (e, n = !0) => {
796
- var r, s, o, t, u;
797
- try {
798
- let d, c = "";
799
- return typeof e == "string" ? c = A(e) : (e.searchTerm = A(e.searchTerm), c = e.searchTerm), (r = this.parent.measureClient) == null || r.sendMeasureEvent("search_requested", {
800
- search_term: c
801
- }), this.parent.emitEvent("query_submitted", {
802
- name: "query_submitted",
803
- data: {
804
- searchTerm: c
805
- }
806
- }), (s = this.parent.adClient) == null || s.onQuerySubmitted(
807
- typeof e == "string" ? { searchTerm: c, mode: "exact" } : e
808
- ), typeof e == "string" ? d = await this.handleGetSearchResponseItemsWithString(c) : d = await this.handleGetSearchResponseItemsWithObject(e), n && ((o = this.parent.measureClient) == null || o.sendMeasureEvent(
809
- "search_response_received",
810
- {
811
- search_term: c,
812
- number_of_documents: d.data.count
813
- }
814
- ), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
815
- var i;
816
- (i = this.parent.measureClient) == null || i.sendMeasureEvent("search_completed", {
817
- search_term: c,
818
- number_of_documents: d.data.count
819
- });
820
- }, he), this.parent.emitEvent("query_fetched", {
821
- name: "query_fetched",
822
- data: {
823
- searchTerm: c
824
- }
825
- }), (((t = d.data.hits) == null ? void 0 : t.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
826
- name: "no_results_returned"
827
- }), (u = this.parent.adClient) == null || u.onQueryFetched(
828
- typeof e == "string" ? { searchTerm: c, mode: "exact" } : e,
829
- d
830
- )), d;
831
- } catch (d) {
832
- throw console.error("Error parsing response:", d), d;
833
- }
797
+ h(this, "getSearchResponseItems", async (e, n = !1) => {
798
+ var t, u, l, s, c, g, T;
799
+ let r, o = "", i;
800
+ return n ? ((t = this.supplementalAbortController) == null || t.abort(
801
+ "A newer search request has replaced this one."
802
+ ), i = new AbortController(), this.supplementalAbortController = i) : ((u = this.abortController) == null || u.abort(
803
+ "A newer search request has replaced this one."
804
+ ), i = new AbortController(), this.abortController = i), typeof e == "string" ? o = _(e) : (e.searchTerm = _(e.searchTerm), o = e.searchTerm), (l = this.parent.measureClient) == null || l.sendMeasureEvent("search_requested", {
805
+ search_term: o
806
+ }), this.parent.emitEvent("query_submitted", {
807
+ name: "query_submitted",
808
+ data: {
809
+ searchTerm: o
810
+ }
811
+ }), (s = this.parent.adClient) == null || s.onQuerySubmitted(
812
+ typeof e == "string" ? { searchTerm: o, mode: "exact" } : e
813
+ ), typeof e == "string" ? r = await this.handleGetSearchResponseItemsWithString(
814
+ o,
815
+ i
816
+ ) : r = await this.handleGetSearchResponseItemsWithObject(
817
+ e,
818
+ i
819
+ ), n || ((c = this.parent.measureClient) == null || c.sendMeasureEvent("search_response_received", {
820
+ search_term: o,
821
+ number_of_documents: r.data.count
822
+ }), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
823
+ var E;
824
+ (E = this.parent.measureClient) == null || E.sendMeasureEvent("search_completed", {
825
+ search_term: o,
826
+ number_of_documents: r.data.count
827
+ });
828
+ }, he), this.parent.emitEvent("query_fetched", {
829
+ name: "query_fetched",
830
+ data: {
831
+ searchTerm: o
832
+ }
833
+ }), (((g = r.data.hits) == null ? void 0 : g.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
834
+ name: "no_results_returned"
835
+ }), (T = this.parent.adClient) == null || T.onQueryFetched(
836
+ typeof e == "string" ? { searchTerm: o, mode: "exact" } : e,
837
+ r
838
+ )), r;
834
839
  });
835
- h(this, "handleGetSearchResponseItemsWithString", async (e) => {
836
- var s;
837
- let n;
840
+ h(this, "handleGetSearchResponseItemsWithString", async (e, n) => {
841
+ var i;
842
+ let r;
838
843
  try {
839
- n = JSON.parse(e), n = {
844
+ r = JSON.parse(e), r = {
840
845
  limit: this.config.searchResultsPerPage,
841
- ...n
846
+ ...r
842
847
  };
843
848
  } catch {
844
849
  throw new Error("Error: Query string is not valid json.");
845
850
  }
851
+ const o = await fetch(this.baseSearchUrl, {
852
+ method: "POST",
853
+ headers: {
854
+ Authorization: this.config.readKey,
855
+ "Content-Type": "application/json",
856
+ "X-Sc-User-Id": this.userId,
857
+ "X-Sc-Session-Id": ((i = this.parent.measureClient) == null ? void 0 : i.sessionId) || C()
858
+ },
859
+ body: JSON.stringify(r),
860
+ signal: n.signal
861
+ });
862
+ if (!o.ok)
863
+ throw new Error(
864
+ `Error: ${o.statusText} (Status: ${o.status})`
865
+ );
866
+ return await o.json();
867
+ });
868
+ h(this, "handleGetSearchResponseItemsWithObject", async (e, n) => {
869
+ var o;
846
870
  const r = await fetch(this.baseSearchUrl, {
847
871
  method: "POST",
848
872
  headers: {
849
873
  Authorization: this.config.readKey,
850
874
  "Content-Type": "application/json",
851
875
  "X-Sc-User-Id": this.userId,
852
- "X-Sc-Session-Id": ((s = this.parent.measureClient) == null ? void 0 : s.sessionId) || E()
876
+ "X-Sc-Session-Id": ((o = this.parent.measureClient) == null ? void 0 : o.sessionId) || C()
853
877
  },
854
- body: JSON.stringify(n)
878
+ body: JSON.stringify({
879
+ query: this.formatParamsForRequest(e),
880
+ offset: e.offset || 0,
881
+ limit: e.limit || this.config.searchResultsPerPage || 20,
882
+ ...e.order_by && {
883
+ order_by: e.order_by
884
+ },
885
+ ...e.sort && {
886
+ sort: e.sort
887
+ }
888
+ }),
889
+ signal: n.signal
855
890
  });
856
891
  if (!r.ok)
857
892
  throw new Error(
@@ -859,38 +894,6 @@ class me {
859
894
  );
860
895
  return await r.json();
861
896
  });
862
- h(this, "handleGetSearchResponseItemsWithObject", async (e) => {
863
- var n;
864
- try {
865
- const r = await fetch(this.baseSearchUrl, {
866
- method: "POST",
867
- headers: {
868
- Authorization: this.config.readKey,
869
- "Content-Type": "application/json",
870
- "X-Sc-User-Id": this.userId,
871
- "X-Sc-Session-Id": ((n = this.parent.measureClient) == null ? void 0 : n.sessionId) || E()
872
- },
873
- body: JSON.stringify({
874
- query: this.formatParamsForRequest(e),
875
- offset: e.offset || 0,
876
- limit: e.limit || this.config.searchResultsPerPage || 20,
877
- ...e.order_by && {
878
- order_by: e.order_by
879
- },
880
- ...e.sort && {
881
- sort: e.sort
882
- }
883
- })
884
- });
885
- if (!r.ok)
886
- throw new Error(
887
- `Error: ${r.statusText} (Status: ${r.status})`
888
- );
889
- return await r.json();
890
- } catch (r) {
891
- throw console.error("Error parsing response:", r), r;
892
- }
893
- });
894
897
  this.parent = e, this.config = n, this.userId = r;
895
898
  }
896
899
  /**
@@ -908,33 +911,33 @@ class me {
908
911
  const n = [];
909
912
  let r = "should";
910
913
  e.facetPathsForIndexFields && Object.keys(e.facetPathsForIndexFields).forEach((t) => {
911
- var d;
912
- const u = (d = e.facetPathsForIndexFields) == null ? void 0 : d[t];
914
+ var l;
915
+ const u = (l = e.facetPathsForIndexFields) == null ? void 0 : l[t];
913
916
  u && (r = "must", n.push({
914
917
  occur: "must",
915
918
  exact: {
916
- ctx: A(u.value)
919
+ ctx: _(u.value)
917
920
  }
918
921
  }));
919
922
  }), e.rangeValueForIndexFields && Object.keys(e.rangeValueForIndexFields).forEach((t) => {
920
- var d;
921
- const u = (d = e.rangeValueForIndexFields) == null ? void 0 : d[t];
923
+ var l;
924
+ const u = (l = e.rangeValueForIndexFields) == null ? void 0 : l[t];
922
925
  u && (r = "must", n.push({
923
926
  occur: "must",
924
927
  exact: {
925
- ctx: A(u.value)
928
+ ctx: _(u.value)
926
929
  }
927
930
  }));
928
931
  });
929
- const s = e.searchTerm, o = e.mode === "fuzzy" ? { fuzzy: { ctx: s } } : {
932
+ const o = e.searchTerm, i = e.mode === "fuzzy" ? { fuzzy: { ctx: o } } : {
930
933
  exact: {
931
- ctx: `${s.startsWith('"') ? s : `"${s}"`}`
934
+ ctx: `${o.startsWith('"') ? o : `"${o}"`}`
932
935
  }
933
936
  };
934
937
  return n.push({
935
938
  occur: e.mode === "exact" ? "must" : r,
936
939
  // Valid, as 'occur' is a required property in SearchClientQuery
937
- ...o
940
+ ...i
938
941
  }), n;
939
942
  }
940
943
  }
@@ -948,37 +951,60 @@ class ve {
948
951
  h(this, "requestTimeout");
949
952
  h(this, "subscriptionEvents", {});
950
953
  h(this, "getResponseItems", (e, n, r) => {
951
- const s = async () => {
954
+ const o = async () => {
952
955
  (async () => {
953
- var d, c;
954
- const o = await ((d = this == null ? void 0 : this.searchClient) == null ? void 0 : d.getSearchResponseItems(e));
955
- if (!o)
956
- throw new Error("Search client was not initialized.");
957
- const t = (o.data.hits || []).filter((i) => !!i.doc).map((i) => ({
958
- id: E(),
959
- document: i.doc || { id: -1 },
960
- source_index: i.source_index,
956
+ var l;
957
+ if (!this.searchClient) {
958
+ console.error("Search client was not initialized.");
959
+ return;
960
+ }
961
+ let i;
962
+ try {
963
+ i = await this.searchClient.getSearchResponseItems(
964
+ e,
965
+ !1
966
+ );
967
+ } catch (s) {
968
+ console.info(`Search request error: ${s}`);
969
+ return;
970
+ }
971
+ if (!i) {
972
+ console.error("Search request error: Search response was undefined");
973
+ return;
974
+ }
975
+ const t = (i.data.hits || []).filter((s) => !!s.doc).map((s) => ({
976
+ id: C(),
977
+ document: s.doc || { id: -1 },
978
+ source_index: s.source_index,
961
979
  type: "SearchDocument"
962
980
  }));
963
981
  let u;
964
982
  if (typeof e == "object") {
965
- const i = structuredClone(
983
+ const s = structuredClone(
966
984
  e
967
985
  );
968
- i.facetPathsForIndexFields && Object.keys(i.facetPathsForIndexFields).length > 0 && i.rangeValueForIndexFields && Object.keys(i.rangeValueForIndexFields).length > 0 && (i.facetPathsForIndexFields = void 0, u = await ((c = this == null ? void 0 : this.searchClient) == null ? void 0 : c.getSearchResponseItems(i, !1)), o && console.log("Supplemental response:", u));
986
+ if (s.facetPathsForIndexFields && Object.keys(s.facetPathsForIndexFields).length > 0) {
987
+ s.facetPathsForIndexFields = void 0;
988
+ try {
989
+ u = await ((l = this == null ? void 0 : this.searchClient) == null ? void 0 : l.getSearchResponseItems(s, !0));
990
+ } catch (c) {
991
+ console.info(`Search request error: ${c}`);
992
+ return;
993
+ }
994
+ }
969
995
  }
970
- n(o, t, u);
996
+ n(e, i, t, u);
971
997
  })(), (async () => {
972
998
  if (this.adClient && typeof e != "string") {
973
- const o = await this.adClient.getAds(e);
974
- r(o);
999
+ const i = await this.adClient.getAds(e);
1000
+ r(i);
975
1001
  }
976
1002
  })();
977
1003
  };
978
1004
  clearTimeout(this.requestTimeout), this.config.searchDebounceDelay ? this.requestTimeout = setTimeout(
979
- s,
1005
+ o,
980
1006
  this.config.searchDebounceDelay
981
- ) : s();
1007
+ ) : o();
982
1008
  });
983
1009
  if (!e.endpointURL || !e.index || !e.readKey)
984
1010
  throw new Error(
@@ -1005,12 +1031,12 @@ class ve {
1005
1031
  */
1006
1032
  startObservingMutations() {
1007
1033
  new MutationObserver((n, r) => {
1008
- let s = !1;
1009
- for (const o of n)
1010
- o.type === "childList" && o.addedNodes.forEach((t) => {
1011
- t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (s = !0);
1034
+ let o = !1;
1035
+ for (const i of n)
1036
+ i.type === "childList" && i.addedNodes.forEach((t) => {
1037
+ t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (o = !0);
1012
1038
  });
1013
- s && this.initInputForms();
1039
+ o && this.initInputForms();
1014
1040
  }).observe(document.body, { childList: !0, subtree: !0 });
1015
1041
  }
1016
1042
  initClients(e, n) {
@@ -1034,8 +1060,8 @@ class ve {
1034
1060
  }
1035
1061
  emitEvent(e, n) {
1036
1062
  var r;
1037
- (r = this.subscriptionEvents[e]) == null || r.forEach((s) => {
1038
- s(n);
1063
+ (r = this.subscriptionEvents[e]) == null || r.forEach((o) => {
1064
+ o(n);
1039
1065
  });
1040
1066
  }
1041
1067
  subscribe(e, n) {
@@ -1719,6 +1745,7 @@ const initialSearchcraftStateValues = {
1719
1745
  rangeValueForIndexFields: {},
1720
1746
  searchTerm: '',
1721
1747
  searchMode: 'fuzzy',
1748
+ searchClientRequest: undefined,
1722
1749
  searchClientResponseItems: [],
1723
1750
  searchResponseTimeTaken: undefined,
1724
1751
  searchResponseFacetPrime: undefined,
@@ -1755,7 +1782,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1755
1782
  },
1756
1783
  init: (core, debug = false) => {
1757
1784
  const logger = debug
1758
- ? new pe({ logLevel: O.DEBUG })
1785
+ ? new pe({ logLevel: D.DEBUG })
1759
1786
  : undefined;
1760
1787
  const state = functions.set({
1761
1788
  core,
@@ -1793,12 +1820,12 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1793
1820
  },
1794
1821
  search: async () => {
1795
1822
  const state = get();
1796
- state.logger?.log(O.INFO, `Starting search with search term: "${state.searchTerm}"`);
1823
+ state.logger?.log(D.INFO, `Starting search with search term: "${state.searchTerm}"`);
1797
1824
  if (!state.core) {
1798
1825
  throw new Error('Searchcraft instance is not initialized.');
1799
1826
  }
1800
1827
  if (!state.searchTerm.trim()) {
1801
- state.logger?.log(O.INFO, 'No search request was made: search term was empty.');
1828
+ state.logger?.log(D.INFO, 'No search request was made: search term was empty.');
1802
1829
  functions.set({
1803
1830
  searchClientResponseItems: [],
1804
1831
  searchResultsCount: 0,
@@ -1822,7 +1849,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1822
1849
  }, functions.setSearchClientResponseItemsFromResponse, functions.setAdClientResponseItems);
1823
1850
  },
1824
1851
  setAdClientResponseItems: (items) => functions.set({ adClientResponseItems: items }),
1825
- setSearchClientResponseItemsFromResponse: (response, items, supplementalResponse) => {
1852
+ setSearchClientResponseItemsFromResponse: (request, response, items, supplementalResponse) => {
1826
1853
  const { facets, count = 0, time_taken = 0 } = response.data;
1827
1854
  const state = functions.set((state) => {
1828
1855
  return {
@@ -1835,12 +1862,13 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1835
1862
  searchResultsCount: count,
1836
1863
  searchResponseFacetPrime: facets,
1837
1864
  supplementalFacetPrime: supplementalResponse?.data.facets,
1865
+ searchClientRequest: request,
1838
1866
  };
1839
1867
  });
1840
- state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
1841
- state.logger?.log(O.DEBUG, `Facets from response: ${JSON.stringify(facets)}`);
1868
+ state.logger?.log(D.DEBUG, `Search results: ${JSON.stringify(items)}`);
1869
+ state.logger?.log(D.DEBUG, `Facets from response: ${JSON.stringify(facets)}`);
1842
1870
  },
1843
- setInitialSearchClientResponseItemsFromResponse: (response, items) => {
1871
+ setInitialSearchClientResponseItemsFromResponse: (request, response, items) => {
1844
1872
  const state = get();
1845
1873
  const { count = 0, time_taken = 0 } = response.data;
1846
1874
  functions.set((state) => {
@@ -1852,13 +1880,14 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1852
1880
  // Reset to first page when response count changes
1853
1881
  count === state.searchResultsCount ? state.searchResultsPage : 1,
1854
1882
  searchResultsCount: count,
1883
+ searchClientRequest: request,
1855
1884
  };
1856
1885
  });
1857
- state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
1886
+ state.logger?.log(D.DEBUG, `Search results: ${JSON.stringify(items)}`);
1858
1887
  },
1859
1888
  setInitialQuery: async (query) => {
1860
1889
  const state = functions.set({ initialQuery: query });
1861
- state.logger?.log(O.INFO, `Starting search with query: "${state.initialQuery}"`);
1890
+ state.logger?.log(D.INFO, `Starting search with query: "${state.initialQuery}"`);
1862
1891
  if (!state.core) {
1863
1892
  throw new Error('Searchcraft instance is not initialized.');
1864
1893
  }
@@ -1879,12 +1908,6 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1879
1908
  */
1880
1909
  functions.set({
1881
1910
  searchTerm,
1882
- facetPathsForIndexFields: {},
1883
- ...(searchTerm.trim().length === 0 && {
1884
- searchMode: 'fuzzy',
1885
- sortType: null,
1886
- orderByField: null,
1887
- }),
1888
1911
  });
1889
1912
  },
1890
1913
  setSearchClientResponseItems: (items) => functions.set({ searchClientResponseItems: items }),
@@ -1914,4 +1937,4 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1914
1937
 
1915
1938
  export { searchcraftStore as s, ve as v };
1916
1939
 
1917
- //# sourceMappingURL=p-7c10ca44.js.map
1940
+ //# sourceMappingURL=p-062d6b80.js.map