@pendo/agent 2.309.2 → 2.310.1

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/dom.esm.js CHANGED
@@ -7428,7 +7428,7 @@ function applyMatrix2dRect(matrix2d, rect) {
7428
7428
  return transformedRect;
7429
7429
  }
7430
7430
 
7431
- var VERSION = '2.309.2_';
7431
+ var VERSION = '2.310.1_';
7432
7432
 
7433
7433
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7434
7434
 
@@ -7534,8 +7534,10 @@ var setCookie = function (name, val, millisToExpire, isSecure) {
7534
7534
  }
7535
7535
  var cookieTTL = limitCookieTTL(millisToExpire);
7536
7536
  var expireDate = new Date();
7537
+ var canSecure = document.location.protocol === 'https:' || isSecure;
7538
+ var sameSite = canSecure ? 'None' : 'Strict';
7537
7539
  expireDate.setTime(expireDate.getTime() + cookieTTL);
7538
- var cookie = name + '=' + encodeURIComponent(val) + (millisToExpire ? ';expires=' + expireDate.toUTCString() : '') + '; path=/' + (document.location.protocol === 'https:' || isSecure ? ';secure' : '') + '; SameSite=Strict';
7540
+ var cookie = name + '=' + encodeURIComponent(val) + (millisToExpire ? ';expires=' + expireDate.toUTCString() : '') + '; path=/' + (canSecure ? ';secure' : '') + '; SameSite=' + sameSite;
7539
7541
  if (storageIsDisabled() || allowLocalStorageOnly()) {
7540
7542
  inMemoryCookies[name] = cookie;
7541
7543
  }
@@ -10023,7 +10025,7 @@ var ElementGetter = /** @class */ (function () {
10023
10025
  }
10024
10026
  ElementGetter.prototype.get = function () {
10025
10027
  var _this = this;
10026
- var el = this.elRef && this.elRef.deref();
10028
+ var el = this.elRef && this.elRef.deref && this.elRef.deref();
10027
10029
  var isInDoc = isInDocument(el); // is this safe to call if el is null?
10028
10030
  if (el && isInDoc)
10029
10031
  return el;
@@ -3912,8 +3912,8 @@ let SERVER = '';
3912
3912
  let ASSET_HOST = '';
3913
3913
  let ASSET_PATH = '';
3914
3914
  let DESIGNER_SERVER = '';
3915
- let VERSION = '2.309.2_';
3916
- let PACKAGE_VERSION = '2.309.2';
3915
+ let VERSION = '2.310.1_';
3916
+ let PACKAGE_VERSION = '2.310.1';
3917
3917
  let LOADER = 'xhr';
3918
3918
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3919
3919
  /**
@@ -4458,8 +4458,10 @@ var setCookie = function (name, val, millisToExpire, isSecure) {
4458
4458
  }
4459
4459
  const cookieTTL = limitCookieTTL(millisToExpire);
4460
4460
  var expireDate = new Date();
4461
+ const canSecure = document.location.protocol === 'https:' || isSecure;
4462
+ const sameSite = canSecure ? 'None' : 'Strict';
4461
4463
  expireDate.setTime(expireDate.getTime() + cookieTTL);
4462
- var cookie = name + '=' + encodeURIComponent(val) + (millisToExpire ? ';expires=' + expireDate.toUTCString() : '') + '; path=/' + (document.location.protocol === 'https:' || isSecure ? ';secure' : '') + '; SameSite=Strict';
4464
+ var cookie = name + '=' + encodeURIComponent(val) + (millisToExpire ? ';expires=' + expireDate.toUTCString() : '') + '; path=/' + (canSecure ? ';secure' : '') + '; SameSite=' + sameSite;
4463
4465
  if (cookieDomain) {
4464
4466
  cookie += ';domain=' + cookieDomain;
4465
4467
  }
@@ -11516,7 +11518,7 @@ class ElementGetter {
11516
11518
  this.cssSelector = cssSelector;
11517
11519
  }
11518
11520
  get() {
11519
- let el = this.elRef && this.elRef.deref();
11521
+ let el = this.elRef && this.elRef.deref && this.elRef.deref();
11520
11522
  const isInDoc = isInDocument(el); // is this safe to call if el is null?
11521
11523
  if (el && isInDoc)
11522
11524
  return el;
@@ -53599,6 +53601,7 @@ const RECORDING_CONFIG_ON_RECORDING_START = 'recording.onRecordingStart';
53599
53601
  const RECORDING_CONFIG_ON_RECORDING_STOP = 'recording.onRecordingStop';
53600
53602
  const RECORDING_CONFIG_WORKER_OVERRIDE = 'recording.workerOverride';
53601
53603
  const RECORDING_CONFIG_TREAT_IFRAME_AS_ROOT = 'recording.treatIframeAsRoot';
53604
+ const RECORDING_CONFIG_DISABLE_UNLOAD = 'recording.disableUnload';
53602
53605
  const RESOURCE_CACHING = 'resourceCaching';
53603
53606
  const ONE_DAY_IN_MILLISECONDS = 24 * 60 * 60 * 1000;
53604
53607
  const THIRTY_MINUTES = 1000 * 60 * 30;
@@ -54324,6 +54327,8 @@ class SessionRecorder {
54324
54327
  this.send({ hidden: true });
54325
54328
  }
54326
54329
  handleUnload() {
54330
+ if (this.api.ConfigReader.get(RECORDING_CONFIG_DISABLE_UNLOAD))
54331
+ return;
54327
54332
  this.send({ unload: true });
54328
54333
  }
54329
54334
  buildRequestUrl(baseUrl, queryObj) {
@@ -55417,9 +55422,9 @@ const MAX_LENGTH = 1000;
55417
55422
  const PII_PATTERN = {
55418
55423
  ip: /\b(?:\d{1,3}\.){3}\d{1,3}\b/g,
55419
55424
  ssn: /\b\d{3}-\d{2}-\d{4}\b/g,
55420
- creditCard: /\b(?:\d[ -]*?){13,16}\b/g,
55425
+ creditCard: /\b(?:\d[ -]?){12,18}\d\b/g,
55421
55426
  httpsUrls: /https:\/\/[^\s]+/g,
55422
- email: /\b\S+@[\w-]+\.[\w-]+\b/g
55427
+ email: /[\w._+-]+@[\w.-]+\.\w+/g
55423
55428
  };
55424
55429
  const PII_REPLACEMENT = '*'.repeat(10);
55425
55430
  const JSON_PII_KEYS = ['password', 'email', 'key', 'token', 'auth', 'authentication', 'phone', 'address', 'ssn'];