@appsurify-testmap/rrweb-player 2.1.3-alpha.3 → 3.1.1-alpha.1
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/rrweb-player.cjs +85 -57
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +85 -57
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +85 -57
- package/dist/rrweb-player.umd.cjs.map +2 -2
- package/dist/rrweb-player.umd.min.cjs +28 -28
- package/dist/rrweb-player.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-player.js
CHANGED
|
@@ -615,6 +615,33 @@ const pseudoClassPlugin = {
|
|
|
615
615
|
};
|
|
616
616
|
}
|
|
617
617
|
};
|
|
618
|
+
const animationFillModePlugin = {
|
|
619
|
+
postcssPlugin: "postcss-animation-fill-mode",
|
|
620
|
+
prepare: function() {
|
|
621
|
+
return {
|
|
622
|
+
Rule: function(rule2) {
|
|
623
|
+
let hasAnimation = false;
|
|
624
|
+
let hasAnimationFillMode = false;
|
|
625
|
+
let animationDeclaration = null;
|
|
626
|
+
rule2.walkDecls((decl) => {
|
|
627
|
+
if (decl.prop === "animation") {
|
|
628
|
+
hasAnimation = true;
|
|
629
|
+
animationDeclaration = decl;
|
|
630
|
+
}
|
|
631
|
+
if (decl.prop === "animation-fill-mode") {
|
|
632
|
+
hasAnimationFillMode = true;
|
|
633
|
+
}
|
|
634
|
+
});
|
|
635
|
+
if (hasAnimation && !hasAnimationFillMode && animationDeclaration) {
|
|
636
|
+
rule2.insertAfter(animationDeclaration, {
|
|
637
|
+
prop: "animation-fill-mode",
|
|
638
|
+
value: "forwards"
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
};
|
|
618
645
|
function getDefaultExportFromCjs$1(x2) {
|
|
619
646
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
620
647
|
}
|
|
@@ -631,12 +658,12 @@ function getAugmentedNamespace$1(n2) {
|
|
|
631
658
|
a2.prototype = f2.prototype;
|
|
632
659
|
} else a2 = {};
|
|
633
660
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
634
|
-
Object.keys(n2).forEach(function(
|
|
635
|
-
var d = Object.getOwnPropertyDescriptor(n2,
|
|
636
|
-
Object.defineProperty(a2,
|
|
661
|
+
Object.keys(n2).forEach(function(k2) {
|
|
662
|
+
var d = Object.getOwnPropertyDescriptor(n2, k2);
|
|
663
|
+
Object.defineProperty(a2, k2, d.get ? d : {
|
|
637
664
|
enumerable: true,
|
|
638
665
|
get: function() {
|
|
639
|
-
return n2[
|
|
666
|
+
return n2[k2];
|
|
640
667
|
}
|
|
641
668
|
});
|
|
642
669
|
});
|
|
@@ -1060,7 +1087,7 @@ function cloneNode$1(obj, parent) {
|
|
|
1060
1087
|
} else if (i2 === "source") {
|
|
1061
1088
|
cloned[i2] = value;
|
|
1062
1089
|
} else if (Array.isArray(value)) {
|
|
1063
|
-
cloned[i2] = value.map((
|
|
1090
|
+
cloned[i2] = value.map((j2) => cloneNode$1(j2, cloned));
|
|
1064
1091
|
} else {
|
|
1065
1092
|
if (type === "object" && value !== null) value = cloneNode$1(value);
|
|
1066
1093
|
cloned[i2] = value;
|
|
@@ -1295,7 +1322,7 @@ let Node$5$1 = class Node2 {
|
|
|
1295
1322
|
}
|
|
1296
1323
|
return result2;
|
|
1297
1324
|
}
|
|
1298
|
-
toJSON(
|
|
1325
|
+
toJSON(_2, inputs) {
|
|
1299
1326
|
let fixed = {};
|
|
1300
1327
|
let emitInputs = inputs == null;
|
|
1301
1328
|
inputs = inputs || /* @__PURE__ */ new Map();
|
|
@@ -2940,8 +2967,8 @@ let Parser$1$1 = class Parser {
|
|
|
2940
2967
|
if (colon === false) return;
|
|
2941
2968
|
let founded = 0;
|
|
2942
2969
|
let token;
|
|
2943
|
-
for (let
|
|
2944
|
-
token = tokens[
|
|
2970
|
+
for (let j2 = colon - 1; j2 >= 0; j2--) {
|
|
2971
|
+
token = tokens[j2];
|
|
2945
2972
|
if (token[0] !== "space") {
|
|
2946
2973
|
founded += 1;
|
|
2947
2974
|
if (founded === 2) break;
|
|
@@ -3059,8 +3086,8 @@ let Parser$1$1 = class Parser {
|
|
|
3059
3086
|
} else if (token[1].toLowerCase() === "important") {
|
|
3060
3087
|
let cache = tokens.slice(0);
|
|
3061
3088
|
let str = "";
|
|
3062
|
-
for (let
|
|
3063
|
-
let type = cache[
|
|
3089
|
+
for (let j2 = i2; j2 > 0; j2--) {
|
|
3090
|
+
let type = cache[j2][0];
|
|
3064
3091
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
3065
3092
|
break;
|
|
3066
3093
|
}
|
|
@@ -4218,7 +4245,8 @@ function adaptCssForReplay(cssText, cache) {
|
|
|
4218
4245
|
try {
|
|
4219
4246
|
const ast = postcss$1$1([
|
|
4220
4247
|
mediaSelectorPlugin,
|
|
4221
|
-
pseudoClassPlugin
|
|
4248
|
+
pseudoClassPlugin,
|
|
4249
|
+
animationFillModePlugin
|
|
4222
4250
|
]).process(cssText);
|
|
4223
4251
|
result2 = ast.css;
|
|
4224
4252
|
} catch (error) {
|
|
@@ -4743,12 +4771,12 @@ function getAugmentedNamespace(n2) {
|
|
|
4743
4771
|
a2.prototype = f2.prototype;
|
|
4744
4772
|
} else a2 = {};
|
|
4745
4773
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
4746
|
-
Object.keys(n2).forEach(function(
|
|
4747
|
-
var d = Object.getOwnPropertyDescriptor(n2,
|
|
4748
|
-
Object.defineProperty(a2,
|
|
4774
|
+
Object.keys(n2).forEach(function(k2) {
|
|
4775
|
+
var d = Object.getOwnPropertyDescriptor(n2, k2);
|
|
4776
|
+
Object.defineProperty(a2, k2, d.get ? d : {
|
|
4749
4777
|
enumerable: true,
|
|
4750
4778
|
get: function() {
|
|
4751
|
-
return n2[
|
|
4779
|
+
return n2[k2];
|
|
4752
4780
|
}
|
|
4753
4781
|
});
|
|
4754
4782
|
});
|
|
@@ -5172,7 +5200,7 @@ function cloneNode(obj, parent) {
|
|
|
5172
5200
|
} else if (i2 === "source") {
|
|
5173
5201
|
cloned[i2] = value;
|
|
5174
5202
|
} else if (Array.isArray(value)) {
|
|
5175
|
-
cloned[i2] = value.map((
|
|
5203
|
+
cloned[i2] = value.map((j2) => cloneNode(j2, cloned));
|
|
5176
5204
|
} else {
|
|
5177
5205
|
if (type === "object" && value !== null) value = cloneNode(value);
|
|
5178
5206
|
cloned[i2] = value;
|
|
@@ -5407,7 +5435,7 @@ let Node$5 = class Node22 {
|
|
|
5407
5435
|
}
|
|
5408
5436
|
return result2;
|
|
5409
5437
|
}
|
|
5410
|
-
toJSON(
|
|
5438
|
+
toJSON(_2, inputs) {
|
|
5411
5439
|
let fixed = {};
|
|
5412
5440
|
let emitInputs = inputs == null;
|
|
5413
5441
|
inputs = inputs || /* @__PURE__ */ new Map();
|
|
@@ -7052,8 +7080,8 @@ let Parser$1 = class Parser2 {
|
|
|
7052
7080
|
if (colon === false) return;
|
|
7053
7081
|
let founded = 0;
|
|
7054
7082
|
let token;
|
|
7055
|
-
for (let
|
|
7056
|
-
token = tokens[
|
|
7083
|
+
for (let j2 = colon - 1; j2 >= 0; j2--) {
|
|
7084
|
+
token = tokens[j2];
|
|
7057
7085
|
if (token[0] !== "space") {
|
|
7058
7086
|
founded += 1;
|
|
7059
7087
|
if (founded === 2) break;
|
|
@@ -7171,8 +7199,8 @@ let Parser$1 = class Parser2 {
|
|
|
7171
7199
|
} else if (token[1].toLowerCase() === "important") {
|
|
7172
7200
|
let cache = tokens.slice(0);
|
|
7173
7201
|
let str = "";
|
|
7174
|
-
for (let
|
|
7175
|
-
let type = cache[
|
|
7202
|
+
for (let j2 = i2; j2 > 0; j2--) {
|
|
7203
|
+
let type = cache[j2][0];
|
|
7176
7204
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
7177
7205
|
break;
|
|
7178
7206
|
}
|
|
@@ -8312,7 +8340,7 @@ const camelizeRE = /-([a-z])/g;
|
|
|
8312
8340
|
const CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9-]+$/;
|
|
8313
8341
|
const camelize = (str) => {
|
|
8314
8342
|
if (CUSTOM_PROPERTY_REGEX.test(str)) return str;
|
|
8315
|
-
return str.replace(camelizeRE, (
|
|
8343
|
+
return str.replace(camelizeRE, (_2, c2) => c2 ? c2.toUpperCase() : "");
|
|
8316
8344
|
};
|
|
8317
8345
|
const hyphenateRE = /\B([A-Z])/g;
|
|
8318
8346
|
const hyphenate = (str) => {
|
|
@@ -10082,30 +10110,30 @@ const mittProxy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro
|
|
|
10082
10110
|
__proto__: null,
|
|
10083
10111
|
default: mitt$1
|
|
10084
10112
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
10085
|
-
function polyfill(
|
|
10086
|
-
if ("scrollBehavior" in d.documentElement.style &&
|
|
10113
|
+
function polyfill(w2 = window, d = document) {
|
|
10114
|
+
if ("scrollBehavior" in d.documentElement.style && w2.__forceSmoothScrollPolyfill__ !== true) {
|
|
10087
10115
|
return;
|
|
10088
10116
|
}
|
|
10089
|
-
const Element2 =
|
|
10117
|
+
const Element2 = w2.HTMLElement || w2.Element;
|
|
10090
10118
|
const SCROLL_TIME = 468;
|
|
10091
10119
|
const original = {
|
|
10092
|
-
scroll:
|
|
10093
|
-
scrollBy:
|
|
10120
|
+
scroll: w2.scroll || w2.scrollTo,
|
|
10121
|
+
scrollBy: w2.scrollBy,
|
|
10094
10122
|
elementScroll: Element2.prototype.scroll || scrollElement,
|
|
10095
10123
|
scrollIntoView: Element2.prototype.scrollIntoView
|
|
10096
10124
|
};
|
|
10097
|
-
const now =
|
|
10125
|
+
const now = w2.performance && w2.performance.now ? w2.performance.now.bind(w2.performance) : Date.now;
|
|
10098
10126
|
function isMicrosoftBrowser(userAgent) {
|
|
10099
10127
|
const userAgentPatterns = ["MSIE ", "Trident/", "Edge/"];
|
|
10100
10128
|
return new RegExp(userAgentPatterns.join("|")).test(userAgent);
|
|
10101
10129
|
}
|
|
10102
|
-
const ROUNDING_TOLERANCE = isMicrosoftBrowser(
|
|
10130
|
+
const ROUNDING_TOLERANCE = isMicrosoftBrowser(w2.navigator.userAgent) ? 1 : 0;
|
|
10103
10131
|
function scrollElement(x2, y) {
|
|
10104
10132
|
this.scrollLeft = x2;
|
|
10105
10133
|
this.scrollTop = y;
|
|
10106
10134
|
}
|
|
10107
|
-
function ease(
|
|
10108
|
-
return 0.5 * (1 - Math.cos(Math.PI *
|
|
10135
|
+
function ease(k2) {
|
|
10136
|
+
return 0.5 * (1 - Math.cos(Math.PI * k2));
|
|
10109
10137
|
}
|
|
10110
10138
|
function shouldBailOut(firstArg) {
|
|
10111
10139
|
if (firstArg === null || typeof firstArg !== "object" || firstArg.behavior === void 0 || firstArg.behavior === "auto" || firstArg.behavior === "instant") {
|
|
@@ -10127,7 +10155,7 @@ function polyfill(w = window, d = document) {
|
|
|
10127
10155
|
}
|
|
10128
10156
|
}
|
|
10129
10157
|
function canOverflow(el, axis) {
|
|
10130
|
-
const overflowValue =
|
|
10158
|
+
const overflowValue = w2.getComputedStyle(el, null)["overflow" + axis];
|
|
10131
10159
|
return overflowValue === "auto" || overflowValue === "scroll";
|
|
10132
10160
|
}
|
|
10133
10161
|
function isScrollable(el) {
|
|
@@ -10153,7 +10181,7 @@ function polyfill(w = window, d = document) {
|
|
|
10153
10181
|
currentY = context.startY + (context.y - context.startY) * value;
|
|
10154
10182
|
context.method.call(context.scrollable, currentX, currentY);
|
|
10155
10183
|
if (currentX !== context.x || currentY !== context.y) {
|
|
10156
|
-
|
|
10184
|
+
w2.requestAnimationFrame(step.bind(w2, context));
|
|
10157
10185
|
}
|
|
10158
10186
|
}
|
|
10159
10187
|
function smoothScroll(el, x2, y) {
|
|
@@ -10163,9 +10191,9 @@ function polyfill(w = window, d = document) {
|
|
|
10163
10191
|
let method;
|
|
10164
10192
|
const startTime = now();
|
|
10165
10193
|
if (el === d.body) {
|
|
10166
|
-
scrollable =
|
|
10167
|
-
startX =
|
|
10168
|
-
startY =
|
|
10194
|
+
scrollable = w2;
|
|
10195
|
+
startX = w2.scrollX || w2.pageXOffset;
|
|
10196
|
+
startY = w2.scrollY || w2.pageYOffset;
|
|
10169
10197
|
method = original.scroll;
|
|
10170
10198
|
} else {
|
|
10171
10199
|
scrollable = el;
|
|
@@ -10183,43 +10211,43 @@ function polyfill(w = window, d = document) {
|
|
|
10183
10211
|
y
|
|
10184
10212
|
});
|
|
10185
10213
|
}
|
|
10186
|
-
|
|
10214
|
+
w2.scroll = w2.scrollTo = function() {
|
|
10187
10215
|
if (arguments[0] === void 0) {
|
|
10188
10216
|
return;
|
|
10189
10217
|
}
|
|
10190
10218
|
if (shouldBailOut(arguments[0]) === true) {
|
|
10191
10219
|
original.scroll.call(
|
|
10192
|
-
|
|
10193
|
-
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] :
|
|
10220
|
+
w2,
|
|
10221
|
+
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] : w2.scrollX || w2.pageXOffset,
|
|
10194
10222
|
// use top prop, second argument if present or fallback to scrollY
|
|
10195
|
-
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] :
|
|
10223
|
+
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : w2.scrollY || w2.pageYOffset
|
|
10196
10224
|
);
|
|
10197
10225
|
return;
|
|
10198
10226
|
}
|
|
10199
10227
|
smoothScroll.call(
|
|
10200
|
-
|
|
10228
|
+
w2,
|
|
10201
10229
|
d.body,
|
|
10202
|
-
arguments[0].left !== void 0 ? ~~arguments[0].left :
|
|
10203
|
-
arguments[0].top !== void 0 ? ~~arguments[0].top :
|
|
10230
|
+
arguments[0].left !== void 0 ? ~~arguments[0].left : w2.scrollX || w2.pageXOffset,
|
|
10231
|
+
arguments[0].top !== void 0 ? ~~arguments[0].top : w2.scrollY || w2.pageYOffset
|
|
10204
10232
|
);
|
|
10205
10233
|
};
|
|
10206
|
-
|
|
10234
|
+
w2.scrollBy = function() {
|
|
10207
10235
|
if (arguments[0] === void 0) {
|
|
10208
10236
|
return;
|
|
10209
10237
|
}
|
|
10210
10238
|
if (shouldBailOut(arguments[0])) {
|
|
10211
10239
|
original.scrollBy.call(
|
|
10212
|
-
|
|
10240
|
+
w2,
|
|
10213
10241
|
arguments[0].left !== void 0 ? arguments[0].left : typeof arguments[0] !== "object" ? arguments[0] : 0,
|
|
10214
10242
|
arguments[0].top !== void 0 ? arguments[0].top : arguments[1] !== void 0 ? arguments[1] : 0
|
|
10215
10243
|
);
|
|
10216
10244
|
return;
|
|
10217
10245
|
}
|
|
10218
10246
|
smoothScroll.call(
|
|
10219
|
-
|
|
10247
|
+
w2,
|
|
10220
10248
|
d.body,
|
|
10221
|
-
~~arguments[0].left + (
|
|
10222
|
-
~~arguments[0].top + (
|
|
10249
|
+
~~arguments[0].left + (w2.scrollX || w2.pageXOffset),
|
|
10250
|
+
~~arguments[0].top + (w2.scrollY || w2.pageYOffset)
|
|
10223
10251
|
);
|
|
10224
10252
|
};
|
|
10225
10253
|
Element2.prototype.scroll = Element2.prototype.scrollTo = function() {
|
|
@@ -10284,15 +10312,15 @@ function polyfill(w = window, d = document) {
|
|
|
10284
10312
|
scrollableParent.scrollLeft + clientRects.left - parentRects.left,
|
|
10285
10313
|
scrollableParent.scrollTop + clientRects.top - parentRects.top
|
|
10286
10314
|
);
|
|
10287
|
-
if (
|
|
10288
|
-
|
|
10315
|
+
if (w2.getComputedStyle(scrollableParent).position !== "fixed") {
|
|
10316
|
+
w2.scrollBy({
|
|
10289
10317
|
left: parentRects.left,
|
|
10290
10318
|
top: parentRects.top,
|
|
10291
10319
|
behavior: "smooth"
|
|
10292
10320
|
});
|
|
10293
10321
|
}
|
|
10294
10322
|
} else {
|
|
10295
|
-
|
|
10323
|
+
w2.scrollBy({
|
|
10296
10324
|
left: clientRects.left,
|
|
10297
10325
|
top: clientRects.top,
|
|
10298
10326
|
behavior: "smooth"
|
|
@@ -10478,16 +10506,16 @@ function s(n2, o2) {
|
|
|
10478
10506
|
}(m), b = h.next(); !b.done; b = h.next()) {
|
|
10479
10507
|
var S = b.value;
|
|
10480
10508
|
if (void 0 === S) return c(p, g);
|
|
10481
|
-
var
|
|
10509
|
+
var w2 = "string" == typeof S ? { target: S } : S, j2 = w2.target, E = w2.actions, R = void 0 === E ? [] : E, N2 = w2.cond, O2 = void 0 === N2 ? function() {
|
|
10482
10510
|
return true;
|
|
10483
|
-
} :
|
|
10484
|
-
if (
|
|
10485
|
-
var
|
|
10511
|
+
} : N2, _2 = void 0 === j2, k2 = null != j2 ? j2 : p, T = n2.states[k2];
|
|
10512
|
+
if (O2(g, d)) {
|
|
10513
|
+
var q2 = t(f((_2 ? r(R) : [].concat(x2.exit, R, T.entry).filter(function(t2) {
|
|
10486
10514
|
return t2;
|
|
10487
10515
|
})).map(function(t2) {
|
|
10488
10516
|
return i$2(t2, y._options.actions);
|
|
10489
|
-
}), g, d), 3), z =
|
|
10490
|
-
return { value: C, context: A, actions: z, changed:
|
|
10517
|
+
}), g, d), 3), z = q2[0], A = q2[1], B2 = q2[2], C = null != j2 ? j2 : p;
|
|
10518
|
+
return { value: C, context: A, actions: z, changed: j2 !== p || z.length > 0 || B2, matches: a(C) };
|
|
10491
10519
|
}
|
|
10492
10520
|
}
|
|
10493
10521
|
} catch (t2) {
|