@pendo/agent 2.300.0 → 2.300.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
@@ -7315,7 +7315,7 @@ function getScreenPosition(element) {
7315
7315
  };
7316
7316
  }
7317
7317
 
7318
- var VERSION = '2.300.0_';
7318
+ var VERSION = '2.300.1_';
7319
7319
 
7320
7320
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7321
7321
 
@@ -3905,8 +3905,8 @@ let SERVER = '';
3905
3905
  let ASSET_HOST = '';
3906
3906
  let ASSET_PATH = '';
3907
3907
  let DESIGNER_SERVER = '';
3908
- let VERSION = '2.300.0_';
3909
- let PACKAGE_VERSION = '2.300.0';
3908
+ let VERSION = '2.300.1_';
3909
+ let PACKAGE_VERSION = '2.300.1';
3910
3910
  let LOADER = 'xhr';
3911
3911
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3912
3912
  /**
@@ -12239,8 +12239,14 @@ const BEACON_GIF_FAILURES = {
12239
12239
  poll: 'pendo-poll-gif-failure',
12240
12240
  agentic: 'pendo-agentic-gif-failure'
12241
12241
  };
12242
- const GUIDE_LOOP_TIMER = 'pendo-guide-loop';
12243
- const EVENT_CAPTURED_TIMER = 'pendo-event-captured';
12242
+ const GUIDE_LOOP_TIMER = {
12243
+ name: 'pendo-guide-loop',
12244
+ debuggingOnly: true
12245
+ };
12246
+ const EVENT_CAPTURED_TIMER = {
12247
+ name: 'pendo-event-captured',
12248
+ debuggingOnly: true
12249
+ };
12244
12250
  const INITIALIZE = 'pendo-initialize';
12245
12251
  const TEARDOWN = 'pendo-teardown';
12246
12252
  const METRICS = {};
@@ -12256,12 +12262,8 @@ _.each(BEACON_GIF_FAILURES, (name) => {
12256
12262
  instrument: counter
12257
12263
  };
12258
12264
  });
12259
- METRICS[GUIDE_LOOP_TIMER] = {
12260
- name: GUIDE_LOOP_TIMER
12261
- };
12262
- METRICS[EVENT_CAPTURED_TIMER] = {
12263
- name: EVENT_CAPTURED_TIMER
12264
- };
12265
+ METRICS[GUIDE_LOOP_TIMER.name] = GUIDE_LOOP_TIMER;
12266
+ METRICS[EVENT_CAPTURED_TIMER.name] = EVENT_CAPTURED_TIMER;
12265
12267
  METRICS[INITIALIZE] = {
12266
12268
  name: INITIALIZE
12267
12269
  };
@@ -12269,11 +12271,42 @@ METRICS[TEARDOWN] = {
12269
12271
  name: TEARDOWN
12270
12272
  };
12271
12273
 
12274
+ var debugEnabled = 'debug-enabled';
12275
+ function getDebuggingStorage() {
12276
+ try {
12277
+ const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
12278
+ if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
12279
+ return { enabled: debuggingStorage };
12280
+ }
12281
+ return debuggingStorage || {};
12282
+ }
12283
+ catch (e) {
12284
+ return {};
12285
+ }
12286
+ }
12287
+ function isDebuggingEnabled(asBoolean = true) {
12288
+ let isEnabled;
12289
+ if (store && store.getters && store.getters['debugger/debuggingEnabled']) {
12290
+ isEnabled = store.getters['debugger/debuggingEnabled']();
12291
+ }
12292
+ else {
12293
+ isEnabled = getDebuggingStorage().enabled === true;
12294
+ }
12295
+ if (asBoolean) {
12296
+ return isEnabled;
12297
+ }
12298
+ else {
12299
+ return isEnabled ? 'Yes' : 'No';
12300
+ }
12301
+ }
12302
+
12272
12303
  const PERFORMANCE_SEND_INTERVAL = 1000 * 60 * 10; // 10 minutes
12273
12304
  class PerformanceMonitor {
12274
12305
  constructor() {
12275
12306
  this._isPerformanceApiAvailable = this._checkPerformanceApi();
12276
12307
  this._measuringPerformance = false;
12308
+ this._debugging = false;
12309
+ this._setDebuggingBound = _.bind(this._setDebugging, this);
12277
12310
  this.marks = new Set();
12278
12311
  this.measures = new Set();
12279
12312
  }
@@ -12282,6 +12315,8 @@ class PerformanceMonitor {
12282
12315
  return _.noop;
12283
12316
  this._measuringPerformance = true;
12284
12317
  this._markPerformance(INITIALIZE);
12318
+ this._setDebugging();
12319
+ Events.debuggerLaunched.on(this._setDebuggingBound);
12285
12320
  this.interval = setInterval(() => {
12286
12321
  this.send();
12287
12322
  }, PERFORMANCE_SEND_INTERVAL);
@@ -12293,13 +12328,19 @@ class PerformanceMonitor {
12293
12328
  this._markPerformance(TEARDOWN);
12294
12329
  this.send();
12295
12330
  this._measuringPerformance = false;
12331
+ this._setDebugging();
12332
+ Events.debuggerLaunched.off(this._setDebuggingBound);
12296
12333
  this._clearMarksAndMeasures();
12297
12334
  clearInterval(this.interval);
12298
12335
  }
12299
- startTimer(name, detail = null) {
12336
+ startTimer({ name, debuggingOnly }, detail = null) {
12337
+ if (debuggingOnly && !this._debugging)
12338
+ return;
12300
12339
  this._markPerformance(`${name}-start`, { detail });
12301
12340
  }
12302
- stopTimer(name, detail = null) {
12341
+ stopTimer({ name, debuggingOnly }, detail = null) {
12342
+ if (debuggingOnly && !this._debugging)
12343
+ return;
12303
12344
  this._markPerformance(`${name}-stop`, { detail });
12304
12345
  this._measurePerformance(name, { detail });
12305
12346
  }
@@ -12340,6 +12381,9 @@ class PerformanceMonitor {
12340
12381
  _shouldMeasurePerformance() {
12341
12382
  return this._isPerformanceApiAvailable && this._measuringPerformance;
12342
12383
  }
12384
+ _setDebugging() {
12385
+ this._debugging = isDebuggingEnabled();
12386
+ }
12343
12387
  _markPerformance(name, metadata) {
12344
12388
  if (!this._shouldMeasurePerformance())
12345
12389
  return;
@@ -12357,13 +12401,15 @@ class PerformanceMonitor {
12357
12401
  }
12358
12402
  }
12359
12403
  _clearMarksAndMeasures() {
12360
- for (const name of this.marks) {
12404
+ // eslint-disable-next-line agent-eslint-rules/no-array-foreach
12405
+ this.marks.forEach(name => {
12361
12406
  performance.clearMarks(name);
12362
- }
12407
+ });
12363
12408
  this.marks.clear();
12364
- for (const name of this.measures) {
12409
+ // eslint-disable-next-line agent-eslint-rules/no-array-foreach
12410
+ this.measures.forEach(name => {
12365
12411
  performance.clearMeasures(name);
12366
- }
12412
+ });
12367
12413
  this.measures.clear();
12368
12414
  }
12369
12415
  }
@@ -21537,35 +21583,6 @@ function Wrappable() {
21537
21583
  return this;
21538
21584
  }
21539
21585
 
21540
- var debugEnabled = 'debug-enabled';
21541
- function getDebuggingStorage() {
21542
- try {
21543
- const debuggingStorage = agentStorage.read(debugEnabled) || JSON.parse(getCookie(debugEnabled));
21544
- if (typeof debuggingStorage === 'boolean') { // v1 debugger storage format
21545
- return { enabled: debuggingStorage };
21546
- }
21547
- return debuggingStorage || {};
21548
- }
21549
- catch (e) {
21550
- return {};
21551
- }
21552
- }
21553
- function isDebuggingEnabled(asBoolean = true) {
21554
- let isEnabled;
21555
- if (store && store.getters && store.getters['debugger/debuggingEnabled']) {
21556
- isEnabled = store.getters['debugger/debuggingEnabled']();
21557
- }
21558
- else {
21559
- isEnabled = getDebuggingStorage().enabled === true;
21560
- }
21561
- if (asBoolean) {
21562
- return isEnabled;
21563
- }
21564
- else {
21565
- return isEnabled ? 'Yes' : 'No';
21566
- }
21567
- }
21568
-
21569
21586
  class GuideTypeIdentifier {
21570
21587
  constructor(identificationFn, typeName) {
21571
21588
  this.type = typeName;