@zaplier/sdk 1.1.4 → 1.1.5

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.esm.js CHANGED
@@ -7594,15 +7594,15 @@ class ZaplierSDK {
7594
7594
  */
7595
7595
  getBrowserFingerprint() {
7596
7596
  const components = [
7597
- navigator.userAgent || '',
7598
- navigator.platform || '',
7597
+ navigator.userAgent || "",
7598
+ navigator.platform || "",
7599
7599
  screen.width || 0,
7600
7600
  screen.height || 0,
7601
7601
  new Date(2024, 0, 1).getTimezoneOffset(),
7602
- navigator.language || '',
7603
- navigator.hardwareConcurrency || 0
7602
+ navigator.language || "",
7603
+ navigator.hardwareConcurrency || 0,
7604
7604
  ];
7605
- const combined = components.join('|');
7605
+ const combined = components.join("|");
7606
7606
  let hash = 0;
7607
7607
  for (let i = 0; i < combined.length; i++) {
7608
7608
  const char = combined.charCodeAt(i);
@@ -7692,8 +7692,8 @@ class ZaplierSDK {
7692
7692
  // Use page load time (stable during session) instead of current time
7693
7693
  performance.timeOrigin || 0,
7694
7694
  // Deterministic entropy from browser characteristics
7695
- (navigator.plugins ? navigator.plugins.length : 0),
7696
- (navigator.mimeTypes ? navigator.mimeTypes.length : 0),
7695
+ navigator.plugins ? navigator.plugins.length : 0,
7696
+ navigator.mimeTypes ? navigator.mimeTypes.length : 0,
7697
7697
  // Memory usage pattern (if available, use rounded values for stability)
7698
7698
  Math.floor((performance.memory?.usedJSHeapSize || 0) / 1000000),
7699
7699
  Math.floor((performance.memory?.totalJSHeapSize || 0) / 1000000),
@@ -7705,14 +7705,18 @@ class ZaplierSDK {
7705
7705
  window.outerWidth || 0,
7706
7706
  Math.floor((window.devicePixelRatio || 1) * 100) / 100, // Round to 2 decimals
7707
7707
  // Canvas support (deterministic)
7708
- typeof document.createElement('canvas').getContext === 'function' ? 1 : 0,
7708
+ typeof document.createElement("canvas").getContext === "function"
7709
+ ? 1
7710
+ : 0,
7709
7711
  ];
7710
7712
  // Create deterministic entropy string
7711
7713
  const entropyString = entropyComponents.join("|");
7712
7714
  // Add deterministic checksum instead of random values
7713
7715
  let checksum = 0;
7714
7716
  for (let i = 0; i < entropyString.length; i++) {
7715
- checksum = ((checksum << 5) - checksum + entropyString.charCodeAt(i)) & 0xffffffff;
7717
+ checksum =
7718
+ ((checksum << 5) - checksum + entropyString.charCodeAt(i)) &
7719
+ 0xffffffff;
7716
7720
  }
7717
7721
  const deterministic = Math.abs(checksum).toString(36);
7718
7722
  // Advanced hash function with better distribution
@@ -7854,14 +7858,7 @@ class ZaplierSDK {
7854
7858
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
7855
7859
  }
7856
7860
  const jsonResponse = await response.json();
7857
- // If anti-adblock is enabled, also send via anti-adblock as a backup
7858
- // (but don't wait for it or use its response)
7859
- if (this.antiAdblockManager && method === "POST") {
7860
- // Send in parallel without blocking
7861
- this.antiAdblockManager.send(data, endpoint).catch(() => {
7862
- // Silently fail - we already got the response from standard fetch
7863
- });
7864
- }
7861
+ // Return immediately - anti-adblock is only used as fallback when fetch fails
7865
7862
  return jsonResponse;
7866
7863
  }
7867
7864
  catch (error) {