@sentry/replay 11.10.0 → 11.12.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/build/npm/cjs/index.js +133 -102
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/esm/index.js +133 -102
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/package.json +1 -1
- package/build/npm/types/coreHandlers/util/shouldSampleForBufferEvent.d.ts.map +1 -1
- package/build/npm/types/integration.d.ts.map +1 -1
- package/package.json +30 -32
package/build/npm/cjs/index.js
CHANGED
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const core = require('@sentry/core');
|
|
4
4
|
const browserUtils = require('@sentry/browser-utils');
|
|
5
5
|
|
|
6
|
+
const Ob="sentry.replay_id",qb="sentry.segment.name.source";
|
|
7
|
+
|
|
6
8
|
const WINDOW = core.GLOBAL_OBJ;
|
|
7
9
|
const REPLAY_SESSION_KEY = "sentryReplaySession";
|
|
8
10
|
const REPLAY_EVENT_NAME = "replay_event";
|
|
@@ -23,8 +25,6 @@ const MIN_REPLAY_DURATION = 4999;
|
|
|
23
25
|
const MIN_REPLAY_DURATION_LIMIT = 5e4;
|
|
24
26
|
const MAX_REPLAY_DURATION = 36e5;
|
|
25
27
|
|
|
26
|
-
const hb="sentry.segment.name.source";
|
|
27
|
-
|
|
28
28
|
var __defProp = Object.defineProperty;
|
|
29
29
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
30
30
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -154,9 +154,7 @@ class Mirror {
|
|
|
154
154
|
const id = this.getId(n);
|
|
155
155
|
this.idNodeMap.delete(id);
|
|
156
156
|
if (n.childNodes) {
|
|
157
|
-
n.childNodes.forEach(
|
|
158
|
-
(childNode) => this.removeNodeFromMap(childNode)
|
|
159
|
-
);
|
|
157
|
+
n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));
|
|
160
158
|
}
|
|
161
159
|
if (isElement$1(n) && n.shadowRoot) {
|
|
162
160
|
this.removeNodeFromMap(n.shadowRoot);
|
|
@@ -904,12 +902,12 @@ function serializeElementNode(n, options) {
|
|
|
904
902
|
unblockSelector
|
|
905
903
|
);
|
|
906
904
|
const tagName = getValidTagName(n);
|
|
907
|
-
let
|
|
905
|
+
let attributes = {};
|
|
908
906
|
const len = n.attributes.length;
|
|
909
907
|
for (let i2 = 0; i2 < len; i2++) {
|
|
910
908
|
const attr = n.attributes[i2];
|
|
911
909
|
if (attr.name && !ignoreAttribute(tagName, attr.name, attr.value)) {
|
|
912
|
-
|
|
910
|
+
attributes[attr.name] = transformAttribute(
|
|
913
911
|
doc,
|
|
914
912
|
tagName,
|
|
915
913
|
toLowerCase(attr.name),
|
|
@@ -929,10 +927,10 @@ function serializeElementNode(n, options) {
|
|
|
929
927
|
cssText = stringifyStylesheet(stylesheet);
|
|
930
928
|
}
|
|
931
929
|
if (cssText) {
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
930
|
+
attributes.rel = null;
|
|
931
|
+
attributes.href = null;
|
|
932
|
+
attributes.crossorigin = null;
|
|
933
|
+
attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);
|
|
936
934
|
}
|
|
937
935
|
}
|
|
938
936
|
if (tagName === "style" && n.sheet && // TODO: Currently we only try to get dynamic stylesheet when it is an empty style element
|
|
@@ -941,7 +939,7 @@ function serializeElementNode(n, options) {
|
|
|
941
939
|
n.sheet
|
|
942
940
|
);
|
|
943
941
|
if (cssText) {
|
|
944
|
-
|
|
942
|
+
attributes._cssText = absoluteToStylesheet(cssText, getHref(doc));
|
|
945
943
|
}
|
|
946
944
|
}
|
|
947
945
|
if (tagName === "input" || tagName === "textarea" || tagName === "select" || tagName === "option") {
|
|
@@ -949,7 +947,7 @@ function serializeElementNode(n, options) {
|
|
|
949
947
|
const type = getInputType(el);
|
|
950
948
|
const value = getInputValue(el, toUpperCase(tagName), type);
|
|
951
949
|
const checked = el.checked;
|
|
952
|
-
if (type !== "submit" && type !== "button" && value) {
|
|
950
|
+
if (type !== "submit" && type !== "button" && (value || attributes.value)) {
|
|
953
951
|
const forceMask = needMaskingText(
|
|
954
952
|
el,
|
|
955
953
|
maskTextClass,
|
|
@@ -962,7 +960,7 @@ function serializeElementNode(n, options) {
|
|
|
962
960
|
maskInputOptions
|
|
963
961
|
})
|
|
964
962
|
);
|
|
965
|
-
|
|
963
|
+
attributes.value = maskInputValue({
|
|
966
964
|
isMasked: forceMask,
|
|
967
965
|
element: el,
|
|
968
966
|
value,
|
|
@@ -970,20 +968,20 @@ function serializeElementNode(n, options) {
|
|
|
970
968
|
});
|
|
971
969
|
}
|
|
972
970
|
if (checked) {
|
|
973
|
-
|
|
971
|
+
attributes.checked = checked;
|
|
974
972
|
}
|
|
975
973
|
}
|
|
976
974
|
if (tagName === "option") {
|
|
977
975
|
if (n.selected && !maskInputOptions["select"]) {
|
|
978
|
-
|
|
976
|
+
attributes.selected = true;
|
|
979
977
|
} else {
|
|
980
|
-
delete
|
|
978
|
+
delete attributes.selected;
|
|
981
979
|
}
|
|
982
980
|
}
|
|
983
981
|
if (tagName === "canvas" && recordCanvas) {
|
|
984
982
|
if (n.__context === "2d") {
|
|
985
983
|
if (!is2DCanvasBlank(n)) {
|
|
986
|
-
|
|
984
|
+
attributes.rr_dataURL = n.toDataURL(
|
|
987
985
|
dataURLOptions.type,
|
|
988
986
|
dataURLOptions.quality
|
|
989
987
|
);
|
|
@@ -1001,7 +999,7 @@ function serializeElementNode(n, options) {
|
|
|
1001
999
|
dataURLOptions.quality
|
|
1002
1000
|
);
|
|
1003
1001
|
if (canvasDataURL !== blankCanvasDataURL) {
|
|
1004
|
-
|
|
1002
|
+
attributes.rr_dataURL = canvasDataURL;
|
|
1005
1003
|
}
|
|
1006
1004
|
}
|
|
1007
1005
|
}
|
|
@@ -1019,15 +1017,14 @@ function serializeElementNode(n, options) {
|
|
|
1019
1017
|
canvasService.width = image.naturalWidth;
|
|
1020
1018
|
canvasService.height = image.naturalHeight;
|
|
1021
1019
|
canvasCtx.drawImage(image, 0, 0);
|
|
1022
|
-
|
|
1020
|
+
attributes.rr_dataURL = canvasService.toDataURL(
|
|
1023
1021
|
dataURLOptions.type,
|
|
1024
1022
|
dataURLOptions.quality
|
|
1025
1023
|
);
|
|
1026
1024
|
} catch (err) {
|
|
1027
1025
|
if (image.crossOrigin !== "anonymous") {
|
|
1028
1026
|
image.crossOrigin = "anonymous";
|
|
1029
|
-
if (image.complete && image.naturalWidth !== 0)
|
|
1030
|
-
recordInlineImage();
|
|
1027
|
+
if (image.complete && image.naturalWidth !== 0) recordInlineImage();
|
|
1031
1028
|
else image.addEventListener("load", recordInlineImage);
|
|
1032
1029
|
return;
|
|
1033
1030
|
} else {
|
|
@@ -1037,37 +1034,37 @@ function serializeElementNode(n, options) {
|
|
|
1037
1034
|
}
|
|
1038
1035
|
}
|
|
1039
1036
|
if (image.crossOrigin === "anonymous") {
|
|
1040
|
-
priorCrossOrigin ?
|
|
1037
|
+
priorCrossOrigin ? attributes.crossOrigin = priorCrossOrigin : image.removeAttribute("crossorigin");
|
|
1041
1038
|
}
|
|
1042
1039
|
};
|
|
1043
1040
|
if (image.complete && image.naturalWidth !== 0) recordInlineImage();
|
|
1044
1041
|
else image.addEventListener("load", recordInlineImage);
|
|
1045
1042
|
}
|
|
1046
1043
|
if (tagName === "audio" || tagName === "video") {
|
|
1047
|
-
|
|
1048
|
-
|
|
1044
|
+
attributes.rr_mediaState = n.paused ? "paused" : "played";
|
|
1045
|
+
attributes.rr_mediaCurrentTime = n.currentTime;
|
|
1049
1046
|
}
|
|
1050
1047
|
if (!newlyAddedElement) {
|
|
1051
1048
|
if (n.scrollLeft) {
|
|
1052
|
-
|
|
1049
|
+
attributes.rr_scrollLeft = n.scrollLeft;
|
|
1053
1050
|
}
|
|
1054
1051
|
if (n.scrollTop) {
|
|
1055
|
-
|
|
1052
|
+
attributes.rr_scrollTop = n.scrollTop;
|
|
1056
1053
|
}
|
|
1057
1054
|
}
|
|
1058
1055
|
if (needBlock) {
|
|
1059
1056
|
const { width, height } = n.getBoundingClientRect();
|
|
1060
|
-
|
|
1061
|
-
class:
|
|
1057
|
+
attributes = {
|
|
1058
|
+
class: attributes.class,
|
|
1062
1059
|
rr_width: `${width}px`,
|
|
1063
1060
|
rr_height: `${height}px`
|
|
1064
1061
|
};
|
|
1065
1062
|
}
|
|
1066
|
-
if (tagName === "iframe" && !keepIframeSrcFn(
|
|
1063
|
+
if (tagName === "iframe" && !keepIframeSrcFn(attributes.src)) {
|
|
1067
1064
|
if (!needBlock && !getIFrameContentDocument$1(n)) {
|
|
1068
|
-
|
|
1065
|
+
attributes.rr_src = attributes.src;
|
|
1069
1066
|
}
|
|
1070
|
-
delete
|
|
1067
|
+
delete attributes.src;
|
|
1071
1068
|
}
|
|
1072
1069
|
let isCustomElement;
|
|
1073
1070
|
try {
|
|
@@ -1077,7 +1074,7 @@ function serializeElementNode(n, options) {
|
|
|
1077
1074
|
return {
|
|
1078
1075
|
type: NodeType$1.Element,
|
|
1079
1076
|
tagName,
|
|
1080
|
-
attributes
|
|
1077
|
+
attributes,
|
|
1081
1078
|
childNodes: [],
|
|
1082
1079
|
isSVG: isSVGElement(n) || void 0,
|
|
1083
1080
|
needBlock,
|
|
@@ -1192,8 +1189,8 @@ function serializeNodeWithId(n, options) {
|
|
|
1192
1189
|
} else {
|
|
1193
1190
|
id = genId();
|
|
1194
1191
|
}
|
|
1195
|
-
const
|
|
1196
|
-
mirror.add(n,
|
|
1192
|
+
const serializedNode = Object.assign(_serializedNode, { id });
|
|
1193
|
+
mirror.add(n, serializedNode);
|
|
1197
1194
|
if (id === IGNORED_NODE) {
|
|
1198
1195
|
return null;
|
|
1199
1196
|
}
|
|
@@ -1201,14 +1198,14 @@ function serializeNodeWithId(n, options) {
|
|
|
1201
1198
|
onSerialize(n);
|
|
1202
1199
|
}
|
|
1203
1200
|
let recordChild = !skipChild;
|
|
1204
|
-
if (
|
|
1205
|
-
recordChild = recordChild && !
|
|
1201
|
+
if (serializedNode.type === NodeType$1.Element) {
|
|
1202
|
+
recordChild = recordChild && !serializedNode.needBlock;
|
|
1206
1203
|
const shadowRoot = n.shadowRoot;
|
|
1207
1204
|
if (shadowRoot && isNativeShadowDom(shadowRoot))
|
|
1208
|
-
|
|
1205
|
+
serializedNode.isShadowHost = true;
|
|
1209
1206
|
}
|
|
1210
|
-
if ((
|
|
1211
|
-
if (slimDOMOptions.headWhitespace &&
|
|
1207
|
+
if ((serializedNode.type === NodeType$1.Document || serializedNode.type === NodeType$1.Element) && recordChild) {
|
|
1208
|
+
if (slimDOMOptions.headWhitespace && serializedNode.type === NodeType$1.Element && serializedNode.tagName === "head") {
|
|
1212
1209
|
preserveWhiteSpace = false;
|
|
1213
1210
|
}
|
|
1214
1211
|
const bypassOptions = {
|
|
@@ -1246,7 +1243,7 @@ function serializeNodeWithId(n, options) {
|
|
|
1246
1243
|
for (const childN of childNodes) {
|
|
1247
1244
|
const serializedChildNode = serializeNodeWithId(childN, bypassOptions);
|
|
1248
1245
|
if (serializedChildNode) {
|
|
1249
|
-
|
|
1246
|
+
serializedNode.childNodes.push(serializedChildNode);
|
|
1250
1247
|
}
|
|
1251
1248
|
}
|
|
1252
1249
|
if (isElement$1(n) && n.shadowRoot) {
|
|
@@ -1254,15 +1251,15 @@ function serializeNodeWithId(n, options) {
|
|
|
1254
1251
|
const serializedChildNode = serializeNodeWithId(childN, bypassOptions);
|
|
1255
1252
|
if (serializedChildNode) {
|
|
1256
1253
|
isNativeShadowDom(n.shadowRoot) && (serializedChildNode.isShadow = true);
|
|
1257
|
-
|
|
1254
|
+
serializedNode.childNodes.push(serializedChildNode);
|
|
1258
1255
|
}
|
|
1259
1256
|
}
|
|
1260
1257
|
}
|
|
1261
1258
|
}
|
|
1262
1259
|
if (n.parentNode && isShadowRoot(n.parentNode) && isNativeShadowDom(n.parentNode)) {
|
|
1263
|
-
|
|
1260
|
+
serializedNode.isShadow = true;
|
|
1264
1261
|
}
|
|
1265
|
-
if (
|
|
1262
|
+
if (serializedNode.type === NodeType$1.Element && serializedNode.tagName === "iframe" && !serializedNode.needBlock) {
|
|
1266
1263
|
onceIframeLoaded(
|
|
1267
1264
|
n,
|
|
1268
1265
|
() => {
|
|
@@ -1309,14 +1306,14 @@ function serializeNodeWithId(n, options) {
|
|
|
1309
1306
|
iframeLoadTimeout
|
|
1310
1307
|
);
|
|
1311
1308
|
}
|
|
1312
|
-
if (
|
|
1309
|
+
if (serializedNode.type === NodeType$1.Element && serializedNode.tagName === "img" && !n.complete && serializedNode.needBlock) {
|
|
1313
1310
|
const image = n;
|
|
1314
1311
|
const updateImageDimensions = () => {
|
|
1315
1312
|
if (image.isConnected && !image.complete && onBlockedImageLoad) {
|
|
1316
1313
|
try {
|
|
1317
1314
|
const rect = image.getBoundingClientRect();
|
|
1318
1315
|
if (rect.width > 0 && rect.height > 0) {
|
|
1319
|
-
onBlockedImageLoad(image,
|
|
1316
|
+
onBlockedImageLoad(image, serializedNode, rect);
|
|
1320
1317
|
}
|
|
1321
1318
|
} catch (error) {
|
|
1322
1319
|
}
|
|
@@ -1327,7 +1324,7 @@ function serializeNodeWithId(n, options) {
|
|
|
1327
1324
|
image.addEventListener("load", updateImageDimensions);
|
|
1328
1325
|
}
|
|
1329
1326
|
}
|
|
1330
|
-
if (
|
|
1327
|
+
if (serializedNode.type === NodeType$1.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")) {
|
|
1331
1328
|
onceStylesheetLoaded(
|
|
1332
1329
|
n,
|
|
1333
1330
|
() => {
|
|
@@ -1373,10 +1370,10 @@ function serializeNodeWithId(n, options) {
|
|
|
1373
1370
|
stylesheetLoadTimeout
|
|
1374
1371
|
);
|
|
1375
1372
|
}
|
|
1376
|
-
if (
|
|
1377
|
-
delete
|
|
1373
|
+
if (serializedNode.type === NodeType$1.Element) {
|
|
1374
|
+
delete serializedNode.needBlock;
|
|
1378
1375
|
}
|
|
1379
|
-
return
|
|
1376
|
+
return serializedNode;
|
|
1380
1377
|
}
|
|
1381
1378
|
function snapshot(n, options) {
|
|
1382
1379
|
const {
|
|
@@ -1799,6 +1796,17 @@ function setTimeout$2(...rest) {
|
|
|
1799
1796
|
function clearTimeout$2(...rest) {
|
|
1800
1797
|
return getImplementation("clearTimeout")(...rest);
|
|
1801
1798
|
}
|
|
1799
|
+
function runAll(handlers) {
|
|
1800
|
+
const errors = [];
|
|
1801
|
+
for (const handler of handlers) {
|
|
1802
|
+
try {
|
|
1803
|
+
handler();
|
|
1804
|
+
} catch (error) {
|
|
1805
|
+
errors.push(error);
|
|
1806
|
+
}
|
|
1807
|
+
}
|
|
1808
|
+
return errors;
|
|
1809
|
+
}
|
|
1802
1810
|
var EventType = /* @__PURE__ */ ((EventType2) => {
|
|
1803
1811
|
EventType2[EventType2["DomContentLoaded"] = 0] = "DomContentLoaded";
|
|
1804
1812
|
EventType2[EventType2["Load"] = 1] = "Load";
|
|
@@ -2918,13 +2926,7 @@ function initInputObserver({
|
|
|
2918
2926
|
const userTriggered = event.isTrusted;
|
|
2919
2927
|
const tagName = target && toUpperCase(target.tagName);
|
|
2920
2928
|
if (tagName === "OPTION") target = target.parentElement;
|
|
2921
|
-
if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(
|
|
2922
|
-
target,
|
|
2923
|
-
blockClass,
|
|
2924
|
-
blockSelector,
|
|
2925
|
-
unblockSelector,
|
|
2926
|
-
true
|
|
2927
|
-
)) {
|
|
2929
|
+
if (!target || !tagName || INPUT_TAGS.indexOf(tagName) < 0 || isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {
|
|
2928
2930
|
return;
|
|
2929
2931
|
}
|
|
2930
2932
|
const el = target;
|
|
@@ -3042,9 +3044,7 @@ function getNestedCSSRulePositions(rule) {
|
|
|
3042
3044
|
const positions = [];
|
|
3043
3045
|
function recurse(childRule, pos) {
|
|
3044
3046
|
if (hasNestedCSSRule("CSSGroupingRule") && childRule.parentRule instanceof CSSGroupingRule || hasNestedCSSRule("CSSMediaRule") && childRule.parentRule instanceof CSSMediaRule || hasNestedCSSRule("CSSSupportsRule") && childRule.parentRule instanceof CSSSupportsRule || hasNestedCSSRule("CSSConditionRule") && childRule.parentRule instanceof CSSConditionRule) {
|
|
3045
|
-
const rules2 = Array.from(
|
|
3046
|
-
childRule.parentRule.cssRules
|
|
3047
|
-
);
|
|
3047
|
+
const rules2 = Array.from(childRule.parentRule.cssRules);
|
|
3048
3048
|
const index = rules2.indexOf(childRule);
|
|
3049
3049
|
pos.unshift(index);
|
|
3050
3050
|
} else if (childRule.parentStyleSheet) {
|
|
@@ -3264,35 +3264,51 @@ function initAdoptedStyleSheetObserver({
|
|
|
3264
3264
|
patchTarget?.prototype,
|
|
3265
3265
|
"adoptedStyleSheets"
|
|
3266
3266
|
) : void 0;
|
|
3267
|
-
|
|
3267
|
+
const previousAdoptedStyleSheetsDescriptor = Object.getOwnPropertyDescriptor(
|
|
3268
|
+
host,
|
|
3269
|
+
"adoptedStyleSheets"
|
|
3270
|
+
);
|
|
3271
|
+
if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor || // Another script locked `host` itself: it put a locked property on it, or
|
|
3272
|
+
// sealed or froze it. Patching would throw, so we don't. Full snapshots
|
|
3273
|
+
// still capture the adopted stylesheets; we only miss changes between
|
|
3274
|
+
// snapshots.
|
|
3275
|
+
previousAdoptedStyleSheetsDescriptor?.configurable === false || !Object.isExtensible(host))
|
|
3268
3276
|
return () => {
|
|
3269
3277
|
};
|
|
3278
|
+
let adoptedStyleSheetsOverrideIsActive = true;
|
|
3279
|
+
const adoptedStyleSheetsSetter = function(sheets) {
|
|
3280
|
+
originalPropertyDescriptor.set?.call(this, sheets);
|
|
3281
|
+
if (adoptedStyleSheetsOverrideIsActive && hostId !== null && hostId !== -1) {
|
|
3282
|
+
try {
|
|
3283
|
+
stylesheetManager.adoptStyleSheets(sheets, hostId);
|
|
3284
|
+
} catch (e2) {
|
|
3285
|
+
}
|
|
3286
|
+
}
|
|
3287
|
+
};
|
|
3270
3288
|
Object.defineProperty(host, "adoptedStyleSheets", {
|
|
3271
|
-
configurable:
|
|
3289
|
+
configurable: true,
|
|
3272
3290
|
enumerable: originalPropertyDescriptor.enumerable,
|
|
3273
3291
|
get() {
|
|
3274
3292
|
return originalPropertyDescriptor.get?.call(this);
|
|
3275
3293
|
},
|
|
3276
|
-
set
|
|
3277
|
-
const result = originalPropertyDescriptor.set?.call(this, sheets);
|
|
3278
|
-
if (hostId !== null && hostId !== -1) {
|
|
3279
|
-
try {
|
|
3280
|
-
stylesheetManager.adoptStyleSheets(sheets, hostId);
|
|
3281
|
-
} catch (e2) {
|
|
3282
|
-
}
|
|
3283
|
-
}
|
|
3284
|
-
return result;
|
|
3285
|
-
}
|
|
3294
|
+
set: adoptedStyleSheetsSetter
|
|
3286
3295
|
});
|
|
3287
3296
|
return callbackWrapper(() => {
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3297
|
+
adoptedStyleSheetsOverrideIsActive = false;
|
|
3298
|
+
const currentDescriptor = Object.getOwnPropertyDescriptor(
|
|
3299
|
+
host,
|
|
3300
|
+
"adoptedStyleSheets"
|
|
3301
|
+
);
|
|
3302
|
+
if (currentDescriptor?.set !== adoptedStyleSheetsSetter) return;
|
|
3303
|
+
if (previousAdoptedStyleSheetsDescriptor) {
|
|
3304
|
+
Reflect.defineProperty(
|
|
3305
|
+
host,
|
|
3306
|
+
"adoptedStyleSheets",
|
|
3307
|
+
previousAdoptedStyleSheetsDescriptor
|
|
3308
|
+
);
|
|
3309
|
+
} else {
|
|
3310
|
+
Reflect.deleteProperty(host, "adoptedStyleSheets");
|
|
3311
|
+
}
|
|
3296
3312
|
});
|
|
3297
3313
|
}
|
|
3298
3314
|
function initStyleDeclarationObserver({
|
|
@@ -3420,7 +3436,11 @@ function initFontObserver({ fontCb, doc }) {
|
|
|
3420
3436
|
const fontMap = /* @__PURE__ */ new WeakMap();
|
|
3421
3437
|
const originalFontFace = win.FontFace;
|
|
3422
3438
|
win.FontFace = function FontFace2(family, source, descriptors) {
|
|
3423
|
-
const fontFace = new originalFontFace(
|
|
3439
|
+
const fontFace = new originalFontFace(
|
|
3440
|
+
family,
|
|
3441
|
+
source,
|
|
3442
|
+
descriptors
|
|
3443
|
+
);
|
|
3424
3444
|
fontMap.set(fontFace, {
|
|
3425
3445
|
family,
|
|
3426
3446
|
buffer: typeof source !== "string",
|
|
@@ -3572,21 +3592,24 @@ function initObservers(o2, _hooks = {}) {
|
|
|
3572
3592
|
);
|
|
3573
3593
|
}
|
|
3574
3594
|
return callbackWrapper(() => {
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3595
|
+
const errors = runAll([
|
|
3596
|
+
() => forEachMutationBuffer((b) => b.reset()),
|
|
3597
|
+
() => mutationObserver?.disconnect(),
|
|
3598
|
+
mousemoveHandler,
|
|
3599
|
+
mouseInteractionHandler,
|
|
3600
|
+
scrollHandler,
|
|
3601
|
+
viewportResizeHandler,
|
|
3602
|
+
inputHandler,
|
|
3603
|
+
mediaInteractionHandler,
|
|
3604
|
+
styleSheetObserver,
|
|
3605
|
+
adoptedStyleSheetObserver,
|
|
3606
|
+
styleDeclarationObserver,
|
|
3607
|
+
fontObserver,
|
|
3608
|
+
selectionObserver,
|
|
3609
|
+
customElementObserver,
|
|
3610
|
+
...pluginHandlers
|
|
3611
|
+
]);
|
|
3612
|
+
if (errors.length > 0) throw errors[0];
|
|
3590
3613
|
});
|
|
3591
3614
|
}
|
|
3592
3615
|
function hasNestedCSSRule(prop) {
|
|
@@ -4681,10 +4704,15 @@ function record(options = {}) {
|
|
|
4681
4704
|
);
|
|
4682
4705
|
}
|
|
4683
4706
|
return () => {
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4707
|
+
const errors = runAll([
|
|
4708
|
+
...handlers,
|
|
4709
|
+
() => processedNodeManager.destroy(),
|
|
4710
|
+
() => {
|
|
4711
|
+
_takeFullSnapshot = void 0;
|
|
4712
|
+
},
|
|
4713
|
+
unregisterErrorHandler
|
|
4714
|
+
]);
|
|
4715
|
+
if (errors.length > 0) throw errors[0];
|
|
4688
4716
|
};
|
|
4689
4717
|
} catch (error) {
|
|
4690
4718
|
console.warn(error);
|
|
@@ -6264,6 +6292,9 @@ function shouldSampleForBufferEvent(replay, event) {
|
|
|
6264
6292
|
if (!event.exception || event.type) {
|
|
6265
6293
|
return false;
|
|
6266
6294
|
}
|
|
6295
|
+
if (event.sdkProcessingMetadata?.hasDefaultSyntheticStacktrace) {
|
|
6296
|
+
return false;
|
|
6297
|
+
}
|
|
6267
6298
|
return isSampled(replay.getOptions().errorSampleRate);
|
|
6268
6299
|
}
|
|
6269
6300
|
|
|
@@ -7847,7 +7878,7 @@ class ReplayContainer {
|
|
|
7847
7878
|
return void 0;
|
|
7848
7879
|
}
|
|
7849
7880
|
const spanJson = core.spanToJSON(lastRootSpan);
|
|
7850
|
-
const source = spanJson.attributes[
|
|
7881
|
+
const source = spanJson.attributes[qb];
|
|
7851
7882
|
if (!source || !["route", "custom"].includes(source)) {
|
|
7852
7883
|
return void 0;
|
|
7853
7884
|
}
|
|
@@ -8528,7 +8559,7 @@ class Replay {
|
|
|
8528
8559
|
processSpan(span) {
|
|
8529
8560
|
const replayId = this.getReplayId(true);
|
|
8530
8561
|
if (replayId) {
|
|
8531
|
-
core.safeSetSpanJSONAttributes(span, {
|
|
8562
|
+
core.safeSetSpanJSONAttributes(span, { [Ob]: replayId });
|
|
8532
8563
|
if (this.getRecordingMode() === "buffer") {
|
|
8533
8564
|
core.safeSetSpanJSONAttributes(span, { "sentry._internal.replay_is_buffering": true });
|
|
8534
8565
|
}
|