@pendo/agent 2.312.1 → 2.314.0

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.
@@ -2801,9 +2801,10 @@ var ConfigReader = (function () {
2801
2801
  function initializeOptions() {
2802
2802
  // Core
2803
2803
  /**
2804
- * Formerly `additionalApiKeys`. When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
2804
+ * When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
2805
2805
  * only sent to the primary public app ID). This will only function if there are no `additionalPublicAppIds` set on
2806
2806
  * the configuration included in the downloaded web SDK.
2807
+ * Alias: `additionalApiKeys`
2807
2808
  *
2808
2809
  * @access public
2809
2810
  * @category Config/Core
@@ -2811,8 +2812,7 @@ var ConfigReader = (function () {
2811
2812
  * @default []
2812
2813
  * @type {string[]}
2813
2814
  */
2814
- addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2815
- addOption('additionalApiKeys', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2815
+ addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['additionalApiKeys']);
2816
2816
  addOption('allowedOriginServers');
2817
2817
  addOption('allowedOriginServerHashes');
2818
2818
  addOption('allowMixedApplicationFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
@@ -2829,8 +2829,9 @@ var ConfigReader = (function () {
2829
2829
  */
2830
2830
  addOption('annotateUrl', [SNIPPET_SRC]);
2831
2831
  /**
2832
- * Formerly `apiKey`. A primary public app ID to send data to from the web SDK. This will only function if there is no `publicAppId` set
2832
+ * A primary public app ID to send data to from the web SDK. This will only function if there is no `publicAppId` set
2833
2833
  * on the configuration included in the downloaded web SDK.
2834
+ * Alias: `apiKey`
2834
2835
  *
2835
2836
  * @access public
2836
2837
  * @category Config/Core
@@ -2838,8 +2839,7 @@ var ConfigReader = (function () {
2838
2839
  * @default undefined
2839
2840
  * @type {string}
2840
2841
  */
2841
- addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2842
- addOption('apiKey', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
2842
+ addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['apiKey']);
2843
2843
  addOption('assetHost', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
2844
2844
  /**
2845
2845
  * If set to `true`, the web SDK will try to install and initialize in all same-origin frames on the page.
@@ -2852,7 +2852,7 @@ var ConfigReader = (function () {
2852
2852
  * @type {boolean}
2853
2853
  */
2854
2854
  addOption('autoFrameInstall', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
2855
- addOption('blockAgentMetadata', [PENDO_CONFIG_SRC], false);
2855
+ addOption('blockWebSDKMetadata', [PENDO_CONFIG_SRC], false, undefined, ['blockAgentMetadata']);
2856
2856
  /**
2857
2857
  * An alternate url to load guide content from. This will be used to replace the standard google storage
2858
2858
  * url for your subscription. Usually used for
@@ -2927,6 +2927,37 @@ var ConfigReader = (function () {
2927
2927
  */
2928
2928
  addOption('disablePersistence', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
2929
2929
  addOption('enableSignedMetadata', [PENDO_CONFIG_SRC], false);
2930
+ /**
2931
+ * Having identity persisted by default makes it so that a transition from using identified visitor ids
2932
+ * to using anonymous visitor ids is challenging. Anyone that used your application with an identified
2933
+ * visitor id would have that value persisted to storage and whenever the web SDK is initialized for them,
2934
+ * that value would be read from storage treating them as the same identified visitor. When set `true`,
2935
+ * this config option will only use persisted identity values if they are an anonymous id. It is meant to
2936
+ * be used to smoothly make this transition to using anonymous ids while still retaining the benefit of
2937
+ * consistent anonymous ids for visitors. This option will be ignored if you provide an identified
2938
+ * visitorId to the initialize call.
2939
+ *
2940
+ * @access public
2941
+ * @category Config/Core
2942
+ * @name forceAnonymous
2943
+ * @default false
2944
+ * @type {boolean}
2945
+ */
2946
+ addOption('forceAnonymous', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
2947
+ /**
2948
+ * If set to `true`, the web SDK will prioritize this frame to use as the leader frame that will coordinate
2949
+ * the display of guides and the resource center. The leader frame is usually the "top" frame if the SDK is initialized
2950
+ * there and this option is meant to be used when that condition is not met or the leader should be some other
2951
+ * specific frame. Sitewide guides and the resource center will always attempt to be shown in the leader frame
2952
+ * first.
2953
+ *
2954
+ * @access public
2955
+ * @category Config/Core
2956
+ * @name forceLeader
2957
+ * @default false
2958
+ * @type {boolean}
2959
+ */
2960
+ addOption('forcedLeader', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
2930
2961
  /**
2931
2962
  * By default, the identity of a visitor in various iframes on a page are independent from each other.
2932
2963
  * Setting this to `true` will instead have the web SDK make sure all frames use the exact same visitor and
@@ -2951,23 +2982,6 @@ var ConfigReader = (function () {
2951
2982
  * @type {boolean}
2952
2983
  */
2953
2984
  addOption('frameIdentityTopDownOnly', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
2954
- /**
2955
- * Having identity persisted by default makes it so that a transition from using identified visitor ids
2956
- * to using anonymous visitor ids is challenging. Anyone that used your application with an identified
2957
- * visitor id would have that value persisted to storage and whenever the web SDK is initialized for them,
2958
- * that value would be read from storage treating them as the same identified visitor. When set `true`,
2959
- * this config option will only use persisted identity values if they are an anonymous id. It is meant to
2960
- * be used to smoothly make this transition to using anonymous ids while still retaining the benefit of
2961
- * consistent anonymous ids for visitors. This option will be ignored if you provide an identified
2962
- * visitorId to the initialize call.
2963
- *
2964
- * @access public
2965
- * @category Config/Core
2966
- * @name forceAnonymous
2967
- * @default false
2968
- * @type {boolean}
2969
- */
2970
- addOption('forceAnonymous', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
2971
2985
  addOption('identityStorageLifetime', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
2972
2986
  addOption('identityStorageSuffix', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
2973
2987
  /**
@@ -3068,7 +3082,7 @@ var ConfigReader = (function () {
3068
3082
  * @type {boolean}
3069
3083
  */
3070
3084
  addOption('preventUnloadListener', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
3071
- addOption('promotedAgentMetadataConfigurations', [PENDO_CONFIG_SRC]);
3085
+ addOption('promotedWebSDKMetadataConfigurations', [PENDO_CONFIG_SRC], undefined, undefined, ['promotedAgentMetadataConfigurations']);
3072
3086
  /**
3073
3087
  * An array of strings or a function that returns an array of strings. The web SDK will then strip any query
3074
3088
  * string parameters from the url that are not found in the provided array. **Deprecated:** new usages to
@@ -3098,14 +3112,15 @@ var ConfigReader = (function () {
3098
3112
  /**
3099
3113
  * Meant to be used with `autoFrameInstall`. If set, the web SDK will use this as the url to download itself
3100
3114
  * from in child frames. Read more about [frame support](/advanced/auto-frame-install).
3115
+ * Alias: `selfHostedAgentUrl`
3101
3116
  *
3102
3117
  * @access public
3103
3118
  * @category Config/Core
3104
- * @name selfHostedAgentUrl
3119
+ * @name selfHostedWebSDKUrl
3105
3120
  * @default undefined
3106
3121
  * @type {string}
3107
3122
  */
3108
- addOption('selfHostedAgentUrl', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
3123
+ addOption('selfHostedWebSDKUrl', [SNIPPET_SRC, PENDO_CONFIG_SRC], undefined, undefined, ['selfHostedAgentUrl']);
3109
3124
  /**
3110
3125
  * If this option is set to true, event data will only be transmitted using requests of type POST instead
3111
3126
  * of first trying to use GET requests. This can result in fewer requests being sent each time that event data
@@ -3207,7 +3222,6 @@ var ConfigReader = (function () {
3207
3222
  addOption('excludeNonGuideAnalytics', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
3208
3223
  addOption('htmlAttributeBlacklist');
3209
3224
  addOption('htmlAttributes');
3210
- addOption('interceptElementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false); // old, use syntheticClicks.elementRemoval instead
3211
3225
  /**
3212
3226
  * By default, the web SDK will attempt to intercept calls to `preventDefault` on `touchend` events in order to
3213
3227
  * ensure that Pendo still tracks the click event. There are cases where your application might prevent these
@@ -3239,6 +3253,7 @@ var ConfigReader = (function () {
3239
3253
  * events. In these cases, Pendo will not be able to capture the `click` event properly for events or guide
3240
3254
  * behavior. Setting this to `true` will have the web SDK intercept these types of element removal to ensure
3241
3255
  * more consistent Pendo behavior (this option has been moved from `interceptElementRemoval`).
3256
+ * Alias: `interceptElementRemoval`
3242
3257
  *
3243
3258
  * @access public
3244
3259
  * @category Config/Analytics
@@ -3246,7 +3261,7 @@ var ConfigReader = (function () {
3246
3261
  * @default false
3247
3262
  * @type {boolean}
3248
3263
  */
3249
- addOption('syntheticClicks.elementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
3264
+ addOption('syntheticClicks.elementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false, undefined, ['interceptElementRemoval']);
3250
3265
  /**
3251
3266
  * A `click` is classified by the browser as the same element receiving the `mousedown` and `mouseup` events.
3252
3267
  * When `true` this option will allow Pendo to treat cases where a visitor clicks down the mouse, moves the
@@ -3295,7 +3310,6 @@ var ConfigReader = (function () {
3295
3310
  * @type {Number}
3296
3311
  */
3297
3312
  addOption('cacheGuidesTimeout', [PENDO_CONFIG_SRC], 600000);
3298
- addOption('delayGuides', [SNIPPET_SRC]); // old, use guides.delay instead
3299
3313
  /**
3300
3314
  * If `true`, this will prevent the web SDK from attempting to launch the Visual Design Studio.
3301
3315
  *
@@ -3331,7 +3345,6 @@ var ConfigReader = (function () {
3331
3345
  * @type {boolean}
3332
3346
  */
3333
3347
  addOption('disableGuidePseudoStyles', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
3334
- addOption('disableGuides', [SNIPPET_SRC]); // old, use guides.disabled instead
3335
3348
  /**
3336
3349
  * Content of badge and target element activated guides will be prefetched on load to improve guide display
3337
3350
  * time unless set to `true`.
@@ -3376,7 +3389,6 @@ var ConfigReader = (function () {
3376
3389
  * @type {number}
3377
3390
  */
3378
3391
  addOption('guideSeenTimeoutLength', [PENDO_CONFIG_SRC, SNIPPET_SRC], 10000);
3379
- addOption('guideTimeout', [SNIPPET_SRC]); // old, use guides.timeout instead
3380
3392
  /**
3381
3393
  * If `true`, guides will be verified against their saved content hash before display to ensure validity of
3382
3394
  * guide content.
@@ -3401,7 +3413,8 @@ var ConfigReader = (function () {
3401
3413
  addOption('guides.attachPoint', [SNIPPET_SRC]);
3402
3414
  /**
3403
3415
  * Guides will be loaded, but not displayed. Call `pendo.startGuides()` to display guides when you choose
3404
- * to do so (this options has been moved from `delayGuides`).
3416
+ * to do so.
3417
+ * Alias: `delayGuides`
3405
3418
  *
3406
3419
  * @access public
3407
3420
  * @category Config/Guides
@@ -3409,9 +3422,10 @@ var ConfigReader = (function () {
3409
3422
  * @default false
3410
3423
  * @type {boolean}
3411
3424
  */
3412
- addOption('guides.delay', [SNIPPET_SRC]);
3425
+ addOption('guides.delay', [SNIPPET_SRC], undefined, undefined, ['delayGuides']);
3413
3426
  /**
3414
3427
  * Completely disables guides (this option has been moved from `disableGuides`).
3428
+ * Alias: `disableGuides`
3415
3429
  *
3416
3430
  * @access public
3417
3431
  * @category Config/Guides
@@ -3419,7 +3433,7 @@ var ConfigReader = (function () {
3419
3433
  * @default false
3420
3434
  * @type {boolean}
3421
3435
  */
3422
- addOption('guides.disabled', [SNIPPET_SRC]);
3436
+ addOption('guides.disabled', [SNIPPET_SRC], undefined, undefined, ['disableGuides']);
3423
3437
  /**
3424
3438
  * If 'true', guides with slow selectors will be removed from guide display processing.
3425
3439
  * This will improve application performance, but slow guides will not be shown to users.
@@ -3445,6 +3459,7 @@ var ConfigReader = (function () {
3445
3459
  /**
3446
3460
  * How long to wait for guides to load in milliseconds (this option has been moved from `guideTimeout`).
3447
3461
  * By default guides will not timeout.
3462
+ * Alias: `guideTimeout`
3448
3463
  *
3449
3464
  * @access public
3450
3465
  * @category Config/Guides
@@ -3452,7 +3467,7 @@ var ConfigReader = (function () {
3452
3467
  * @default undefined
3453
3468
  * @type {number}
3454
3469
  */
3455
- addOption('guides.timeout', [SNIPPET_SRC]);
3470
+ addOption('guides.timeout', [SNIPPET_SRC], undefined, undefined, ['guideTimeout']);
3456
3471
  /**
3457
3472
  * The tooltip arrow size (in pixels). This only affects classic guides.
3458
3473
  *
@@ -3543,10 +3558,10 @@ var ConfigReader = (function () {
3543
3558
  // Adopt
3544
3559
  addOption('adoptHost');
3545
3560
  addOption('adoptAnalyticsForwarding');
3546
- addOption('agentDebuggerPluginLoader');
3561
+ addOption('webSDKDebuggerPluginLoader', [PENDO_CONFIG_SRC], undefined, undefined, ['agentDebuggerPluginLoader']);
3547
3562
  addOption('allowPartnerAnalyticsForwarding', [SNIPPET_SRC], false);
3548
3563
  addOption('adoptPrioritizeAdoptGuides', [PENDO_CONFIG_SRC], false);
3549
- addOption('designerAgentPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
3564
+ addOption('designerWebSDKPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['designerAgentPluginsLoader']);
3550
3565
  addOption('guideContentLoader', [PENDO_CONFIG_SRC]);
3551
3566
  addOption('trainingPartner');
3552
3567
  addOption('oemAccountId', [SNIPPET_SRC]);
@@ -3585,8 +3600,18 @@ var ConfigReader = (function () {
3585
3600
  function getValueFromSourceGetter(option, sourceGetter) {
3586
3601
  if (!sourceGetter)
3587
3602
  return;
3588
- var source = sourceGetter();
3589
- var v = _.get(source.lookup, getConfigKey(option));
3603
+ const source = sourceGetter();
3604
+ let v = _.get(source.lookup, getConfigKey(option));
3605
+ // need to also check option aliases if the option.name key is not found in the source
3606
+ if (!doesExist(v)) {
3607
+ const aliasWithValue = _.find(option.aliases || [], function (alias) {
3608
+ const val = _.get(source.lookup, alias);
3609
+ if (doesExist(val))
3610
+ return val;
3611
+ });
3612
+ if (aliasWithValue)
3613
+ v = _.get(source.lookup, aliasWithValue);
3614
+ }
3590
3615
  return doesExist(v) ? v : undefined;
3591
3616
  }
3592
3617
  function getValueFromSource(option, src) {
@@ -3603,10 +3628,6 @@ var ConfigReader = (function () {
3603
3628
  var option = findOption(optionName);
3604
3629
  defaultValue = defaultValue || _.get(option, 'defaultValue', null);
3605
3630
  var defaultReturn = new ConfigValue(optionName, defaultValue, DEFAULT_SRC);
3606
- // if (source) {
3607
- // var val = getValueFromSource(option, source);
3608
- // return val;
3609
- // }
3610
3631
  var validOptions = mapSourcesToValues(option, sources);
3611
3632
  // defaultValue must exist in order to use non-ordered sources,
3612
3633
  // otherwise you can't know what value to value over another.
@@ -3924,8 +3945,8 @@ let SERVER = '';
3924
3945
  let ASSET_HOST = '';
3925
3946
  let ASSET_PATH = '';
3926
3947
  let DESIGNER_SERVER = '';
3927
- let VERSION = '2.312.1_';
3928
- let PACKAGE_VERSION = '2.312.1';
3948
+ let VERSION = '2.314.0_';
3949
+ let PACKAGE_VERSION = '2.314.0';
3929
3950
  let LOADER = 'xhr';
3930
3951
  /* eslint-enable web-sdk-eslint-rules/no-gulp-env-references */
3931
3952
  /**
@@ -12253,16 +12274,17 @@ var JWT = (function () {
12253
12274
  };
12254
12275
  })();
12255
12276
 
12256
- const MAX_BACKOFF = 6;
12257
- const MAX_FAILURES = 100;
12277
+ const MAX_RETRY_DELAY_MS = 5 * 60 * 1000; // 5 minutes
12278
+ const ONE_HOUR = 60 * 60 * 1000; // 1 hour
12279
+ const FAILURE_WINDOW_MS = 2 * ONE_HOUR;
12258
12280
  class SendQueue {
12259
- constructor(sendFn, maxFailures = MAX_FAILURES) {
12281
+ constructor(sendFn) {
12260
12282
  this.queue = [];
12261
12283
  this.unloads = new Set();
12262
12284
  this.pending = new Set();
12263
12285
  this.failures = new Map();
12286
+ this.firstFailureTime = null;
12264
12287
  this.sendFn = sendFn;
12265
- this.maxFailures = maxFailures;
12266
12288
  }
12267
12289
  isEmpty() {
12268
12290
  return this.queue.length <= 0;
@@ -12272,6 +12294,7 @@ class SendQueue {
12272
12294
  this.unloads.clear();
12273
12295
  this.pending.clear();
12274
12296
  this.failures.clear();
12297
+ this.firstFailureTime = null;
12275
12298
  this.stopped = true;
12276
12299
  clearTimeout(this.timer);
12277
12300
  delete this.timer;
@@ -12292,12 +12315,16 @@ class SendQueue {
12292
12315
  incrementFailure(payload) {
12293
12316
  const failureCount = (this.failures.get(payload) || 0) + 1;
12294
12317
  this.failures.set(payload, failureCount);
12318
+ if (this.firstFailureTime == null) {
12319
+ this.firstFailureTime = new Date().getTime();
12320
+ }
12295
12321
  return failureCount;
12296
12322
  }
12297
12323
  pass(payload, dequeue = true) {
12298
12324
  this.unloads.delete(payload);
12299
12325
  this.pending.delete(payload);
12300
- this.failures.clear();
12326
+ this.failures.delete(payload);
12327
+ this.firstFailureTime = null;
12301
12328
  const index = this.queue.indexOf(payload);
12302
12329
  if (index >= 0) {
12303
12330
  this.queue.splice(index, 1);
@@ -12312,18 +12339,26 @@ class SendQueue {
12312
12339
  const failureCount = this.incrementFailure(payload);
12313
12340
  if (this.stopped || !retry)
12314
12341
  return;
12315
- if (failureCount >= this.maxFailures) {
12342
+ const now = new Date().getTime();
12343
+ const elapsed = now - (this.firstFailureTime || now);
12344
+ if (elapsed >= FAILURE_WINDOW_MS) {
12316
12345
  if (this.onTimeout) {
12317
12346
  this.onTimeout();
12318
12347
  }
12319
- this.pass(payload, false);
12348
+ this.firstFailureTime = null;
12349
+ this.retryLater(ONE_HOUR);
12350
+ return;
12320
12351
  }
12321
- this.retryLater(Math.pow(2, Math.min(failureCount - 1, MAX_BACKOFF)) * 1000);
12352
+ this.retryLater(Math.min(Math.pow(2, failureCount - 1) * 1000, MAX_RETRY_DELAY_MS));
12353
+ }
12354
+ retryNow() {
12355
+ clearTimeout(this.timer);
12356
+ delete this.timer;
12357
+ this.next();
12322
12358
  }
12323
12359
  retryLater(delay) {
12324
12360
  this.timer = setTimeout$1(() => {
12325
- delete this.timer;
12326
- this.next();
12361
+ this.retryNow();
12327
12362
  }, delay);
12328
12363
  }
12329
12364
  failed() {
@@ -12338,7 +12373,7 @@ class SendQueue {
12338
12373
  }
12339
12374
  drain(finalPayloadArray, isUnload = true) {
12340
12375
  this.queue.push(...finalPayloadArray);
12341
- if (this.failed())
12376
+ if (this.failed() && !this.allowDrainWhileFailed)
12342
12377
  return Promise$2.reject();
12343
12378
  const promises = [];
12344
12379
  for (const payload of this.queue) {
@@ -12357,7 +12392,7 @@ class SendQueue {
12357
12392
  }
12358
12393
 
12359
12394
  const UNSENT_EVENTS_KEY = 'unsentEvents';
12360
- const UNSENT_EVENTS_DURATION = 6 * 24 * 60 * 60 * 1000; // 6 days
12395
+ const UNSENT_EVENTS_MAX_AGE = 7 * 24 * 60 * 60 * 1000; // 7 days
12361
12396
  class LocalStorageEventBuffer {
12362
12397
  constructor() {
12363
12398
  this.events = {};
@@ -12399,7 +12434,7 @@ class LocalStorageEventBuffer {
12399
12434
  }
12400
12435
  write(storage) {
12401
12436
  if (_.size(this.events) > 0) {
12402
- storage.write(UNSENT_EVENTS_KEY, JSON.stringify(this.events), UNSENT_EVENTS_DURATION);
12437
+ storage.write(UNSENT_EVENTS_KEY, JSON.stringify(this.events), UNSENT_EVENTS_MAX_AGE);
12403
12438
  }
12404
12439
  else {
12405
12440
  storage.clear(UNSENT_EVENTS_KEY);
@@ -12639,7 +12674,6 @@ function eventCreate(type, props, url, name, eventProperties, context) {
12639
12674
  if (type === 'track') {
12640
12675
  eventObj.track_event_name = name || defaultTrackName;
12641
12676
  }
12642
- Events.eventCaptured.trigger(eventObj, context);
12643
12677
  return eventObj;
12644
12678
  }
12645
12679
  function shouldCollectEvent() {
@@ -12659,7 +12693,11 @@ function shouldCollectEvent() {
12659
12693
  function collectEvent(type, props, url, name, eventProperties, context) {
12660
12694
  if (!shouldCollectEvent())
12661
12695
  return;
12662
- var event = eventCreate(type, props, url, name, eventProperties, context);
12696
+ var event = eventCreate(type, props, url, name, eventProperties);
12697
+ var captureEvent = Events.eventCaptured.trigger(event, context);
12698
+ if (captureEvent.cancel) {
12699
+ return;
12700
+ }
12663
12701
  if (!isURLValid(event.url)) {
12664
12702
  return;
12665
12703
  }
@@ -12851,6 +12889,13 @@ function filterAnalyticsDisabled(silo, next) {
12851
12889
  return;
12852
12890
  next(silo);
12853
12891
  }
12892
+ function fireEventCaptured(silo, next) {
12893
+ var captureEvent = Events.eventCaptured.trigger(silo);
12894
+ if (captureEvent.cancel) {
12895
+ return;
12896
+ }
12897
+ next(silo);
12898
+ }
12854
12899
  function errorLogger() {
12855
12900
  return function (silo, next) {
12856
12901
  if (silo.length === 1 && silo.JZB.length > ENCODED_EVENT_MAX_POST_LENGTH) {
@@ -12888,6 +12933,7 @@ function addSiloParams(options) {
12888
12933
  silo.params = _.extend({}, silo.params, options.params);
12889
12934
  silo.beacon = options.beacon;
12890
12935
  silo.eventLength = silo.JZB.length;
12936
+ silo.ts = silo[0].browser_time || getNow();
12891
12937
  var jwtOptions = JWT.get();
12892
12938
  if (!_.isEmpty(jwtOptions)) {
12893
12939
  silo.auth = jwtOptions;
@@ -13078,6 +13124,9 @@ function createSendQueue(options, send, guaranteedSend) {
13078
13124
  const apiKeys = getApiKeysFromOptions(options);
13079
13125
  const queues = _.map(apiKeys, (apiKey, i) => {
13080
13126
  const queue = new SendQueue(function (request, isUnload, failureCount) {
13127
+ if (getNow() - request.ts > UNSENT_EVENTS_MAX_AGE) {
13128
+ return q.resolve(); // ignore event if it's too old
13129
+ }
13081
13130
  if (failureCount) {
13082
13131
  request.params = _.extend({}, request.params, {
13083
13132
  rt: failureCount
@@ -13089,7 +13138,10 @@ function createSendQueue(options, send, guaranteedSend) {
13089
13138
  }
13090
13139
  return q.resolve();
13091
13140
  }
13092
- else if (isUnload) {
13141
+ if (isUnload && queue.failed()) {
13142
+ return q.reject();
13143
+ }
13144
+ if (isUnload) {
13093
13145
  return guaranteedSend(apiKey, request);
13094
13146
  }
13095
13147
  else {
@@ -13099,6 +13151,7 @@ function createSendQueue(options, send, guaranteedSend) {
13099
13151
  queue.onTimeout = function () {
13100
13152
  performanceMonitor.count(BEACON_GIF_FAILURES[options.beacon]);
13101
13153
  };
13154
+ queue.allowDrainWhileFailed = true;
13102
13155
  queue.retryPending = true;
13103
13156
  return queue;
13104
13157
  });
@@ -13744,7 +13797,7 @@ var wirePage = function (eventList) {
13744
13797
  unwire.push(() => { handle_change_event.cancel(); });
13745
13798
  unwire.push(attachEventInternal(document, 'change', handle_change_event, true));
13746
13799
  }
13747
- const interceptElementRemoval = ConfigReader.get('interceptElementRemoval') || ConfigReader.get('syntheticClicks.elementRemoval');
13800
+ const interceptElementRemoval = ConfigReader.get('syntheticClicks.elementRemoval');
13748
13801
  const interceptMouseUp = ConfigReader.get('syntheticClicks.targetChanged');
13749
13802
  unwire.push(wireSyntheticClicks(dom.event.trigger, sniffer.addEventListener, interceptElementRemoval, interceptMouseUp).teardown);
13750
13803
  unwire.push(listenForEvents(eventList));
@@ -23136,7 +23189,7 @@ const Keys = (function () {
23136
23189
  _apiKey = key;
23137
23190
  };
23138
23191
  const discoverApiKey = (apiKey) => {
23139
- apiKey = ConfigReader.get('publicAppId') || ConfigReader.get('apiKey', apiKey);
23192
+ apiKey = ConfigReader.get('publicAppId', apiKey);
23140
23193
  if (apiKey) {
23141
23194
  setApiKey(apiKey);
23142
23195
  }
@@ -25794,7 +25847,6 @@ function createGuideEvent(name, guideId, stepId, visitorId, reason, language) {
25794
25847
  url: pendoDotUrl.externalizeURL(),
25795
25848
  props
25796
25849
  });
25797
- Events.eventCaptured.trigger(event);
25798
25850
  return event;
25799
25851
  }
25800
25852
  var stagedEventsTimer = null;
@@ -25947,6 +25999,9 @@ var mostRecentGuideRequest;
25947
25999
  var loadGuideJs = function (apiKey, params) {
25948
26000
  var guideRequestId = _.uniqueId();
25949
26001
  var deferred = q.defer();
26002
+ if (mostRecentGuideRequest && mostRecentGuideRequest.deferred) {
26003
+ mostRecentGuideRequest.deferred.reject('newRequest'); // make sure that we don't leave open any promises if multiple guide requests are made in quick succession
26004
+ }
25950
26005
  mostRecentGuideRequest = {
25951
26006
  id: guideRequestId,
25952
26007
  deferred
@@ -26173,8 +26228,7 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
26173
26228
  resetPendoUI();
26174
26229
  var lastGuideStepSeen = pendo$1.lastGuideStepSeen;
26175
26230
  if (!lastGuideStepSeen) {
26176
- log.info('lastGuideStepSeen is not set, shutting down guides');
26177
- return;
26231
+ throw new Error('lastGuideStepSeen is not set, check response from guide payload');
26178
26232
  }
26179
26233
  store.dispatch('guideState/receiveLastGuideStepSeen', lastGuideStepSeen);
26180
26234
  lastGuideStepSeen.visitorId = visitorId;
@@ -26239,10 +26293,16 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
26239
26293
  }
26240
26294
  }
26241
26295
  }).catch(function (err) {
26296
+ if (err === 'newRequest') {
26297
+ log.info('Guide load cancelled due to new request');
26298
+ deferred.resolve('Guide load cancelled due to new request');
26299
+ return;
26300
+ }
26301
+ log.info(`Error in loadGuideJs, shutting down guides, err: ${_.get(err, 'message', err || 'Unknown error')}`);
26242
26302
  Events.guidesFailed.trigger();
26243
26303
  deferred.reject(err);
26244
26304
  });
26245
- var guideTimeoutDuration = ConfigReader.get('guideTimeout') || ConfigReader.get('guides.timeout');
26305
+ var guideTimeoutDuration = ConfigReader.get('guides.timeout');
26246
26306
  if (_.isNumber(guideTimeoutDuration)) {
26247
26307
  clearTimeout(loadGuidesTimeout);
26248
26308
  loadGuidesTimeout = setTimeout$1(function () {
@@ -26376,7 +26436,7 @@ var getGuideEventCache = function () {
26376
26436
  };
26377
26437
  function createGuideEventQueue(options) {
26378
26438
  const processSilos = pipeline(filterAnalyticsDisabled, splitSiloOnFieldChange('visitor_id'), splitSiloOnFieldChange('props.guide_id'), splitSiloOnFieldChange('props.source'), compressSilo, errorLogger(), addSiloParams(options), addAccountIdParamIfAdoptPartner, addSourceParamIfPresent, convertSiloToObject);
26379
- const packageSilos = pipeline(eventSequence, siloReducer(options.cache), _.noop // do not move to the silo queue until manual flush
26439
+ const packageSilos = pipeline(fireEventCaptured, eventSequence, siloReducer(options.cache), _.noop // do not move to the silo queue until manual flush
26380
26440
  );
26381
26441
  return new EventQueue(_.extend({ processSilos, packageSilos }, options));
26382
26442
  }
@@ -26585,7 +26645,7 @@ var initGuides = function (observer) {
26585
26645
  * pendo.areGuidesDisabled() => true
26586
26646
  */
26587
26647
  var areGuidesDisabled = function () {
26588
- return ConfigReader.get('guides.disabled', false) || ConfigReader.get('disableGuides', false) || !pendoCore;
26648
+ return ConfigReader.get('guides.disabled', false) || !pendoCore;
26589
26649
  };
26590
26650
  /**
26591
26651
  * Returns true or false if the client has delayed guides in the snippet or via a command
@@ -26597,7 +26657,7 @@ var areGuidesDisabled = function () {
26597
26657
  * pendo.areGuidesDelayed() => true
26598
26658
  */
26599
26659
  var areGuidesDelayed = function () {
26600
- return ConfigReader.get('guides.delay', false) || ConfigReader.get('delayGuides', false);
26660
+ return ConfigReader.get('guides.delay', false);
26601
26661
  };
26602
26662
  var setGuidesDisabled = function (areDisabled) {
26603
26663
  var originalOptions = ConfigReader.getLocalConfig();
@@ -32953,7 +33013,8 @@ var FramesModule = (function () {
32953
33013
  isTop,
32954
33014
  visibility: isTop ? 'visible' : 'unknown',
32955
33015
  apiKey: pendo$1.apiKey,
32956
- leaderKey
33016
+ leaderKey,
33017
+ forcedLeader: ConfigReader.get('forcedLeader')
32957
33018
  }, currentFrameState)
32958
33019
  });
32959
33020
  },
@@ -33027,27 +33088,31 @@ var FramesModule = (function () {
33027
33088
  context.dispatch('electLeader');
33028
33089
  }, 50),
33029
33090
  electLeader(context) {
33030
- var state = context.state;
33031
- var candidateFrames = state.frames;
33032
- var leaderKeyPreference = context.getters.leaderKeyPreference();
33091
+ const state = context.state;
33092
+ let candidateFrames = state.frames;
33093
+ const leaderKeyPreference = context.getters.leaderKeyPreference();
33033
33094
  if (leaderKeyPreference.length) {
33034
33095
  while (leaderKeyPreference.length) {
33035
- var leaderKey = leaderKeyPreference.shift();
33036
- var framesWithKey = _.filter(state.frames, (frame) => frame.apiKey === leaderKey);
33096
+ const leaderKey = leaderKeyPreference.shift();
33097
+ const framesWithKey = _.filter(state.frames, (frame) => frame.apiKey === leaderKey);
33037
33098
  if (framesWithKey.length) {
33038
33099
  candidateFrames = framesWithKey;
33039
33100
  break;
33040
33101
  }
33041
33102
  }
33042
33103
  }
33043
- var topFrame = _.find(candidateFrames, (frame) => frame.isTop);
33104
+ const forcedLeaderFrames = _.filter(candidateFrames, (frame) => frame.forcedLeader);
33105
+ if (forcedLeaderFrames.length) {
33106
+ candidateFrames = forcedLeaderFrames;
33107
+ }
33108
+ const topFrame = _.find(candidateFrames, (frame) => frame.isTop);
33044
33109
  if (topFrame) {
33045
33110
  context.dispatch('followLeader', {
33046
33111
  leaderId: topFrame.id
33047
33112
  });
33048
33113
  }
33049
33114
  else {
33050
- var oldestFrame = _.min(candidateFrames, 'joinedAt');
33115
+ const oldestFrame = _.min(candidateFrames, 'joinedAt');
33051
33116
  context.dispatch('followLeader', {
33052
33117
  leaderId: oldestFrame.id
33053
33118
  });
@@ -33694,9 +33759,13 @@ var FramesModule = (function () {
33694
33759
  },
33695
33760
  canShowRCBadge(state, getters) {
33696
33761
  if (getters.leaderKey() !== pendo$1.apiKey) {
33697
- const sameKeyFrames = _.filter(state.frames, function (frame) {
33762
+ let sameKeyFrames = _.filter(state.frames, function (frame) {
33698
33763
  return frame.apiKey === pendo$1.apiKey;
33699
33764
  });
33765
+ const forcedLeaderFrames = _.filter(sameKeyFrames, (frame) => frame.forcedLeader);
33766
+ if (forcedLeaderFrames.length) {
33767
+ sameKeyFrames = forcedLeaderFrames;
33768
+ }
33700
33769
  const topFrame = _.find(sameKeyFrames, function (frame) {
33701
33770
  return frame.isTop;
33702
33771
  });
@@ -33708,12 +33777,6 @@ var FramesModule = (function () {
33708
33777
  });
33709
33778
  return state.frameId === firstJoined.id;
33710
33779
  }
33711
- var hasTopFrame = _.any(state.frames, function (frame) {
33712
- return frame.isTop;
33713
- });
33714
- if (hasTopFrame) {
33715
- return getters.isTop();
33716
- }
33717
33780
  return getters.isLeader();
33718
33781
  },
33719
33782
  leaderKeyPreference(state) {
@@ -37919,7 +37982,7 @@ function startDebuggingModuleIfEnabled() {
37919
37982
  if (dom('#pendo-client-debugger').length)
37920
37983
  return;
37921
37984
  // if debugger launcher function exists on config, run it
37922
- const agentDebuggerPluginLoader = ConfigReader.get('agentDebuggerPluginLoader');
37985
+ const agentDebuggerPluginLoader = ConfigReader.get('webSDKDebuggerPluginLoader');
37923
37986
  if (PluginAPI.restartDebugger) {
37924
37987
  PluginAPI.restartDebugger();
37925
37988
  }
@@ -38467,7 +38530,6 @@ const FrustrationEvent = (function () {
38467
38530
  // A guide that show nested inside another element.
38468
38531
  // Multiple embedded guides can show at the same time.
38469
38532
  const buildGuideBehaviors = function ({ globalPendo, pluginApi }) {
38470
- const guide = this;
38471
38533
  const { _ } = globalPendo;
38472
38534
  const { store } = pluginApi;
38473
38535
  this.process = function () {
@@ -38524,12 +38586,6 @@ const buildGuideBehaviors = function ({ globalPendo, pluginApi }) {
38524
38586
  const nextStep = guide.nextStep(lastSeenStep) || firstStep;
38525
38587
  return nextStep.show(reason);
38526
38588
  };
38527
- // when embedded guide is initialized set the forceShowFirstStep property.
38528
- // This property is deleted after the guide shows because we no longer want to foce show the first step.
38529
- // The propert is reset on urlChanged events.
38530
- if (!this.hasOwnProperty('forceShowFirstStep')) {
38531
- this.forceShowFirstStep = _.get(guide, 'attributes.restartOnReload');
38532
- }
38533
38589
  this.isShownInThisFrame = function () {
38534
38590
  const guide = this;
38535
38591
  return _.any(guide.steps, function (step) {
@@ -38586,7 +38642,6 @@ const EmbeddedGuides = (function () {
38586
38642
  pluginApi.Events.on('deliverablesLoaded', clearEmbeddedGuides);
38587
38643
  pluginApi.Events.on('guideLoopStopped', onGuidesStopped);
38588
38644
  pluginApi.Events.on('guideListChanged', initializeEmbeddedGuides);
38589
- pluginApi.Events.on('urlChanged', setForceShowFirstStepFlags);
38590
38645
  pluginApi.Events.on('guideAdvanced', hideGuide);
38591
38646
  pluginApi.Events.on('metadata', onMetadataChange);
38592
38647
  pluginApi.Events.on('identify', onIdentify);
@@ -38601,7 +38656,6 @@ const EmbeddedGuides = (function () {
38601
38656
  pluginApi.Events.off('deliverablesLoaded', clearEmbeddedGuides);
38602
38657
  pluginApi.Events.off('guideLoopStopped', onGuidesStopped);
38603
38658
  pluginApi.Events.off('guideListChanged', initializeEmbeddedGuides);
38604
- pluginApi.Events.off('urlChanged', setForceShowFirstStepFlags);
38605
38659
  pluginApi.Events.off('guideAdvanced', hideGuide);
38606
38660
  pluginApi.Events.off('metadata', onMetadataChange);
38607
38661
  pluginApi.Events.off('identify', onIdentify);
@@ -38615,14 +38669,14 @@ const EmbeddedGuides = (function () {
38615
38669
  // The guideLoopStopped event sometimes is sent when the guide loop is restarted, for example when a guide is advanced.
38616
38670
  // Do not hide embedded guides in these cases.
38617
38671
  // The delayGuides flag is set when guides are manually stopped, and unset when guides are manually started.
38618
- if (pluginApi.ConfigReader.get('delayGuides')) {
38672
+ if (pluginApi.ConfigReader.get('guides.delay')) {
38619
38673
  hideAllEmbeddedGuides();
38620
38674
  }
38621
38675
  }
38622
38676
  function hideGuide(event) {
38623
38677
  const guideId = _.get(event, 'data.0.props.guide_id', null);
38624
38678
  if (guideId) {
38625
- const guide = embeddedGuides.find(({ id }) => id === guideId);
38679
+ const guide = _.find(embeddedGuides, ({ id }) => id === guideId);
38626
38680
  if (guide) {
38627
38681
  guide.hide();
38628
38682
  }
@@ -38666,13 +38720,6 @@ const EmbeddedGuides = (function () {
38666
38720
  function onIdentify() {
38667
38721
  setEmbeddedGuideCacheValid(false);
38668
38722
  }
38669
- // This function syncs the forceShowFirstStep with the restartOnReload property on guides
38670
- // This function is run on the urlChanged event.
38671
- function setForceShowFirstStepFlags() {
38672
- _.forEach(embeddedGuides, function (guide) {
38673
- guide.forceShowFirstStep = !!_.get(guide, 'attributes.restartOnReload');
38674
- });
38675
- }
38676
38723
  function extractEmbeddedGuides(guide) {
38677
38724
  if (isEmbedded(guide)) {
38678
38725
  if (!_.some(embeddedGuides, ({ id }) => id === guide.id)) {
@@ -40305,6 +40352,35 @@ class PromptPlugin {
40305
40352
  }
40306
40353
  var PromptAnalytics = new PromptPlugin();
40307
40354
 
40355
+ class RestartOnReload {
40356
+ initialize(pendo, { Events }) {
40357
+ this.pendo = pendo;
40358
+ const { _, attachEvent } = pendo;
40359
+ const boundSetForceShowFirstStepFlags = _.bind(this.setForceShowFirstStepFlags, this);
40360
+ this.subscriptions = [
40361
+ attachEvent(Events, 'deliverablesLoaded', boundSetForceShowFirstStepFlags),
40362
+ attachEvent(Events, 'urlChanged', boundSetForceShowFirstStepFlags)
40363
+ ];
40364
+ }
40365
+ teardown() {
40366
+ this.pendo._.forEach(this.subscriptions, function (unsubscribe) {
40367
+ unsubscribe();
40368
+ });
40369
+ this.subscriptions.length = 0;
40370
+ }
40371
+ setForceShowFirstStepFlags() {
40372
+ const { pendo } = this;
40373
+ const { _ } = pendo;
40374
+ _.forEach(pendo.guides, function (guide) {
40375
+ const restartOnReload = !!_.get(guide, 'attributes.restartOnReload');
40376
+ if (restartOnReload) {
40377
+ guide.forceShowFirstStep = true;
40378
+ }
40379
+ });
40380
+ }
40381
+ }
40382
+ var RestartOnReload$1 = new RestartOnReload();
40383
+
40308
40384
  function registerBuiltInPlugins() {
40309
40385
  registerPlugin(IFrameMonitor);
40310
40386
  registerPlugin(DOMActivation);
@@ -40324,6 +40400,7 @@ function registerBuiltInPlugins() {
40324
40400
  registerPlugin(WebAnalytics$1);
40325
40401
  registerPlugin(FormValidation);
40326
40402
  registerPlugin(PromptAnalytics);
40403
+ registerPlugin(RestartOnReload$1);
40327
40404
  }
40328
40405
 
40329
40406
  /*
@@ -40502,6 +40579,7 @@ const substitutionRegex = '\\{(?:\\s?)([^.\\s]?visitor|account|parentAccount)\\.
40502
40579
  const skipStepString = '{skipStep:* *(auto|\\d+)\\/}';
40503
40580
  const goToMiddleString = '(?!0)(\\d+)';
40504
40581
  const goToString = `({goto-${goToMiddleString}\\/})`;
40582
+ const containerSelector = '[id^="pendo-guide-container"]';
40505
40583
  function lookupGuideButtons(domJson, buttons = []) {
40506
40584
  if (domJson.type === 'button' && domJson.actions) {
40507
40585
  buttons.push(domJson);
@@ -40539,6 +40617,7 @@ var guideMarkdownUtil = {
40539
40617
  substitutionRegex,
40540
40618
  skipStepString,
40541
40619
  goToString,
40620
+ containerSelector,
40542
40621
  lookupGuideButtons,
40543
40622
  removeMarkdownSyntax
40544
40623
  };
@@ -40592,7 +40671,7 @@ const PollBranching = {
40592
40671
  attributes: true,
40593
40672
  childList: true,
40594
40673
  characterData: true,
40595
- subtree: false
40674
+ subtree: true
40596
40675
  };
40597
40676
  const MutationObserver = getZoneSafeMethod$1(pendo._, 'MutationObserver');
40598
40677
  const observer = new MutationObserver(applyBranchingIndicators);
@@ -40711,13 +40790,13 @@ function branchingGoToStep(event, step, guide, pendo) {
40711
40790
  if (pollStepIndex < 0)
40712
40791
  return;
40713
40792
  const destinationObject = {
40714
- destinationStepId: guide.steps[pollStepIndex].id
40793
+ destinationStepId: guide.steps[pollStepIndex].id,
40794
+ step
40715
40795
  };
40716
40796
  pendo.goToStep(destinationObject);
40717
40797
  event.cancel = true;
40718
40798
  }
40719
40799
 
40720
- const containerSelector = '[id^="pendo-guide-container"]';
40721
40800
  const MetadataSubstitution = {
40722
40801
  name: 'MetadataSubstitution',
40723
40802
  script(step, guide, pendo) {
@@ -40741,7 +40820,7 @@ const MetadataSubstitution = {
40741
40820
  attributes: true,
40742
40821
  childList: true,
40743
40822
  characterData: true,
40744
- subtree: false
40823
+ subtree: true
40745
40824
  };
40746
40825
  const MutationObserver = getZoneSafeMethod$1(pendo._, 'MutationObserver');
40747
40826
  const observer = new MutationObserver(applySubstitutionIndicators);
@@ -40750,7 +40829,7 @@ const MetadataSubstitution = {
40750
40829
  pendo._.each(mutations, function (mutation) {
40751
40830
  var _a;
40752
40831
  if (mutation.addedNodes.length) {
40753
- if (document.querySelector(containerSelector)) {
40832
+ if (document.querySelector(guideMarkdownUtil.containerSelector)) {
40754
40833
  const placeholderData = findSubstitutableElements(pendo);
40755
40834
  const step = (_a = pendo.designerv2.currentlyPreviewedGuide) === null || _a === void 0 ? void 0 : _a.steps[0];
40756
40835
  if (!step)
@@ -40817,9 +40896,9 @@ function substituteMetadataByTarget(data, target, mdValue, matched) {
40817
40896
  }
40818
40897
  function updateGuideContainer(containerId, context, pendo) {
40819
40898
  if (pendo.designer && !pendo._.size(pendo.dom('#pendo-ps-substitution-icon'))) {
40820
- pendo.dom(containerSelector).append(substitutionIcon('#999', '30px'));
40899
+ pendo.dom(guideMarkdownUtil.containerSelector).append(substitutionIcon('#999', '30px'));
40821
40900
  }
40822
- pendo.flexElement(pendo.dom(containerSelector));
40901
+ pendo.flexElement(pendo.dom(guideMarkdownUtil.containerSelector));
40823
40902
  pendo.BuildingBlocks.BuildingBlockGuides.recalculateGuideHeight(containerId, context);
40824
40903
  }
40825
40904
  function findSubstitutableUrlsInJson(originalData, placeholderData = [], pendo) {
@@ -40860,7 +40939,7 @@ function findSubstitutableUrlsInJson(originalData, placeholderData = [], pendo)
40860
40939
  return placeholderData;
40861
40940
  }
40862
40941
  function findSubstitutableElements(pendo) {
40863
- let elements = pendo.dom(`${containerSelector} *:not(.pendo-inline-ui)`);
40942
+ let elements = pendo.dom(`${guideMarkdownUtil.containerSelector} *:not(.pendo-inline-ui)`);
40864
40943
  return pendo._.chain(elements)
40865
40944
  .filter(function (placeholder) {
40866
40945
  const subRegex = new RegExp(guideMarkdownUtil.substitutionRegex);
@@ -40968,7 +41047,7 @@ const RequiredQuestions = {
40968
41047
  });
40969
41048
  }
40970
41049
  });
40971
- step.attachEvent(step.guideElement.find('[id^="pendo-guide-container"]')[0], 'click', function (event) {
41050
+ step.attachEvent(step.guideElement.find(guideMarkdownUtil.containerSelector)[0], 'click', function (event) {
40972
41051
  if (!event.target.classList.contains('_pendo-button')) {
40973
41052
  evaluateRequiredQuestions(requiredQuestions);
40974
41053
  }
@@ -41139,7 +41218,7 @@ const SkipToEligibleStep = {
41139
41218
  script(step, guide, pendo) {
41140
41219
  let isAdvanceIntercepted = false;
41141
41220
  let isPreviousIntercepted = false;
41142
- let guideContainer = step.guideElement.find('#pendo-guide-container');
41221
+ let guideContainer = step.guideElement.find(guideMarkdownUtil.containerSelector);
41143
41222
  let guideContainerAriaLabel = guideContainer.attr('aria-label');
41144
41223
  let stepNumberOrAuto = skipStepRegex.exec(guideContainerAriaLabel)[1];
41145
41224
  if (guideContainer) {
@@ -41151,7 +41230,7 @@ const SkipToEligibleStep = {
41151
41230
  let eligibleStep = findEligibleSkipStep(stepNumberOrAuto, 'next');
41152
41231
  if (!isAdvanceIntercepted && stepNumberOrAuto) {
41153
41232
  isAdvanceIntercepted = true;
41154
- pendo.goToStep({ destinationStepId: eligibleStep.id });
41233
+ pendo.goToStep({ destinationStepId: eligibleStep.id, step });
41155
41234
  evt.cancel = true;
41156
41235
  }
41157
41236
  });
@@ -41161,7 +41240,7 @@ const SkipToEligibleStep = {
41161
41240
  let eligibleStep = findEligibleSkipStep(stepNumberOrAuto, 'previous');
41162
41241
  if (!isPreviousIntercepted && stepNumberOrAuto) {
41163
41242
  isPreviousIntercepted = true;
41164
- pendo.goToStep({ destinationStepId: eligibleStep.id });
41243
+ pendo.goToStep({ destinationStepId: eligibleStep.id, step });
41165
41244
  evt.cancel = true;
41166
41245
  }
41167
41246
  });
@@ -41171,10 +41250,10 @@ const SkipToEligibleStep = {
41171
41250
  let skipForwardStep = findStepOnPage(guide.getPositionOfStep(step), 'next', stepNumber);
41172
41251
  let skipPreviousStep = findStepOnPage(guide.getPositionOfStep(step) - 2, 'previous', stepNumber);
41173
41252
  if (skipForwardStep && direction == 'next') {
41174
- pendo.goToStep({ destinationStepId: skipForwardStep });
41253
+ pendo.goToStep({ destinationStepId: skipForwardStep, step });
41175
41254
  }
41176
41255
  if (skipPreviousStep && direction == 'previous') {
41177
- pendo.goToStep({ destinationStepId: skipPreviousStep });
41256
+ pendo.goToStep({ destinationStepId: skipPreviousStep, step });
41178
41257
  }
41179
41258
  return direction === 'next' ? skipForwardStep : skipPreviousStep;
41180
41259
  }
@@ -41200,7 +41279,7 @@ const SkipToEligibleStep = {
41200
41279
  },
41201
41280
  test(step, guide, pendo) {
41202
41281
  var _a;
41203
- const guideContainerAriaLabel = (_a = step.guideElement) === null || _a === void 0 ? void 0 : _a.find('#pendo-guide-container').attr('aria-label');
41282
+ const guideContainerAriaLabel = (_a = step.guideElement) === null || _a === void 0 ? void 0 : _a.find(guideMarkdownUtil.containerSelector).attr('aria-label');
41204
41283
  return pendo._.isString(guideContainerAriaLabel) && guideContainerAriaLabel.indexOf('{skipStep') !== -1;
41205
41284
  },
41206
41285
  designerListener(pendo) {
@@ -41210,7 +41289,7 @@ const SkipToEligibleStep = {
41210
41289
  attributes: true,
41211
41290
  childList: true,
41212
41291
  characterData: true,
41213
- subtree: false
41292
+ subtree: true
41214
41293
  };
41215
41294
  const MutationObserver = getZoneSafeMethod$1(pendo._, 'MutationObserver');
41216
41295
  const observer = new MutationObserver(applySkipStepIndicator);
@@ -41221,14 +41300,14 @@ const SkipToEligibleStep = {
41221
41300
  var _a, _b;
41222
41301
  const nodeHasQuerySelector = pendo._.isFunction((_a = mutation.addedNodes[0]) === null || _a === void 0 ? void 0 : _a.querySelectorAll);
41223
41302
  if (mutation.addedNodes.length && nodeHasQuerySelector) {
41224
- let guideContainer = mutation.addedNodes[0].querySelectorAll('#pendo-guide-container');
41303
+ let guideContainer = mutation.addedNodes[0].querySelectorAll(guideMarkdownUtil.containerSelector);
41225
41304
  let guideContainerAriaLabel = (_b = guideContainer[0]) === null || _b === void 0 ? void 0 : _b.getAttribute('aria-label');
41226
41305
  if (guideContainerAriaLabel) {
41227
41306
  if (guideContainerAriaLabel.match(skipStepRegex)) {
41228
41307
  let fullSkipStepString = guideContainerAriaLabel.match(skipStepRegex)[0];
41229
41308
  guideContainerAriaLabel.replace(fullSkipStepString, '');
41230
41309
  if (!pendo.dom('#_pendoSkipIcon').length) {
41231
- pendo.dom('#pendo-guide-container').append(skipIcon('#999', '30px').trim());
41310
+ pendo.dom(guideMarkdownUtil.containerSelector).append(skipIcon('#999', '30px').trim());
41232
41311
  }
41233
41312
  }
41234
41313
  }
@@ -42247,7 +42326,9 @@ function VocPortal() {
42247
42326
  visitor: metadata.visitor,
42248
42327
  account: metadata.account,
42249
42328
  parentAccount: metadata.parentAccount,
42250
- sandboxMode: sandBoxMode
42329
+ sandboxMode: sandBoxMode,
42330
+ guideId: pendoGlobal._.get(pendoGlobal.getActiveGuide(), 'guide.id'),
42331
+ rcModuleId: pendoGlobal._.get(pendoGlobal.BuildingBlocks.BuildingBlockResourceCenter.getResourceCenter(), 'activeModule.id')
42251
42332
  };
42252
42333
  responseHandler(response);
42253
42334
  }
@@ -48530,16 +48611,17 @@ class SessionRecorderBuffer {
48530
48611
  }
48531
48612
  }
48532
48613
 
48533
- const MAX_BACKOFF = 6;
48534
- const MAX_FAILURES = 100;
48614
+ const MAX_RETRY_DELAY_MS = 5 * 60 * 1000; // 5 minutes
48615
+ const ONE_HOUR = 60 * 60 * 1000; // 1 hour
48616
+ const FAILURE_WINDOW_MS = 2 * ONE_HOUR;
48535
48617
  class SendQueue {
48536
- constructor(sendFn, maxFailures = MAX_FAILURES) {
48618
+ constructor(sendFn) {
48537
48619
  this.queue = [];
48538
48620
  this.unloads = new Set();
48539
48621
  this.pending = new Set();
48540
48622
  this.failures = new Map();
48623
+ this.firstFailureTime = null;
48541
48624
  this.sendFn = sendFn;
48542
- this.maxFailures = maxFailures;
48543
48625
  }
48544
48626
  isEmpty() {
48545
48627
  return this.queue.length <= 0;
@@ -48549,6 +48631,7 @@ class SendQueue {
48549
48631
  this.unloads.clear();
48550
48632
  this.pending.clear();
48551
48633
  this.failures.clear();
48634
+ this.firstFailureTime = null;
48552
48635
  this.stopped = true;
48553
48636
  clearTimeout(this.timer);
48554
48637
  delete this.timer;
@@ -48569,12 +48652,16 @@ class SendQueue {
48569
48652
  incrementFailure(payload) {
48570
48653
  const failureCount = (this.failures.get(payload) || 0) + 1;
48571
48654
  this.failures.set(payload, failureCount);
48655
+ if (this.firstFailureTime == null) {
48656
+ this.firstFailureTime = new Date().getTime();
48657
+ }
48572
48658
  return failureCount;
48573
48659
  }
48574
48660
  pass(payload, dequeue = true) {
48575
48661
  this.unloads.delete(payload);
48576
48662
  this.pending.delete(payload);
48577
- this.failures.clear();
48663
+ this.failures.delete(payload);
48664
+ this.firstFailureTime = null;
48578
48665
  const index = this.queue.indexOf(payload);
48579
48666
  if (index >= 0) {
48580
48667
  this.queue.splice(index, 1);
@@ -48589,18 +48676,26 @@ class SendQueue {
48589
48676
  const failureCount = this.incrementFailure(payload);
48590
48677
  if (this.stopped || !retry)
48591
48678
  return;
48592
- if (failureCount >= this.maxFailures) {
48679
+ const now = new Date().getTime();
48680
+ const elapsed = now - (this.firstFailureTime || now);
48681
+ if (elapsed >= FAILURE_WINDOW_MS) {
48593
48682
  if (this.onTimeout) {
48594
48683
  this.onTimeout();
48595
48684
  }
48596
- this.pass(payload, false);
48685
+ this.firstFailureTime = null;
48686
+ this.retryLater(ONE_HOUR);
48687
+ return;
48597
48688
  }
48598
- this.retryLater(Math.pow(2, Math.min(failureCount - 1, MAX_BACKOFF)) * 1000);
48689
+ this.retryLater(Math.min(Math.pow(2, failureCount - 1) * 1000, MAX_RETRY_DELAY_MS));
48690
+ }
48691
+ retryNow() {
48692
+ clearTimeout(this.timer);
48693
+ delete this.timer;
48694
+ this.next();
48599
48695
  }
48600
48696
  retryLater(delay) {
48601
48697
  this.timer = setTimeout$1(() => {
48602
- delete this.timer;
48603
- this.next();
48698
+ this.retryNow();
48604
48699
  }, delay);
48605
48700
  }
48606
48701
  failed() {
@@ -48615,7 +48710,7 @@ class SendQueue {
48615
48710
  }
48616
48711
  drain(finalPayloadArray, isUnload = true) {
48617
48712
  this.queue.push(...finalPayloadArray);
48618
- if (this.failed())
48713
+ if (this.failed() && !this.allowDrainWhileFailed)
48619
48714
  return Promise$2.reject();
48620
48715
  const promises = [];
48621
48716
  for (const payload of this.queue) {
@@ -56316,9 +56411,10 @@ var ConfigReader = (function () {
56316
56411
  function initializeOptions() {
56317
56412
  // Core
56318
56413
  /**
56319
- * Formerly `additionalApiKeys`. When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
56414
+ * When included, all analytics events will be sent to each of the public app IDs in the list (guide events are
56320
56415
  * only sent to the primary public app ID). This will only function if there are no `additionalPublicAppIds` set on
56321
56416
  * the configuration included in the downloaded web SDK.
56417
+ * Alias: `additionalApiKeys`
56322
56418
  *
56323
56419
  * @access public
56324
56420
  * @category Config/Core
@@ -56326,8 +56422,7 @@ var ConfigReader = (function () {
56326
56422
  * @default []
56327
56423
  * @type {string[]}
56328
56424
  */
56329
- addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56330
- addOption('additionalApiKeys', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56425
+ addOption('additionalPublicAppIds', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['additionalApiKeys']);
56331
56426
  addOption('allowedOriginServers');
56332
56427
  addOption('allowedOriginServerHashes');
56333
56428
  addOption('allowMixedApplicationFrames', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
@@ -56344,8 +56439,9 @@ var ConfigReader = (function () {
56344
56439
  */
56345
56440
  addOption('annotateUrl', [SNIPPET_SRC]);
56346
56441
  /**
56347
- * Formerly `apiKey`. A primary public app ID to send data to from the web SDK. This will only function if there is no `publicAppId` set
56442
+ * A primary public app ID to send data to from the web SDK. This will only function if there is no `publicAppId` set
56348
56443
  * on the configuration included in the downloaded web SDK.
56444
+ * Alias: `apiKey`
56349
56445
  *
56350
56446
  * @access public
56351
56447
  * @category Config/Core
@@ -56353,8 +56449,7 @@ var ConfigReader = (function () {
56353
56449
  * @default undefined
56354
56450
  * @type {string}
56355
56451
  */
56356
- addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56357
- addOption('apiKey', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
56452
+ addOption('publicAppId', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['apiKey']);
56358
56453
  addOption('assetHost', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56359
56454
  /**
56360
56455
  * If set to `true`, the web SDK will try to install and initialize in all same-origin frames on the page.
@@ -56367,7 +56462,7 @@ var ConfigReader = (function () {
56367
56462
  * @type {boolean}
56368
56463
  */
56369
56464
  addOption('autoFrameInstall', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56370
- addOption('blockAgentMetadata', [PENDO_CONFIG_SRC], false);
56465
+ addOption('blockWebSDKMetadata', [PENDO_CONFIG_SRC], false, undefined, ['blockAgentMetadata']);
56371
56466
  /**
56372
56467
  * An alternate url to load guide content from. This will be used to replace the standard google storage
56373
56468
  * url for your subscription. Usually used for
@@ -56442,6 +56537,37 @@ var ConfigReader = (function () {
56442
56537
  */
56443
56538
  addOption('disablePersistence', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56444
56539
  addOption('enableSignedMetadata', [PENDO_CONFIG_SRC], false);
56540
+ /**
56541
+ * Having identity persisted by default makes it so that a transition from using identified visitor ids
56542
+ * to using anonymous visitor ids is challenging. Anyone that used your application with an identified
56543
+ * visitor id would have that value persisted to storage and whenever the web SDK is initialized for them,
56544
+ * that value would be read from storage treating them as the same identified visitor. When set `true`,
56545
+ * this config option will only use persisted identity values if they are an anonymous id. It is meant to
56546
+ * be used to smoothly make this transition to using anonymous ids while still retaining the benefit of
56547
+ * consistent anonymous ids for visitors. This option will be ignored if you provide an identified
56548
+ * visitorId to the initialize call.
56549
+ *
56550
+ * @access public
56551
+ * @category Config/Core
56552
+ * @name forceAnonymous
56553
+ * @default false
56554
+ * @type {boolean}
56555
+ */
56556
+ addOption('forceAnonymous', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56557
+ /**
56558
+ * If set to `true`, the web SDK will prioritize this frame to use as the leader frame that will coordinate
56559
+ * the display of guides and the resource center. The leader frame is usually the "top" frame if the SDK is initialized
56560
+ * there and this option is meant to be used when that condition is not met or the leader should be some other
56561
+ * specific frame. Sitewide guides and the resource center will always attempt to be shown in the leader frame
56562
+ * first.
56563
+ *
56564
+ * @access public
56565
+ * @category Config/Core
56566
+ * @name forceLeader
56567
+ * @default false
56568
+ * @type {boolean}
56569
+ */
56570
+ addOption('forcedLeader', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56445
56571
  /**
56446
56572
  * By default, the identity of a visitor in various iframes on a page are independent from each other.
56447
56573
  * Setting this to `true` will instead have the web SDK make sure all frames use the exact same visitor and
@@ -56466,23 +56592,6 @@ var ConfigReader = (function () {
56466
56592
  * @type {boolean}
56467
56593
  */
56468
56594
  addOption('frameIdentityTopDownOnly', [SNIPPET_SRC, PENDO_CONFIG_SRC], true);
56469
- /**
56470
- * Having identity persisted by default makes it so that a transition from using identified visitor ids
56471
- * to using anonymous visitor ids is challenging. Anyone that used your application with an identified
56472
- * visitor id would have that value persisted to storage and whenever the web SDK is initialized for them,
56473
- * that value would be read from storage treating them as the same identified visitor. When set `true`,
56474
- * this config option will only use persisted identity values if they are an anonymous id. It is meant to
56475
- * be used to smoothly make this transition to using anonymous ids while still retaining the benefit of
56476
- * consistent anonymous ids for visitors. This option will be ignored if you provide an identified
56477
- * visitorId to the initialize call.
56478
- *
56479
- * @access public
56480
- * @category Config/Core
56481
- * @name forceAnonymous
56482
- * @default false
56483
- * @type {boolean}
56484
- */
56485
- addOption('forceAnonymous', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56486
56595
  addOption('identityStorageLifetime', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56487
56596
  addOption('identityStorageSuffix', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56488
56597
  /**
@@ -56583,7 +56692,7 @@ var ConfigReader = (function () {
56583
56692
  * @type {boolean}
56584
56693
  */
56585
56694
  addOption('preventUnloadListener', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56586
- addOption('promotedAgentMetadataConfigurations', [PENDO_CONFIG_SRC]);
56695
+ addOption('promotedWebSDKMetadataConfigurations', [PENDO_CONFIG_SRC], undefined, undefined, ['promotedAgentMetadataConfigurations']);
56587
56696
  /**
56588
56697
  * An array of strings or a function that returns an array of strings. The web SDK will then strip any query
56589
56698
  * string parameters from the url that are not found in the provided array. **Deprecated:** new usages to
@@ -56613,14 +56722,15 @@ var ConfigReader = (function () {
56613
56722
  /**
56614
56723
  * Meant to be used with `autoFrameInstall`. If set, the web SDK will use this as the url to download itself
56615
56724
  * from in child frames. Read more about [frame support](/advanced/auto-frame-install).
56725
+ * Alias: `selfHostedAgentUrl`
56616
56726
  *
56617
56727
  * @access public
56618
56728
  * @category Config/Core
56619
- * @name selfHostedAgentUrl
56729
+ * @name selfHostedWebSDKUrl
56620
56730
  * @default undefined
56621
56731
  * @type {string}
56622
56732
  */
56623
- addOption('selfHostedAgentUrl', [SNIPPET_SRC, PENDO_CONFIG_SRC]);
56733
+ addOption('selfHostedWebSDKUrl', [SNIPPET_SRC, PENDO_CONFIG_SRC], undefined, undefined, ['selfHostedAgentUrl']);
56624
56734
  /**
56625
56735
  * If this option is set to true, event data will only be transmitted using requests of type POST instead
56626
56736
  * of first trying to use GET requests. This can result in fewer requests being sent each time that event data
@@ -56722,7 +56832,6 @@ var ConfigReader = (function () {
56722
56832
  addOption('excludeNonGuideAnalytics', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56723
56833
  addOption('htmlAttributeBlacklist');
56724
56834
  addOption('htmlAttributes');
56725
- addOption('interceptElementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false); // old, use syntheticClicks.elementRemoval instead
56726
56835
  /**
56727
56836
  * By default, the web SDK will attempt to intercept calls to `preventDefault` on `touchend` events in order to
56728
56837
  * ensure that Pendo still tracks the click event. There are cases where your application might prevent these
@@ -56754,6 +56863,7 @@ var ConfigReader = (function () {
56754
56863
  * events. In these cases, Pendo will not be able to capture the `click` event properly for events or guide
56755
56864
  * behavior. Setting this to `true` will have the web SDK intercept these types of element removal to ensure
56756
56865
  * more consistent Pendo behavior (this option has been moved from `interceptElementRemoval`).
56866
+ * Alias: `interceptElementRemoval`
56757
56867
  *
56758
56868
  * @access public
56759
56869
  * @category Config/Analytics
@@ -56761,7 +56871,7 @@ var ConfigReader = (function () {
56761
56871
  * @default false
56762
56872
  * @type {boolean}
56763
56873
  */
56764
- addOption('syntheticClicks.elementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56874
+ addOption('syntheticClicks.elementRemoval', [SNIPPET_SRC, PENDO_CONFIG_SRC], false, undefined, ['interceptElementRemoval']);
56765
56875
  /**
56766
56876
  * A `click` is classified by the browser as the same element receiving the `mousedown` and `mouseup` events.
56767
56877
  * When `true` this option will allow Pendo to treat cases where a visitor clicks down the mouse, moves the
@@ -56810,7 +56920,6 @@ var ConfigReader = (function () {
56810
56920
  * @type {Number}
56811
56921
  */
56812
56922
  addOption('cacheGuidesTimeout', [PENDO_CONFIG_SRC], 600000);
56813
- addOption('delayGuides', [SNIPPET_SRC]); // old, use guides.delay instead
56814
56923
  /**
56815
56924
  * If `true`, this will prevent the web SDK from attempting to launch the Visual Design Studio.
56816
56925
  *
@@ -56846,7 +56955,6 @@ var ConfigReader = (function () {
56846
56955
  * @type {boolean}
56847
56956
  */
56848
56957
  addOption('disableGuidePseudoStyles', [SNIPPET_SRC, PENDO_CONFIG_SRC], false);
56849
- addOption('disableGuides', [SNIPPET_SRC]); // old, use guides.disabled instead
56850
56958
  /**
56851
56959
  * Content of badge and target element activated guides will be prefetched on load to improve guide display
56852
56960
  * time unless set to `true`.
@@ -56891,7 +56999,6 @@ var ConfigReader = (function () {
56891
56999
  * @type {number}
56892
57000
  */
56893
57001
  addOption('guideSeenTimeoutLength', [PENDO_CONFIG_SRC, SNIPPET_SRC], 10000);
56894
- addOption('guideTimeout', [SNIPPET_SRC]); // old, use guides.timeout instead
56895
57002
  /**
56896
57003
  * If `true`, guides will be verified against their saved content hash before display to ensure validity of
56897
57004
  * guide content.
@@ -56916,7 +57023,8 @@ var ConfigReader = (function () {
56916
57023
  addOption('guides.attachPoint', [SNIPPET_SRC]);
56917
57024
  /**
56918
57025
  * Guides will be loaded, but not displayed. Call `pendo.startGuides()` to display guides when you choose
56919
- * to do so (this options has been moved from `delayGuides`).
57026
+ * to do so.
57027
+ * Alias: `delayGuides`
56920
57028
  *
56921
57029
  * @access public
56922
57030
  * @category Config/Guides
@@ -56924,9 +57032,10 @@ var ConfigReader = (function () {
56924
57032
  * @default false
56925
57033
  * @type {boolean}
56926
57034
  */
56927
- addOption('guides.delay', [SNIPPET_SRC]);
57035
+ addOption('guides.delay', [SNIPPET_SRC], undefined, undefined, ['delayGuides']);
56928
57036
  /**
56929
57037
  * Completely disables guides (this option has been moved from `disableGuides`).
57038
+ * Alias: `disableGuides`
56930
57039
  *
56931
57040
  * @access public
56932
57041
  * @category Config/Guides
@@ -56934,7 +57043,7 @@ var ConfigReader = (function () {
56934
57043
  * @default false
56935
57044
  * @type {boolean}
56936
57045
  */
56937
- addOption('guides.disabled', [SNIPPET_SRC]);
57046
+ addOption('guides.disabled', [SNIPPET_SRC], undefined, undefined, ['disableGuides']);
56938
57047
  /**
56939
57048
  * If 'true', guides with slow selectors will be removed from guide display processing.
56940
57049
  * This will improve application performance, but slow guides will not be shown to users.
@@ -56960,6 +57069,7 @@ var ConfigReader = (function () {
56960
57069
  /**
56961
57070
  * How long to wait for guides to load in milliseconds (this option has been moved from `guideTimeout`).
56962
57071
  * By default guides will not timeout.
57072
+ * Alias: `guideTimeout`
56963
57073
  *
56964
57074
  * @access public
56965
57075
  * @category Config/Guides
@@ -56967,7 +57077,7 @@ var ConfigReader = (function () {
56967
57077
  * @default undefined
56968
57078
  * @type {number}
56969
57079
  */
56970
- addOption('guides.timeout', [SNIPPET_SRC]);
57080
+ addOption('guides.timeout', [SNIPPET_SRC], undefined, undefined, ['guideTimeout']);
56971
57081
  /**
56972
57082
  * The tooltip arrow size (in pixels). This only affects classic guides.
56973
57083
  *
@@ -57058,10 +57168,10 @@ var ConfigReader = (function () {
57058
57168
  // Adopt
57059
57169
  addOption('adoptHost');
57060
57170
  addOption('adoptAnalyticsForwarding');
57061
- addOption('agentDebuggerPluginLoader');
57171
+ addOption('webSDKDebuggerPluginLoader', [PENDO_CONFIG_SRC], undefined, undefined, ['agentDebuggerPluginLoader']);
57062
57172
  addOption('allowPartnerAnalyticsForwarding', [SNIPPET_SRC], false);
57063
57173
  addOption('adoptPrioritizeAdoptGuides', [PENDO_CONFIG_SRC], false);
57064
- addOption('designerAgentPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC]);
57174
+ addOption('designerWebSDKPluginsLoader', [PENDO_CONFIG_SRC, SNIPPET_SRC], undefined, undefined, ['designerAgentPluginsLoader']);
57065
57175
  addOption('guideContentLoader', [PENDO_CONFIG_SRC]);
57066
57176
  addOption('trainingPartner');
57067
57177
  addOption('oemAccountId', [SNIPPET_SRC]);
@@ -57100,8 +57210,18 @@ var ConfigReader = (function () {
57100
57210
  function getValueFromSourceGetter(option, sourceGetter) {
57101
57211
  if (!sourceGetter)
57102
57212
  return;
57103
- var source = sourceGetter();
57104
- var v = _.get(source.lookup, getConfigKey(option));
57213
+ const source = sourceGetter();
57214
+ let v = _.get(source.lookup, getConfigKey(option));
57215
+ // need to also check option aliases if the option.name key is not found in the source
57216
+ if (!doesExist(v)) {
57217
+ const aliasWithValue = _.find(option.aliases || [], function (alias) {
57218
+ const val = _.get(source.lookup, alias);
57219
+ if (doesExist(val))
57220
+ return val;
57221
+ });
57222
+ if (aliasWithValue)
57223
+ v = _.get(source.lookup, aliasWithValue);
57224
+ }
57105
57225
  return doesExist(v) ? v : undefined;
57106
57226
  }
57107
57227
  function getValueFromSource(option, src) {
@@ -57118,10 +57238,6 @@ var ConfigReader = (function () {
57118
57238
  var option = findOption(optionName);
57119
57239
  defaultValue = defaultValue || _.get(option, 'defaultValue', null);
57120
57240
  var defaultReturn = new ConfigValue(optionName, defaultValue, DEFAULT_SRC);
57121
- // if (source) {
57122
- // var val = getValueFromSource(option, source);
57123
- // return val;
57124
- // }
57125
57241
  var validOptions = mapSourcesToValues(option, sources);
57126
57242
  // defaultValue must exist in order to use non-ordered sources,
57127
57243
  // otherwise you can't know what value to value over another.