@searchcraft/react-sdk 0.5.1 → 0.5.3

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.
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ var er = Object.defineProperty, tr = (e, t) => {
32
32
  return !1;
33
33
  })(), fe = !1, Be = [], ct = [], cr = (e, t) => (r) => {
34
34
  e.push(r), fe || (fe = !0, S.$flags$ & 4 ? me(pe) : S.raf(pe));
35
- }, Le = (e) => {
35
+ }, Ie = (e) => {
36
36
  for (let t = 0; t < e.length; t++)
37
37
  try {
38
38
  e[t](performance.now());
@@ -41,8 +41,8 @@ var er = Object.defineProperty, tr = (e, t) => {
41
41
  }
42
42
  e.length = 0;
43
43
  }, pe = () => {
44
- Le(Be), Le(ct), (fe = Be.length > 0) && S.raf(pe);
45
- }, me = (e) => ar().then(e), ir = /* @__PURE__ */ cr(ct), Ie = {}, or = "http://www.w3.org/2000/svg", lr = "http://www.w3.org/1999/xhtml", ye = (e) => (e = typeof e, e === "object" || e === "function");
44
+ Ie(Be), Ie(ct), (fe = Be.length > 0) && S.raf(pe);
45
+ }, me = (e) => ar().then(e), ir = /* @__PURE__ */ cr(ct), Le = {}, or = "http://www.w3.org/2000/svg", lr = "http://www.w3.org/1999/xhtml", ye = (e) => (e = typeof e, e === "object" || e === "function");
46
46
  function ur(e) {
47
47
  var t, r, s;
48
48
  return (s = (r = (t = e.head) == null ? void 0 : t.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : r.getAttribute("content")) != null ? s : void 0;
@@ -216,7 +216,7 @@ var fr = (e) => {
216
216
  }
217
217
  }
218
218
  }, Sr = /\s/, Ne = (e) => e ? e.split(Sr) : [], ut = "Capture", wr = new RegExp(ut + "$"), dt = (e, t, r) => {
219
- const s = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, c = e && e.$attrs$ || Ie, a = t.$attrs$ || Ie;
219
+ const s = t.$elm$.nodeType === 11 && t.$elm$.host ? t.$elm$.host : t.$elm$, c = e && e.$attrs$ || Le, a = t.$attrs$ || Le;
220
220
  for (const n of qe(Object.keys(c)))
221
221
  n in a || Ue(s, n, c[n], void 0, r, t.$flags$);
222
222
  for (const n of qe(Object.keys(a)))
@@ -466,7 +466,7 @@ var be, ve, ce = !1, ie = !1, Fe = !1, C = !1, oe = (e, t, r, s) => {
466
466
  }, yt = (e) => {
467
467
  var t;
468
468
  return e.classList.add((t = G.hydratedSelectorName) != null ? t : "hydrated");
469
- }, Br = (e, t) => Q(e).$instanceValues$.get(t), Lr = (e, t, r, s) => {
469
+ }, Br = (e, t) => Q(e).$instanceValues$.get(t), Ir = (e, t, r, s) => {
470
470
  const c = Q(e), a = e, n = c.$instanceValues$.get(t), o = c.$flags$, u = a;
471
471
  r = vr(r, s.$members$[t][0]);
472
472
  const i = Number.isNaN(n) && Number.isNaN(r);
@@ -486,7 +486,7 @@ var be, ve, ce = !1, ie = !1, Fe = !1, C = !1, oe = (e, t, r, s) => {
486
486
  (o & 18) === 2 && Ee(c, !1);
487
487
  }
488
488
  }
489
- }, Ir = (e, t, r) => {
489
+ }, Lr = (e, t, r) => {
490
490
  var s, c;
491
491
  const a = e.prototype;
492
492
  if (t.$members$ || t.$watchers$ || e.watchers) {
@@ -498,7 +498,7 @@ var be, ve, ce = !1, ie = !1, Fe = !1, C = !1, oe = (e, t, r, s) => {
498
498
  return Br(this, o);
499
499
  },
500
500
  set(i) {
501
- Lr(this, o, i, t);
501
+ Ir(this, o, i, t);
502
502
  },
503
503
  configurable: !0,
504
504
  enumerable: !0
@@ -622,7 +622,7 @@ var be, ve, ce = !1, ie = !1, Fe = !1, C = !1, oe = (e, t, r, s) => {
622
622
  __attachShadow() {
623
623
  this.shadowRoot = this;
624
624
  }
625
- }), e.is = r.$tagName$, Ir(e, r);
625
+ }), e.is = r.$tagName$, Lr(e, r);
626
626
  }, $e = (e, t) => t, Se = {}, we = {};
