@amplitude/rrweb-player 2.0.0-alpha.31 → 2.0.0-alpha.33

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.
@@ -4073,6 +4073,7 @@ postcss$1$1.Input;
4073
4073
  postcss$1$1.Rule;
4074
4074
  postcss$1$1.Root;
4075
4075
  postcss$1$1.Node;
4076
+ const customElementExclusions = ["webview"];
4076
4077
  const tagMap = {
4077
4078
  script: "noscript",
4078
4079
  // camel case svg element tag names
@@ -4194,7 +4195,8 @@ function buildNode(n2, options) {
4194
4195
  // If the tag name is a custom element name
4195
4196
  n2.isCustom && // If the browser supports custom elements
4196
4197
  ((_a2 = doc.defaultView) == null ? void 0 : _a2.customElements) && // If the custom element hasn't been defined yet
4197
- !doc.defaultView.customElements.get(n2.tagName)
4198
+ !doc.defaultView.customElements.get(n2.tagName) && // If the tag is not in the exclusion list
4199
+ !customElementExclusions.includes(n2.tagName)
4198
4200
  )
4199
4201
  doc.defaultView.customElements.define(
4200
4202
  n2.tagName,
@@ -9366,14 +9368,20 @@ const testableMethods = {
9366
9368
  MutationObserver: ["constructor"]
9367
9369
  };
9368
9370
  const untaintedBasePrototype = {};
9369
- const isAngularZonePresent = () => {
9370
- return !!globalThis.Zone;
9371
- };
9371
+ function angularZoneUnpatchedAlternative(key) {
9372
+ var _a2, _b2;
9373
+ const angularUnpatchedVersionSymbol = (_b2 = (_a2 = globalThis == null ? void 0 : globalThis.Zone) == null ? void 0 : _a2.__symbol__) == null ? void 0 : _b2.call(_a2, key);
9374
+ if (angularUnpatchedVersionSymbol && globalThis[angularUnpatchedVersionSymbol]) {
9375
+ return globalThis[angularUnpatchedVersionSymbol];
9376
+ } else {
9377
+ return void 0;
9378
+ }
9379
+ }
9372
9380
  function getUntaintedPrototype(key) {
9373
9381
  if (untaintedBasePrototype[key])
9374
9382
  return untaintedBasePrototype[key];
9375
- const defaultObj = globalThis[key];
9376
- const defaultPrototype = defaultObj.prototype;
9383
+ const candidate = angularZoneUnpatchedAlternative(key) || globalThis[key];
9384
+ const defaultPrototype = candidate.prototype;
9377
9385
  const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;
9378
9386
  const isUntaintedAccessors = Boolean(
9379
9387
  accessorNames && // @ts-expect-error 2345
@@ -9396,15 +9404,15 @@ function getUntaintedPrototype(key) {
9396
9404
  }
9397
9405
  )
9398
9406
  );
9399
- if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {
9400
- untaintedBasePrototype[key] = defaultObj.prototype;
9401
- return defaultObj.prototype;
9407
+ if (isUntaintedAccessors && isUntaintedMethods) {
9408
+ untaintedBasePrototype[key] = candidate.prototype;
9409
+ return candidate.prototype;
9402
9410
  }
9403
9411
  try {
9404
9412
  const iframeEl = document.createElement("iframe");
9405
9413
  document.body.appendChild(iframeEl);
9406
9414
  const win = iframeEl.contentWindow;
9407
- if (!win) return defaultObj.prototype;
9415
+ if (!win) return candidate.prototype;
9408
9416
  const untaintedObject = win[key].prototype;
9409
9417
  document.body.removeChild(iframeEl);
9410
9418
  if (!untaintedObject) return defaultPrototype;