@pendo/agent 2.276.0 → 2.278.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.
- package/dist/debugger-plugin.min.js +1 -1
- package/dist/dom.esm.js +18 -5
- package/dist/pendo.debugger.min.js +12 -10
- package/dist/pendo.module.js +473 -206
- package/dist/pendo.module.min.js +1 -1
- package/dist/pendo.preview.min.js +10 -8
- package/package.json +1 -1
package/dist/pendo.module.js
CHANGED
|
@@ -430,15 +430,6 @@ function getPolicy(pendo) {
|
|
|
430
430
|
return policy;
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
/*
|
|
434
|
-
* NOTE: gulpfile.js line 296 -- actually writes the line of code that uses this
|
|
435
|
-
* CODE to the agent. It's presumably done there to guarantee its early position
|
|
436
|
-
* in resulting agent code.
|
|
437
|
-
*
|
|
438
|
-
* If you want to add any libraries for use in the preamble (we currently have
|
|
439
|
-
* b64 and sha1 available here now) then you'll need to update `gulpfile.js`
|
|
440
|
-
* line 35 for the `eslint` task and `karma.conf.js` line 31.
|
|
441
|
-
*/
|
|
442
433
|
var STAGING_SERVER_HASHES = 'stagingServerHashes';
|
|
443
434
|
var pendo$1;
|
|
444
435
|
var _pendoConfig = {};
|
|
@@ -447,8 +438,13 @@ function loadAsModule(config) {
|
|
|
447
438
|
}
|
|
448
439
|
function createPendoObject(config) {
|
|
449
440
|
var windowOrMountPoint = loadAsModule(config) ? {} : window;
|
|
450
|
-
|
|
451
|
-
|
|
441
|
+
var agentScriptTag = findAgentScriptTag(document.getElementsByTagName('script'), config.apiKey);
|
|
442
|
+
var globalKey = config.pendoGlobalKey || 'pendo';
|
|
443
|
+
if (agentScriptTag) {
|
|
444
|
+
globalKey = agentScriptTag.getAttribute('data-pendo-global-key') || globalKey;
|
|
445
|
+
config.pendoGlobalKey = globalKey;
|
|
446
|
+
}
|
|
447
|
+
pendo$1 = windowOrMountPoint[globalKey] = windowOrMountPoint[globalKey] || {};
|
|
452
448
|
return pendo$1;
|
|
453
449
|
}
|
|
454
450
|
function isStagingEnvironment(config) {
|
|
@@ -466,16 +462,23 @@ function shouldUseStagingAgent(config) {
|
|
|
466
462
|
function shouldUseUnminifiedAgent(config, debuggingEnabled) {
|
|
467
463
|
return !isExtension(config) && isMinifiedAgent(config) && debuggingEnabled;
|
|
468
464
|
}
|
|
469
|
-
function
|
|
465
|
+
function findAgentScriptTag(scripts, apiKey) {
|
|
470
466
|
if (scripts === void 0) { scripts = []; }
|
|
471
467
|
var regex = /^https:\/\/[\w\-.]*cdn[\w\-.]*\.(pendo-dev\.com|pendo\.io)\/agent\/static\/([\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}|PENDO_API_KEY)\/pendo\.js$/g;
|
|
472
468
|
for (var i = 0; i < scripts.length; i++) {
|
|
473
469
|
var script = scripts[i];
|
|
474
|
-
if (regex.test(script.src)) {
|
|
475
|
-
return script
|
|
470
|
+
if (regex.test(script.src) || script.id === "pendo-".concat(apiKey)) {
|
|
471
|
+
return script;
|
|
476
472
|
}
|
|
477
473
|
}
|
|
478
474
|
}
|
|
475
|
+
function buildCDNStagingAgentUrl(scripts) {
|
|
476
|
+
if (scripts === void 0) { scripts = []; }
|
|
477
|
+
var agentScript = findAgentScriptTag(scripts);
|
|
478
|
+
if (agentScript) {
|
|
479
|
+
return agentScript.src.replace(/\.js$/, '-staging.js');
|
|
480
|
+
}
|
|
481
|
+
}
|
|
479
482
|
function getAlternateAgentUrl(config, useStaging, debuggingEnabled) {
|
|
480
483
|
var agentUrl = buildCDNStagingAgentUrl(document.getElementsByTagName('script')) || config.stagingAgentUrl;
|
|
481
484
|
if (debuggingEnabled) {
|
|
@@ -3891,8 +3894,8 @@ var SERVER = '';
|
|
|
3891
3894
|
var ASSET_HOST = '';
|
|
3892
3895
|
var ASSET_PATH = '';
|
|
3893
3896
|
var DESIGNER_ENV = '';
|
|
3894
|
-
var VERSION = '2.
|
|
3895
|
-
var PACKAGE_VERSION = '2.
|
|
3897
|
+
var VERSION = '2.278.0_';
|
|
3898
|
+
var PACKAGE_VERSION = '2.278.0';
|
|
3896
3899
|
var LOADER = 'xhr';
|
|
3897
3900
|
/* eslint-enable agent-eslint-rules/no-gulp-env-references */
|
|
3898
3901
|
/**
|
|
@@ -10097,14 +10100,15 @@ function roundOffsetPosition(position) {
|
|
|
10097
10100
|
});
|
|
10098
10101
|
return position;
|
|
10099
10102
|
}
|
|
10100
|
-
function getOffsetPosition(element) {
|
|
10103
|
+
function getOffsetPosition(element, _win) {
|
|
10104
|
+
if (_win === void 0) { _win = window; }
|
|
10101
10105
|
if (isPositionFixed(element)) {
|
|
10102
10106
|
var fixedPosition = getScreenPosition(element);
|
|
10103
10107
|
fixedPosition.fixed = true;
|
|
10104
10108
|
return roundOffsetPosition(fixedPosition);
|
|
10105
10109
|
}
|
|
10106
10110
|
else {
|
|
10107
|
-
var absolutePosition = getAbsolutePosition(element, getBody());
|
|
10111
|
+
var absolutePosition = getAbsolutePosition(element, getBody(_win.document), _win);
|
|
10108
10112
|
return roundOffsetPosition(absolutePosition);
|
|
10109
10113
|
}
|
|
10110
10114
|
}
|
|
@@ -11255,11 +11259,23 @@ var WeakRef = (function(global, factory) {
|
|
|
11255
11259
|
return nativeWeakRef;
|
|
11256
11260
|
})(window, WeakRefFactory);
|
|
11257
11261
|
|
|
11262
|
+
var trimString = function (str, limit) {
|
|
11263
|
+
var len = str.length;
|
|
11264
|
+
if (len <= limit)
|
|
11265
|
+
return str;
|
|
11266
|
+
return trimSurrogate(str.substring(0, limit));
|
|
11267
|
+
};
|
|
11268
|
+
function getTextValue(elem, limit) {
|
|
11269
|
+
if (elem.tagName && ['textarea', 'input'].indexOf(elem.tagName.toLowerCase()) > -1) {
|
|
11270
|
+
return trimString(elem.value, limit);
|
|
11271
|
+
}
|
|
11272
|
+
return getText(elem, limit);
|
|
11273
|
+
}
|
|
11258
11274
|
function getText(elem, limit) {
|
|
11275
|
+
if (limit === void 0) { limit = 128; }
|
|
11259
11276
|
var ret = '';
|
|
11260
11277
|
var nodeType = elem.nodeType;
|
|
11261
11278
|
var sub;
|
|
11262
|
-
limit = limit || 128;
|
|
11263
11279
|
if (nodeType === TEXT || nodeType === CDATA_SECTION) {
|
|
11264
11280
|
return elem.nodeValue;
|
|
11265
11281
|
}
|
|
@@ -11372,7 +11388,7 @@ var ElementGetter = /** @class */ (function () {
|
|
|
11372
11388
|
ElementGetter.prototype.getText = function (limit) {
|
|
11373
11389
|
if (limit === void 0) { limit = 1024; }
|
|
11374
11390
|
// XXX not sure about size limit
|
|
11375
|
-
return
|
|
11391
|
+
return getTextValue(this.get(), limit);
|
|
11376
11392
|
};
|
|
11377
11393
|
ElementGetter.prototype.addEventListener = function (event, callback) {
|
|
11378
11394
|
var _this = this;
|
|
@@ -17011,10 +17027,10 @@ var FlexboxPolyfill = (function () {
|
|
|
17011
17027
|
return classes && classes.indexOf('pendo-mock-flexbox-element') > -1;
|
|
17012
17028
|
});
|
|
17013
17029
|
}
|
|
17014
|
-
function createFlexContainer(isElementPosAbsolute) {
|
|
17030
|
+
function createFlexContainer(isElementPosAbsolute, useNativeFlexbox) {
|
|
17015
17031
|
var container = document.createElement('div');
|
|
17016
17032
|
container.style.display = 'inline-block';
|
|
17017
|
-
if (!isElementPosAbsolute) {
|
|
17033
|
+
if (!isElementPosAbsolute && !useNativeFlexbox) {
|
|
17018
17034
|
container.style.position = 'absolute';
|
|
17019
17035
|
}
|
|
17020
17036
|
// Sibling inline-block elements will attempt to align with a common baseline (think about it like a horizontal line)
|
|
@@ -17229,19 +17245,33 @@ var FlexboxPolyfill = (function () {
|
|
|
17229
17245
|
var computedStyles = getComputedStyle_safe(row);
|
|
17230
17246
|
return parseInt(width, 10) - parseInt(computedStyles.paddingLeft, 10) - parseInt(computedStyles.paddingRight, 10);
|
|
17231
17247
|
}
|
|
17232
|
-
function initializeFlexRows(row, justifyContent, rowVerticalAlignment) {
|
|
17233
|
-
|
|
17234
|
-
if (
|
|
17235
|
-
|
|
17236
|
-
|
|
17237
|
-
|
|
17238
|
-
|
|
17239
|
-
|
|
17240
|
-
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
|
|
17244
|
-
|
|
17248
|
+
function initializeFlexRows(row, justifyContent, rowVerticalAlignment, useNativeFlexbox) {
|
|
17249
|
+
if (useNativeFlexbox === void 0) { useNativeFlexbox = false; }
|
|
17250
|
+
if (useNativeFlexbox) {
|
|
17251
|
+
var alignments = {
|
|
17252
|
+
'top': 'flex-start',
|
|
17253
|
+
'center': 'center',
|
|
17254
|
+
'bottom': 'flex-end'
|
|
17255
|
+
};
|
|
17256
|
+
row.style.display = 'flex';
|
|
17257
|
+
row.style.flexWrap = 'wrap';
|
|
17258
|
+
row.style.justifyContent = justifyContent;
|
|
17259
|
+
row.style.alignItems = alignments[rowVerticalAlignment] || 'flex-start';
|
|
17260
|
+
}
|
|
17261
|
+
else {
|
|
17262
|
+
var flexElements = getFlexboxElements(row.children);
|
|
17263
|
+
if (flexElements.length === 0)
|
|
17264
|
+
return;
|
|
17265
|
+
// In the following steps, we remove and add elements to the guide.
|
|
17266
|
+
// Therefore we precalculation the rowWidth to ensure it won't change
|
|
17267
|
+
// in case of scrollbar will be added or removed from the screen.
|
|
17268
|
+
var rowWidth = FlexboxPolyfill.getRowWidth(row);
|
|
17269
|
+
var flexRows = FlexboxPolyfill.wrapFlexElementsInFlexRows(flexElements, row, rowWidth);
|
|
17270
|
+
// Once we have all the pendo-mock-flexbox-element elements placed in to
|
|
17271
|
+
// pendo-mock-flexbox-row rows, loop through each pendo-mock-flexbox-row and set the
|
|
17272
|
+
// height and alignment
|
|
17273
|
+
FlexboxPolyfill.formatFlexRows(flexRows, row, justifyContent, rowVerticalAlignment, rowWidth);
|
|
17274
|
+
}
|
|
17245
17275
|
}
|
|
17246
17276
|
function wrapFlexElementsInFlexRows(flexElements, row, rowWidthPreCalc) {
|
|
17247
17277
|
var rowWidth = rowWidthPreCalc || getRowWidth(row);
|
|
@@ -17318,21 +17348,24 @@ var FlexboxPolyfill = (function () {
|
|
|
17318
17348
|
return true;
|
|
17319
17349
|
return false;
|
|
17320
17350
|
}
|
|
17321
|
-
function flexElement(ele) {
|
|
17351
|
+
function flexElement(ele, useNativeFlexbox) {
|
|
17322
17352
|
var rowsToBeFlexed = dom('[data-pendo-display-flex]', ele);
|
|
17323
17353
|
_.each(rowsToBeFlexed, function (row) {
|
|
17324
|
-
var rowWithFlexedElements = FlexboxPolyfill.initializeFlexElements(row);
|
|
17354
|
+
var rowWithFlexedElements = useNativeFlexbox ? row : FlexboxPolyfill.initializeFlexElements(row);
|
|
17325
17355
|
var horizontalAlignment = row.getAttribute('data-pendo-justify-content');
|
|
17326
17356
|
var rowVerticalAlignment = row.getAttribute('data-row-vertical-alignment');
|
|
17327
|
-
FlexboxPolyfill.initializeFlexRows(rowWithFlexedElements, horizontalAlignment, rowVerticalAlignment);
|
|
17357
|
+
FlexboxPolyfill.initializeFlexRows(rowWithFlexedElements, horizontalAlignment, rowVerticalAlignment, useNativeFlexbox);
|
|
17328
17358
|
});
|
|
17329
17359
|
}
|
|
17330
|
-
function flexAllThings(containerId,
|
|
17360
|
+
function flexAllThings(containerId, step) {
|
|
17361
|
+
var _a;
|
|
17362
|
+
var useNativeFlexbox = (_a = step === null || step === void 0 ? void 0 : step.attributes) === null || _a === void 0 ? void 0 : _a.useFlexbox;
|
|
17363
|
+
var context = (step === null || step === void 0 ? void 0 : step.guideElement) || document;
|
|
17331
17364
|
var guideContainer = dom('#' + containerId, context)[0];
|
|
17332
17365
|
if (!guideContainer)
|
|
17333
17366
|
return;
|
|
17334
17367
|
maintainAspectRatios(guideContainer);
|
|
17335
|
-
FlexboxPolyfill.flexElement(guideContainer);
|
|
17368
|
+
FlexboxPolyfill.flexElement(guideContainer, useNativeFlexbox);
|
|
17336
17369
|
}
|
|
17337
17370
|
function maintainAspectRatios(ele) {
|
|
17338
17371
|
var dataAspectRatio = 'data-aspect-ratio';
|
|
@@ -17587,7 +17620,7 @@ function recalculateGuideHeightOnImgLoad(node, step) {
|
|
|
17587
17620
|
if (guideContainer && step.attributes.imgCount <= 0) {
|
|
17588
17621
|
recalculateGuideWidth(containerId, step.guideElement);
|
|
17589
17622
|
adjustGuideContentWidth(containerId, step.guideElement);
|
|
17590
|
-
FlexboxPolyfill.flexAllThings(containerId, step
|
|
17623
|
+
FlexboxPolyfill.flexAllThings(containerId, step);
|
|
17591
17624
|
var guide = step.getGuide();
|
|
17592
17625
|
// calling recalculateGuideHeight with an announcement guide or Announcements Module breaks announcements display
|
|
17593
17626
|
// in resource center
|
|
@@ -17598,7 +17631,7 @@ function recalculateGuideHeightOnImgLoad(node, step) {
|
|
|
17598
17631
|
var containerHasOverflow = domContainer && domContainer.style && domContainer.style.overflow === 'auto';
|
|
17599
17632
|
if (containerHasOverflow) {
|
|
17600
17633
|
adjustGuideContentWidth(containerId, step.guideElement);
|
|
17601
|
-
FlexboxPolyfill.flexAllThings(step.containerId, step
|
|
17634
|
+
FlexboxPolyfill.flexAllThings(step.containerId, step);
|
|
17602
17635
|
}
|
|
17603
17636
|
}
|
|
17604
17637
|
if (step.attributes.calculatedType === 'tooltip') {
|
|
@@ -17624,7 +17657,7 @@ function recalculateGuideHeightOnImgLoad(node, step) {
|
|
|
17624
17657
|
}
|
|
17625
17658
|
guideContainer.style.visibility = 'visible';
|
|
17626
17659
|
guideContainer.parentNode.style.visibility = 'visible';
|
|
17627
|
-
FlexboxPolyfill.flexAllThings(step.containerId, step
|
|
17660
|
+
FlexboxPolyfill.flexAllThings(step.containerId, step);
|
|
17628
17661
|
});
|
|
17629
17662
|
}
|
|
17630
17663
|
function bindActionToNode(node, actionObject, step) {
|
|
@@ -18347,7 +18380,7 @@ var BuildingBlockResourceCenter = (function () {
|
|
|
18347
18380
|
}, []);
|
|
18348
18381
|
adjustGuideContentWidth(containerIds, step.guideElement);
|
|
18349
18382
|
_.each(containerIds, function (containerId) {
|
|
18350
|
-
FlexboxPolyfill.flexAllThings(containerId, step
|
|
18383
|
+
FlexboxPolyfill.flexAllThings(containerId, step);
|
|
18351
18384
|
});
|
|
18352
18385
|
}
|
|
18353
18386
|
else {
|
|
@@ -21481,7 +21514,7 @@ function startPreviewMode(window) {
|
|
|
21481
21514
|
function updatePreviewUI() {
|
|
21482
21515
|
if (store.getters['frames/isFollower']())
|
|
21483
21516
|
return true;
|
|
21484
|
-
updatePreview(document,
|
|
21517
|
+
updatePreview(document, getDisplayableGuides(), getLastGuideStepSeen());
|
|
21485
21518
|
return true;
|
|
21486
21519
|
}
|
|
21487
21520
|
function addPreviewUI(window) {
|
|
@@ -21545,7 +21578,7 @@ function previewMessageHandler(e) {
|
|
|
21545
21578
|
store.dispatch('frames/stopPreview', { 'preventWindowClose': preventWindowClose });
|
|
21546
21579
|
}
|
|
21547
21580
|
else if (type === pendoPreview$1 + '::restart') {
|
|
21548
|
-
var lastGuideStepSeen = restartPreview(
|
|
21581
|
+
var lastGuideStepSeen = restartPreview(getDisplayableGuides(), getLastGuideStepSeen(), e.data.language);
|
|
21549
21582
|
store.dispatch('guideState/forceExpire');
|
|
21550
21583
|
store.dispatch('guideState/updateLastGuideStepSeen', lastGuideStepSeen);
|
|
21551
21584
|
store.dispatch('frames/restartPreview');
|
|
@@ -21989,10 +22022,10 @@ var watermarkGuideRequest = function (config) {
|
|
|
21989
22022
|
});
|
|
21990
22023
|
};
|
|
21991
22024
|
var PreviewGuideLoader = {
|
|
21992
|
-
'load': function (url, callback) {
|
|
22025
|
+
'load': function (url, pendo, callback) {
|
|
21993
22026
|
return previewLoadGuideJs(url, callback);
|
|
21994
22027
|
},
|
|
21995
|
-
'post': function (url, payload, callback) {
|
|
22028
|
+
'post': function (url, payload, pendo, callback) {
|
|
21996
22029
|
return previewLoadGuideJs(url, callback);
|
|
21997
22030
|
},
|
|
21998
22031
|
'endpoint': function () {
|
|
@@ -24805,11 +24838,22 @@ var resetPendoUI = function () {
|
|
|
24805
24838
|
removeAllBadges();
|
|
24806
24839
|
flushLater();
|
|
24807
24840
|
};
|
|
24841
|
+
/**
|
|
24842
|
+
* If a visitor has been marked as "Do Not Process" then this value will be set to true.
|
|
24843
|
+
*
|
|
24844
|
+
* @access public
|
|
24845
|
+
* @name doNotProcess
|
|
24846
|
+
* @type {string}
|
|
24847
|
+
* @category Events
|
|
24848
|
+
* @example
|
|
24849
|
+
* pendo.doNotProcess => true
|
|
24850
|
+
*/
|
|
24808
24851
|
function handleDoNotProcess() {
|
|
24809
24852
|
stopGuides();
|
|
24810
24853
|
lockEvents();
|
|
24811
24854
|
pendo$1.segmentFlags = [];
|
|
24812
24855
|
pendo$1.doNotProcess = true;
|
|
24856
|
+
store.commit('debugger/doNotProcess', true);
|
|
24813
24857
|
log.info('not tracking visitor due to 451 response');
|
|
24814
24858
|
}
|
|
24815
24859
|
function guidesPayload(guidesJson) {
|
|
@@ -24844,16 +24888,6 @@ function isGuideRequestPending() {
|
|
|
24844
24888
|
return false;
|
|
24845
24889
|
}
|
|
24846
24890
|
var mostRecentGuideRequest;
|
|
24847
|
-
/**
|
|
24848
|
-
* If a visitor has been marked as "Do Not Process" then this value will be set to true.
|
|
24849
|
-
*
|
|
24850
|
-
* @access public
|
|
24851
|
-
* @name doNotProcess
|
|
24852
|
-
* @type {string}
|
|
24853
|
-
* @category Events
|
|
24854
|
-
* @example
|
|
24855
|
-
* pendo.doNotProcess => true
|
|
24856
|
-
*/
|
|
24857
24891
|
var loadGuideJs = function (apiKey, params) {
|
|
24858
24892
|
var isAdoptPartner = treatAsAdoptPartner();
|
|
24859
24893
|
var guideRequestId = _.uniqueId();
|
|
@@ -25124,10 +25158,16 @@ var loadGuides = function (apiKey, visitorId, page, callback) {
|
|
|
25124
25158
|
store.dispatch('frames/changeGuideList', displayableGuides);
|
|
25125
25159
|
// define event properties to be consumed during handle_event
|
|
25126
25160
|
pendo$1.eventProperties = createEventPropertiesFromFeatures(pendo$1.features);
|
|
25161
|
+
var globalJsPromise = q.resolve();
|
|
25162
|
+
if (pendo$1.globalJsUrl) {
|
|
25163
|
+
globalJsPromise = loadGlobalScriptOnce(replaceWithContentHost(pendo$1.globalJsUrl))['catch'](function (err) {
|
|
25164
|
+
log.error('Error loading global script: ', err);
|
|
25165
|
+
});
|
|
25166
|
+
}
|
|
25127
25167
|
if (displayableGuides.length) {
|
|
25128
25168
|
q.all([
|
|
25129
25169
|
loadGuideCss(),
|
|
25130
|
-
|
|
25170
|
+
globalJsPromise,
|
|
25131
25171
|
initializeResourceCenter(activeGuides),
|
|
25132
25172
|
BuildingBlockWatermark.initializeWatermark(activeGuides),
|
|
25133
25173
|
waitForGlobalCssToLoad(5000)
|
|
@@ -25871,7 +25911,7 @@ var EventRouter = function () {
|
|
|
25871
25911
|
containerJSON = findGuideContainerJSON(evt.step.domJson);
|
|
25872
25912
|
recalculateGuideWidth(containerJSON.props.id, guideElement);
|
|
25873
25913
|
adjustGuideContentWidth(containerJSON.props.id, guideElement);
|
|
25874
|
-
FlexboxPolyfill.flexAllThings(containerJSON.props.id,
|
|
25914
|
+
FlexboxPolyfill.flexAllThings(containerJSON.props.id, evt.step);
|
|
25875
25915
|
recalculateGuideHeight(containerJSON.props.id, guideElement);
|
|
25876
25916
|
break;
|
|
25877
25917
|
case actionKeys.hideElements:
|
|
@@ -25879,7 +25919,7 @@ var EventRouter = function () {
|
|
|
25879
25919
|
containerJSON = findGuideContainerJSON(evt.step.domJson);
|
|
25880
25920
|
recalculateGuideWidth(containerJSON.props.id, guideElement);
|
|
25881
25921
|
adjustGuideContentWidth(containerJSON.props.id, guideElement);
|
|
25882
|
-
FlexboxPolyfill.flexAllThings(containerJSON.props.id,
|
|
25922
|
+
FlexboxPolyfill.flexAllThings(containerJSON.props.id, evt.step);
|
|
25883
25923
|
recalculateGuideHeight(containerJSON.props.id, guideElement);
|
|
25884
25924
|
break;
|
|
25885
25925
|
case actionKeys.slideElement:
|
|
@@ -27289,7 +27329,7 @@ var BuildingBlockGuides = (function () {
|
|
|
27289
27329
|
// Note: Announcement guides have their own special handling for deferring flexAllThings until
|
|
27290
27330
|
// all images have loaded. See the if (isResourceCenter) check below
|
|
27291
27331
|
if ((!hasImageCount && !isResourceCenter)) {
|
|
27292
|
-
BuildingBlockGuides.flexAllThings(step.containerId, step
|
|
27332
|
+
BuildingBlockGuides.flexAllThings(step.containerId, step);
|
|
27293
27333
|
}
|
|
27294
27334
|
if (!isFullyCustomResourceCenter) {
|
|
27295
27335
|
BuildingBlockGuides.recalculateGuideHeight(step.containerId, step.guideElement);
|
|
@@ -27327,7 +27367,7 @@ var BuildingBlockGuides = (function () {
|
|
|
27327
27367
|
announcementModules = [guide.attributes.resourceCenter];
|
|
27328
27368
|
}
|
|
27329
27369
|
else {
|
|
27330
|
-
BuildingBlockGuides.flexAllThings(step.containerId, step
|
|
27370
|
+
BuildingBlockGuides.flexAllThings(step.containerId, step);
|
|
27331
27371
|
}
|
|
27332
27372
|
if (announcementModules.length) {
|
|
27333
27373
|
_.forEach(announcementModules, function (announcementModule) {
|
|
@@ -27345,7 +27385,7 @@ var BuildingBlockGuides = (function () {
|
|
|
27345
27385
|
// pendo-g- can actually be the guideId OR the stepId. see fetchAndMigrateGuide in
|
|
27346
27386
|
// the designer repo
|
|
27347
27387
|
var containerIdToFlex = dom('#pendo-g-' + stepId).length ? stepId : guideId;
|
|
27348
|
-
BuildingBlockGuides.flexAllThings('pendo-g-' + containerIdToFlex, step
|
|
27388
|
+
BuildingBlockGuides.flexAllThings('pendo-g-' + containerIdToFlex, step);
|
|
27349
27389
|
}
|
|
27350
27390
|
});
|
|
27351
27391
|
});
|
|
@@ -30335,7 +30375,7 @@ function GuideStep(guide) {
|
|
|
30335
30375
|
// the designer repo
|
|
30336
30376
|
var containerIdToFlex = dom(guideContainer).find('#pendo-g-' + stepId)[0] ? stepId : guide.id;
|
|
30337
30377
|
BuildingBlockGuides.adjustGuideContentWidth('pendo-g-' + containerIdToFlex, step.guideElement);
|
|
30338
|
-
BuildingBlockGuides.flexAllThings('pendo-g-' + containerIdToFlex, step
|
|
30378
|
+
BuildingBlockGuides.flexAllThings('pendo-g-' + containerIdToFlex, step);
|
|
30339
30379
|
}
|
|
30340
30380
|
});
|
|
30341
30381
|
}
|
|
@@ -30344,7 +30384,7 @@ function GuideStep(guide) {
|
|
|
30344
30384
|
}
|
|
30345
30385
|
}
|
|
30346
30386
|
else {
|
|
30347
|
-
BuildingBlockGuides.flexAllThings(containerId, step
|
|
30387
|
+
BuildingBlockGuides.flexAllThings(containerId, step);
|
|
30348
30388
|
}
|
|
30349
30389
|
if (!isFullyCustomResourceCenter) {
|
|
30350
30390
|
BuildingBlockGuides.recalculateGuideHeight(containerId, step.guideElement);
|
|
@@ -30784,7 +30824,7 @@ var CloneDetection = /** @class */ (function () {
|
|
|
30784
30824
|
};
|
|
30785
30825
|
CloneDetection.prototype.startCloneDetectionTimer = function () {
|
|
30786
30826
|
this.stopCloneDetectionTimer();
|
|
30787
|
-
this.cloneDetectionTimer = setTimeout$1(
|
|
30827
|
+
this.cloneDetectionTimer = setTimeout$1(_.bind(this.clearCloneDetectionValue, this), 1000 * 10);
|
|
30788
30828
|
};
|
|
30789
30829
|
CloneDetection.prototype.stopCloneDetectionTimer = function () {
|
|
30790
30830
|
if (this.cloneDetectionTimer) {
|
|
@@ -32257,7 +32297,8 @@ var DebuggerModule = (function () {
|
|
|
32257
32297
|
'enableEventLogging': false,
|
|
32258
32298
|
'eventsCaptured': [],
|
|
32259
32299
|
'cspErrors': [],
|
|
32260
|
-
'installType': null
|
|
32300
|
+
'installType': null,
|
|
32301
|
+
'doNotProcess': false
|
|
32261
32302
|
};
|
|
32262
32303
|
var SYNC_TYPES = {
|
|
32263
32304
|
'TOP_DOWN': 'top-down',
|
|
@@ -32456,6 +32497,9 @@ var DebuggerModule = (function () {
|
|
|
32456
32497
|
if (state.cspErrors.length > 10) {
|
|
32457
32498
|
state.cspErrors.pop();
|
|
32458
32499
|
}
|
|
32500
|
+
},
|
|
32501
|
+
'doNotProcess': function (state, doNotProcess) {
|
|
32502
|
+
state.doNotProcess = doNotProcess;
|
|
32459
32503
|
}
|
|
32460
32504
|
};
|
|
32461
32505
|
function autoDisplayFn(evt) {
|
|
@@ -33209,7 +33253,8 @@ var PromoteMetadata = (function () {
|
|
|
33209
33253
|
'hasPromotedMetadataKind': hasPromotedMetadataKind,
|
|
33210
33254
|
'setSchemaGroup': setSchemaGroup,
|
|
33211
33255
|
'getSchemaGroup': getSchemaGroup,
|
|
33212
|
-
'resetSchemaGroup': resetSchemaGroup
|
|
33256
|
+
'resetSchemaGroup': resetSchemaGroup,
|
|
33257
|
+
'resetCachedSchemaGroup': resetCachedSchemaGroup
|
|
33213
33258
|
};
|
|
33214
33259
|
function init(pendo, PluginAPI) {
|
|
33215
33260
|
pluginApi = PluginAPI;
|
|
@@ -33224,13 +33269,13 @@ var PromoteMetadata = (function () {
|
|
|
33224
33269
|
* @access public
|
|
33225
33270
|
* @label SCHEMA_GROUP
|
|
33226
33271
|
*/
|
|
33227
|
-
agentStorage.registry.addLocal(SCHEMA_GROUP);
|
|
33272
|
+
pluginApi.agentStorage.registry.addLocal(SCHEMA_GROUP);
|
|
33228
33273
|
if (shouldPersist()) {
|
|
33229
33274
|
try {
|
|
33230
|
-
cachedSchemaGroup = JSON.parse(agentStorage.read(SCHEMA_GROUP)) || {};
|
|
33275
|
+
cachedSchemaGroup = JSON.parse(pluginApi.agentStorage.read(SCHEMA_GROUP)) || {};
|
|
33231
33276
|
}
|
|
33232
33277
|
catch (e) {
|
|
33233
|
-
|
|
33278
|
+
resetCachedSchemaGroup();
|
|
33234
33279
|
}
|
|
33235
33280
|
}
|
|
33236
33281
|
if (promotedAgentMetadata && promotedAgentMetadata.length) {
|
|
@@ -33271,16 +33316,19 @@ var PromoteMetadata = (function () {
|
|
|
33271
33316
|
function clearSession(event) {
|
|
33272
33317
|
var eventData = event.data[0];
|
|
33273
33318
|
if (_.get(eventData, 'wasCleared')) {
|
|
33274
|
-
agentStorage.clear(SCHEMA_GROUP);
|
|
33319
|
+
pluginApi.agentStorage.clear(SCHEMA_GROUP);
|
|
33275
33320
|
resetSchemaGroup();
|
|
33276
33321
|
}
|
|
33277
33322
|
}
|
|
33278
33323
|
function resetSchemaGroup() {
|
|
33279
33324
|
schemaGroup = {};
|
|
33280
33325
|
}
|
|
33326
|
+
function resetCachedSchemaGroup() {
|
|
33327
|
+
cachedSchemaGroup = {};
|
|
33328
|
+
}
|
|
33281
33329
|
function createSchemaGroup(metadata) {
|
|
33282
33330
|
if (shouldPersist()) {
|
|
33283
|
-
cachedSchemaGroup = JSON.parse(agentStorage.read(SCHEMA_GROUP)) || {};
|
|
33331
|
+
cachedSchemaGroup = JSON.parse(pluginApi.agentStorage.read(SCHEMA_GROUP)) || {};
|
|
33284
33332
|
cachedSchemaGroup = removePrefixes(cachedSchemaGroup);
|
|
33285
33333
|
}
|
|
33286
33334
|
var __sg__ = getSchemaGroup();
|
|
@@ -33301,7 +33349,7 @@ var PromoteMetadata = (function () {
|
|
|
33301
33349
|
}
|
|
33302
33350
|
});
|
|
33303
33351
|
if (shouldPersist()) {
|
|
33304
|
-
agentStorage.write(SCHEMA_GROUP, JSON.stringify(__sg__), undefined, false, true);
|
|
33352
|
+
pluginApi.agentStorage.write(SCHEMA_GROUP, JSON.stringify(__sg__), undefined, false, true);
|
|
33305
33353
|
}
|
|
33306
33354
|
return __sg__;
|
|
33307
33355
|
}
|
|
@@ -35337,6 +35385,7 @@ var ActionAutomation = (function () {
|
|
|
35337
35385
|
'getElement': getElement,
|
|
35338
35386
|
'getValue': getValue,
|
|
35339
35387
|
'injectText': injectText,
|
|
35388
|
+
'simulateClick': simulateClick,
|
|
35340
35389
|
'isAutomationInQueue': isAutomationInQueue,
|
|
35341
35390
|
'popQueue': popQueue,
|
|
35342
35391
|
'setActive': setActive
|
|
@@ -35348,8 +35397,8 @@ var ActionAutomation = (function () {
|
|
|
35348
35397
|
}
|
|
35349
35398
|
function getElement(automation, retries) {
|
|
35350
35399
|
if (retries === void 0) { retries = DEFAULT_ELEMENT_RETRIES; }
|
|
35351
|
-
return new Promise$2(function (resolve) {
|
|
35352
|
-
return setTimeout$1(function () {
|
|
35400
|
+
return new Promise$2(_.bind(function (resolve) {
|
|
35401
|
+
return setTimeout$1(_.bind(function () {
|
|
35353
35402
|
var element = this.getTarget(automation);
|
|
35354
35403
|
var isElementValid = element && !element.disabled;
|
|
35355
35404
|
if ((isElementValid) || retries < 1) {
|
|
@@ -35359,8 +35408,8 @@ var ActionAutomation = (function () {
|
|
|
35359
35408
|
this.getElement(automation, retries - 1).then(function (ele) {
|
|
35360
35409
|
resolve(ele);
|
|
35361
35410
|
});
|
|
35362
|
-
}
|
|
35363
|
-
}
|
|
35411
|
+
}, this), DEFAULT_TARGET_LOOKUP_RETRY_CADENCE);
|
|
35412
|
+
}, this));
|
|
35364
35413
|
}
|
|
35365
35414
|
function getValue(config) {
|
|
35366
35415
|
return config.value;
|
|
@@ -35386,6 +35435,13 @@ var ActionAutomation = (function () {
|
|
|
35386
35435
|
changeEvent.simulated = true; // for React ≤ 15.6.0
|
|
35387
35436
|
element.dispatchEvent(changeEvent);
|
|
35388
35437
|
}
|
|
35438
|
+
function simulateClick(element) {
|
|
35439
|
+
element.dispatchEvent(new MouseEvent('pointerdown', { 'bubbles': true, 'cancelable': true }));
|
|
35440
|
+
element.dispatchEvent(new MouseEvent('mousedown', { 'bubbles': true, 'cancelable': true }));
|
|
35441
|
+
element.dispatchEvent(new MouseEvent('pointerup', { 'bubbles': true, 'cancelable': true }));
|
|
35442
|
+
element.dispatchEvent(new MouseEvent('mouseup', { 'bubbles': true, 'cancelable': true }));
|
|
35443
|
+
element.click();
|
|
35444
|
+
}
|
|
35389
35445
|
function isAutomationInQueue(automation) {
|
|
35390
35446
|
return !!_.find(this.automationQueue, function (item) {
|
|
35391
35447
|
return automation.id === item.id;
|
|
@@ -35431,8 +35487,8 @@ var ActionAutomation = (function () {
|
|
|
35431
35487
|
if (automationConfig.type === 'autoclick') {
|
|
35432
35488
|
waitTime = DEFAULT_WAIT_BETWEEN_AUTOMATION_CLICKS;
|
|
35433
35489
|
}
|
|
35434
|
-
return setTimeout$1(function () {
|
|
35435
|
-
return this.getElement(automationConfig, DEFAULT_ELEMENT_RETRIES).then(function (element) {
|
|
35490
|
+
return setTimeout$1(_.bind(function () {
|
|
35491
|
+
return this.getElement(automationConfig, DEFAULT_ELEMENT_RETRIES).then(_.bind(function (element) {
|
|
35436
35492
|
if (!element) {
|
|
35437
35493
|
this.automationQueue = [];
|
|
35438
35494
|
pendoGlobal.log('automation target element not found. id: ' + automationConfig.id + ', pathRule: ' + automationConfig.target.elementPathRules, 'debug');
|
|
@@ -35451,16 +35507,14 @@ var ActionAutomation = (function () {
|
|
|
35451
35507
|
break;
|
|
35452
35508
|
}
|
|
35453
35509
|
case 'autoclick':
|
|
35454
|
-
|
|
35455
|
-
element.dispatchEvent(new MouseEvent('mouseup', { 'bubbles': true, 'cancelable': true }));
|
|
35456
|
-
element.click();
|
|
35510
|
+
this.simulateClick(element);
|
|
35457
35511
|
break;
|
|
35458
35512
|
}
|
|
35459
35513
|
this.automationQueue.shift();
|
|
35460
35514
|
if (this.automationQueue.length)
|
|
35461
35515
|
this.popQueue();
|
|
35462
|
-
}
|
|
35463
|
-
}
|
|
35516
|
+
}, this));
|
|
35517
|
+
}, this), waitTime);
|
|
35464
35518
|
}
|
|
35465
35519
|
function guideActivity(event) {
|
|
35466
35520
|
if (!event.step)
|
|
@@ -35593,7 +35647,7 @@ var EventProperties = (function () {
|
|
|
35593
35647
|
function createClickEventProperties(eventPropertyHandler) {
|
|
35594
35648
|
if (globalPendo.eventProperties && globalPendo.eventProperties.length) {
|
|
35595
35649
|
var eventProps = createFeatureEventPropertyMap(eventPropertyHandler.target);
|
|
35596
|
-
_.pairs(eventProps).forEach(function (_a) {
|
|
35650
|
+
globalPendo._.pairs(eventProps).forEach(function (_a) {
|
|
35597
35651
|
var key = _a[0], value = _a[1];
|
|
35598
35652
|
eventPropertyHandler.addEventProperty(key, value);
|
|
35599
35653
|
});
|
|
@@ -35714,7 +35768,7 @@ var EventProperties = (function () {
|
|
|
35714
35768
|
else {
|
|
35715
35769
|
logMessage += '\n For page event with name: ' + ep.name;
|
|
35716
35770
|
}
|
|
35717
|
-
log.critical(logMessage);
|
|
35771
|
+
pluginAPI.log.critical(logMessage);
|
|
35718
35772
|
// Once we fail to collect an eventProperty because of a pause we will not continue
|
|
35719
35773
|
// to punish our customer's customer by letting it happen again
|
|
35720
35774
|
// we have the log so we can investigate, no need to register a ton more while they
|
|
@@ -35820,6 +35874,10 @@ function startDebuggingModuleIfEnabled() {
|
|
|
35820
35874
|
else {
|
|
35821
35875
|
var script = document.createElement('script');
|
|
35822
35876
|
script.src = getPolicy(pendo$1).createScriptURL(getAssetUrl('debugger-plugin.min.js'));
|
|
35877
|
+
script.setAttribute('id', 'pendo-debugger-plugin');
|
|
35878
|
+
if (ConfigReader.get('pendoGlobalKey')) {
|
|
35879
|
+
script.setAttribute('data-pendo-global-key', ConfigReader.get('pendoGlobalKey'));
|
|
35880
|
+
}
|
|
35823
35881
|
dom.getBody().appendChild(script);
|
|
35824
35882
|
}
|
|
35825
35883
|
Events.debuggerLaunched.trigger();
|
|
@@ -36002,7 +36060,8 @@ var FrustrationEvent = (function () {
|
|
|
36002
36060
|
'addErrorClickLog': addErrorClickLog,
|
|
36003
36061
|
'getErrorEventTarget': getErrorEventTarget,
|
|
36004
36062
|
'checkErrorEvent': checkErrorEvent,
|
|
36005
|
-
'observeDOMMutation': observeDOMMutation
|
|
36063
|
+
'observeDOMMutation': observeDOMMutation,
|
|
36064
|
+
'checkFrustrationEvent': checkFrustrationEvent
|
|
36006
36065
|
};
|
|
36007
36066
|
function init(pendo, PluginAPI) {
|
|
36008
36067
|
pendoGlobal = pendo;
|
|
@@ -36340,7 +36399,44 @@ var FrustrationEvent = (function () {
|
|
|
36340
36399
|
// A guide that show nested inside another element.
|
|
36341
36400
|
// Multiple embedded guides can show at the same time.
|
|
36342
36401
|
var buildGuideBehaviors = function (_a) {
|
|
36343
|
-
var
|
|
36402
|
+
var store = _a.store, globalPendo = _a.globalPendo;
|
|
36403
|
+
var _ = globalPendo._;
|
|
36404
|
+
var handleShow = function () {
|
|
36405
|
+
var guide = this;
|
|
36406
|
+
var guideElement = null;
|
|
36407
|
+
var containerSelector = '[id^="pendo-guide-container"]';
|
|
36408
|
+
var selector = _.get(guide, 'attributes.embedConfig.selector');
|
|
36409
|
+
var method = _.get(guide, 'attributes.embedConfig.method');
|
|
36410
|
+
var element = _.first(globalPendo.Sizzle(selector));
|
|
36411
|
+
var isShown = guide.isShownInThisFrame();
|
|
36412
|
+
if (element && isShown) {
|
|
36413
|
+
var guideElementSelector = "#pendo-guide-container-".concat(_.get(this.getActiveStep(), 'id'));
|
|
36414
|
+
guideElement = !!globalPendo.Sizzle(guideElementSelector, element).length;
|
|
36415
|
+
}
|
|
36416
|
+
if (!isShown && !!element && this.shouldAutoDisplay()) {
|
|
36417
|
+
if (method === 'replace' && !!globalPendo.Sizzle(containerSelector, element).length) {
|
|
36418
|
+
return;
|
|
36419
|
+
}
|
|
36420
|
+
guide.show('embed');
|
|
36421
|
+
}
|
|
36422
|
+
else if (isShown && (!element || !guideElement)) {
|
|
36423
|
+
guide.hide();
|
|
36424
|
+
}
|
|
36425
|
+
};
|
|
36426
|
+
var getActiveStep = function () {
|
|
36427
|
+
var guide = this;
|
|
36428
|
+
if (!guide)
|
|
36429
|
+
return null;
|
|
36430
|
+
return _.find(guide.steps, function (step) {
|
|
36431
|
+
return step.isShown();
|
|
36432
|
+
});
|
|
36433
|
+
};
|
|
36434
|
+
var shouldAutoDisplay = function () {
|
|
36435
|
+
var guide = this;
|
|
36436
|
+
return (guide.shouldShowSnoozedGuide() || guide.shouldRepeatGuide() || _.all(guide.steps, function (step) {
|
|
36437
|
+
return step.shouldRepeat() || (!step.isSnoozed() && step.seenState !== 'dismissed');
|
|
36438
|
+
}));
|
|
36439
|
+
};
|
|
36344
36440
|
var show = function (reason) {
|
|
36345
36441
|
var guide = this;
|
|
36346
36442
|
var firstStep = _.first(guide.steps);
|
|
@@ -36365,7 +36461,7 @@ var buildGuideBehaviors = function (_a) {
|
|
|
36365
36461
|
return step.isRendered() || step.isLocked();
|
|
36366
36462
|
});
|
|
36367
36463
|
};
|
|
36368
|
-
return { show: show, isShownInThisFrame: isShownInThisFrame };
|
|
36464
|
+
return { show: show, isShownInThisFrame: isShownInThisFrame, getActiveStep: getActiveStep, handleShow: handleShow, shouldAutoDisplay: shouldAutoDisplay };
|
|
36369
36465
|
};
|
|
36370
36466
|
var buildStepBehaviors = function (_a) {
|
|
36371
36467
|
var pluginApi = _a.pluginApi; _a._;
|
|
@@ -36406,7 +36502,7 @@ var EmbeddedGuides = (function () {
|
|
|
36406
36502
|
globalPendo = pendo;
|
|
36407
36503
|
_ = globalPendo._;
|
|
36408
36504
|
exportPublicEmbeddedGuideApi(pendo);
|
|
36409
|
-
embeddedGuideBehaviors = buildGuideBehaviors({
|
|
36505
|
+
embeddedGuideBehaviors = buildGuideBehaviors({ 'store': pluginApi.store, globalPendo: globalPendo });
|
|
36410
36506
|
pluginApi.Events.on('deliverablesLoaded', clearEmbeddedGuides);
|
|
36411
36507
|
pluginApi.Events.on('guideLoopStopped', hideAllEmbeddedGuides);
|
|
36412
36508
|
pluginApi.Events.on('guideListChanged', initializeEmbeddedGuides);
|
|
@@ -36425,24 +36521,11 @@ var EmbeddedGuides = (function () {
|
|
|
36425
36521
|
pluginApi.GuideActivity.removeGuideResolver(getGuideObjectFromEvent);
|
|
36426
36522
|
if (this.removeResizeEvent)
|
|
36427
36523
|
this.removeResizeEvent();
|
|
36524
|
+
_oldEmbeddedGuides.length = 0;
|
|
36428
36525
|
}
|
|
36429
36526
|
function showAllEmbeddedGuides() {
|
|
36430
|
-
var Sizzle = globalPendo.Sizzle;
|
|
36431
36527
|
_.forEach(embeddedGuides, function (guide) {
|
|
36432
|
-
|
|
36433
|
-
var selector = _.get(guide, 'attributes.embedConfig.selector');
|
|
36434
|
-
var element = _.first(Sizzle(selector));
|
|
36435
|
-
var isShown = guide.isShownInThisFrame();
|
|
36436
|
-
if (element && isShown) {
|
|
36437
|
-
var guideElementSelector = "#pendo-guide-container-".concat(_.get(getActiveStep(guide), 'id'));
|
|
36438
|
-
guideElement = _.first(Sizzle(guideElementSelector, element));
|
|
36439
|
-
}
|
|
36440
|
-
if (!isShown && !!element && shouldAutoDisplay(guide)) {
|
|
36441
|
-
guide.show('embed');
|
|
36442
|
-
}
|
|
36443
|
-
else if (isShown && (!element || !guideElement)) {
|
|
36444
|
-
guide.hide();
|
|
36445
|
-
}
|
|
36528
|
+
guide.handleShow();
|
|
36446
36529
|
});
|
|
36447
36530
|
}
|
|
36448
36531
|
function hideAllEmbeddedGuides() {
|
|
@@ -36466,24 +36549,16 @@ var EmbeddedGuides = (function () {
|
|
|
36466
36549
|
})) {
|
|
36467
36550
|
embeddedGuides.push(guide);
|
|
36468
36551
|
}
|
|
36469
|
-
|
|
36470
|
-
return pluginApi.store.getters['preview/isInPreviewMode']();
|
|
36552
|
+
return false;
|
|
36471
36553
|
}
|
|
36472
36554
|
return true;
|
|
36473
36555
|
}
|
|
36474
36556
|
function isEmbedded(guide) {
|
|
36475
36557
|
return !!(guide && guide.launchMethod && guide.launchMethod === 'embed');
|
|
36476
36558
|
}
|
|
36477
|
-
function getActiveStep(guide) {
|
|
36478
|
-
if (!guide)
|
|
36479
|
-
return null;
|
|
36480
|
-
return _.find(guide.steps, function (step) {
|
|
36481
|
-
return step.isShown();
|
|
36482
|
-
});
|
|
36483
|
-
}
|
|
36484
36559
|
function redrawEmbeddedGuides() {
|
|
36485
36560
|
_.forEach(embeddedGuides, function (guide) {
|
|
36486
|
-
var step = getActiveStep(
|
|
36561
|
+
var step = guide.getActiveStep();
|
|
36487
36562
|
if (step && !globalPendo.ignoreResize) {
|
|
36488
36563
|
step.redraw();
|
|
36489
36564
|
}
|
|
@@ -36518,14 +36593,9 @@ var EmbeddedGuides = (function () {
|
|
|
36518
36593
|
return !!step;
|
|
36519
36594
|
});
|
|
36520
36595
|
if (!guide || !step)
|
|
36521
|
-
return;
|
|
36596
|
+
return null;
|
|
36522
36597
|
return { guide: guide, step: step };
|
|
36523
36598
|
}
|
|
36524
|
-
function shouldAutoDisplay(guide) {
|
|
36525
|
-
return (guide.shouldShowSnoozedGuide() || guide.shouldRepeatGuide() || _.all(guide.steps, function (step) {
|
|
36526
|
-
return step.shouldRepeat() || (!step.isSnoozed() && step.seenState !== 'dismissed');
|
|
36527
|
-
}));
|
|
36528
|
-
}
|
|
36529
36599
|
function initializeEmbeddedGuides() {
|
|
36530
36600
|
restoreFromPreviouseGuides();
|
|
36531
36601
|
pluginApi.guides.registerDisplayableGuides('embeddedGuides', embeddedGuides);
|
|
@@ -37689,23 +37759,28 @@ var DOMPrompt = /** @class */ (function () {
|
|
|
37689
37759
|
this.q = PluginAPI.q;
|
|
37690
37760
|
this.inputEl = new this.dom.Element(inputCssSelector);
|
|
37691
37761
|
this.submitEl = new this.dom.Element(submitCssSelector);
|
|
37692
|
-
this.inputEl.addEventListener('
|
|
37693
|
-
|
|
37694
|
-
|
|
37762
|
+
this.inputEl.addEventListener('change', function (evt) {
|
|
37763
|
+
// capture value from copy / paste
|
|
37764
|
+
_this.capturePromptValue();
|
|
37765
|
+
}, true);
|
|
37766
|
+
this.inputEl.addEventListener('keydown', function (evt) {
|
|
37767
|
+
var wasEnterKey = evt.code === 'Enter';
|
|
37768
|
+
_this.capturePromptValue(wasEnterKey);
|
|
37769
|
+
if (wasEnterKey) {
|
|
37695
37770
|
_this.waitThenCheckForSubmit().then(function (wasSubmitted) {
|
|
37696
37771
|
if (wasSubmitted) {
|
|
37697
37772
|
_this.submit(_this.latestPromptValue);
|
|
37698
37773
|
}
|
|
37699
37774
|
});
|
|
37700
37775
|
}
|
|
37701
|
-
});
|
|
37776
|
+
}, true);
|
|
37702
37777
|
this.submitEl.addEventListener('click', function () {
|
|
37703
37778
|
_this.waitThenCheckForSubmit().then(function (wasSubmitted) {
|
|
37704
37779
|
if (wasSubmitted) {
|
|
37705
37780
|
_this.submit(_this.latestPromptValue);
|
|
37706
37781
|
}
|
|
37707
37782
|
});
|
|
37708
|
-
});
|
|
37783
|
+
}, true);
|
|
37709
37784
|
this.promptContainer = new this.dom.Observer();
|
|
37710
37785
|
this.promptContainer.addObservers(this.inputEl, this.submitEl);
|
|
37711
37786
|
}
|
|
@@ -37728,6 +37803,18 @@ var DOMPrompt = /** @class */ (function () {
|
|
|
37728
37803
|
this._.each(this.listeners, function (cb) { return cb(val); });
|
|
37729
37804
|
this.latestPromptValue = '';
|
|
37730
37805
|
};
|
|
37806
|
+
/*
|
|
37807
|
+
* Genernally we want to capture the value from "input" but there can be implementation
|
|
37808
|
+
* dependent scenarios where the input's value has already been cleared by the time we
|
|
37809
|
+
* get the event handler is called. So, in that case, we don't want to throw our saved value out.
|
|
37810
|
+
*/
|
|
37811
|
+
DOMPrompt.prototype.capturePromptValue = function (onlyUpdateIfNotEmpty) {
|
|
37812
|
+
if (onlyUpdateIfNotEmpty === void 0) { onlyUpdateIfNotEmpty = false; }
|
|
37813
|
+
var tmp = this.getPromptValue();
|
|
37814
|
+
if (tmp || !onlyUpdateIfNotEmpty) {
|
|
37815
|
+
this.latestPromptValue = tmp;
|
|
37816
|
+
}
|
|
37817
|
+
};
|
|
37731
37818
|
DOMPrompt.prototype.getPromptValue = function () {
|
|
37732
37819
|
return this.inputEl.getText();
|
|
37733
37820
|
};
|
|
@@ -37944,7 +38031,8 @@ var TextCapture = (function () {
|
|
|
37944
38031
|
'isEnabled': isEnabled,
|
|
37945
38032
|
'isTextCapturable': isTextCapturable,
|
|
37946
38033
|
'hasWhitelist': hasWhitelist,
|
|
37947
|
-
'serializer': textSerializer
|
|
38034
|
+
'serializer': textSerializer,
|
|
38035
|
+
'guideActivity': guideActivity
|
|
37948
38036
|
};
|
|
37949
38037
|
// technically not idempotent but might actually be right. not sure.
|
|
37950
38038
|
function init(pendo, PluginAPI) {
|
|
@@ -44662,7 +44750,7 @@ var _a;
|
|
|
44662
44750
|
var __defProp$1 = Object.defineProperty;
|
|
44663
44751
|
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
44664
44752
|
var __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
44665
|
-
var NodeType$
|
|
44753
|
+
var NodeType$3 = /* @__PURE__ */ ((NodeType2) => {
|
|
44666
44754
|
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
44667
44755
|
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
44668
44756
|
NodeType2[NodeType2["Element"] = 2] = "Element";
|
|
@@ -44670,7 +44758,7 @@ var NodeType$2 = /* @__PURE__ */ ((NodeType2) => {
|
|
|
44670
44758
|
NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
|
|
44671
44759
|
NodeType2[NodeType2["Comment"] = 5] = "Comment";
|
|
44672
44760
|
return NodeType2;
|
|
44673
|
-
})(NodeType$
|
|
44761
|
+
})(NodeType$3 || {});
|
|
44674
44762
|
const testableAccessors$1 = {
|
|
44675
44763
|
Node: ["childNodes", "parentNode", "parentElement", "textContent"],
|
|
44676
44764
|
ShadowRoot: ["host", "styleSheets"],
|
|
@@ -44805,6 +44893,32 @@ function querySelectorAll$1(n2, selectors) {
|
|
|
44805
44893
|
function mutationObserverCtor$1() {
|
|
44806
44894
|
return getUntaintedPrototype$1("MutationObserver").constructor;
|
|
44807
44895
|
}
|
|
44896
|
+
function patch$1(source, name, replacement) {
|
|
44897
|
+
try {
|
|
44898
|
+
if (!(name in source)) {
|
|
44899
|
+
return () => {
|
|
44900
|
+
};
|
|
44901
|
+
}
|
|
44902
|
+
const original = source[name];
|
|
44903
|
+
const wrapped = replacement(original);
|
|
44904
|
+
if (typeof wrapped === "function") {
|
|
44905
|
+
wrapped.prototype = wrapped.prototype || {};
|
|
44906
|
+
Object.defineProperties(wrapped, {
|
|
44907
|
+
__rrweb_original__: {
|
|
44908
|
+
enumerable: false,
|
|
44909
|
+
value: original
|
|
44910
|
+
}
|
|
44911
|
+
});
|
|
44912
|
+
}
|
|
44913
|
+
source[name] = wrapped;
|
|
44914
|
+
return () => {
|
|
44915
|
+
source[name] = original;
|
|
44916
|
+
};
|
|
44917
|
+
} catch {
|
|
44918
|
+
return () => {
|
|
44919
|
+
};
|
|
44920
|
+
}
|
|
44921
|
+
}
|
|
44808
44922
|
const index$1 = {
|
|
44809
44923
|
childNodes: childNodes$1,
|
|
44810
44924
|
parentNode: parentNode$1,
|
|
@@ -44817,7 +44931,8 @@ const index$1 = {
|
|
|
44817
44931
|
shadowRoot: shadowRoot$1,
|
|
44818
44932
|
querySelector: querySelector$1,
|
|
44819
44933
|
querySelectorAll: querySelectorAll$1,
|
|
44820
|
-
mutationObserver: mutationObserverCtor$1
|
|
44934
|
+
mutationObserver: mutationObserverCtor$1,
|
|
44935
|
+
patch: patch$1
|
|
44821
44936
|
};
|
|
44822
44937
|
function isElement(n2) {
|
|
44823
44938
|
return n2.nodeType === n2.ELEMENT_NODE;
|
|
@@ -45121,6 +45236,111 @@ function absolutifyURLs(cssText, href) {
|
|
|
45121
45236
|
}
|
|
45122
45237
|
);
|
|
45123
45238
|
}
|
|
45239
|
+
function normalizeCssString(cssText, _testNoPxNorm = false) {
|
|
45240
|
+
if (_testNoPxNorm) {
|
|
45241
|
+
return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "");
|
|
45242
|
+
} else {
|
|
45243
|
+
return cssText.replace(/(\/\*[^*]*\*\/)|[\s;]/g, "").replace(/0px/g, "0");
|
|
45244
|
+
}
|
|
45245
|
+
}
|
|
45246
|
+
function splitCssText(cssText, style, _testNoPxNorm = false) {
|
|
45247
|
+
const childNodes2 = Array.from(style.childNodes);
|
|
45248
|
+
const splits = [];
|
|
45249
|
+
let iterCount = 0;
|
|
45250
|
+
if (childNodes2.length > 1 && cssText && typeof cssText === "string") {
|
|
45251
|
+
let cssTextNorm = normalizeCssString(cssText, _testNoPxNorm);
|
|
45252
|
+
const normFactor = cssTextNorm.length / cssText.length;
|
|
45253
|
+
for (let i2 = 1; i2 < childNodes2.length; i2++) {
|
|
45254
|
+
if (childNodes2[i2].textContent && typeof childNodes2[i2].textContent === "string") {
|
|
45255
|
+
const textContentNorm = normalizeCssString(
|
|
45256
|
+
childNodes2[i2].textContent,
|
|
45257
|
+
_testNoPxNorm
|
|
45258
|
+
);
|
|
45259
|
+
const jLimit = 100;
|
|
45260
|
+
let j = 3;
|
|
45261
|
+
for (; j < textContentNorm.length; j++) {
|
|
45262
|
+
if (
|
|
45263
|
+
// keep consuming css identifiers (to get a decent chunk more quickly)
|
|
45264
|
+
textContentNorm[j].match(/[a-zA-Z0-9]/) || // substring needs to be unique to this section
|
|
45265
|
+
textContentNorm.indexOf(textContentNorm.substring(0, j), 1) !== -1
|
|
45266
|
+
) {
|
|
45267
|
+
continue;
|
|
45268
|
+
}
|
|
45269
|
+
break;
|
|
45270
|
+
}
|
|
45271
|
+
for (; j < textContentNorm.length; j++) {
|
|
45272
|
+
let startSubstring = textContentNorm.substring(0, j);
|
|
45273
|
+
let cssNormSplits = cssTextNorm.split(startSubstring);
|
|
45274
|
+
let splitNorm = -1;
|
|
45275
|
+
if (cssNormSplits.length === 2) {
|
|
45276
|
+
splitNorm = cssNormSplits[0].length;
|
|
45277
|
+
} else if (cssNormSplits.length > 2 && cssNormSplits[0] === "" && childNodes2[i2 - 1].textContent !== "") {
|
|
45278
|
+
splitNorm = cssTextNorm.indexOf(startSubstring, 1);
|
|
45279
|
+
} else if (cssNormSplits.length === 1) {
|
|
45280
|
+
startSubstring = startSubstring.substring(
|
|
45281
|
+
0,
|
|
45282
|
+
startSubstring.length - 1
|
|
45283
|
+
);
|
|
45284
|
+
cssNormSplits = cssTextNorm.split(startSubstring);
|
|
45285
|
+
if (cssNormSplits.length <= 1) {
|
|
45286
|
+
splits.push(cssText);
|
|
45287
|
+
return splits;
|
|
45288
|
+
}
|
|
45289
|
+
j = jLimit + 1;
|
|
45290
|
+
} else if (j === textContentNorm.length - 1) {
|
|
45291
|
+
splitNorm = cssTextNorm.indexOf(startSubstring);
|
|
45292
|
+
}
|
|
45293
|
+
if (cssNormSplits.length >= 2 && j > jLimit) {
|
|
45294
|
+
const prevTextContent = childNodes2[i2 - 1].textContent;
|
|
45295
|
+
if (prevTextContent && typeof prevTextContent === "string") {
|
|
45296
|
+
const prevMinLength = normalizeCssString(prevTextContent).length;
|
|
45297
|
+
splitNorm = cssTextNorm.indexOf(startSubstring, prevMinLength);
|
|
45298
|
+
}
|
|
45299
|
+
if (splitNorm === -1) {
|
|
45300
|
+
splitNorm = cssNormSplits[0].length;
|
|
45301
|
+
}
|
|
45302
|
+
}
|
|
45303
|
+
if (splitNorm !== -1) {
|
|
45304
|
+
let k = Math.floor(splitNorm / normFactor);
|
|
45305
|
+
for (; k > 0 && k < cssText.length; ) {
|
|
45306
|
+
iterCount += 1;
|
|
45307
|
+
if (iterCount > 50 * childNodes2.length) {
|
|
45308
|
+
splits.push(cssText);
|
|
45309
|
+
return splits;
|
|
45310
|
+
}
|
|
45311
|
+
const normPart = normalizeCssString(
|
|
45312
|
+
cssText.substring(0, k),
|
|
45313
|
+
_testNoPxNorm
|
|
45314
|
+
);
|
|
45315
|
+
if (normPart.length === splitNorm) {
|
|
45316
|
+
splits.push(cssText.substring(0, k));
|
|
45317
|
+
cssText = cssText.substring(k);
|
|
45318
|
+
cssTextNorm = cssTextNorm.substring(splitNorm);
|
|
45319
|
+
break;
|
|
45320
|
+
} else if (normPart.length < splitNorm) {
|
|
45321
|
+
k += Math.max(
|
|
45322
|
+
1,
|
|
45323
|
+
Math.floor((splitNorm - normPart.length) / normFactor)
|
|
45324
|
+
);
|
|
45325
|
+
} else {
|
|
45326
|
+
k -= Math.max(
|
|
45327
|
+
1,
|
|
45328
|
+
Math.floor((normPart.length - splitNorm) * normFactor)
|
|
45329
|
+
);
|
|
45330
|
+
}
|
|
45331
|
+
}
|
|
45332
|
+
break;
|
|
45333
|
+
}
|
|
45334
|
+
}
|
|
45335
|
+
}
|
|
45336
|
+
}
|
|
45337
|
+
}
|
|
45338
|
+
splits.push(cssText);
|
|
45339
|
+
return splits;
|
|
45340
|
+
}
|
|
45341
|
+
function markCssSplits(cssText, style) {
|
|
45342
|
+
return splitCssText(cssText, style).join("/* rr_split */");
|
|
45343
|
+
}
|
|
45124
45344
|
let _id = 1;
|
|
45125
45345
|
const tagNameRegex = new RegExp("[^a-z0-9-_:]");
|
|
45126
45346
|
const IGNORED_NODE = -2;
|
|
@@ -45381,27 +45601,28 @@ function serializeNode(n2, options) {
|
|
|
45381
45601
|
inlineImages,
|
|
45382
45602
|
recordCanvas,
|
|
45383
45603
|
keepIframeSrcFn,
|
|
45384
|
-
newlyAddedElement = false
|
|
45604
|
+
newlyAddedElement = false,
|
|
45605
|
+
cssCaptured = false
|
|
45385
45606
|
} = options;
|
|
45386
45607
|
const rootId = getRootId(doc, mirror2);
|
|
45387
45608
|
switch (n2.nodeType) {
|
|
45388
45609
|
case n2.DOCUMENT_NODE:
|
|
45389
45610
|
if (n2.compatMode !== "CSS1Compat") {
|
|
45390
45611
|
return {
|
|
45391
|
-
type: NodeType$
|
|
45612
|
+
type: NodeType$3.Document,
|
|
45392
45613
|
childNodes: [],
|
|
45393
45614
|
compatMode: n2.compatMode
|
|
45394
45615
|
// probably "BackCompat"
|
|
45395
45616
|
};
|
|
45396
45617
|
} else {
|
|
45397
45618
|
return {
|
|
45398
|
-
type: NodeType$
|
|
45619
|
+
type: NodeType$3.Document,
|
|
45399
45620
|
childNodes: []
|
|
45400
45621
|
};
|
|
45401
45622
|
}
|
|
45402
45623
|
case n2.DOCUMENT_TYPE_NODE:
|
|
45403
45624
|
return {
|
|
45404
|
-
type: NodeType$
|
|
45625
|
+
type: NodeType$3.DocumentType,
|
|
45405
45626
|
name: n2.name,
|
|
45406
45627
|
publicId: n2.publicId,
|
|
45407
45628
|
systemId: n2.systemId,
|
|
@@ -45430,17 +45651,18 @@ function serializeNode(n2, options) {
|
|
|
45430
45651
|
maskTextFn,
|
|
45431
45652
|
maskInputOptions,
|
|
45432
45653
|
maskInputFn,
|
|
45433
|
-
rootId
|
|
45654
|
+
rootId,
|
|
45655
|
+
cssCaptured
|
|
45434
45656
|
});
|
|
45435
45657
|
case n2.CDATA_SECTION_NODE:
|
|
45436
45658
|
return {
|
|
45437
|
-
type: NodeType$
|
|
45659
|
+
type: NodeType$3.CDATA,
|
|
45438
45660
|
textContent: "",
|
|
45439
45661
|
rootId
|
|
45440
45662
|
};
|
|
45441
45663
|
case n2.COMMENT_NODE:
|
|
45442
45664
|
return {
|
|
45443
|
-
type: NodeType$
|
|
45665
|
+
type: NodeType$3.Comment,
|
|
45444
45666
|
textContent: index$1.textContent(n2) || "",
|
|
45445
45667
|
rootId
|
|
45446
45668
|
};
|
|
@@ -45455,18 +45677,26 @@ function getRootId(doc, mirror2) {
|
|
|
45455
45677
|
}
|
|
45456
45678
|
function serializeTextNode(n2, options) {
|
|
45457
45679
|
var _a2;
|
|
45458
|
-
const {
|
|
45459
|
-
|
|
45460
|
-
|
|
45461
|
-
|
|
45680
|
+
const {
|
|
45681
|
+
needsMask,
|
|
45682
|
+
maskTextFn,
|
|
45683
|
+
maskInputOptions,
|
|
45684
|
+
maskInputFn,
|
|
45685
|
+
rootId,
|
|
45686
|
+
cssCaptured
|
|
45687
|
+
} = options;
|
|
45688
|
+
const parentTagName = n2.parentNode && n2.parentNode.tagName;
|
|
45689
|
+
let textContent2 = "";
|
|
45462
45690
|
const isStyle = parentTagName === "STYLE" ? true : void 0;
|
|
45463
45691
|
const isScript = parentTagName === "SCRIPT" ? true : void 0;
|
|
45464
45692
|
const isTextarea = parentTagName === "TEXTAREA" ? true : void 0;
|
|
45465
|
-
if (isStyle &&
|
|
45693
|
+
if (isStyle && textContent2) {
|
|
45466
45694
|
try {
|
|
45467
45695
|
if (n2.nextSibling || n2.previousSibling) {
|
|
45468
|
-
} else if ((_a2 =
|
|
45469
|
-
|
|
45696
|
+
} else if ((_a2 = n2.parentNode.sheet) == null ? void 0 : _a2.cssRules) {
|
|
45697
|
+
textContent2 = stringifyStylesheet(
|
|
45698
|
+
n2.parentNode.sheet
|
|
45699
|
+
);
|
|
45470
45700
|
}
|
|
45471
45701
|
} catch (err) {
|
|
45472
45702
|
console.warn(
|
|
@@ -45474,21 +45704,25 @@ function serializeTextNode(n2, options) {
|
|
|
45474
45704
|
n2
|
|
45475
45705
|
);
|
|
45476
45706
|
}
|
|
45477
|
-
|
|
45707
|
+
textContent2 = absolutifyURLs(textContent2, getHref(options.doc));
|
|
45478
45708
|
}
|
|
45479
45709
|
if (isScript) {
|
|
45480
|
-
|
|
45710
|
+
textContent2 = "SCRIPT_PLACEHOLDER";
|
|
45711
|
+
} else if (!cssCaptured) {
|
|
45712
|
+
textContent2 = index$1.textContent(n2);
|
|
45713
|
+
if (isStyle && textContent2) {
|
|
45714
|
+
textContent2 = absolutifyURLs(textContent2, getHref(options.doc));
|
|
45715
|
+
}
|
|
45481
45716
|
}
|
|
45482
|
-
if (!isStyle && !isScript &&
|
|
45483
|
-
|
|
45717
|
+
if (!isStyle && !isScript && textContent2 && needsMask) {
|
|
45718
|
+
textContent2 = maskTextFn ? maskTextFn(textContent2, index$1.parentElement(n2)) : textContent2.replace(/[\S]/g, "*");
|
|
45484
45719
|
}
|
|
45485
|
-
if (isTextarea &&
|
|
45486
|
-
|
|
45720
|
+
if (isTextarea && textContent2 && maskInputOptions.textarea) {
|
|
45721
|
+
textContent2 = maskInputFn ? maskInputFn(textContent2, n2.parentNode) : textContent2.replace(/[\S]/g, "*");
|
|
45487
45722
|
}
|
|
45488
45723
|
return {
|
|
45489
|
-
type: NodeType$
|
|
45490
|
-
textContent:
|
|
45491
|
-
isStyle,
|
|
45724
|
+
type: NodeType$3.Text,
|
|
45725
|
+
textContent: textContent2 || "",
|
|
45492
45726
|
rootId
|
|
45493
45727
|
};
|
|
45494
45728
|
}
|
|
@@ -45537,12 +45771,14 @@ function serializeElementNode(n2, options) {
|
|
|
45537
45771
|
attributes._cssText = cssText;
|
|
45538
45772
|
}
|
|
45539
45773
|
}
|
|
45540
|
-
if (tagName === "style" && n2.sheet
|
|
45541
|
-
|
|
45542
|
-
const cssText = stringifyStylesheet(
|
|
45774
|
+
if (tagName === "style" && n2.sheet) {
|
|
45775
|
+
let cssText = stringifyStylesheet(
|
|
45543
45776
|
n2.sheet
|
|
45544
45777
|
);
|
|
45545
45778
|
if (cssText) {
|
|
45779
|
+
if (n2.childNodes.length > 1) {
|
|
45780
|
+
cssText = markCssSplits(cssText, n2);
|
|
45781
|
+
}
|
|
45546
45782
|
attributes._cssText = cssText;
|
|
45547
45783
|
}
|
|
45548
45784
|
}
|
|
@@ -45673,7 +45909,7 @@ function serializeElementNode(n2, options) {
|
|
|
45673
45909
|
} catch (e2) {
|
|
45674
45910
|
}
|
|
45675
45911
|
return {
|
|
45676
|
-
type: NodeType$
|
|
45912
|
+
type: NodeType$3.Element,
|
|
45677
45913
|
tagName,
|
|
45678
45914
|
attributes,
|
|
45679
45915
|
childNodes: [],
|
|
@@ -45691,12 +45927,12 @@ function lowerIfExists(maybeAttr) {
|
|
|
45691
45927
|
}
|
|
45692
45928
|
}
|
|
45693
45929
|
function slimDOMExcluded(sn, slimDOMOptions) {
|
|
45694
|
-
if (slimDOMOptions.comment && sn.type === NodeType$
|
|
45930
|
+
if (slimDOMOptions.comment && sn.type === NodeType$3.Comment) {
|
|
45695
45931
|
return true;
|
|
45696
|
-
} else if (sn.type === NodeType$
|
|
45932
|
+
} else if (sn.type === NodeType$3.Element) {
|
|
45697
45933
|
if (slimDOMOptions.script && // script tag
|
|
45698
45934
|
(sn.tagName === "script" || // (module)preload link
|
|
45699
|
-
sn.tagName === "link" && (sn.attributes.rel === "preload"
|
|
45935
|
+
sn.tagName === "link" && (sn.attributes.rel === "preload" && sn.attributes.as === "script" || sn.attributes.rel === "modulepreload") || // prefetch link
|
|
45700
45936
|
sn.tagName === "link" && sn.attributes.rel === "prefetch" && typeof sn.attributes.href === "string" && extractFileExtension(sn.attributes.href) === "js")) {
|
|
45701
45937
|
return true;
|
|
45702
45938
|
} else if (slimDOMOptions.headFavicon && (sn.tagName === "link" && sn.attributes.rel === "shortcut icon" || sn.tagName === "meta" && (lowerIfExists(sn.attributes.name).match(
|
|
@@ -45745,7 +45981,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
45745
45981
|
onStylesheetLoad,
|
|
45746
45982
|
stylesheetLoadTimeout = 5e3,
|
|
45747
45983
|
keepIframeSrcFn = () => false,
|
|
45748
|
-
newlyAddedElement = false
|
|
45984
|
+
newlyAddedElement = false,
|
|
45985
|
+
cssCaptured = false
|
|
45749
45986
|
} = options;
|
|
45750
45987
|
let { needsMask } = options;
|
|
45751
45988
|
let { preserveWhiteSpace = true } = options;
|
|
@@ -45772,7 +46009,8 @@ function serializeNodeWithId(n2, options) {
|
|
|
45772
46009
|
inlineImages,
|
|
45773
46010
|
recordCanvas,
|
|
45774
46011
|
keepIframeSrcFn,
|
|
45775
|
-
newlyAddedElement
|
|
46012
|
+
newlyAddedElement,
|
|
46013
|
+
cssCaptured
|
|
45776
46014
|
});
|
|
45777
46015
|
if (!_serializedNode) {
|
|
45778
46016
|
console.warn(n2, "not serialized");
|
|
@@ -45781,7 +46019,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
45781
46019
|
let id;
|
|
45782
46020
|
if (mirror2.hasNode(n2)) {
|
|
45783
46021
|
id = mirror2.getId(n2);
|
|
45784
|
-
} else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$
|
|
46022
|
+
} else if (slimDOMExcluded(_serializedNode, slimDOMOptions) || !preserveWhiteSpace && _serializedNode.type === NodeType$3.Text && !_serializedNode.textContent.replace(/^\s+|\s+$/gm, "").length) {
|
|
45785
46023
|
id = IGNORED_NODE;
|
|
45786
46024
|
} else {
|
|
45787
46025
|
id = genId();
|
|
@@ -45795,15 +46033,15 @@ function serializeNodeWithId(n2, options) {
|
|
|
45795
46033
|
onSerialize(n2);
|
|
45796
46034
|
}
|
|
45797
46035
|
let recordChild = !skipChild;
|
|
45798
|
-
if (serializedNode.type === NodeType$
|
|
46036
|
+
if (serializedNode.type === NodeType$3.Element) {
|
|
45799
46037
|
recordChild = recordChild && !serializedNode.needBlock;
|
|
45800
46038
|
delete serializedNode.needBlock;
|
|
45801
46039
|
const shadowRootEl = index$1.shadowRoot(n2);
|
|
45802
46040
|
if (shadowRootEl && isNativeShadowDom(shadowRootEl))
|
|
45803
46041
|
serializedNode.isShadowHost = true;
|
|
45804
46042
|
}
|
|
45805
|
-
if ((serializedNode.type === NodeType$
|
|
45806
|
-
if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$
|
|
46043
|
+
if ((serializedNode.type === NodeType$3.Document || serializedNode.type === NodeType$3.Element) && recordChild) {
|
|
46044
|
+
if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$3.Element && serializedNode.tagName === "head") {
|
|
45807
46045
|
preserveWhiteSpace = false;
|
|
45808
46046
|
}
|
|
45809
46047
|
const bypassOptions = {
|
|
@@ -45829,10 +46067,14 @@ function serializeNodeWithId(n2, options) {
|
|
|
45829
46067
|
iframeLoadTimeout,
|
|
45830
46068
|
onStylesheetLoad,
|
|
45831
46069
|
stylesheetLoadTimeout,
|
|
45832
|
-
keepIframeSrcFn
|
|
46070
|
+
keepIframeSrcFn,
|
|
46071
|
+
cssCaptured: false
|
|
45833
46072
|
};
|
|
45834
|
-
if (serializedNode.type === NodeType$
|
|
46073
|
+
if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "textarea" && serializedNode.attributes.value !== void 0) ;
|
|
45835
46074
|
else {
|
|
46075
|
+
if (serializedNode.type === NodeType$3.Element && serializedNode.attributes._cssText !== void 0 && typeof serializedNode.attributes._cssText === "string") {
|
|
46076
|
+
bypassOptions.cssCaptured = true;
|
|
46077
|
+
}
|
|
45836
46078
|
for (const childN of Array.from(index$1.childNodes(n2))) {
|
|
45837
46079
|
const serializedChildNode = serializeNodeWithId(childN, bypassOptions);
|
|
45838
46080
|
if (serializedChildNode) {
|
|
@@ -45855,7 +46097,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
45855
46097
|
if (parent && isShadowRoot(parent) && isNativeShadowDom(parent)) {
|
|
45856
46098
|
serializedNode.isShadow = true;
|
|
45857
46099
|
}
|
|
45858
|
-
if (serializedNode.type === NodeType$
|
|
46100
|
+
if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "iframe") {
|
|
45859
46101
|
onceIframeLoaded(
|
|
45860
46102
|
n2,
|
|
45861
46103
|
() => {
|
|
@@ -45897,7 +46139,7 @@ function serializeNodeWithId(n2, options) {
|
|
|
45897
46139
|
iframeLoadTimeout
|
|
45898
46140
|
);
|
|
45899
46141
|
}
|
|
45900
|
-
if (serializedNode.type === NodeType$
|
|
46142
|
+
if (serializedNode.type === NodeType$3.Element && serializedNode.tagName === "link" && typeof serializedNode.attributes.rel === "string" && (serializedNode.attributes.rel === "stylesheet" || serializedNode.attributes.rel === "preload" && typeof serializedNode.attributes.href === "string" && extractFileExtension(serializedNode.attributes.href) === "css")) {
|
|
45901
46143
|
onceStylesheetLoaded(
|
|
45902
46144
|
n2,
|
|
45903
46145
|
() => {
|
|
@@ -46232,6 +46474,32 @@ function querySelectorAll(n2, selectors) {
|
|
|
46232
46474
|
function mutationObserverCtor() {
|
|
46233
46475
|
return getUntaintedPrototype("MutationObserver").constructor;
|
|
46234
46476
|
}
|
|
46477
|
+
function patch(source, name, replacement) {
|
|
46478
|
+
try {
|
|
46479
|
+
if (!(name in source)) {
|
|
46480
|
+
return () => {
|
|
46481
|
+
};
|
|
46482
|
+
}
|
|
46483
|
+
const original = source[name];
|
|
46484
|
+
const wrapped = replacement(original);
|
|
46485
|
+
if (typeof wrapped === "function") {
|
|
46486
|
+
wrapped.prototype = wrapped.prototype || {};
|
|
46487
|
+
Object.defineProperties(wrapped, {
|
|
46488
|
+
__rrweb_original__: {
|
|
46489
|
+
enumerable: false,
|
|
46490
|
+
value: original
|
|
46491
|
+
}
|
|
46492
|
+
});
|
|
46493
|
+
}
|
|
46494
|
+
source[name] = wrapped;
|
|
46495
|
+
return () => {
|
|
46496
|
+
source[name] = original;
|
|
46497
|
+
};
|
|
46498
|
+
} catch {
|
|
46499
|
+
return () => {
|
|
46500
|
+
};
|
|
46501
|
+
}
|
|
46502
|
+
}
|
|
46235
46503
|
const index = {
|
|
46236
46504
|
childNodes,
|
|
46237
46505
|
parentNode,
|
|
@@ -46244,7 +46512,8 @@ const index = {
|
|
|
46244
46512
|
shadowRoot,
|
|
46245
46513
|
querySelector,
|
|
46246
46514
|
querySelectorAll,
|
|
46247
|
-
mutationObserver: mutationObserverCtor
|
|
46515
|
+
mutationObserver: mutationObserverCtor,
|
|
46516
|
+
patch
|
|
46248
46517
|
};
|
|
46249
46518
|
function getWindow(documentOrWindow) {
|
|
46250
46519
|
const defaultView = documentOrWindow.defaultView;
|
|
@@ -46337,35 +46606,6 @@ function hookSetter(target, key, d, isRevoked, win = window) {
|
|
|
46337
46606
|
);
|
|
46338
46607
|
return () => hookSetter(target, key, original || {}, true);
|
|
46339
46608
|
}
|
|
46340
|
-
function patch(source, name, replacement) {
|
|
46341
|
-
try {
|
|
46342
|
-
if (!(name in source)) {
|
|
46343
|
-
return () => {
|
|
46344
|
-
};
|
|
46345
|
-
}
|
|
46346
|
-
const original = source[name];
|
|
46347
|
-
const wrapped = replacement(original);
|
|
46348
|
-
if (typeof wrapped === "function") {
|
|
46349
|
-
wrapped.toString = function() {
|
|
46350
|
-
return original.toString();
|
|
46351
|
-
};
|
|
46352
|
-
wrapped.prototype = wrapped.prototype || {};
|
|
46353
|
-
Object.defineProperties(wrapped, {
|
|
46354
|
-
__rrweb_original__: {
|
|
46355
|
-
enumerable: false,
|
|
46356
|
-
value: original
|
|
46357
|
-
}
|
|
46358
|
-
});
|
|
46359
|
-
}
|
|
46360
|
-
source[name] = wrapped;
|
|
46361
|
-
return () => {
|
|
46362
|
-
source[name] = original;
|
|
46363
|
-
};
|
|
46364
|
-
} catch {
|
|
46365
|
-
return () => {
|
|
46366
|
-
};
|
|
46367
|
-
}
|
|
46368
|
-
}
|
|
46369
46609
|
let nowTimestamp = Date.now;
|
|
46370
46610
|
if (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {
|
|
46371
46611
|
nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();
|
|
@@ -46592,6 +46832,15 @@ var MediaInteractions = /* @__PURE__ */ ((MediaInteractions2) => {
|
|
|
46592
46832
|
MediaInteractions2[MediaInteractions2["RateChange"] = 4] = "RateChange";
|
|
46593
46833
|
return MediaInteractions2;
|
|
46594
46834
|
})(MediaInteractions || {});
|
|
46835
|
+
var NodeType = /* @__PURE__ */ ((NodeType2) => {
|
|
46836
|
+
NodeType2[NodeType2["Document"] = 0] = "Document";
|
|
46837
|
+
NodeType2[NodeType2["DocumentType"] = 1] = "DocumentType";
|
|
46838
|
+
NodeType2[NodeType2["Element"] = 2] = "Element";
|
|
46839
|
+
NodeType2[NodeType2["Text"] = 3] = "Text";
|
|
46840
|
+
NodeType2[NodeType2["CDATA"] = 4] = "CDATA";
|
|
46841
|
+
NodeType2[NodeType2["Comment"] = 5] = "Comment";
|
|
46842
|
+
return NodeType2;
|
|
46843
|
+
})(NodeType || {});
|
|
46595
46844
|
function isNodeInLinkedList(n2) {
|
|
46596
46845
|
return "__ln" in n2;
|
|
46597
46846
|
}
|
|
@@ -46754,9 +47003,18 @@ class MutationBuffer {
|
|
|
46754
47003
|
};
|
|
46755
47004
|
const pushAdd = (n2) => {
|
|
46756
47005
|
const parent = index.parentNode(n2);
|
|
46757
|
-
if (!parent || !inDom(n2)
|
|
47006
|
+
if (!parent || !inDom(n2)) {
|
|
46758
47007
|
return;
|
|
46759
47008
|
}
|
|
47009
|
+
let cssCaptured = false;
|
|
47010
|
+
if (n2.nodeType === Node.TEXT_NODE) {
|
|
47011
|
+
const parentTag = parent.tagName;
|
|
47012
|
+
if (parentTag === "TEXTAREA") {
|
|
47013
|
+
return;
|
|
47014
|
+
} else if (parentTag === "STYLE" && this.addedSet.has(parent)) {
|
|
47015
|
+
cssCaptured = true;
|
|
47016
|
+
}
|
|
47017
|
+
}
|
|
46760
47018
|
const parentId = isShadowRoot(parent) ? this.mirror.getId(getShadowHost(n2)) : this.mirror.getId(parent);
|
|
46761
47019
|
const nextId = getNextId(n2);
|
|
46762
47020
|
if (parentId === -1 || nextId === -1) {
|
|
@@ -46798,7 +47056,8 @@ class MutationBuffer {
|
|
|
46798
47056
|
},
|
|
46799
47057
|
onStylesheetLoad: (link, childSn) => {
|
|
46800
47058
|
this.stylesheetManager.attachLinkElement(link, childSn);
|
|
46801
|
-
}
|
|
47059
|
+
},
|
|
47060
|
+
cssCaptured
|
|
46802
47061
|
});
|
|
46803
47062
|
if (sn) {
|
|
46804
47063
|
adds.push({
|
|
@@ -46936,10 +47195,18 @@ class MutationBuffer {
|
|
|
46936
47195
|
this.attributes.push(item);
|
|
46937
47196
|
this.attributeMap.set(textarea, item);
|
|
46938
47197
|
}
|
|
46939
|
-
|
|
47198
|
+
const value = Array.from(
|
|
46940
47199
|
index.childNodes(textarea),
|
|
46941
47200
|
(cn) => index.textContent(cn) || ""
|
|
46942
47201
|
).join("");
|
|
47202
|
+
item.attributes.value = maskInputValue({
|
|
47203
|
+
element: textarea,
|
|
47204
|
+
maskInputOptions: this.maskInputOptions,
|
|
47205
|
+
tagName: textarea.tagName,
|
|
47206
|
+
type: getInputType(textarea),
|
|
47207
|
+
value,
|
|
47208
|
+
maskInputFn: this.maskInputFn
|
|
47209
|
+
});
|
|
46943
47210
|
});
|
|
46944
47211
|
__publicField(this, "processMutation", (m) => {
|
|
46945
47212
|
if (isIgnored(m.target, this.mirror, this.slimDOMOptions)) {
|
|
@@ -48559,7 +48826,7 @@ class IframeManager {
|
|
|
48559
48826
|
}
|
|
48560
48827
|
}
|
|
48561
48828
|
patchRootIdOnNode(node, rootId) {
|
|
48562
|
-
if (node.type !== NodeType
|
|
48829
|
+
if (node.type !== NodeType.Document && !node.rootId) node.rootId = rootId;
|
|
48563
48830
|
if ("childNodes" in node) {
|
|
48564
48831
|
node.childNodes.forEach((child) => {
|
|
48565
48832
|
this.patchRootIdOnNode(child, rootId);
|