627
627
  const Ve = (e) => {
628
628
  let t;
@@ -918,7 +918,7 @@ let hs = (e = 21) => {
918
918
  t += ds[r[e] & 63];
919
919
  return t;
920
920
  };
921
- function L(e, t, r, s) {
921
+ function I(e, t, r, s) {
922
922
  return new (r || (r = Promise))(function(c, a) {
923
923
  function n(i) {
924
924
  try {
@@ -943,7 +943,7 @@ function L(e, t, r, s) {
943
943
  u((s = s.apply(e, [])).next());
944
944
  });
945
945
  }
946
- function I(e, t) {
946
+ function L(e, t) {
947
947
  var r, s, c, a, n = { label: 0, sent: function() {
948
948
  if (1 & c[0]) throw c[1];
949
949
  return c[1];
@@ -1083,9 +1083,9 @@ function bs(e, t, r) {
1083
1083
  }));
1084
1084
  }
1085
1085
  function ms() {
1086
- return L(this, void 0, void 0, function() {
1086
+ return I(this, void 0, void 0, function() {
1087
1087
  var e, t, r, s, c;
1088
- return I(this, function(a) {
1088
+ return L(this, function(a) {
1089
1089
  switch (a.label) {
1090
1090
  case 0:
1091
1091
  return a.trys.push([0, 2, , 3]), e = ps(), t = Object.keys(e), [4, bs(Object.values(e), (O == null ? void 0 : O.timeout) || 1e3, fs)];
@@ -1120,9 +1120,9 @@ function Tt(e, t) {
1120
1120
  return r;
1121
1121
  }
1122
1122
  function ys(e) {
1123
- return L(this, void 0, void 0, function() {
1123
+ return I(this, void 0, void 0, function() {
1124
1124
  var t, r;
1125
- return I(this, function(s) {
1125
+ return L(this, function(s) {
1126
1126
  switch (s.label) {
1127
1127
  case 0:
1128
1128
  return s.trys.push([0, 2, , 3]), [4, ms()];
@@ -1165,8 +1165,8 @@ function Y() {
1165
1165
  return { name: "unknown", version: "unknown" };
1166
1166
  }
1167
1167
  R("audio", function() {
1168
- return L(this, void 0, void 0, function() {
1169
- return I(this, function(e) {
1168
+ return I(this, void 0, void 0, function() {
1169
+ return L(this, function(e) {
1170
1170
  return [2, new Promise(function(t, r) {
1171
1171
  try {
1172
1172
  var s = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), c = s.createBufferSource(), a = s.createOscillator();
@@ -1270,9 +1270,9 @@ Y().name != "Firefox" && R("fonts", function() {
1270
1270
  try {
1271
1271
  (function(s) {
1272
1272
  var c;
1273
- L(this, void 0, void 0, function() {
1273
+ I(this, void 0, void 0, function() {
1274
1274
  var a, n, o;
1275
- return I(this, function(u) {
1275
+ return L(this, function(u) {
1276
1276
  switch (u.label) {
1277
1277
  case 0:
1278
1278
  return document.body ? [3, 2] : [4, (i = 50, new Promise(function(h) {
@@ -1291,9 +1291,9 @@ Y().name != "Firefox" && R("fonts", function() {
1291
1291
  });
1292
1292
  })(function(s) {
1293
1293
  var c = s.iframe;
1294
- return L(e, void 0, void 0, function() {
1294
+ return I(e, void 0, void 0, function() {
1295
1295
  var a, n, o, u;
1296
- return I(this, function(i) {
1296
+ return L(this, function(i) {
1297
1297
  return a = c.createElement("canvas"), n = a.getContext("2d"), o = $s.map(function(l) {
1298
1298
  return Ze(n, l);
1299
1299
  }), u = {}, Es.forEach(function(l) {
@@ -1317,14 +1317,14 @@ Y().name != "Firefox" && R("fonts", function() {
1317
1317
  e({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
1318
1318
  });
1319
1319
  }), R("permissions", function() {
1320
- return L(this, void 0, void 0, function() {
1320
+ return I(this, void 0, void 0, function() {
1321
1321
  var e;
1322
- return I(this, function(t) {
1322
+ return L(this, function(t) {
1323
1323
  return he = (O == null ? void 0 : O.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"], e = Array.from({ length: (O == null ? void 0 : O.retries) || 3 }, function() {
1324
1324
  return function() {
1325
- return L(this, void 0, void 0, function() {
1325
+ return I(this, void 0, void 0, function() {
1326
1326
  var r, s, c, a, n;
1327
- return I(this, function(o) {
1327
+ return L(this, function(o) {
1328
1328
  switch (o.label) {
1329
1329
  case 0:
1330
1330
  r = {}, s = 0, c = he, o.label = 1;
@@ -1371,9 +1371,9 @@ Y().name != "Firefox" && R("fonts", function() {
1371
1371
  });
1372
1372
  var E, zs = Y().name !== "SamsungBrowser" ? 1 : 3, p = null;
1373
1373
  R("webgl", function() {
1374
- return L(this, void 0, void 0, function() {
1374
+ return I(this, void 0, void 0, function() {
1375
1375
  var e;
1376
- return I(this, function(t) {
1376
+ return L(this, function(t) {
1377
1377
  typeof document < "u" && ((E = document.createElement("canvas")).width = 200, E.height = 100, p = E.getContext("webgl"));
1378
1378
  try {
1379
1379
  if (!p) throw new Error("WebGL not supported");
@@ -1429,8 +1429,8 @@ var q = function(e, t, r, s) {
1429
1429
  return a * c;
1430
1430
  };
1431
1431
  R("math", function() {
1432
- return L(void 0, void 0, void 0, function() {
1433
- return I(this, function(e) {
1432
+ return I(void 0, void 0, void 0, function() {
1433
+ return L(this, function(e) {
1434
1434
  return [2, { acos: Math.acos(0.5), asin: q(Math.asin, -1, 1, 97), atan: q(Math.atan, -1, 1, 97), cos: q(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: q(Math.sin, -Math.PI, Math.PI, 97), sinh: q(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: q(Math.tan, 0, 2 * Math.PI, 97), tanh: q(Math.tanh, -9 / 7, 7 / 9, 97) }];
1435
1435
  });
1436
1436
  });
@@ -1507,7 +1507,9 @@ class Ts {
1507
1507
  throw new Error(
1508
1508
  "Endpoint URL, Index value(s), and Read Key must be provided"
1509
1509
  );
1510
- this.config = t, this.sdkInfo = r, this.userId = t.userId || "", this.sessionId = hs(), this.initMeasure();
1510
+ this.config = t, this.sdkInfo = r, this.userId = t.userId || "", this.sessionId = "", setTimeout(() => {
1511
+ this.sessionId = hs(), this.initMeasure();
1512
+ }, 300);
1511
1513
  }
1512
1514
  /**
1513
1515
  * Initializes this.userId based on config & sends the `sdk_innitialized` event.
@@ -1769,14 +1771,14 @@ function Bs(e) {
1769
1771
  }
1770
1772
  return e || {};
1771
1773
  }
1772
- function Ls(e) {
1774
+ function Is(e) {
1773
1775
  try {
1774
1776
  return JSON.stringify(e);
1775
1777
  } catch (t) {
1776
1778
  return console.error("Error serializing styles:", t), "{}";
1777
1779
  }
1778
1780
  }
1779
- function Is(e) {
1781
+ function Ls(e) {
1780
1782
  const t = /* @__PURE__ */ new Date(), r = new Date(e), s = Math.floor((t.getTime() - r.getTime()) / 1e3), c = Math.floor(s / 60), a = Math.floor(c / 60), n = Math.floor(a / 24), o = Math.floor(n / 365);
1781
1783
  return c < 60 ? `${c}m ago` : a < 24 ? `${a}h ago` : n < 365 ? `${n}d ago` : `${o}y ago`;
1782
1784
  }
@@ -1804,7 +1806,7 @@ function H(e, t) {
1804
1806
  if (e && t)
1805
1807
  return t.fieldNames.map((r) => {
1806
1808
  let s = e[r.fieldName];
1807
- return s && r.dataType === "date" && (s = Is(s)), s;
1809
+ return s && r.dataType === "date" && (s = Ls(s)), s;
1808
1810
  }).filter((r) => !!r).join(t.delimiter || " ");
1809
1811
  }
1810
1812
  function Mt(e, t) {
@@ -1873,7 +1875,7 @@ function qs(e, t, r) {
1873
1875
  [e]: f.children
1874
1876
  };
1875
1877
  }
1876
- const Hs = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-error-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-danger);margin:0}", Vs = Hs, Lt = /* @__PURE__ */ P(class extends A {
1878
+ const Hs = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-error-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-danger);margin:0}", Vs = Hs, It = /* @__PURE__ */ P(class extends A {
1877
1879
  constructor() {
1878
1880
  super(), this.__registerHost(), this.errorMessage = void 0;
1879
1881
  }
@@ -1892,12 +1894,12 @@ function Ae() {
1892
1894
  ["searchcraft-error-message"].forEach((t) => {
1893
1895
  switch (t) {
1894
1896
  case "searchcraft-error-message":
1895
- customElements.get(t) || customElements.define(t, Lt);
1897
+ customElements.get(t) || customElements.define(t, It);
1896
1898
  break;
1897
1899
  }
1898
1900
  });
1899
1901
  }
1900
- const Ws = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-search-results-container{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-ad-section{align-items:center;background-color:#F1F1F1;border-radius:16px;display:flex;flex-direction:column;font-size:16px;justify-content:center;min-height:176px;text-align:center}.searchcraft-ad-section p{margin:0;color:var(--sc-content-disabled)}.searchcraft-search-results-empty-state-container{text-align:center}.searchcraft-search-results-error-message-container{text-align:center}", Gs = Ws, It = /* @__PURE__ */ P(class extends A {
1902
+ const Ws = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-search-results-container{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-ad-section{align-items:center;background-color:#F1F1F1;border-radius:16px;display:flex;flex-direction:column;font-size:16px;justify-content:center;min-height:176px;text-align:center}.searchcraft-ad-section p{margin:0;color:var(--sc-content-disabled)}.searchcraft-search-results-empty-state-container{text-align:center}.searchcraft-search-results-error-message-container{text-align:center}", Gs = Ws, Lt = /* @__PURE__ */ P(class extends A {
1901
1903
  constructor() {
1902
1904
  super(), this.__registerHost(), this.noResults = M(this, "noResults", 7), this.adInterval = 4, this.customStylesForResults = void 0, this.searchResultMappings = void 0, this.placeAdAtEnd = !1, this.placeAdAtStart = !0, this.resultImagePlacement = "right", this.buttonLabel = void 0, this.buttonTarget = "_blank", this.buttonRel = void 0, this.containerTarget = "_blank", this.containerRel = void 0, this.hasSearched = !1, this.query = "", this.searchResults = null;
1903
1905
  }
@@ -1912,7 +1914,7 @@ const Ws = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input
1912
1914
  this.unsubscribe && this.unsubscribe();
1913
1915
  }
1914
1916
  renderDocument(t, r) {
1915
- const s = H(t, this.searchResultMappings.title), c = H(t, this.searchResultMappings.subtitle), a = H(t, this.searchResultMappings.body), n = H(t, this.searchResultMappings.containerHref), o = H(t, this.searchResultMappings.buttonHref), u = H(t, this.searchResultMappings.imageSource), i = H(t, this.searchResultMappings.footer), l = typeof this.customStylesForResults == "string" ? this.customStylesForResults : Ls(this.customStylesForResults);
1917
+ const s = H(t, this.searchResultMappings.title), c = H(t, this.searchResultMappings.subtitle), a = H(t, this.searchResultMappings.body), n = H(t, this.searchResultMappings.containerHref), o = H(t, this.searchResultMappings.buttonHref), u = H(t, this.searchResultMappings.imageSource), i = H(t, this.searchResultMappings.footer), l = typeof this.customStylesForResults == "string" ? this.customStylesForResults : Is(this.customStylesForResults);
1916
1918
  return d("searchcraft-base-search-result", { key: `${t.document_id}-${r}`, "custom-styles": l, "image-placement": this.resultImagePlacement, "container-rel": this.containerRel, "container-target": this.containerTarget, "button-label": this.buttonLabel || "View more", "button-rel": this.buttonRel, "button-target": this.buttonTarget, "document-position": r, "title-content": s, "subtitle-content": c, "body-content": a, "footer-content": i, "container-href": n, "button-href": o, "image-src": u });
1917
1919
  }
1918
1920
  render() {
@@ -1960,7 +1962,7 @@ function Qs() {
1960
1962
  ["searchcraft-base-search-results", "searchcraft-base-search-result", "searchcraft-error-message"].forEach((t) => {
1961
1963
  switch (t) {
1962
1964
  case "searchcraft-base-search-results":
1963
- customElements.get(t) || customElements.define(t, It);
1965
+ customElements.get(t) || customElements.define(t, Lt);
1964
1966
  break;
1965
1967
  case "searchcraft-base-search-result":
1966
1968
  customElements.get(t) || Pt();
@@ -1971,7 +1973,7 @@ function Qs() {
1971
1973
  }
1972
1974
  });
1973
1975
  }
1974
- const Js = It, Ks = Qs;
1976
+ const Js = Lt, Ks = Qs;
1975
1977
  var Ot = { exports: {} };
1976
1978
  /*!
1977
1979
  Copyright (c) 2018 Jed Watson.
@@ -2038,7 +2040,7 @@ function Ut() {
2038
2040
  }
2039
2041
  });
2040
2042
  }
2041
- const Zs = jt, en = Ut, tn = Lt, rn = Ae, sn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.filtersListContainer{width:100%}.filterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.filterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.filterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.filterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.filterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.filterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.childFilterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:12px;margin-left:24px;position:relative}.childFilterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childFilterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.childFilterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.childFilterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childFilterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:9px;left:8px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:3px;left:9px}.searchcraft-facet-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-disabled);text-align:center}", nn = sn, Nt = /* @__PURE__ */ P(class extends A {
2043
+ const Zs = jt, en = Ut, tn = It, rn = Ae, sn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.filtersListContainer{width:100%}.filterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:14px;position:relative;-webkit-font-smoothing:antialiased}.filterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;width:24px}.filterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.filterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.filterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.filterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.childFilterCheckboxLabel{align-items:center;color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);font-size:14px;font-weight:600;gap:12px;margin-left:24px;position:relative}.childFilterCheckboxLabel input[type=checkbox]{align-items:center;appearance:none;background-color:var(--sc-surface-brand-secondary-hover);border:1px solid var(--sc-surface-disabled);border-radius:8px;cursor:pointer;display:flex;height:24px;justify-content:center;position:relative;width:24px;-webkit-font-smoothing:antialiased}.childFilterCheckboxLabel input[type=checkbox]:focus{outline:2px solid var(--sc-surface-brand-primary)}.childFilterCheckboxLabel input[type=checkbox]:checked{background-color:var(--sc-surface-brand-primary);position:relative}.childFilterCheckboxLabel input[type=checkbox]:checked+.checkContainer{display:block}.childFilterCheckboxLabel input[type=checkbox]:checked+.dashContainer{display:block}.checkContainer{display:none;height:16px;width:16px;position:absolute;top:9px;left:8px}.dashContainer{display:none;height:3px;width:14px;position:absolute;top:3px;left:9px}.searchcraft-facet-message{font-family:var(--sc-font-family);-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-body-small-font-weight);line-height:var(--sc-body-small-line-height);color:var(--sc-content-disabled);text-align:center}", nn = sn, Nt = /* @__PURE__ */ P(class extends A {
2042
2044
  constructor() {
2043
2045
  super(), this.__registerHost(), this.facetSelectionUpdated = M(this, "facetSelectionUpdated", 7), this.searchStore = z.getState(), this.formatLabel = (t) => {
2044
2046
  const r = t.path.replace(/^\//, ""), s = t.count;
@@ -2337,16 +2339,12 @@ function Kt() {
2337
2339
  }
2338
2340
  });
2339
2341
  }
2340
- const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javascript SDK", En = "Searchcraft", $n = "Apache-2.0", Sn = "dist/index.cjs.js", wn = "dist/index.js", Cn = "dist/types/index.d.ts", kn = "dist/collection/collection-manifest.json", Rn = "dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js", zn = {
2342
+ const vn = "@searchcraft/javascript-sdk", Fn = "0.5.3", xn = "Searchcraft Javascript SDK", En = "Searchcraft", $n = "Apache-2.0", Sn = "dist/index.cjs.js", wn = "dist/index.js", Cn = "dist/types/index.d.ts", kn = "dist/collection/collection-manifest.json", Rn = "dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js", zn = {
2341
2343
  ".": {
2342
2344
  import: "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js",
2343
2345
  require: "./dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.cjs.js",
2344
2346
  types: "./dist/types/index.d.ts"
2345
2347
  },
2346
- "./dist/*": {
2347
- import: "./dist/*",
2348
- types: "./dist/*"
2349
- },
2350
2348
  "./components": {
2351
2349
  import: "./dist/components/index.js",
2352
2350
  types: "./dist/components/index.d.ts"
@@ -2355,6 +2353,10 @@ const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javasc
2355
2353
  import: "./dist/loader/index.js",
2356
2354
  require: "./dist/loader/index.cjs",
2357
2355
  types: "./dist/loader/index.d.ts"
2356
+ },
2357
+ "./dist/components/*": {
2358
+ import: "./dist/components/*",
2359
+ types: "./dist/components/*"
2358
2360
  }
2359
2361
  }, Tn = {
2360
2362
  type: "git",
@@ -2418,15 +2420,15 @@ const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javasc
2418
2420
  this.inputValue = "", this.debounceTimeout && clearTimeout(this.debounceTimeout), this.searchTerm = "", this.searchStore.setQuery(""), this.searchStore.setSearchResults(null), this.error = !1, this.inputCleared && this.inputCleared.emit();
2419
2421
  }, this.handleFormSubmit = async (t) => {
2420
2422
  t.preventDefault(), await this.performSearch(this.searchTerm);
2421
- }, this.config = void 0, this.autoSearch = !0, this.buttonPlacement = "none", this.buttonLabel = void 0, this.inputLabel = void 0, this.customStyles = {}, this.placeholderValue = "Enter Search", this.searchTerm = "", this.debounceDelay = 0, this.inputValue = this.searchTerm, this.error = !1;
2423
+ }, this.config = void 0, this.autoSearch = !0, this.buttonPlacement = "none", this.buttonLabel = void 0, this.inputLabel = void 0, this.customStyles = {}, this.placeholderValue = "Enter Search", this.searchTerm = "", this.debounceDelay = 0, this.inputValue = this.searchTerm, this.error = !1, this.isSearchcraftInitialized = !1;
2422
2424
  }
2423
2425
  init() {
2424
- if (this.config) {
2426
+ if (this.config && !this.isSearchcraftInitialized) {
2425
2427
  const t = new Ts(this.config, {
2426
2428
  sdkName: tt.name,
2427
2429
  sdkVersion: tt.version
2428
2430
  });
2429
- this.searchStore.initialize(t, !0);
2431
+ this.searchStore.initialize(t, !0), this.isSearchcraftInitialized = !0;
2430
2432
  }
2431
2433
  }
2432
2434
  componentDidLoad() {
@@ -2441,9 +2443,9 @@ const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javasc
2441
2443
  "searchcraft-input-grid-buttonRight": this.buttonPlacement === "right",
2442
2444
  "searchcraft-input-grid-buttonNone": this.buttonPlacement === "none"
2443
2445
  });
2444
- return d("form", { key: "ac7eeb57d1d06df0be4354f2bb64b36d954d9cac", class: "searchcraft-input-form", onSubmit: this.handleFormSubmit }, d("div", { key: "544156a87b038bd8585ea1c5613fee9f6906c973", class: s }, d("div", { key: "7ff6b5150e440c45eef51f103e41314bd68dbe43", class: "searchcraft-input-button-wrapper" }, d("searchcraft-button", { key: "3b0c6c94485133259dc247905d0bd5b224f74e4e", onButtonClick: this.handleFormSubmit, label: this.buttonLabel })), d("div", { key: "8604e917290120905a92cf948a5a76f52197e882", class: "searchcraft-input-label-wrapper" }, d("searchcraft-input-label", { key: "376e1c3e3b84f683872e118a14da2a229e4b8eb5", label: this.inputLabel })), this.error && d("div", { key: "aa26f0b978e134ca026ea290eb149d6626185ac2", class: "searchcraft-input-error-wrapper" }, d("searchcraft-error-message", { key: "87340701fd0a5fcbd0249d9798a607e920089080", errorMessage: "Please enter a search query." })), d("div", { key: "ebd7c6d07da299a7d2553ccb96fc618222e228df", class: "searchcraft-input-wrapper" }, d("input", { key: "1961a43111858561b4d2e84935b3c47cec45397f", autoComplete: "off", class: "searchcraft-input", onFocus: () => this.inputFocus.emit(), onBlur: () => this.inputBlur.emit(), onInput: (c) => {
2446
+ return d("form", { key: "7f224a10ab80d70660c9db97be5d68830932570b", class: "searchcraft-input-form", onSubmit: this.handleFormSubmit }, d("div", { key: "6822a21a43e5be992b11ddb6c86370ddd68e1475", class: s }, d("div", { key: "6022989ca876ea46de048398a076bc43d5213554", class: "searchcraft-input-button-wrapper" }, d("searchcraft-button", { key: "d48b61729ef9a3f19049dfe751aefa22fdc85e9f", onButtonClick: this.handleFormSubmit, label: this.buttonLabel })), d("div", { key: "3465e467cbb965ad813b6c9c726173bb3fe828f2", class: "searchcraft-input-label-wrapper" }, d("searchcraft-input-label", { key: "1026b7834358c6673a72ef8352830c9b4681020f", label: this.inputLabel })), this.error && d("div", { key: "ff0d55cd88e1895f9b0bd4c0afc917127e76afa2", class: "searchcraft-input-error-wrapper" }, d("searchcraft-error-message", { key: "57fc160411f21f45617e1a3b8677fb4c6e96c0f0", errorMessage: "Please enter a search query." })), d("div", { key: "b2783bf86177d22d4abedb4420fdb2a1807527ef", class: "searchcraft-input-wrapper" }, d("input", { key: "e985da32be58ab3e200866e085b2acd25b54aa31", autoComplete: "off", class: "searchcraft-input", onFocus: () => this.inputFocus.emit(), onBlur: () => this.inputBlur.emit(), onInput: (c) => {
2445
2447
  this.handleOnInput(c);
2446
- }, placeholder: this.placeholderValue, style: t, type: "text", value: this.inputValue }), d("div", { key: "966ac230dd6946dad185d9f657145ebab76a262a", class: "searchcraft-input-search-icon-wrapper" }, d("svg", { key: "12d139c60fe38055df9ea502c877fb773b38682d", class: "searchcraft-input-search-icon", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "searchcraft-title" }, d("title", { key: "b8eea376073c55c6e0e4bf29d40230f1d2220ce7", id: "searchcraft-title" }, "Searchcraft Search Icon Light"), d("path", { key: "c513ef3b3cea3823e7838ac2574cd5a237e06ef1", d: "M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z", stroke: "#404040", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), r && d("button", { key: "35e056ea1d2530e045c3edae231204f9c490d10b", type: "button", class: "searchcraft-input-clear-button", onClick: this.handleClearInput }, d("svg", { key: "3ab21fc44269d2f13ba91c21d24becd3ea5e2728", class: "searchcraft-input-clear-icon", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "icon-title" }, d("title", { key: "c9c4c5c1a5772cac63e3cf5557cc6e90f0b1a1f1", id: "icon-title" }, "Searchcraft Clear Input Icon Light"), d("path", { key: "36740b841f8ec8e439c8e7fbefd37dafafcf5d00", d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z", stroke: "black", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
2448
+ }, placeholder: this.placeholderValue, style: t, type: "text", value: this.inputValue }), d("div", { key: "d5277758ae26262f5f3b49e8763add412661e5cf", class: "searchcraft-input-search-icon-wrapper" }, d("svg", { key: "79792740ea1207fad40786f555c63c4a26ff3fe2", class: "searchcraft-input-search-icon", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "searchcraft-title" }, d("title", { key: "7a487bdf41babdafb802ebd79c34a6a5da300cd6", id: "searchcraft-title" }, "Searchcraft Search Icon Light"), d("path", { key: "27c442bf412aca373cbc982b3a35a00fe7bb82ed", d: "M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z", stroke: "#404040", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))), r && d("button", { key: "4c4bc21e9e87f4245ac38d7af269aae35876b6b0", type: "button", class: "searchcraft-input-clear-button", onClick: this.handleClearInput }, d("svg", { key: "4b82e65987a8a8c296d2b9c279474c29607727e0", class: "searchcraft-input-clear-icon", viewBox: "0 0 22 22", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "icon-title" }, d("title", { key: "9d64212798691a2f8c6c9c4f74ceca1d2fe39fd1", id: "icon-title" }, "Searchcraft Clear Input Icon Light"), d("path", { key: "4c6c5b33fbd9ac02661996bb56e0902094e9b140", d: "M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z", stroke: "black", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }))))));
2447
2449
  }
2448
2450
  static get watchers() {
2449
2451
  return {
@@ -2464,11 +2466,12 @@ const vn = "@searchcraft/javascript-sdk", Fn = "0.5.1", xn = "Searchcraft Javasc
2464
2466
  searchTerm: [1, "search-term"],
2465
2467
  debounceDelay: [2, "debounce-delay"],
2466
2468
  inputValue: [32],
2467
- error: [32]
2469
+ error: [32],
2470
+ isSearchcraftInitialized: [32]
2468
2471
  }, void 0, {
2469
2472
  config: ["onConfigChange"]
2470
2473
  }]);
2471
- function Ln() {
2474
+ function In() {
2472
2475
  if (typeof customElements > "u")
2473
2476
  return;
2474
2477
  ["searchcraft-input-form", "searchcraft-button", "searchcraft-error-message", "searchcraft-input-label"].forEach((t) => {
@@ -2488,7 +2491,7 @@ function Ln() {
2488
2491
  }
2489
2492
  });
2490
2493
  }
2491
- const In = Yt, On = Ln, jn = Jt, Un = Kt, Nn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-results-info-container{border-bottom:1px solid var(--sc-surface-disabled);display:flex;justify-content:flex-start}.searchcraft-results-info-content{color:var(--sc-content-primary);font-family:var(--sc-font-family);font-size:18px;font-weight:600;line-height:20px;margin:0px 0 8px}@media (max-width: 900px){.searchcraft-results-info-content{margin:0;margin-bottom:8px}}", qn = Nn, Xt = /* @__PURE__ */ P(class extends A {
2494
+ const Ln = Yt, On = In, jn = Jt, Un = Kt, Nn = ":root{--sc-spinner-size:20px;--sc-input-border-radius:8px;--sc-input-search-icon-size:20px;--sc-input-clear-icon-size:20px;--sc-input-padding-left:44px;--sc-input-padding-right:44px;--sc-image-border-radius:8px}:root{--sc-surface-disabled:#D9D9D9;--sc-surface-neutral-primary:#FFFFFF;--sc-surface-neutral-secondary:#F3F3F3;--sc-surface-neutral-light:#FFFFFF;--sc-surface-neutral-primary-hover:#FAFAFA;--sc-surface-neutral-primary-active:#F7F7F7;--sc-surface-neutral-secondary-hover:#EDEDED;--sc-surface-neutral-secondary-active:#E6E6E6;--sc-surface-brand-primary:#000000;--sc-surface-brand-secondary:#E6E6E6;--sc-surface-brand-primary-hover:#2E2E2E;--sc-surface-brand-primary-active:#292929;--sc-surface-brand-secondary-hover:#EBEBEB;--sc-surface-brand-secondary-active:#E0E0E0;--sc-surface-success-primary:#008000;--sc-surface-success-secondary:#CCFFCC;--sc-surface-success-primary-hover:#009900;--sc-surface-success-primary-active:#006600;--sc-surface-success-secondary-hover:#E6FFE6;--sc-surface-success-secondary-active:#E6FFE6;--sc-surface-caution-primary:#CC6600;--sc-surface-caution-secondary:#FFD9B3;--sc-surface-caution-primary-hover:#E57300;--sc-surface-caution-primary-active:#B25A00;--sc-surface-caution-secondary-hover:#FFE5CC;--sc-surface-caution-secondary-active:#FFCC99;--sc-surface-danger-primary:#CC0000;--sc-surface-danger-secondary:#FFCCCC;--sc-surface-danger-primary-hover:#E50000;--sc-surface-danger-primary-active:#B30000;--sc-surface-danger-secondary-hover:#FFE7E7;--sc-surface-danger-secondary-active:#FFB3B3;--sc-content-brand:#000000;--sc-content-success:#008000;--sc-content-caution:#994D00;--sc-content-danger:#990000;--sc-content-disabled:#737373;--sc-content-neutral-primary:#292929;--sc-content-neutral-secondary:#404040;--sc-content-brand-on-primary:#FFFFFF;--sc-content-success-on-primary:#FFFFFF;--sc-content-caution-on-primary:#FFFFFF;--sc-content-danger-on-primary:#FFFFFF;--sc-content-disabled-on-disabled:#737373;--sc-border-neutral:rgba(0,0,0, 0.1);--sc-border-brand:#000000;--sc-border-success:#008000;--sc-border-caution:#CC6600;--sc-border-danger:#CC0000;--sc-border-disabled:#737373}:root{--sc-font-family:sans-serif;--sc-heading-1-font-size:32px;--sc-heading-1-line-height:36px;--sc-heading-1-font-weight:700;--sc-heading-2-font-size:29px;--sc-heading-2-line-height:32px;--sc-heading-2-font-weight:700;--sc-heading-3-font-size:26px;--sc-heading-3-line-height:28px;--sc-heading-3-font-weight:700;--sc-heading-4-font-size:23px;--sc-heading-4-line-height:24px;--sc-heading-4-font-weight:700;--sc-heading-5-font-size:20px;--sc-heading-5-line-height:24px;--sc-heading-5-font-weight:700;--sc-heading-6-font-size:10px;--sc-heading-6-line-height:12px;--sc-heading-6-font-weight:700;--sc-body-bold-font-size:16px;--sc-body-bold-line-height:20px;--sc-body-bold-font-weight:700;--sc-body-font-size:16px;--sc-body-line-height:20px;--sc-body-font-weight:400;--sc-body-small-bold-font-size:12px;--sc-body-small-bold-line-height:16px;--sc-body-small-bold-font-weight:700;--sc-body-small-font-size:12px;--sc-body-small-line-height:16px;--sc-body-small-font-weight:400}.searchcraft-results-info-container{border-bottom:1px solid var(--sc-surface-disabled);display:flex;justify-content:flex-start}.searchcraft-results-info-content{color:var(--sc-content-primary);font-family:var(--sc-font-family);font-size:18px;font-weight:600;line-height:20px;margin:0px 0 8px}@media (max-width: 900px){.searchcraft-results-info-content{margin:0;margin-bottom:8px}}", qn = Nn, Xt = /* @__PURE__ */ P(class extends A {
2492
2495
  constructor() {
2493
2496
  super(), this.__registerHost(), this.isRequesting = !1, this.resultsCount = 0, this.responseTime = "", this.query = "";
2494
2497
  }
@@ -2606,7 +2609,7 @@ const Yn = /* @__PURE__ */ new Set(["children", "localName", "ref", "style", "cl
2606
2609
  defineCustomElement: bn
2607
2610
  }), aa = /* @__PURE__ */ D({
2608
2611
  tagName: "searchcraft-input-form",
2609
- elementClass: In,
2612
+ elementClass: Ln,
2610
2613
  // @ts-ignore - React type of Stencil Output Target may differ from the React version used in the Nuxt.js project, this can be ignored.
2611
2614
  react: _,
2612
2615
  events: {