@pendo/agent 2.272.0 → 2.273.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.
@@ -67,10 +67,7 @@ var sha1$1 = {exports: {}};
67
67
  (function() {
68
68
 
69
69
  var root = typeof window === 'object' ? window : {};
70
- var NODE_JS = !root.JS_SHA1_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
71
- if (NODE_JS) {
72
- root = commonjsGlobal;
73
- }
70
+
74
71
  var COMMON_JS = !root.JS_SHA1_NO_COMMON_JS && 'object' === 'object' && module.exports;
75
72
  var HEX_CHARS = '0123456789abcdef'.split('');
76
73
  var EXTRA = [-2147483648, 8388608, 32768, 128];
@@ -87,9 +84,7 @@ var sha1$1 = {exports: {}};
87
84
 
88
85
  var createMethod = function () {
89
86
  var method = createOutputMethod('hex');
90
- if (NODE_JS) {
91
- method = nodeWrap(method);
92
- }
87
+
93
88
  method.create = function () {
94
89
  return new Sha1();
95
90
  };
@@ -103,21 +98,7 @@ var sha1$1 = {exports: {}};
103
98
  return method;
104
99
  };
105
100
 
106
- var nodeWrap = function (method) {
107
- var crypto = eval("require('crypto')");
108
- var Buffer = eval("require('buffer').Buffer");
109
- var nodeMethod = function (message) {
110
- if (typeof message === 'string') {
111
- return crypto.createHash('sha1').update(message, 'utf8').digest('hex');
112
- } else if (message.constructor === ArrayBuffer) {
113
- message = new Uint8Array(message);
114
- } else if (message.length === undefined) {
115
- return method(message);
116
- }
117
- return crypto.createHash('sha1').update(new Buffer(message)).digest('hex');
118
- };
119
- return nodeMethod;
120
- };
101
+
121
102
 
122
103
  function Sha1(sharedMemory) {
123
104
  if (sharedMemory) {
@@ -3907,8 +3888,8 @@ var SERVER = '';
3907
3888
  var ASSET_HOST = '';
3908
3889
  var ASSET_PATH = '';
3909
3890
  var DESIGNER_ENV = '';
3910
- var VERSION = '2.272.0_';
3911
- var PACKAGE_VERSION = '2.272.0';
3891
+ var VERSION = '2.273.0_';
3892
+ var PACKAGE_VERSION = '2.273.0';
3912
3893
  var LOADER = 'xhr';
3913
3894
  /* eslint-enable agent-eslint-rules/no-gulp-env-references */
3914
3895
  /**
@@ -19906,10 +19887,10 @@ function PermalinkConstructor(findGuideById) {
19906
19887
  }
19907
19888
  function showPermalinkGuide(guide, step) {
19908
19889
  if (step) {
19909
- step.show('permalink');
19890
+ return step.show('permalink');
19910
19891
  }
19911
19892
  else {
19912
- guide.show('permalink');
19893
+ return guide.show('permalink');
19913
19894
  }
19914
19895
  }
19915
19896
  function shouldShowPermalinkGuide(guide) {
@@ -19921,14 +19902,17 @@ function PermalinkConstructor(findGuideById) {
19921
19902
  if (permalinkGuide && this.shouldShowPermalinkGuide(permalinkGuide)) {
19922
19903
  var step = this.getStepFromUrl(queryString, permalinkGuide);
19923
19904
  var once = queryString.pendo_once;
19924
- if (once) {
19925
- delete queryString.pendo_once;
19926
- delete queryString.pendo;
19927
- delete queryString.step;
19928
- delete queryString.c__pendo;
19929
- window.history.replaceState({}, document.title, window.location.pathname + '?' + objectToQueryString(queryString));
19930
- }
19931
- return this.showPermalinkGuide(permalinkGuide, step);
19905
+ return this.showPermalinkGuide(permalinkGuide, step)
19906
+ .then(function (result) {
19907
+ if (result && once) {
19908
+ delete queryString.pendo_once;
19909
+ delete queryString.pendo;
19910
+ delete queryString.step;
19911
+ delete queryString.c__pendo;
19912
+ window.history.replaceState({}, document.title, window.location.pathname + '?' + objectToQueryString(queryString));
19913
+ }
19914
+ return result;
19915
+ });
19932
19916
  }
19933
19917
  }
19934
19918
  }
@@ -35770,14 +35754,16 @@ var DebuggerLauncher = (function () {
35770
35754
  if (store.getters['frames/isLeader']()) {
35771
35755
  startDebuggingModuleIfEnabled();
35772
35756
  }
35773
- registerMessageHandler('pendo-debugger::launch', function (data, msg) {
35774
- if (data.config.apiKey !== pendo.apiKey)
35775
- return;
35757
+ });
35758
+ registerMessageHandler('pendo-debugger::launch', function (data, msg) {
35759
+ if (data.config.apiKey !== pendo.apiKey)
35760
+ return;
35761
+ waitForLeader(Events, store, q).then(function () {
35776
35762
  msg.source.postMessage({
35777
35763
  'type': 'pendo-debugger::ready',
35778
35764
  'apiKey': pendo.apiKey
35779
35765
  }, msg.origin);
35780
- if (isDebuggingEnabled())
35766
+ if (isDebuggingEnabled() || !store.getters['frames/isLeader']())
35781
35767
  return;
35782
35768
  enableDebugging(false);
35783
35769
  });
@@ -36885,6 +36871,7 @@ var channels = [
36885
36871
  }]
36886
36872
  ];
36887
36873
  var WEB_ANALYTICS_STORAGE_KEY = 'utm';
36874
+ var CAPTURE_REFERRER_CONFIG_KEY = 'enableFullUtmReferrer';
36888
36875
  var WebAnalytics = /** @class */ (function () {
36889
36876
  function WebAnalytics() {
36890
36877
  this.name = 'WebAnalytics';
@@ -36892,6 +36879,11 @@ var WebAnalytics = /** @class */ (function () {
36892
36879
  WebAnalytics.prototype.initialize = function (pendo, PluginAPI) {
36893
36880
  this.pendo = pendo;
36894
36881
  this.api = PluginAPI;
36882
+ var ConfigReader = PluginAPI.ConfigReader;
36883
+ ConfigReader.addOption(CAPTURE_REFERRER_CONFIG_KEY, [
36884
+ ConfigReader.sources.SNIPPET_SRC,
36885
+ ConfigReader.sources.PENDO_CONFIG_SRC
36886
+ ], false);
36895
36887
  var bind = pendo._.bind;
36896
36888
  this.subscriptions = [
36897
36889
  PluginAPI.attachEvent(PluginAPI.Events, 'eventCaptured', bind(this.addUtmToEvent, this)),
@@ -36936,6 +36928,9 @@ var WebAnalytics = /** @class */ (function () {
36936
36928
  content: content
36937
36929
  };
36938
36930
  utm.channel = this.calculateUtmChannel({ referrerValue: referrerValue, utm: utm, gclid: gclid, fbclid: fbclid });
36931
+ if (referrer && this.api.ConfigReader.get(CAPTURE_REFERRER_CONFIG_KEY)) {
36932
+ utm.referrer = referrer;
36933
+ }
36939
36934
  return utm;
36940
36935
  }
36941
36936
  }