@pendo/agent 2.302.1 → 2.302.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/dom.esm.js CHANGED
@@ -7359,7 +7359,7 @@ function getScreenPosition(element) {
7359
7359
  };
7360
7360
  }
7361
7361
 
7362
- var VERSION = '2.302.1_';
7362
+ var VERSION = '2.302.3_';
7363
7363
 
7364
7364
  var decodeURIComponent = _.isFunction(window.decodeURIComponent) ? window.decodeURIComponent : _.identity;
7365
7365
 
@@ -3904,8 +3904,8 @@ let SERVER = '';
3904
3904
  let ASSET_HOST = '';
3905
3905
  let ASSET_PATH = '';
3906
3906
  let DESIGNER_SERVER = '';
3907
- let VERSION = '2.302.1_';
3908
- let PACKAGE_VERSION = '2.302.1';
3907
+ let VERSION = '2.302.3_';
3908
+ let PACKAGE_VERSION = '2.302.3';
3909
3909
  let LOADER = 'xhr';
3910
3910
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3911
3911
  /**
@@ -26799,9 +26799,8 @@ class NetworkRequestIntercept {
26799
26799
  window.fetch = function (...args) {
26800
26800
  return __awaiter(this, void 0, void 0, function* () {
26801
26801
  let [url, config = {}] = args;
26802
- let isRequestObject = false;
26803
- if (_.isObject(args[0])) {
26804
- isRequestObject = true;
26802
+ const isRequestObject = _.isObject(args[0]) && _.isFunction(args[0].clone) && !(args[0] instanceof URL);
26803
+ if (isRequestObject) {
26805
26804
  url = args[0].url;
26806
26805
  // Clone the Request object to avoid consuming the body
26807
26806
  config = args[0].clone();
@@ -28845,22 +28844,29 @@ var BuildingBlockGuides = (function () {
28845
28844
  const guideContainerId = 'pendo-guide-container';
28846
28845
  const baseContainerId = 'pendo-base';
28847
28846
  const baseContainer = guideToAppend[0];
28848
- const pendoGuideContainer = baseContainer.querySelector(`#${guideContainerId}`);
28847
+ const pendoGuideContainer = dom(`#${guideContainerId}`, baseContainer)[0];
28849
28848
  if (pendoGuideContainer) {
28850
28849
  pendoGuideContainer.id = `${guideContainerId}-${step.id}`;
28851
28850
  baseContainer.id = `${baseContainerId}-${step.id}`;
28852
28851
  }
28853
28852
  const { selector, method } = embedConfig;
28854
28853
  parent = dom(selector)[0];
28855
- if (method === 'replace' && parent) {
28856
- parent.innerHTML = '';
28857
- guideToAppend.appendTo(parent);
28858
- }
28859
- else if (method === 'prepend') {
28860
- guideToAppend.prependTo(parent);
28854
+ const existingGuideElement = dom(`#${baseContainer.id}`, parent);
28855
+ if (existingGuideElement.length) { // The embedded guide may already exist due to page caching
28856
+ guideToAppend = existingGuideElement;
28857
+ step.guideElement = guideToAppend;
28861
28858
  }
28862
28859
  else {
28863
- guideToAppend.appendTo(parent);
28860
+ if (method === 'replace' && parent) {
28861
+ parent.innerHTML = '';
28862
+ guideToAppend.appendTo(parent);
28863
+ }
28864
+ else if (method === 'prepend') {
28865
+ guideToAppend.prependTo(parent);
28866
+ }
28867
+ else {
28868
+ guideToAppend.appendTo(parent);
28869
+ }
28864
28870
  }
28865
28871
  }
28866
28872
  else {