@temps-sdk/analytics-browser 0.0.6 → 0.0.8
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/README.md +2 -2
- package/dist/auto.js +1 -1
- package/dist/temps.js +678 -703
- package/dist/temps.min.js +47 -47
- package/package.json +2 -2
package/dist/temps.js
CHANGED
|
@@ -121,6 +121,9 @@
|
|
|
121
121
|
const separator = url.includes("?") ? "&" : "?";
|
|
122
122
|
return `${url}${separator}${INGEST_KEY_QUERY_PARAM}=${encodeURIComponent(ingestKey)}`;
|
|
123
123
|
}
|
|
124
|
+
function beaconBlob(payload, ingestKey) {
|
|
125
|
+
return new Blob([payload], { type: ingestKey ? "text/plain" : "application/json" });
|
|
126
|
+
}
|
|
124
127
|
async function sendAnalytics(endpoint, data, method = "POST", basePath, ingestKey) {
|
|
125
128
|
try {
|
|
126
129
|
await fetch(`${basePath}/${endpoint}`, {
|
|
@@ -138,11 +141,9 @@
|
|
|
138
141
|
const payload = JSON.stringify(enrich(data));
|
|
139
142
|
if (typeof navigator !== "undefined" && navigator.sendBeacon && typeof navigator.sendBeacon === "function") {
|
|
140
143
|
try {
|
|
141
|
-
|
|
142
|
-
if (navigator.sendBeacon(url, blob))
|
|
144
|
+
if (navigator.sendBeacon(url, beaconBlob(payload, ingestKey)))
|
|
143
145
|
return true;
|
|
144
|
-
} catch {
|
|
145
|
-
}
|
|
146
|
+
} catch {}
|
|
146
147
|
}
|
|
147
148
|
fetch(url, {
|
|
148
149
|
method: "POST",
|
|
@@ -378,70 +379,69 @@
|
|
|
378
379
|
var r;
|
|
379
380
|
var i;
|
|
380
381
|
var o = -1;
|
|
381
|
-
var a = function(
|
|
382
|
-
addEventListener("pageshow", function(
|
|
383
|
-
|
|
382
|
+
var a = function(e) {
|
|
383
|
+
addEventListener("pageshow", function(n) {
|
|
384
|
+
n.persisted && (o = n.timeStamp, e(n));
|
|
384
385
|
}, true);
|
|
385
386
|
};
|
|
386
387
|
var c = function() {
|
|
387
|
-
var
|
|
388
|
-
if (
|
|
389
|
-
return
|
|
388
|
+
var e = self.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0];
|
|
389
|
+
if (e && e.responseStart > 0 && e.responseStart < performance.now())
|
|
390
|
+
return e;
|
|
390
391
|
};
|
|
391
392
|
var u = function() {
|
|
392
|
-
var
|
|
393
|
-
return
|
|
393
|
+
var e = c();
|
|
394
|
+
return e && e.activationStart || 0;
|
|
394
395
|
};
|
|
395
|
-
var f = function(
|
|
396
|
-
var
|
|
397
|
-
o >= 0 ?
|
|
398
|
-
return { name:
|
|
396
|
+
var f = function(e, n) {
|
|
397
|
+
var t = c(), r = "navigate";
|
|
398
|
+
o >= 0 ? r = "back-forward-cache" : t && (document.prerendering || u() > 0 ? r = "prerender" : document.wasDiscarded ? r = "restore" : t.type && (r = t.type.replace(/_/g, "-")));
|
|
399
|
+
return { name: e, value: n === undefined ? -1 : n, rating: "good", delta: 0, entries: [], id: "v4-".concat(Date.now(), "-").concat(Math.floor(8999999999999 * Math.random()) + 1000000000000), navigationType: r };
|
|
399
400
|
};
|
|
400
|
-
var s = function(
|
|
401
|
+
var s = function(e, n, t) {
|
|
401
402
|
try {
|
|
402
|
-
if (PerformanceObserver.supportedEntryTypes.includes(
|
|
403
|
-
var
|
|
403
|
+
if (PerformanceObserver.supportedEntryTypes.includes(e)) {
|
|
404
|
+
var r = new PerformanceObserver(function(e) {
|
|
404
405
|
Promise.resolve().then(function() {
|
|
405
|
-
|
|
406
|
+
n(e.getEntries());
|
|
406
407
|
});
|
|
407
408
|
});
|
|
408
|
-
return
|
|
409
|
+
return r.observe(Object.assign({ type: e, buffered: true }, t || {})), r;
|
|
409
410
|
}
|
|
410
|
-
} catch (
|
|
411
|
-
}
|
|
411
|
+
} catch (e) {}
|
|
412
412
|
};
|
|
413
|
-
var d = function(
|
|
414
|
-
var
|
|
415
|
-
return function(
|
|
416
|
-
|
|
417
|
-
return
|
|
418
|
-
}(
|
|
413
|
+
var d = function(e, n, t, r) {
|
|
414
|
+
var i, o;
|
|
415
|
+
return function(a) {
|
|
416
|
+
n.value >= 0 && (a || r) && ((o = n.value - (i || 0)) || i === undefined) && (i = n.value, n.delta = o, n.rating = function(e, n) {
|
|
417
|
+
return e > n[1] ? "poor" : e > n[0] ? "needs-improvement" : "good";
|
|
418
|
+
}(n.value, t), e(n));
|
|
419
419
|
};
|
|
420
420
|
};
|
|
421
|
-
var l = function(
|
|
421
|
+
var l = function(e) {
|
|
422
422
|
requestAnimationFrame(function() {
|
|
423
423
|
return requestAnimationFrame(function() {
|
|
424
|
-
return
|
|
424
|
+
return e();
|
|
425
425
|
});
|
|
426
426
|
});
|
|
427
427
|
};
|
|
428
|
-
var p = function(
|
|
428
|
+
var p = function(e) {
|
|
429
429
|
document.addEventListener("visibilitychange", function() {
|
|
430
|
-
document.visibilityState === "hidden" &&
|
|
430
|
+
document.visibilityState === "hidden" && e();
|
|
431
431
|
});
|
|
432
432
|
};
|
|
433
|
-
var v = function(
|
|
434
|
-
var
|
|
433
|
+
var v = function(e) {
|
|
434
|
+
var n = false;
|
|
435
435
|
return function() {
|
|
436
|
-
|
|
436
|
+
n || (e(), n = true);
|
|
437
437
|
};
|
|
438
438
|
};
|
|
439
439
|
var m = -1;
|
|
440
440
|
var h = function() {
|
|
441
441
|
return document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0;
|
|
442
442
|
};
|
|
443
|
-
var g = function(
|
|
444
|
-
document.visibilityState === "hidden" && m > -1 && (m =
|
|
443
|
+
var g = function(e) {
|
|
444
|
+
document.visibilityState === "hidden" && m > -1 && (m = e.type === "visibilitychange" ? e.timeStamp : 0, T());
|
|
445
445
|
};
|
|
446
446
|
var y = function() {
|
|
447
447
|
addEventListener("visibilitychange", g, true), addEventListener("prerenderingchange", g, true);
|
|
@@ -458,52 +458,52 @@
|
|
|
458
458
|
return m;
|
|
459
459
|
} };
|
|
460
460
|
};
|
|
461
|
-
var C = function(
|
|
461
|
+
var C = function(e) {
|
|
462
462
|
document.prerendering ? addEventListener("prerenderingchange", function() {
|
|
463
|
-
return
|
|
464
|
-
}, true) :
|
|
463
|
+
return e();
|
|
464
|
+
}, true) : e();
|
|
465
465
|
};
|
|
466
466
|
var b = [1800, 3000];
|
|
467
|
-
var S = function(
|
|
468
|
-
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
|
|
467
|
+
var S = function(e, n) {
|
|
468
|
+
n = n || {}, C(function() {
|
|
469
|
+
var t, r = E(), i = f("FCP"), o = s("paint", function(e) {
|
|
470
|
+
e.forEach(function(e) {
|
|
471
|
+
e.name === "first-contentful-paint" && (o.disconnect(), e.startTime < r.firstHiddenTime && (i.value = Math.max(e.startTime - u(), 0), i.entries.push(e), t(true)));
|
|
472
472
|
});
|
|
473
473
|
});
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
474
|
+
o && (t = d(e, i, b, n.reportAllChanges), a(function(r) {
|
|
475
|
+
i = f("FCP"), t = d(e, i, b, n.reportAllChanges), l(function() {
|
|
476
|
+
i.value = performance.now() - r.timeStamp, t(true);
|
|
477
477
|
});
|
|
478
478
|
}));
|
|
479
479
|
});
|
|
480
480
|
};
|
|
481
481
|
var L = [0.1, 0.25];
|
|
482
|
-
var w = function(
|
|
483
|
-
|
|
484
|
-
var
|
|
485
|
-
|
|
486
|
-
if (!
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
}
|
|
490
|
-
}),
|
|
491
|
-
},
|
|
492
|
-
|
|
493
|
-
|
|
482
|
+
var w = function(e, n) {
|
|
483
|
+
n = n || {}, S(v(function() {
|
|
484
|
+
var t, r = f("CLS", 0), i = 0, o = [], c = function(e) {
|
|
485
|
+
e.forEach(function(e) {
|
|
486
|
+
if (!e.hadRecentInput) {
|
|
487
|
+
var n = o[0], t = o[o.length - 1];
|
|
488
|
+
i && e.startTime - t.startTime < 1000 && e.startTime - n.startTime < 5000 ? (i += e.value, o.push(e)) : (i = e.value, o = [e]);
|
|
489
|
+
}
|
|
490
|
+
}), i > r.value && (r.value = i, r.entries = o, t());
|
|
491
|
+
}, u = s("layout-shift", c);
|
|
492
|
+
u && (t = d(e, r, L, n.reportAllChanges), p(function() {
|
|
493
|
+
c(u.takeRecords()), t(true);
|
|
494
494
|
}), a(function() {
|
|
495
|
-
|
|
496
|
-
return
|
|
495
|
+
i = 0, r = f("CLS", 0), t = d(e, r, L, n.reportAllChanges), l(function() {
|
|
496
|
+
return t();
|
|
497
497
|
});
|
|
498
|
-
}), setTimeout(
|
|
498
|
+
}), setTimeout(t, 0));
|
|
499
499
|
}));
|
|
500
500
|
};
|
|
501
501
|
var A = 0;
|
|
502
502
|
var I = 1 / 0;
|
|
503
503
|
var P = 0;
|
|
504
|
-
var M = function(
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
var M = function(e) {
|
|
505
|
+
e.forEach(function(e) {
|
|
506
|
+
e.interactionId && (I = Math.min(I, e.interactionId), P = Math.max(P, e.interactionId), A = P ? (P - I) / 7 + 1 : 0);
|
|
507
507
|
});
|
|
508
508
|
};
|
|
509
509
|
var k = function() {
|
|
@@ -516,143 +516,143 @@
|
|
|
516
516
|
var x = new Map;
|
|
517
517
|
var R = 0;
|
|
518
518
|
var B = function() {
|
|
519
|
-
var
|
|
520
|
-
return D[
|
|
519
|
+
var e = Math.min(D.length - 1, Math.floor((k() - R) / 50));
|
|
520
|
+
return D[e];
|
|
521
521
|
};
|
|
522
522
|
var H = [];
|
|
523
|
-
var q = function(
|
|
524
|
-
if (H.forEach(function(
|
|
525
|
-
return
|
|
526
|
-
}),
|
|
527
|
-
var
|
|
528
|
-
if (
|
|
529
|
-
if (
|
|
530
|
-
|
|
523
|
+
var q = function(e) {
|
|
524
|
+
if (H.forEach(function(n) {
|
|
525
|
+
return n(e);
|
|
526
|
+
}), e.interactionId || e.entryType === "first-input") {
|
|
527
|
+
var n = D[D.length - 1], t = x.get(e.interactionId);
|
|
528
|
+
if (t || D.length < 10 || e.duration > n.latency) {
|
|
529
|
+
if (t)
|
|
530
|
+
e.duration > t.latency ? (t.entries = [e], t.latency = e.duration) : e.duration === t.latency && e.startTime === t.entries[0].startTime && t.entries.push(e);
|
|
531
531
|
else {
|
|
532
|
-
var
|
|
533
|
-
x.set(
|
|
532
|
+
var r = { id: e.interactionId, latency: e.duration, entries: [e] };
|
|
533
|
+
x.set(r.id, r), D.push(r);
|
|
534
534
|
}
|
|
535
|
-
D.sort(function(
|
|
536
|
-
return
|
|
537
|
-
}), D.length > 10 && D.splice(10).forEach(function(
|
|
538
|
-
return x.delete(
|
|
535
|
+
D.sort(function(e, n) {
|
|
536
|
+
return n.latency - e.latency;
|
|
537
|
+
}), D.length > 10 && D.splice(10).forEach(function(e) {
|
|
538
|
+
return x.delete(e.id);
|
|
539
539
|
});
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var O = function(
|
|
544
|
-
var
|
|
545
|
-
return
|
|
543
|
+
var O = function(e) {
|
|
544
|
+
var n = self.requestIdleCallback || self.setTimeout, t = -1;
|
|
545
|
+
return e = v(e), document.visibilityState === "hidden" ? e() : (t = n(e), p(e)), t;
|
|
546
546
|
};
|
|
547
547
|
var N = [200, 500];
|
|
548
|
-
var j = function(
|
|
549
|
-
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (
|
|
550
|
-
var
|
|
548
|
+
var j = function(e, n) {
|
|
549
|
+
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (n = n || {}, C(function() {
|
|
550
|
+
var t;
|
|
551
551
|
F();
|
|
552
|
-
var
|
|
552
|
+
var r, i = f("INP"), o = function(e) {
|
|
553
553
|
O(function() {
|
|
554
|
-
|
|
555
|
-
var
|
|
556
|
-
|
|
554
|
+
e.forEach(q);
|
|
555
|
+
var n = B();
|
|
556
|
+
n && n.latency !== i.value && (i.value = n.latency, i.entries = n.entries, r());
|
|
557
557
|
});
|
|
558
|
-
},
|
|
559
|
-
|
|
560
|
-
|
|
558
|
+
}, c = s("event", o, { durationThreshold: (t = n.durationThreshold) !== null && t !== undefined ? t : 40 });
|
|
559
|
+
r = d(e, i, N, n.reportAllChanges), c && (c.observe({ type: "first-input", buffered: true }), p(function() {
|
|
560
|
+
o(c.takeRecords()), r(true);
|
|
561
561
|
}), a(function() {
|
|
562
|
-
R = k(), D.length = 0, x.clear(),
|
|
562
|
+
R = k(), D.length = 0, x.clear(), i = f("INP"), r = d(e, i, N, n.reportAllChanges);
|
|
563
563
|
}));
|
|
564
564
|
}));
|
|
565
565
|
};
|
|
566
566
|
var _ = [2500, 4000];
|
|
567
567
|
var z = {};
|
|
568
|
-
var G = function(
|
|
569
|
-
|
|
570
|
-
var
|
|
571
|
-
|
|
572
|
-
|
|
568
|
+
var G = function(e, n) {
|
|
569
|
+
n = n || {}, C(function() {
|
|
570
|
+
var t, r = E(), i = f("LCP"), o = function(e) {
|
|
571
|
+
n.reportAllChanges || (e = e.slice(-1)), e.forEach(function(e) {
|
|
572
|
+
e.startTime < r.firstHiddenTime && (i.value = Math.max(e.startTime - u(), 0), i.entries = [e], t());
|
|
573
573
|
});
|
|
574
|
-
},
|
|
575
|
-
if (
|
|
576
|
-
|
|
577
|
-
var
|
|
578
|
-
z[
|
|
574
|
+
}, c = s("largest-contentful-paint", o);
|
|
575
|
+
if (c) {
|
|
576
|
+
t = d(e, i, _, n.reportAllChanges);
|
|
577
|
+
var m = v(function() {
|
|
578
|
+
z[i.id] || (o(c.takeRecords()), c.disconnect(), z[i.id] = true, t(true));
|
|
579
579
|
});
|
|
580
|
-
["keydown", "click"].forEach(function(
|
|
581
|
-
addEventListener(
|
|
582
|
-
return O(
|
|
580
|
+
["keydown", "click"].forEach(function(e) {
|
|
581
|
+
addEventListener(e, function() {
|
|
582
|
+
return O(m);
|
|
583
583
|
}, { once: true, capture: true });
|
|
584
|
-
}), p(
|
|
585
|
-
|
|
586
|
-
|
|
584
|
+
}), p(m), a(function(r) {
|
|
585
|
+
i = f("LCP"), t = d(e, i, _, n.reportAllChanges), l(function() {
|
|
586
|
+
i.value = performance.now() - r.timeStamp, z[i.id] = true, t(true);
|
|
587
587
|
});
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
};
|
|
592
592
|
var J = [800, 1800];
|
|
593
|
-
var K = function
|
|
593
|
+
var K = function e(n) {
|
|
594
594
|
document.prerendering ? C(function() {
|
|
595
|
-
return
|
|
595
|
+
return e(n);
|
|
596
596
|
}) : document.readyState !== "complete" ? addEventListener("load", function() {
|
|
597
|
-
return
|
|
598
|
-
}, true) : setTimeout(
|
|
597
|
+
return e(n);
|
|
598
|
+
}, true) : setTimeout(n, 0);
|
|
599
599
|
};
|
|
600
|
-
var Q = function(
|
|
601
|
-
|
|
602
|
-
var
|
|
600
|
+
var Q = function(e, n) {
|
|
601
|
+
n = n || {};
|
|
602
|
+
var t = f("TTFB"), r = d(e, t, J, n.reportAllChanges);
|
|
603
603
|
K(function() {
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
|
|
604
|
+
var i = c();
|
|
605
|
+
i && (t.value = Math.max(i.responseStart - u(), 0), t.entries = [i], r(true), a(function() {
|
|
606
|
+
t = f("TTFB", 0), (r = d(e, t, J, n.reportAllChanges))(true);
|
|
607
607
|
}));
|
|
608
608
|
});
|
|
609
609
|
};
|
|
610
610
|
var U = { passive: true, capture: true };
|
|
611
611
|
var V = new Date;
|
|
612
|
-
var W = function(
|
|
613
|
-
n || (n =
|
|
612
|
+
var W = function(e, i) {
|
|
613
|
+
n || (n = i, t = e, r = new Date, Z(removeEventListener), X());
|
|
614
614
|
};
|
|
615
615
|
var X = function() {
|
|
616
616
|
if (t >= 0 && t < r - V) {
|
|
617
|
-
var
|
|
618
|
-
i.forEach(function(
|
|
619
|
-
|
|
617
|
+
var e = { entryType: "first-input", name: n.type, target: n.target, cancelable: n.cancelable, startTime: n.timeStamp, processingStart: n.timeStamp + t };
|
|
618
|
+
i.forEach(function(n) {
|
|
619
|
+
n(e);
|
|
620
620
|
}), i = [];
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
|
-
var Y = function(
|
|
624
|
-
if (
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
var
|
|
628
|
-
W(
|
|
629
|
-
},
|
|
630
|
-
|
|
631
|
-
},
|
|
632
|
-
removeEventListener("pointerup",
|
|
623
|
+
var Y = function(e) {
|
|
624
|
+
if (e.cancelable) {
|
|
625
|
+
var n = (e.timeStamp > 1000000000000 ? new Date : performance.now()) - e.timeStamp;
|
|
626
|
+
e.type == "pointerdown" ? function(e, n) {
|
|
627
|
+
var t = function() {
|
|
628
|
+
W(e, n), i();
|
|
629
|
+
}, r = function() {
|
|
630
|
+
i();
|
|
631
|
+
}, i = function() {
|
|
632
|
+
removeEventListener("pointerup", t, U), removeEventListener("pointercancel", r, U);
|
|
633
633
|
};
|
|
634
|
-
addEventListener("pointerup",
|
|
635
|
-
}(
|
|
634
|
+
addEventListener("pointerup", t, U), addEventListener("pointercancel", r, U);
|
|
635
|
+
}(n, e) : W(n, e);
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
|
-
var Z = function(
|
|
639
|
-
["mousedown", "keydown", "touchstart", "pointerdown"].forEach(function(
|
|
640
|
-
return
|
|
638
|
+
var Z = function(e) {
|
|
639
|
+
["mousedown", "keydown", "touchstart", "pointerdown"].forEach(function(n) {
|
|
640
|
+
return e(n, Y, U);
|
|
641
641
|
});
|
|
642
642
|
};
|
|
643
643
|
var $ = [100, 300];
|
|
644
|
-
var ee = function(
|
|
645
|
-
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
},
|
|
649
|
-
|
|
650
|
-
},
|
|
651
|
-
|
|
652
|
-
|
|
644
|
+
var ee = function(e, r) {
|
|
645
|
+
r = r || {}, C(function() {
|
|
646
|
+
var o, c = E(), u = f("FID"), l = function(e) {
|
|
647
|
+
e.startTime < c.firstHiddenTime && (u.value = e.processingStart - e.startTime, u.entries.push(e), o(true));
|
|
648
|
+
}, m = function(e) {
|
|
649
|
+
e.forEach(l);
|
|
650
|
+
}, h = s("first-input", m);
|
|
651
|
+
o = d(e, u, $, r.reportAllChanges), h && (p(v(function() {
|
|
652
|
+
m(h.takeRecords()), h.disconnect();
|
|
653
653
|
})), a(function() {
|
|
654
|
-
var
|
|
655
|
-
|
|
654
|
+
var a;
|
|
655
|
+
u = f("FID"), o = d(e, u, $, r.reportAllChanges), i = [], t = -1, n = null, Z(addEventListener), a = l, i.push(a), X();
|
|
656
656
|
}));
|
|
657
657
|
});
|
|
658
658
|
};
|
|
@@ -682,12 +682,12 @@
|
|
|
682
682
|
this.start();
|
|
683
683
|
}
|
|
684
684
|
start() {
|
|
685
|
-
Q((
|
|
686
|
-
S((
|
|
687
|
-
G((
|
|
688
|
-
ee((
|
|
689
|
-
w((
|
|
690
|
-
j((
|
|
685
|
+
Q((m) => this.recordLoad("ttfb", m.value));
|
|
686
|
+
S((m) => this.recordLoad("fcp", m.value));
|
|
687
|
+
G((m) => this.recordLoad("lcp", m.value));
|
|
688
|
+
ee((m) => this.recordFid(m.value));
|
|
689
|
+
w((m) => this.sendLate("cls", m.value));
|
|
690
|
+
j((m) => this.sendLate("inp", m.value));
|
|
691
691
|
document.addEventListener("visibilitychange", this.handleVisibilityChange, true);
|
|
692
692
|
window.addEventListener("pagehide", this.handlePageHide, true);
|
|
693
693
|
}
|
|
@@ -1076,10 +1076,10 @@
|
|
|
1076
1076
|
return true;
|
|
1077
1077
|
const chunkSize = 50;
|
|
1078
1078
|
for (let x2 = 0;x2 < canvas.width; x2 += chunkSize) {
|
|
1079
|
-
for (let
|
|
1079
|
+
for (let y = 0;y < canvas.height; y += chunkSize) {
|
|
1080
1080
|
const getImageData = ctx.getImageData;
|
|
1081
1081
|
const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData ? getImageData[ORIGINAL_ATTRIBUTE_NAME] : getImageData;
|
|
1082
|
-
const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2,
|
|
1082
|
+
const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x2, y, Math.min(chunkSize, canvas.width - x2), Math.min(chunkSize, canvas.height - y)).data.buffer);
|
|
1083
1083
|
if (pixelBuffer.some((pixel) => pixel !== 0))
|
|
1084
1084
|
return false;
|
|
1085
1085
|
}
|
|
@@ -1157,14 +1157,14 @@
|
|
|
1157
1157
|
for (let i2 = 1;i2 < childNodes2.length; i2++) {
|
|
1158
1158
|
if (childNodes2[i2].textContent && typeof childNodes2[i2].textContent === "string") {
|
|
1159
1159
|
const textContentNorm = normalizeCssString(childNodes2[i2].textContent);
|
|
1160
|
-
for (let
|
|
1161
|
-
const bit = textContentNorm.substring(0,
|
|
1160
|
+
for (let j = 3;j < textContentNorm.length; j++) {
|
|
1161
|
+
const bit = textContentNorm.substring(0, j);
|
|
1162
1162
|
if (cssTextNorm.split(bit).length === 2) {
|
|
1163
1163
|
const splitNorm = cssTextNorm.indexOf(bit);
|
|
1164
|
-
for (let
|
|
1165
|
-
if (normalizeCssString(cssText.substring(0,
|
|
1166
|
-
splits.push(cssText.substring(0,
|
|
1167
|
-
cssText = cssText.substring(
|
|
1164
|
+
for (let k = splitNorm;k < cssText.length; k++) {
|
|
1165
|
+
if (normalizeCssString(cssText.substring(0, k)).length === splitNorm) {
|
|
1166
|
+
splits.push(cssText.substring(0, k));
|
|
1167
|
+
cssText = cssText.substring(k);
|
|
1168
1168
|
break;
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
@@ -1317,8 +1317,7 @@
|
|
|
1317
1317
|
if (blockSelector) {
|
|
1318
1318
|
return element.matches(blockSelector);
|
|
1319
1319
|
}
|
|
1320
|
-
} catch (
|
|
1321
|
-
}
|
|
1320
|
+
} catch (e2) {}
|
|
1322
1321
|
return false;
|
|
1323
1322
|
}
|
|
1324
1323
|
function classMatchesRegex(node2, regex, checkAncestors) {
|
|
@@ -1373,8 +1372,7 @@
|
|
|
1373
1372
|
return true;
|
|
1374
1373
|
}
|
|
1375
1374
|
}
|
|
1376
|
-
} catch (
|
|
1377
|
-
}
|
|
1375
|
+
} catch (e2) {}
|
|
1378
1376
|
return false;
|
|
1379
1377
|
}
|
|
1380
1378
|
function onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {
|
|
@@ -1703,8 +1701,7 @@
|
|
|
1703
1701
|
try {
|
|
1704
1702
|
if (customElements.get(tagName))
|
|
1705
1703
|
isCustomElement = true;
|
|
1706
|
-
} catch (
|
|
1707
|
-
}
|
|
1704
|
+
} catch (e2) {}
|
|
1708
1705
|
return {
|
|
1709
1706
|
type: NodeType$3.Element,
|
|
1710
1707
|
tagName,
|
|
@@ -2056,12 +2053,12 @@
|
|
|
2056
2053
|
} else
|
|
2057
2054
|
a2 = {};
|
|
2058
2055
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
2059
|
-
Object.keys(n2).forEach(function(
|
|
2060
|
-
var
|
|
2061
|
-
Object.defineProperty(a2,
|
|
2056
|
+
Object.keys(n2).forEach(function(k) {
|
|
2057
|
+
var d = Object.getOwnPropertyDescriptor(n2, k);
|
|
2058
|
+
Object.defineProperty(a2, k, d.get ? d : {
|
|
2062
2059
|
enumerable: true,
|
|
2063
2060
|
get: function() {
|
|
2064
|
-
return n2[
|
|
2061
|
+
return n2[k];
|
|
2065
2062
|
}
|
|
2066
2063
|
});
|
|
2067
2064
|
});
|
|
@@ -2443,8 +2440,8 @@
|
|
|
2443
2440
|
return root2.raws.indent;
|
|
2444
2441
|
let value;
|
|
2445
2442
|
root2.walk((i2) => {
|
|
2446
|
-
let
|
|
2447
|
-
if (
|
|
2443
|
+
let p = i2.parent;
|
|
2444
|
+
if (p && p !== root2 && p.parent && p.parent === root2) {
|
|
2448
2445
|
if (typeof i2.raws.before !== "undefined") {
|
|
2449
2446
|
let parts = i2.raws.before.split(`
|
|
2450
2447
|
`);
|
|
@@ -2522,7 +2519,7 @@
|
|
|
2522
2519
|
} else if (i2 === "source") {
|
|
2523
2520
|
cloned[i2] = value;
|
|
2524
2521
|
} else if (Array.isArray(value)) {
|
|
2525
|
-
cloned[i2] = value.map((
|
|
2522
|
+
cloned[i2] = value.map((j) => cloneNode$1(j, cloned));
|
|
2526
2523
|
} else {
|
|
2527
2524
|
if (type === "object" && value !== null)
|
|
2528
2525
|
value = cloneNode$1(value);
|
|
@@ -2755,7 +2752,7 @@
|
|
|
2755
2752
|
}
|
|
2756
2753
|
return result2;
|
|
2757
2754
|
}
|
|
2758
|
-
toJSON(
|
|
2755
|
+
toJSON(_, inputs) {
|
|
2759
2756
|
let fixed = {};
|
|
2760
2757
|
let emitInputs = inputs == null;
|
|
2761
2758
|
inputs = inputs || /* @__PURE__ */ new Map;
|
|
@@ -3322,9 +3319,9 @@
|
|
|
3322
3319
|
column += str.length;
|
|
3323
3320
|
}
|
|
3324
3321
|
if (node2 && type !== "start") {
|
|
3325
|
-
let
|
|
3322
|
+
let p = node2.parent || { raws: {} };
|
|
3326
3323
|
let childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes;
|
|
3327
|
-
if (!childless || node2 !==
|
|
3324
|
+
if (!childless || node2 !== p.last || p.raws.semicolon) {
|
|
3328
3325
|
if (node2.source && node2.source.end) {
|
|
3329
3326
|
mapping.source = this.sourcePath(node2);
|
|
3330
3327
|
mapping.original.line = node2.source.end.line;
|
|
@@ -3765,8 +3762,8 @@
|
|
|
3765
3762
|
let result2;
|
|
3766
3763
|
try {
|
|
3767
3764
|
result2 = callback(child, i2);
|
|
3768
|
-
} catch (
|
|
3769
|
-
throw child.addToError(
|
|
3765
|
+
} catch (e2) {
|
|
3766
|
+
throw child.addToError(e2);
|
|
3770
3767
|
}
|
|
3771
3768
|
if (result2 !== false && child.walk) {
|
|
3772
3769
|
result2 = child.walk(callback);
|
|
@@ -4450,8 +4447,8 @@
|
|
|
4450
4447
|
return;
|
|
4451
4448
|
let founded = 0;
|
|
4452
4449
|
let token;
|
|
4453
|
-
for (let
|
|
4454
|
-
token = tokens[
|
|
4450
|
+
for (let j = colon - 1;j >= 0; j--) {
|
|
4451
|
+
token = tokens[j];
|
|
4455
4452
|
if (token[0] !== "space") {
|
|
4456
4453
|
founded += 1;
|
|
4457
4454
|
if (founded === 2)
|
|
@@ -4568,8 +4565,8 @@
|
|
|
4568
4565
|
} else if (token[1].toLowerCase() === "important") {
|
|
4569
4566
|
let cache = tokens.slice(0);
|
|
4570
4567
|
let str = "";
|
|
4571
|
-
for (let
|
|
4572
|
-
let type = cache[
|
|
4568
|
+
for (let j = i2;j > 0; j--) {
|
|
4569
|
+
let type = cache[j][0];
|
|
4573
4570
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
4574
4571
|
break;
|
|
4575
4572
|
}
|
|
@@ -4751,8 +4748,7 @@
|
|
|
4751
4748
|
}
|
|
4752
4749
|
this.endFile();
|
|
4753
4750
|
}
|
|
4754
|
-
precheckMissedSemicolon() {
|
|
4755
|
-
}
|
|
4751
|
+
precheckMissedSemicolon() {}
|
|
4756
4752
|
raw(node2, prop, tokens, customProperty) {
|
|
4757
4753
|
let token, type;
|
|
4758
4754
|
let length = tokens.length;
|
|
@@ -4861,22 +4857,22 @@
|
|
|
4861
4857
|
let parser2 = new Parser2$1(input2);
|
|
4862
4858
|
try {
|
|
4863
4859
|
parser2.parse();
|
|
4864
|
-
} catch (
|
|
4860
|
+
} catch (e2) {
|
|
4865
4861
|
if (true) {
|
|
4866
|
-
if (
|
|
4862
|
+
if (e2.name === "CssSyntaxError" && opts && opts.from) {
|
|
4867
4863
|
if (/\.scss$/i.test(opts.from)) {
|
|
4868
|
-
|
|
4864
|
+
e2.message += `
|
|
4869
4865
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;
|
|
4870
4866
|
} else if (/\.sass/i.test(opts.from)) {
|
|
4871
|
-
|
|
4867
|
+
e2.message += `
|
|
4872
4868
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;
|
|
4873
4869
|
} else if (/\.less$/i.test(opts.from)) {
|
|
4874
|
-
|
|
4870
|
+
e2.message += `
|
|
4875
4871
|
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`;
|
|
4876
4872
|
}
|
|
4877
4873
|
}
|
|
4878
4874
|
}
|
|
4879
|
-
throw
|
|
4875
|
+
throw e2;
|
|
4880
4876
|
}
|
|
4881
4877
|
return parser2.root;
|
|
4882
4878
|
}
|
|
@@ -5054,8 +5050,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
5054
5050
|
let pluginVer = plugin22.postcssVersion;
|
|
5055
5051
|
let runtimeVer = this.result.processor.version;
|
|
5056
5052
|
let a2 = pluginVer.split(".");
|
|
5057
|
-
let
|
|
5058
|
-
if (a2[0] !==
|
|
5053
|
+
let b = runtimeVer.split(".");
|
|
5054
|
+
if (a2[0] !== b[0] || parseInt(a2[1]) > parseInt(b[1])) {
|
|
5059
5055
|
console.error("Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below.");
|
|
5060
5056
|
}
|
|
5061
5057
|
}
|
|
@@ -5121,9 +5117,9 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
5121
5117
|
if (isPromise$1(promise)) {
|
|
5122
5118
|
try {
|
|
5123
5119
|
await promise;
|
|
5124
|
-
} catch (
|
|
5120
|
+
} catch (e2) {
|
|
5125
5121
|
let node2 = stack[stack.length - 1].node;
|
|
5126
|
-
throw this.handleError(
|
|
5122
|
+
throw this.handleError(e2, node2);
|
|
5127
5123
|
}
|
|
5128
5124
|
}
|
|
5129
5125
|
}
|
|
@@ -5138,8 +5134,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
5138
5134
|
} else {
|
|
5139
5135
|
await visitor(root2, this.helpers);
|
|
5140
5136
|
}
|
|
5141
|
-
} catch (
|
|
5142
|
-
throw this.handleError(
|
|
5137
|
+
} catch (e2) {
|
|
5138
|
+
throw this.handleError(e2);
|
|
5143
5139
|
}
|
|
5144
5140
|
}
|
|
5145
5141
|
}
|
|
@@ -5238,8 +5234,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
5238
5234
|
let promise;
|
|
5239
5235
|
try {
|
|
5240
5236
|
promise = visitor(node2, this.helpers);
|
|
5241
|
-
} catch (
|
|
5242
|
-
throw this.handleError(
|
|
5237
|
+
} catch (e2) {
|
|
5238
|
+
throw this.handleError(e2, node2.proxyOf);
|
|
5243
5239
|
}
|
|
5244
5240
|
if (node2.type !== "root" && node2.type !== "document" && !node2.parent) {
|
|
5245
5241
|
return true;
|
|
@@ -5266,8 +5262,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
5266
5262
|
this.result.lastPlugin = plugin22;
|
|
5267
5263
|
try {
|
|
5268
5264
|
return visitor(node2.toProxy(), this.helpers);
|
|
5269
|
-
} catch (
|
|
5270
|
-
throw this.handleError(
|
|
5265
|
+
} catch (e2) {
|
|
5266
|
+
throw this.handleError(e2, node2);
|
|
5271
5267
|
}
|
|
5272
5268
|
}
|
|
5273
5269
|
if (visit2.iterator !== 0) {
|
|
@@ -5690,12 +5686,12 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
5690
5686
|
} else
|
|
5691
5687
|
a2 = {};
|
|
5692
5688
|
Object.defineProperty(a2, "__esModule", { value: true });
|
|
5693
|
-
Object.keys(n2).forEach(function(
|
|
5694
|
-
var
|
|
5695
|
-
Object.defineProperty(a2,
|
|
5689
|
+
Object.keys(n2).forEach(function(k) {
|
|
5690
|
+
var d = Object.getOwnPropertyDescriptor(n2, k);
|
|
5691
|
+
Object.defineProperty(a2, k, d.get ? d : {
|
|
5696
5692
|
enumerable: true,
|
|
5697
5693
|
get: function() {
|
|
5698
|
-
return n2[
|
|
5694
|
+
return n2[k];
|
|
5699
5695
|
}
|
|
5700
5696
|
});
|
|
5701
5697
|
});
|
|
@@ -6077,8 +6073,8 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
6077
6073
|
return root2.raws.indent;
|
|
6078
6074
|
let value;
|
|
6079
6075
|
root2.walk((i2) => {
|
|
6080
|
-
let
|
|
6081
|
-
if (
|
|
6076
|
+
let p = i2.parent;
|
|
6077
|
+
if (p && p !== root2 && p.parent && p.parent === root2) {
|
|
6082
6078
|
if (typeof i2.raws.before !== "undefined") {
|
|
6083
6079
|
let parts = i2.raws.before.split(`
|
|
6084
6080
|
`);
|
|
@@ -6156,7 +6152,7 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
6156
6152
|
} else if (i2 === "source") {
|
|
6157
6153
|
cloned[i2] = value;
|
|
6158
6154
|
} else if (Array.isArray(value)) {
|
|
6159
|
-
cloned[i2] = value.map((
|
|
6155
|
+
cloned[i2] = value.map((j) => cloneNode(j, cloned));
|
|
6160
6156
|
} else {
|
|
6161
6157
|
if (type === "object" && value !== null)
|
|
6162
6158
|
value = cloneNode(value);
|
|
@@ -6389,7 +6385,7 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
6389
6385
|
}
|
|
6390
6386
|
return result2;
|
|
6391
6387
|
}
|
|
6392
|
-
toJSON(
|
|
6388
|
+
toJSON(_, inputs) {
|
|
6393
6389
|
let fixed = {};
|
|
6394
6390
|
let emitInputs = inputs == null;
|
|
6395
6391
|
inputs = inputs || /* @__PURE__ */ new Map;
|
|
@@ -6956,9 +6952,9 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
6956
6952
|
column += str.length;
|
|
6957
6953
|
}
|
|
6958
6954
|
if (node2 && type !== "start") {
|
|
6959
|
-
let
|
|
6955
|
+
let p = node2.parent || { raws: {} };
|
|
6960
6956
|
let childless = node2.type === "decl" || node2.type === "atrule" && !node2.nodes;
|
|
6961
|
-
if (!childless || node2 !==
|
|
6957
|
+
if (!childless || node2 !== p.last || p.raws.semicolon) {
|
|
6962
6958
|
if (node2.source && node2.source.end) {
|
|
6963
6959
|
mapping.source = this.sourcePath(node2);
|
|
6964
6960
|
mapping.original.line = node2.source.end.line;
|
|
@@ -7399,8 +7395,8 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
7399
7395
|
let result2;
|
|
7400
7396
|
try {
|
|
7401
7397
|
result2 = callback(child, i2);
|
|
7402
|
-
} catch (
|
|
7403
|
-
throw child.addToError(
|
|
7398
|
+
} catch (e2) {
|
|
7399
|
+
throw child.addToError(e2);
|
|
7404
7400
|
}
|
|
7405
7401
|
if (result2 !== false && child.walk) {
|
|
7406
7402
|
result2 = child.walk(callback);
|
|
@@ -8084,8 +8080,8 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
8084
8080
|
return;
|
|
8085
8081
|
let founded = 0;
|
|
8086
8082
|
let token;
|
|
8087
|
-
for (let
|
|
8088
|
-
token = tokens[
|
|
8083
|
+
for (let j = colon - 1;j >= 0; j--) {
|
|
8084
|
+
token = tokens[j];
|
|
8089
8085
|
if (token[0] !== "space") {
|
|
8090
8086
|
founded += 1;
|
|
8091
8087
|
if (founded === 2)
|
|
@@ -8202,8 +8198,8 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
8202
8198
|
} else if (token[1].toLowerCase() === "important") {
|
|
8203
8199
|
let cache = tokens.slice(0);
|
|
8204
8200
|
let str = "";
|
|
8205
|
-
for (let
|
|
8206
|
-
let type = cache[
|
|
8201
|
+
for (let j = i2;j > 0; j--) {
|
|
8202
|
+
let type = cache[j][0];
|
|
8207
8203
|
if (str.trim().indexOf("!") === 0 && type !== "space") {
|
|
8208
8204
|
break;
|
|
8209
8205
|
}
|
|
@@ -8385,8 +8381,7 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
8385
8381
|
}
|
|
8386
8382
|
this.endFile();
|
|
8387
8383
|
}
|
|
8388
|
-
precheckMissedSemicolon() {
|
|
8389
|
-
}
|
|
8384
|
+
precheckMissedSemicolon() {}
|
|
8390
8385
|
raw(node2, prop, tokens, customProperty) {
|
|
8391
8386
|
let token, type;
|
|
8392
8387
|
let length = tokens.length;
|
|
@@ -8495,22 +8490,22 @@ https://www.w3ctech.com/topic/2226`);
|
|
|
8495
8490
|
let parser2 = new Parser22(input2);
|
|
8496
8491
|
try {
|
|
8497
8492
|
parser2.parse();
|
|
8498
|
-
} catch (
|
|
8493
|
+
} catch (e2) {
|
|
8499
8494
|
if (true) {
|
|
8500
|
-
if (
|
|
8495
|
+
if (e2.name === "CssSyntaxError" && opts && opts.from) {
|
|
8501
8496
|
if (/\.scss$/i.test(opts.from)) {
|
|
8502
|
-
|
|
8497
|
+
e2.message += `
|
|
8503
8498
|
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`;
|
|
8504
8499
|
} else if (/\.sass/i.test(opts.from)) {
|
|
8505
|
-
|
|
8500
|
+
e2.message += `
|
|
8506
8501
|
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`;
|
|
8507
8502
|
} else if (/\.less$/i.test(opts.from)) {
|
|
8508
|
-
|
|
8503
|
+
e2.message += `
|
|
8509
8504
|
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`;
|
|
8510
8505
|
}
|
|
8511
8506
|
}
|
|
8512
8507
|
}
|
|
8513
|
-
throw
|
|
8508
|
+
throw e2;
|
|
8514
8509
|
}
|
|
8515
8510
|
return parser2.root;
|
|
8516
8511
|
}
|
|
@@ -8688,8 +8683,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
8688
8683
|
let pluginVer = plugin22.postcssVersion;
|
|
8689
8684
|
let runtimeVer = this.result.processor.version;
|
|
8690
8685
|
let a2 = pluginVer.split(".");
|
|
8691
|
-
let
|
|
8692
|
-
if (a2[0] !==
|
|
8686
|
+
let b = runtimeVer.split(".");
|
|
8687
|
+
if (a2[0] !== b[0] || parseInt(a2[1]) > parseInt(b[1])) {
|
|
8693
8688
|
console.error("Unknown error from PostCSS plugin. Your current PostCSS version is " + runtimeVer + ", but " + pluginName + " uses " + pluginVer + ". Perhaps this is the source of the error below.");
|
|
8694
8689
|
}
|
|
8695
8690
|
}
|
|
@@ -8755,9 +8750,9 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
8755
8750
|
if (isPromise(promise)) {
|
|
8756
8751
|
try {
|
|
8757
8752
|
await promise;
|
|
8758
|
-
} catch (
|
|
8753
|
+
} catch (e2) {
|
|
8759
8754
|
let node2 = stack[stack.length - 1].node;
|
|
8760
|
-
throw this.handleError(
|
|
8755
|
+
throw this.handleError(e2, node2);
|
|
8761
8756
|
}
|
|
8762
8757
|
}
|
|
8763
8758
|
}
|
|
@@ -8772,8 +8767,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
8772
8767
|
} else {
|
|
8773
8768
|
await visitor(root2, this.helpers);
|
|
8774
8769
|
}
|
|
8775
|
-
} catch (
|
|
8776
|
-
throw this.handleError(
|
|
8770
|
+
} catch (e2) {
|
|
8771
|
+
throw this.handleError(e2);
|
|
8777
8772
|
}
|
|
8778
8773
|
}
|
|
8779
8774
|
}
|
|
@@ -8872,8 +8867,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
8872
8867
|
let promise;
|
|
8873
8868
|
try {
|
|
8874
8869
|
promise = visitor(node2, this.helpers);
|
|
8875
|
-
} catch (
|
|
8876
|
-
throw this.handleError(
|
|
8870
|
+
} catch (e2) {
|
|
8871
|
+
throw this.handleError(e2, node2.proxyOf);
|
|
8877
8872
|
}
|
|
8878
8873
|
if (node2.type !== "root" && node2.type !== "document" && !node2.parent) {
|
|
8879
8874
|
return true;
|
|
@@ -8900,8 +8895,8 @@ You tried to parse Less with the standard CSS parser; try again with the postcss
|
|
|
8900
8895
|
this.result.lastPlugin = plugin22;
|
|
8901
8896
|
try {
|
|
8902
8897
|
return visitor(node2.toProxy(), this.helpers);
|
|
8903
|
-
} catch (
|
|
8904
|
-
throw this.handleError(
|
|
8898
|
+
} catch (e2) {
|
|
8899
|
+
throw this.handleError(e2, node2);
|
|
8905
8900
|
}
|
|
8906
8901
|
}
|
|
8907
8902
|
if (visit2.iterator !== 0) {
|
|
@@ -9548,12 +9543,12 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
9548
9543
|
}
|
|
9549
9544
|
};
|
|
9550
9545
|
}
|
|
9551
|
-
function hookSetter(target, key,
|
|
9546
|
+
function hookSetter(target, key, d, isRevoked, win = window) {
|
|
9552
9547
|
const original = win.Object.getOwnPropertyDescriptor(target, key);
|
|
9553
|
-
win.Object.defineProperty(target, key, isRevoked ?
|
|
9548
|
+
win.Object.defineProperty(target, key, isRevoked ? d : {
|
|
9554
9549
|
set(value) {
|
|
9555
9550
|
setTimeout(() => {
|
|
9556
|
-
|
|
9551
|
+
d.set.call(this, value);
|
|
9557
9552
|
}, 0);
|
|
9558
9553
|
if (original && original.set) {
|
|
9559
9554
|
original.set.call(this, value);
|
|
@@ -9565,8 +9560,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
9565
9560
|
function patch(source, name, replacement) {
|
|
9566
9561
|
try {
|
|
9567
9562
|
if (!(name in source)) {
|
|
9568
|
-
return () => {
|
|
9569
|
-
};
|
|
9563
|
+
return () => {};
|
|
9570
9564
|
}
|
|
9571
9565
|
const original = source[name];
|
|
9572
9566
|
const wrapped = replacement(original);
|
|
@@ -9584,8 +9578,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
9584
9578
|
source[name] = original;
|
|
9585
9579
|
};
|
|
9586
9580
|
} catch {
|
|
9587
|
-
return () => {
|
|
9588
|
-
};
|
|
9581
|
+
return () => {};
|
|
9589
9582
|
}
|
|
9590
9583
|
}
|
|
9591
9584
|
var nowTimestamp = Date.now;
|
|
@@ -9631,8 +9624,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
9631
9624
|
if (classMatchesRegex(el, blockClass, checkAncestors))
|
|
9632
9625
|
return true;
|
|
9633
9626
|
}
|
|
9634
|
-
} catch (
|
|
9635
|
-
}
|
|
9627
|
+
} catch (e2) {}
|
|
9636
9628
|
if (blockSelector) {
|
|
9637
9629
|
if (el.matches(blockSelector))
|
|
9638
9630
|
return true;
|
|
@@ -10157,25 +10149,25 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10157
10149
|
}
|
|
10158
10150
|
item.attributes.value = Array.from(index.childNodes(textarea), (cn) => index.textContent(cn) || "").join("");
|
|
10159
10151
|
});
|
|
10160
|
-
__publicField(this, "processMutation", (
|
|
10161
|
-
if (isIgnored(
|
|
10152
|
+
__publicField(this, "processMutation", (m) => {
|
|
10153
|
+
if (isIgnored(m.target, this.mirror, this.slimDOMOptions)) {
|
|
10162
10154
|
return;
|
|
10163
10155
|
}
|
|
10164
|
-
switch (
|
|
10156
|
+
switch (m.type) {
|
|
10165
10157
|
case "characterData": {
|
|
10166
|
-
const value = index.textContent(
|
|
10167
|
-
if (!isBlocked(
|
|
10158
|
+
const value = index.textContent(m.target);
|
|
10159
|
+
if (!isBlocked(m.target, this.blockClass, this.blockSelector, false) && value !== m.oldValue) {
|
|
10168
10160
|
this.texts.push({
|
|
10169
|
-
value: needMaskingText(
|
|
10170
|
-
node:
|
|
10161
|
+
value: needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, true) && value ? this.maskTextFn ? this.maskTextFn(value, closestElementOfNode(m.target)) : value.replace(/[\S]/g, "*") : value,
|
|
10162
|
+
node: m.target
|
|
10171
10163
|
});
|
|
10172
10164
|
}
|
|
10173
10165
|
break;
|
|
10174
10166
|
}
|
|
10175
10167
|
case "attributes": {
|
|
10176
|
-
const target =
|
|
10177
|
-
let attributeName =
|
|
10178
|
-
let value =
|
|
10168
|
+
const target = m.target;
|
|
10169
|
+
let attributeName = m.attributeName;
|
|
10170
|
+
let value = m.target.getAttribute(attributeName);
|
|
10179
10171
|
if (attributeName === "value") {
|
|
10180
10172
|
const type = getInputType(target);
|
|
10181
10173
|
value = maskInputValue({
|
|
@@ -10187,10 +10179,10 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10187
10179
|
maskInputFn: this.maskInputFn
|
|
10188
10180
|
});
|
|
10189
10181
|
}
|
|
10190
|
-
if (isBlocked(
|
|
10182
|
+
if (isBlocked(m.target, this.blockClass, this.blockSelector, false) || value === m.oldValue) {
|
|
10191
10183
|
return;
|
|
10192
10184
|
}
|
|
10193
|
-
let item = this.attributeMap.get(
|
|
10185
|
+
let item = this.attributeMap.get(m.target);
|
|
10194
10186
|
if (target.tagName === "IFRAME" && attributeName === "src" && !this.keepIframeSrcFn(value)) {
|
|
10195
10187
|
if (!target.contentDocument) {
|
|
10196
10188
|
attributeName = "rr_src";
|
|
@@ -10200,15 +10192,15 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10200
10192
|
}
|
|
10201
10193
|
if (!item) {
|
|
10202
10194
|
item = {
|
|
10203
|
-
node:
|
|
10195
|
+
node: m.target,
|
|
10204
10196
|
attributes: {},
|
|
10205
10197
|
styleDiff: {},
|
|
10206
10198
|
_unchangedStyles: {}
|
|
10207
10199
|
};
|
|
10208
10200
|
this.attributes.push(item);
|
|
10209
|
-
this.attributeMap.set(
|
|
10201
|
+
this.attributeMap.set(m.target, item);
|
|
10210
10202
|
}
|
|
10211
|
-
if (attributeName === "type" && target.tagName === "INPUT" && (
|
|
10203
|
+
if (attributeName === "type" && target.tagName === "INPUT" && (m.oldValue || "").toLowerCase() === "password") {
|
|
10212
10204
|
target.setAttribute("data-rr-is-password", "true");
|
|
10213
10205
|
}
|
|
10214
10206
|
if (!ignoreAttribute(target.tagName, attributeName)) {
|
|
@@ -10217,13 +10209,13 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10217
10209
|
if (!this.unattachedDoc) {
|
|
10218
10210
|
try {
|
|
10219
10211
|
this.unattachedDoc = document.implementation.createHTMLDocument();
|
|
10220
|
-
} catch (
|
|
10212
|
+
} catch (e2) {
|
|
10221
10213
|
this.unattachedDoc = this.doc;
|
|
10222
10214
|
}
|
|
10223
10215
|
}
|
|
10224
10216
|
const old = this.unattachedDoc.createElement("span");
|
|
10225
|
-
if (
|
|
10226
|
-
old.setAttribute("style",
|
|
10217
|
+
if (m.oldValue) {
|
|
10218
|
+
old.setAttribute("style", m.oldValue);
|
|
10227
10219
|
}
|
|
10228
10220
|
for (const pname of Array.from(target.style)) {
|
|
10229
10221
|
const newValue = target.style.getPropertyValue(pname);
|
|
@@ -10254,25 +10246,25 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10254
10246
|
break;
|
|
10255
10247
|
}
|
|
10256
10248
|
case "childList": {
|
|
10257
|
-
if (isBlocked(
|
|
10249
|
+
if (isBlocked(m.target, this.blockClass, this.blockSelector, true))
|
|
10258
10250
|
return;
|
|
10259
|
-
if (
|
|
10260
|
-
this.genTextAreaValueMutation(
|
|
10251
|
+
if (m.target.tagName === "TEXTAREA") {
|
|
10252
|
+
this.genTextAreaValueMutation(m.target);
|
|
10261
10253
|
return;
|
|
10262
10254
|
}
|
|
10263
|
-
|
|
10264
|
-
|
|
10255
|
+
m.addedNodes.forEach((n2) => this.genAdds(n2, m.target));
|
|
10256
|
+
m.removedNodes.forEach((n2) => {
|
|
10265
10257
|
const nodeId = this.mirror.getId(n2);
|
|
10266
|
-
const parentId = isShadowRoot(
|
|
10267
|
-
if (isBlocked(
|
|
10258
|
+
const parentId = isShadowRoot(m.target) ? this.mirror.getId(index.host(m.target)) : this.mirror.getId(m.target);
|
|
10259
|
+
if (isBlocked(m.target, this.blockClass, this.blockSelector, false) || isIgnored(n2, this.mirror, this.slimDOMOptions) || !isSerialized(n2, this.mirror)) {
|
|
10268
10260
|
return;
|
|
10269
10261
|
}
|
|
10270
10262
|
if (this.addedSet.has(n2)) {
|
|
10271
10263
|
deepDelete(this.addedSet, n2);
|
|
10272
10264
|
this.droppedSet.add(n2);
|
|
10273
|
-
} else if (this.addedSet.has(
|
|
10265
|
+
} else if (this.addedSet.has(m.target) && nodeId === -1)
|
|
10274
10266
|
;
|
|
10275
|
-
else if (isAncestorRemoved(
|
|
10267
|
+
else if (isAncestorRemoved(m.target, this.mirror))
|
|
10276
10268
|
;
|
|
10277
10269
|
else if (this.movedSet.has(n2) && this.movedMap[moveKey(nodeId, parentId)]) {
|
|
10278
10270
|
deepDelete(this.movedSet, n2);
|
|
@@ -10280,7 +10272,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10280
10272
|
this.removes.push({
|
|
10281
10273
|
parentId,
|
|
10282
10274
|
id: nodeId,
|
|
10283
|
-
isShadow: isShadowRoot(
|
|
10275
|
+
isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target) ? true : undefined
|
|
10284
10276
|
});
|
|
10285
10277
|
processRemoves(n2, this.removesSubTreeCache);
|
|
10286
10278
|
}
|
|
@@ -10450,8 +10442,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10450
10442
|
} else if ("path" in event && event.path.length) {
|
|
10451
10443
|
return event.path[0];
|
|
10452
10444
|
}
|
|
10453
|
-
} catch {
|
|
10454
|
-
}
|
|
10445
|
+
} catch {}
|
|
10455
10446
|
return event && event.target;
|
|
10456
10447
|
}
|
|
10457
10448
|
function initMutationObserver(options, rootEl) {
|
|
@@ -10476,8 +10467,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10476
10467
|
mirror: mirror2
|
|
10477
10468
|
}) {
|
|
10478
10469
|
if (sampling.mousemove === false) {
|
|
10479
|
-
return () => {
|
|
10480
|
-
};
|
|
10470
|
+
return () => {};
|
|
10481
10471
|
}
|
|
10482
10472
|
const threshold = typeof sampling.mousemove === "number" ? sampling.mousemove : 50;
|
|
10483
10473
|
const callbackThreshold = typeof sampling.mousemoveCallback === "number" ? sampling.mousemoveCallback : 500;
|
|
@@ -10485,9 +10475,9 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10485
10475
|
let timeBaseline;
|
|
10486
10476
|
const wrappedCb = throttle(callbackWrapper((source) => {
|
|
10487
10477
|
const totalOffset = Date.now() - timeBaseline;
|
|
10488
|
-
mousemoveCb(positions.map((
|
|
10489
|
-
|
|
10490
|
-
return
|
|
10478
|
+
mousemoveCb(positions.map((p) => {
|
|
10479
|
+
p.timeOffset -= totalOffset;
|
|
10480
|
+
return p;
|
|
10491
10481
|
}), source);
|
|
10492
10482
|
positions = [];
|
|
10493
10483
|
timeBaseline = null;
|
|
@@ -10514,7 +10504,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10514
10504
|
on("drag", updatePosition, doc)
|
|
10515
10505
|
];
|
|
10516
10506
|
return callbackWrapper(() => {
|
|
10517
|
-
handlers.forEach((
|
|
10507
|
+
handlers.forEach((h) => h());
|
|
10518
10508
|
});
|
|
10519
10509
|
}
|
|
10520
10510
|
function initMouseInteractionObserver({
|
|
@@ -10526,8 +10516,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10526
10516
|
sampling
|
|
10527
10517
|
}) {
|
|
10528
10518
|
if (sampling.mouseInteraction === false) {
|
|
10529
|
-
return () => {
|
|
10530
|
-
};
|
|
10519
|
+
return () => {};
|
|
10531
10520
|
}
|
|
10532
10521
|
const disableMap = sampling.mouseInteraction === true || sampling.mouseInteraction === undefined ? {} : sampling.mouseInteraction;
|
|
10533
10522
|
const handlers = [];
|
|
@@ -10572,12 +10561,12 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10572
10561
|
pointerType = currentPointerType;
|
|
10573
10562
|
currentPointerType = null;
|
|
10574
10563
|
}
|
|
10575
|
-
const
|
|
10576
|
-
if (!
|
|
10564
|
+
const e2 = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;
|
|
10565
|
+
if (!e2) {
|
|
10577
10566
|
return;
|
|
10578
10567
|
}
|
|
10579
10568
|
const id = mirror2.getId(target);
|
|
10580
|
-
const { clientX, clientY } =
|
|
10569
|
+
const { clientX, clientY } = e2;
|
|
10581
10570
|
callbackWrapper(mouseInteractionCb)({
|
|
10582
10571
|
type: MouseInteractions[thisEventKey],
|
|
10583
10572
|
id,
|
|
@@ -10604,7 +10593,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10604
10593
|
handlers.push(on(eventName, handler, doc));
|
|
10605
10594
|
});
|
|
10606
10595
|
return callbackWrapper(() => {
|
|
10607
|
-
handlers.forEach((
|
|
10596
|
+
handlers.forEach((h) => h());
|
|
10608
10597
|
});
|
|
10609
10598
|
}
|
|
10610
10599
|
function initScrollObserver({
|
|
@@ -10725,7 +10714,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10725
10714
|
const currentWindow = doc.defaultView;
|
|
10726
10715
|
if (!currentWindow) {
|
|
10727
10716
|
return () => {
|
|
10728
|
-
handlers.forEach((
|
|
10717
|
+
handlers.forEach((h) => h());
|
|
10729
10718
|
};
|
|
10730
10719
|
}
|
|
10731
10720
|
const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, "value");
|
|
@@ -10738,7 +10727,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10738
10727
|
[currentWindow.HTMLOptionElement.prototype, "selected"]
|
|
10739
10728
|
];
|
|
10740
10729
|
if (propertyDescriptor && propertyDescriptor.set) {
|
|
10741
|
-
handlers.push(...hookProperties.map((
|
|
10730
|
+
handlers.push(...hookProperties.map((p) => hookSetter(p[0], p[1], {
|
|
10742
10731
|
set() {
|
|
10743
10732
|
callbackWrapper(eventHandler)({
|
|
10744
10733
|
target: this,
|
|
@@ -10748,7 +10737,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10748
10737
|
}, false, currentWindow)));
|
|
10749
10738
|
}
|
|
10750
10739
|
return callbackWrapper(() => {
|
|
10751
|
-
handlers.forEach((
|
|
10740
|
+
handlers.forEach((h) => h());
|
|
10752
10741
|
});
|
|
10753
10742
|
}
|
|
10754
10743
|
function getNestedCSSRulePositions(rule2) {
|
|
@@ -10782,8 +10771,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10782
10771
|
}
|
|
10783
10772
|
function initStyleSheetObserver({ styleSheetRuleCb, mirror: mirror2, stylesheetManager }, { win }) {
|
|
10784
10773
|
if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {
|
|
10785
|
-
return () => {
|
|
10786
|
-
};
|
|
10774
|
+
return () => {};
|
|
10787
10775
|
}
|
|
10788
10776
|
const insertRule = win.CSSStyleSheet.prototype.insertRule;
|
|
10789
10777
|
win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {
|
|
@@ -10941,8 +10929,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10941
10929
|
const patchTarget = host2.nodeName === "#document" ? (_a2 = host2.defaultView) == null ? undefined : _a2.Document : (_c = (_b = host2.ownerDocument) == null ? undefined : _b.defaultView) == null ? undefined : _c.ShadowRoot;
|
|
10942
10930
|
const originalPropertyDescriptor = (patchTarget == null ? undefined : patchTarget.prototype) ? Object.getOwnPropertyDescriptor(patchTarget == null ? undefined : patchTarget.prototype, "adoptedStyleSheets") : undefined;
|
|
10943
10931
|
if (hostId === null || hostId === -1 || !patchTarget || !originalPropertyDescriptor)
|
|
10944
|
-
return () => {
|
|
10945
|
-
};
|
|
10932
|
+
return () => {};
|
|
10946
10933
|
Object.defineProperty(host2, "adoptedStyleSheets", {
|
|
10947
10934
|
configurable: originalPropertyDescriptor.configurable,
|
|
10948
10935
|
enumerable: originalPropertyDescriptor.enumerable,
|
|
@@ -10956,8 +10943,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
10956
10943
|
if (hostId !== null && hostId !== -1) {
|
|
10957
10944
|
try {
|
|
10958
10945
|
stylesheetManager.adoptStyleSheets(sheets, hostId);
|
|
10959
|
-
} catch (
|
|
10960
|
-
}
|
|
10946
|
+
} catch (e2) {}
|
|
10961
10947
|
}
|
|
10962
10948
|
return result2;
|
|
10963
10949
|
}
|
|
@@ -11060,14 +11046,13 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11060
11046
|
on("ratechange", handler(MediaInteractions.RateChange), doc)
|
|
11061
11047
|
];
|
|
11062
11048
|
return callbackWrapper(() => {
|
|
11063
|
-
handlers.forEach((
|
|
11049
|
+
handlers.forEach((h) => h());
|
|
11064
11050
|
});
|
|
11065
11051
|
}
|
|
11066
11052
|
function initFontObserver({ fontCb, doc }) {
|
|
11067
11053
|
const win = doc.defaultView;
|
|
11068
11054
|
if (!win) {
|
|
11069
|
-
return () => {
|
|
11070
|
-
};
|
|
11055
|
+
return () => {};
|
|
11071
11056
|
}
|
|
11072
11057
|
const handlers = [];
|
|
11073
11058
|
const fontMap = /* @__PURE__ */ new WeakMap;
|
|
@@ -11085,9 +11070,9 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11085
11070
|
const restoreHandler = patch(doc.fonts, "add", function(original) {
|
|
11086
11071
|
return function(fontFace) {
|
|
11087
11072
|
setTimeout(callbackWrapper(() => {
|
|
11088
|
-
const
|
|
11089
|
-
if (
|
|
11090
|
-
fontCb(
|
|
11073
|
+
const p = fontMap.get(fontFace);
|
|
11074
|
+
if (p) {
|
|
11075
|
+
fontCb(p);
|
|
11091
11076
|
fontMap.delete(fontFace);
|
|
11092
11077
|
}
|
|
11093
11078
|
}), 0);
|
|
@@ -11099,7 +11084,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11099
11084
|
});
|
|
11100
11085
|
handlers.push(restoreHandler);
|
|
11101
11086
|
return callbackWrapper(() => {
|
|
11102
|
-
handlers.forEach((
|
|
11087
|
+
handlers.forEach((h) => h());
|
|
11103
11088
|
});
|
|
11104
11089
|
}
|
|
11105
11090
|
function initSelectionObserver(param) {
|
|
@@ -11136,8 +11121,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11136
11121
|
}) {
|
|
11137
11122
|
const win = doc.defaultView;
|
|
11138
11123
|
if (!win || !win.customElements)
|
|
11139
|
-
return () => {
|
|
11140
|
-
};
|
|
11124
|
+
return () => {};
|
|
11141
11125
|
const restoreHandler = patch(win.customElements, "define", function(original) {
|
|
11142
11126
|
return function(name, constructor, options) {
|
|
11143
11127
|
try {
|
|
@@ -11146,7 +11130,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11146
11130
|
name
|
|
11147
11131
|
}
|
|
11148
11132
|
});
|
|
11149
|
-
} catch (
|
|
11133
|
+
} catch (e2) {
|
|
11150
11134
|
console.warn(`Custom element callback failed for ${name}`);
|
|
11151
11135
|
}
|
|
11152
11136
|
return original.apply(this, [name, constructor, options]);
|
|
@@ -11170,77 +11154,77 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11170
11154
|
selectionCb,
|
|
11171
11155
|
customElementCb
|
|
11172
11156
|
} = o2;
|
|
11173
|
-
o2.mutationCb = (...
|
|
11157
|
+
o2.mutationCb = (...p) => {
|
|
11174
11158
|
if (hooks.mutation) {
|
|
11175
|
-
hooks.mutation(...
|
|
11159
|
+
hooks.mutation(...p);
|
|
11176
11160
|
}
|
|
11177
|
-
mutationCb(...
|
|
11161
|
+
mutationCb(...p);
|
|
11178
11162
|
};
|
|
11179
|
-
o2.mousemoveCb = (...
|
|
11163
|
+
o2.mousemoveCb = (...p) => {
|
|
11180
11164
|
if (hooks.mousemove) {
|
|
11181
|
-
hooks.mousemove(...
|
|
11165
|
+
hooks.mousemove(...p);
|
|
11182
11166
|
}
|
|
11183
|
-
mousemoveCb(...
|
|
11167
|
+
mousemoveCb(...p);
|
|
11184
11168
|
};
|
|
11185
|
-
o2.mouseInteractionCb = (...
|
|
11169
|
+
o2.mouseInteractionCb = (...p) => {
|
|
11186
11170
|
if (hooks.mouseInteraction) {
|
|
11187
|
-
hooks.mouseInteraction(...
|
|
11171
|
+
hooks.mouseInteraction(...p);
|
|
11188
11172
|
}
|
|
11189
|
-
mouseInteractionCb(...
|
|
11173
|
+
mouseInteractionCb(...p);
|
|
11190
11174
|
};
|
|
11191
|
-
o2.scrollCb = (...
|
|
11175
|
+
o2.scrollCb = (...p) => {
|
|
11192
11176
|
if (hooks.scroll) {
|
|
11193
|
-
hooks.scroll(...
|
|
11177
|
+
hooks.scroll(...p);
|
|
11194
11178
|
}
|
|
11195
|
-
scrollCb(...
|
|
11179
|
+
scrollCb(...p);
|
|
11196
11180
|
};
|
|
11197
|
-
o2.viewportResizeCb = (...
|
|
11181
|
+
o2.viewportResizeCb = (...p) => {
|
|
11198
11182
|
if (hooks.viewportResize) {
|
|
11199
|
-
hooks.viewportResize(...
|
|
11183
|
+
hooks.viewportResize(...p);
|
|
11200
11184
|
}
|
|
11201
|
-
viewportResizeCb(...
|
|
11185
|
+
viewportResizeCb(...p);
|
|
11202
11186
|
};
|
|
11203
|
-
o2.inputCb = (...
|
|
11187
|
+
o2.inputCb = (...p) => {
|
|
11204
11188
|
if (hooks.input) {
|
|
11205
|
-
hooks.input(...
|
|
11189
|
+
hooks.input(...p);
|
|
11206
11190
|
}
|
|
11207
|
-
inputCb(...
|
|
11191
|
+
inputCb(...p);
|
|
11208
11192
|
};
|
|
11209
|
-
o2.mediaInteractionCb = (...
|
|
11193
|
+
o2.mediaInteractionCb = (...p) => {
|
|
11210
11194
|
if (hooks.mediaInteaction) {
|
|
11211
|
-
hooks.mediaInteaction(...
|
|
11195
|
+
hooks.mediaInteaction(...p);
|
|
11212
11196
|
}
|
|
11213
|
-
mediaInteractionCb(...
|
|
11197
|
+
mediaInteractionCb(...p);
|
|
11214
11198
|
};
|
|
11215
|
-
o2.styleSheetRuleCb = (...
|
|
11199
|
+
o2.styleSheetRuleCb = (...p) => {
|
|
11216
11200
|
if (hooks.styleSheetRule) {
|
|
11217
|
-
hooks.styleSheetRule(...
|
|
11201
|
+
hooks.styleSheetRule(...p);
|
|
11218
11202
|
}
|
|
11219
|
-
styleSheetRuleCb(...
|
|
11203
|
+
styleSheetRuleCb(...p);
|
|
11220
11204
|
};
|
|
11221
|
-
o2.styleDeclarationCb = (...
|
|
11205
|
+
o2.styleDeclarationCb = (...p) => {
|
|
11222
11206
|
if (hooks.styleDeclaration) {
|
|
11223
|
-
hooks.styleDeclaration(...
|
|
11207
|
+
hooks.styleDeclaration(...p);
|
|
11224
11208
|
}
|
|
11225
|
-
styleDeclarationCb(...
|
|
11209
|
+
styleDeclarationCb(...p);
|
|
11226
11210
|
};
|
|
11227
|
-
o2.canvasMutationCb = (...
|
|
11211
|
+
o2.canvasMutationCb = (...p) => {
|
|
11228
11212
|
if (hooks.canvasMutation) {
|
|
11229
|
-
hooks.canvasMutation(...
|
|
11213
|
+
hooks.canvasMutation(...p);
|
|
11230
11214
|
}
|
|
11231
|
-
canvasMutationCb(...
|
|
11215
|
+
canvasMutationCb(...p);
|
|
11232
11216
|
};
|
|
11233
|
-
o2.fontCb = (...
|
|
11217
|
+
o2.fontCb = (...p) => {
|
|
11234
11218
|
if (hooks.font) {
|
|
11235
|
-
hooks.font(...
|
|
11219
|
+
hooks.font(...p);
|
|
11236
11220
|
}
|
|
11237
|
-
fontCb(...
|
|
11221
|
+
fontCb(...p);
|
|
11238
11222
|
};
|
|
11239
|
-
o2.selectionCb = (...
|
|
11223
|
+
o2.selectionCb = (...p) => {
|
|
11240
11224
|
if (hooks.selection) {
|
|
11241
|
-
hooks.selection(...
|
|
11225
|
+
hooks.selection(...p);
|
|
11242
11226
|
}
|
|
11243
|
-
selectionCb(...
|
|
11227
|
+
selectionCb(...p);
|
|
11244
11228
|
};
|
|
11245
11229
|
o2.customElementCb = (...c2) => {
|
|
11246
11230
|
if (hooks.customElement) {
|
|
@@ -11252,8 +11236,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11252
11236
|
function initObservers(o2, hooks = {}) {
|
|
11253
11237
|
const currentWindow = o2.doc.defaultView;
|
|
11254
11238
|
if (!currentWindow) {
|
|
11255
|
-
return () => {
|
|
11256
|
-
};
|
|
11239
|
+
return () => {};
|
|
11257
11240
|
}
|
|
11258
11241
|
mergeHooks(o2, hooks);
|
|
11259
11242
|
let mutationObserver;
|
|
@@ -11268,14 +11251,10 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11268
11251
|
});
|
|
11269
11252
|
const inputHandler = initInputObserver(o2);
|
|
11270
11253
|
const mediaInteractionHandler = initMediaInteractionObserver(o2);
|
|
11271
|
-
let styleSheetObserver = () => {
|
|
11272
|
-
};
|
|
11273
|
-
let
|
|
11274
|
-
};
|
|
11275
|
-
let styleDeclarationObserver = () => {
|
|
11276
|
-
};
|
|
11277
|
-
let fontObserver = () => {
|
|
11278
|
-
};
|
|
11254
|
+
let styleSheetObserver = () => {};
|
|
11255
|
+
let adoptedStyleSheetObserver = () => {};
|
|
11256
|
+
let styleDeclarationObserver = () => {};
|
|
11257
|
+
let fontObserver = () => {};
|
|
11279
11258
|
if (o2.recordDOM) {
|
|
11280
11259
|
styleSheetObserver = initStyleSheetObserver(o2, { win: currentWindow });
|
|
11281
11260
|
adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o2, o2.doc);
|
|
@@ -11293,7 +11272,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11293
11272
|
pluginHandlers.push(plugin3.observer(plugin3.callback, currentWindow, plugin3.options));
|
|
11294
11273
|
}
|
|
11295
11274
|
return callbackWrapper(() => {
|
|
11296
|
-
mutationBuffers.forEach((
|
|
11275
|
+
mutationBuffers.forEach((b) => b.reset());
|
|
11297
11276
|
mutationObserver == null || mutationObserver.disconnect();
|
|
11298
11277
|
mousemoveHandler();
|
|
11299
11278
|
mouseInteractionHandler();
|
|
@@ -11307,7 +11286,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11307
11286
|
fontObserver();
|
|
11308
11287
|
selectionObserver();
|
|
11309
11288
|
customElementObserver();
|
|
11310
|
-
pluginHandlers.forEach((
|
|
11289
|
+
pluginHandlers.forEach((h) => h());
|
|
11311
11290
|
});
|
|
11312
11291
|
}
|
|
11313
11292
|
function hasNestedCSSRule(prop) {
|
|
@@ -11445,18 +11424,18 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11445
11424
|
if (transformedEvent)
|
|
11446
11425
|
this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);
|
|
11447
11426
|
}
|
|
11448
|
-
transformCrossOriginEvent(iframeEl,
|
|
11427
|
+
transformCrossOriginEvent(iframeEl, e2) {
|
|
11449
11428
|
var _a2;
|
|
11450
|
-
switch (
|
|
11429
|
+
switch (e2.type) {
|
|
11451
11430
|
case EventType.FullSnapshot: {
|
|
11452
11431
|
this.crossOriginIframeMirror.reset(iframeEl);
|
|
11453
11432
|
this.crossOriginIframeStyleMirror.reset(iframeEl);
|
|
11454
|
-
this.replaceIdOnNode(
|
|
11455
|
-
const rootId =
|
|
11433
|
+
this.replaceIdOnNode(e2.data.node, iframeEl);
|
|
11434
|
+
const rootId = e2.data.node.id;
|
|
11456
11435
|
this.crossOriginIframeRootIdMap.set(iframeEl, rootId);
|
|
11457
|
-
this.patchRootIdOnNode(
|
|
11436
|
+
this.patchRootIdOnNode(e2.data.node, rootId);
|
|
11458
11437
|
return {
|
|
11459
|
-
timestamp:
|
|
11438
|
+
timestamp: e2.timestamp,
|
|
11460
11439
|
type: EventType.IncrementalSnapshot,
|
|
11461
11440
|
data: {
|
|
11462
11441
|
source: IncrementalSource.Mutation,
|
|
@@ -11464,7 +11443,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11464
11443
|
{
|
|
11465
11444
|
parentId: this.mirror.getId(iframeEl),
|
|
11466
11445
|
nextId: null,
|
|
11467
|
-
node:
|
|
11446
|
+
node: e2.data.node
|
|
11468
11447
|
}
|
|
11469
11448
|
],
|
|
11470
11449
|
removes: [],
|
|
@@ -11480,16 +11459,16 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11480
11459
|
return false;
|
|
11481
11460
|
}
|
|
11482
11461
|
case EventType.Plugin: {
|
|
11483
|
-
return
|
|
11462
|
+
return e2;
|
|
11484
11463
|
}
|
|
11485
11464
|
case EventType.Custom: {
|
|
11486
|
-
this.replaceIds(
|
|
11487
|
-
return
|
|
11465
|
+
this.replaceIds(e2.data.payload, iframeEl, ["id", "parentId", "previousId", "nextId"]);
|
|
11466
|
+
return e2;
|
|
11488
11467
|
}
|
|
11489
11468
|
case EventType.IncrementalSnapshot: {
|
|
11490
|
-
switch (
|
|
11469
|
+
switch (e2.data.source) {
|
|
11491
11470
|
case IncrementalSource.Mutation: {
|
|
11492
|
-
|
|
11471
|
+
e2.data.adds.forEach((n2) => {
|
|
11493
11472
|
this.replaceIds(n2, iframeEl, [
|
|
11494
11473
|
"parentId",
|
|
11495
11474
|
"nextId",
|
|
@@ -11499,24 +11478,24 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11499
11478
|
const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);
|
|
11500
11479
|
rootId && this.patchRootIdOnNode(n2.node, rootId);
|
|
11501
11480
|
});
|
|
11502
|
-
|
|
11481
|
+
e2.data.removes.forEach((n2) => {
|
|
11503
11482
|
this.replaceIds(n2, iframeEl, ["parentId", "id"]);
|
|
11504
11483
|
});
|
|
11505
|
-
|
|
11484
|
+
e2.data.attributes.forEach((n2) => {
|
|
11506
11485
|
this.replaceIds(n2, iframeEl, ["id"]);
|
|
11507
11486
|
});
|
|
11508
|
-
|
|
11487
|
+
e2.data.texts.forEach((n2) => {
|
|
11509
11488
|
this.replaceIds(n2, iframeEl, ["id"]);
|
|
11510
11489
|
});
|
|
11511
|
-
return
|
|
11490
|
+
return e2;
|
|
11512
11491
|
}
|
|
11513
11492
|
case IncrementalSource.Drag:
|
|
11514
11493
|
case IncrementalSource.TouchMove:
|
|
11515
11494
|
case IncrementalSource.MouseMove: {
|
|
11516
|
-
|
|
11517
|
-
this.replaceIds(
|
|
11495
|
+
e2.data.positions.forEach((p) => {
|
|
11496
|
+
this.replaceIds(p, iframeEl, ["id"]);
|
|
11518
11497
|
});
|
|
11519
|
-
return
|
|
11498
|
+
return e2;
|
|
11520
11499
|
}
|
|
11521
11500
|
case IncrementalSource.ViewportResize: {
|
|
11522
11501
|
return false;
|
|
@@ -11526,31 +11505,31 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11526
11505
|
case IncrementalSource.Scroll:
|
|
11527
11506
|
case IncrementalSource.CanvasMutation:
|
|
11528
11507
|
case IncrementalSource.Input: {
|
|
11529
|
-
this.replaceIds(
|
|
11530
|
-
return
|
|
11508
|
+
this.replaceIds(e2.data, iframeEl, ["id"]);
|
|
11509
|
+
return e2;
|
|
11531
11510
|
}
|
|
11532
11511
|
case IncrementalSource.StyleSheetRule:
|
|
11533
11512
|
case IncrementalSource.StyleDeclaration: {
|
|
11534
|
-
this.replaceIds(
|
|
11535
|
-
this.replaceStyleIds(
|
|
11536
|
-
return
|
|
11513
|
+
this.replaceIds(e2.data, iframeEl, ["id"]);
|
|
11514
|
+
this.replaceStyleIds(e2.data, iframeEl, ["styleId"]);
|
|
11515
|
+
return e2;
|
|
11537
11516
|
}
|
|
11538
11517
|
case IncrementalSource.Font: {
|
|
11539
|
-
return
|
|
11518
|
+
return e2;
|
|
11540
11519
|
}
|
|
11541
11520
|
case IncrementalSource.Selection: {
|
|
11542
|
-
|
|
11521
|
+
e2.data.ranges.forEach((range) => {
|
|
11543
11522
|
this.replaceIds(range, iframeEl, ["start", "end"]);
|
|
11544
11523
|
});
|
|
11545
|
-
return
|
|
11524
|
+
return e2;
|
|
11546
11525
|
}
|
|
11547
11526
|
case IncrementalSource.AdoptedStyleSheet: {
|
|
11548
|
-
this.replaceIds(
|
|
11549
|
-
this.replaceStyleIds(
|
|
11550
|
-
(_a2 =
|
|
11527
|
+
this.replaceIds(e2.data, iframeEl, ["id"]);
|
|
11528
|
+
this.replaceStyleIds(e2.data, iframeEl, ["styleIds"]);
|
|
11529
|
+
(_a2 = e2.data.styles) == null || _a2.forEach((style) => {
|
|
11551
11530
|
this.replaceStyleIds(style, iframeEl, ["styleId"]);
|
|
11552
11531
|
});
|
|
11553
|
-
return
|
|
11532
|
+
return e2;
|
|
11554
11533
|
}
|
|
11555
11534
|
}
|
|
11556
11535
|
}
|
|
@@ -11662,8 +11641,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11662
11641
|
this.restoreHandlers.forEach((handler) => {
|
|
11663
11642
|
try {
|
|
11664
11643
|
handler();
|
|
11665
|
-
} catch (
|
|
11666
|
-
}
|
|
11644
|
+
} catch (e2) {}
|
|
11667
11645
|
});
|
|
11668
11646
|
this.restoreHandlers = [];
|
|
11669
11647
|
this.shadowDoms = /* @__PURE__ */ new WeakSet;
|
|
@@ -11831,7 +11809,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11831
11809
|
}
|
|
11832
11810
|
}
|
|
11833
11811
|
return () => {
|
|
11834
|
-
handlers.forEach((
|
|
11812
|
+
handlers.forEach((h) => h());
|
|
11835
11813
|
};
|
|
11836
11814
|
}
|
|
11837
11815
|
function getNormalizedContextName(contextType) {
|
|
@@ -11867,7 +11845,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11867
11845
|
console.error("failed to patch HTMLCanvasElement.prototype.getContext");
|
|
11868
11846
|
}
|
|
11869
11847
|
return () => {
|
|
11870
|
-
handlers.forEach((
|
|
11848
|
+
handlers.forEach((h) => h());
|
|
11871
11849
|
};
|
|
11872
11850
|
}
|
|
11873
11851
|
function patchGLPrototype(prototype, type, cb, blockClass, blockSelector, win) {
|
|
@@ -11926,7 +11904,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11926
11904
|
handlers.push(...patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, win));
|
|
11927
11905
|
}
|
|
11928
11906
|
return () => {
|
|
11929
|
-
handlers.forEach((
|
|
11907
|
+
handlers.forEach((h) => h());
|
|
11930
11908
|
};
|
|
11931
11909
|
}
|
|
11932
11910
|
var encodedJs = "KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=";
|
|
@@ -11945,7 +11923,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
11945
11923
|
(window.URL || window.webkitURL).revokeObjectURL(objURL);
|
|
11946
11924
|
});
|
|
11947
11925
|
return worker;
|
|
11948
|
-
} catch (
|
|
11926
|
+
} catch (e2) {
|
|
11949
11927
|
return new Worker("data:text/javascript;base64," + encodedJs, {
|
|
11950
11928
|
name: options == null ? undefined : options.name
|
|
11951
11929
|
});
|
|
@@ -12009,12 +11987,12 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12009
11987
|
const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, true);
|
|
12010
11988
|
const snapshotInProgressMap = /* @__PURE__ */ new Map;
|
|
12011
11989
|
const worker = new WorkerWrapper;
|
|
12012
|
-
worker.onmessage = (
|
|
12013
|
-
const { id } =
|
|
11990
|
+
worker.onmessage = (e2) => {
|
|
11991
|
+
const { id } = e2.data;
|
|
12014
11992
|
snapshotInProgressMap.set(id, false);
|
|
12015
|
-
if (!("base64" in
|
|
11993
|
+
if (!("base64" in e2.data))
|
|
12016
11994
|
return;
|
|
12017
|
-
const { base64, type, width, height } =
|
|
11995
|
+
const { base64, type, width, height } = e2.data;
|
|
12018
11996
|
this.mutationCb({
|
|
12019
11997
|
id,
|
|
12020
11998
|
type: CanvasContext["2D"],
|
|
@@ -12199,8 +12177,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12199
12177
|
this.styleMirror.reset();
|
|
12200
12178
|
this.trackedLinkElements = /* @__PURE__ */ new WeakSet;
|
|
12201
12179
|
}
|
|
12202
|
-
trackStylesheetInLinkElement(_linkEl) {
|
|
12203
|
-
}
|
|
12180
|
+
trackStylesheetInLinkElement(_linkEl) {}
|
|
12204
12181
|
}
|
|
12205
12182
|
|
|
12206
12183
|
class ProcessedNodeManager {
|
|
@@ -12222,15 +12199,14 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12222
12199
|
}
|
|
12223
12200
|
this.nodeMap.set(node2, (this.nodeMap.get(node2) || /* @__PURE__ */ new Set).add(buffer));
|
|
12224
12201
|
}
|
|
12225
|
-
destroy() {
|
|
12226
|
-
}
|
|
12202
|
+
destroy() {}
|
|
12227
12203
|
}
|
|
12228
12204
|
var wrappedEmit;
|
|
12229
12205
|
var takeFullSnapshot$1;
|
|
12230
12206
|
var canvasManager;
|
|
12231
12207
|
var recording = false;
|
|
12232
12208
|
try {
|
|
12233
|
-
if (Array.from([1], (
|
|
12209
|
+
if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {
|
|
12234
12210
|
const cleanFrame = document.createElement("iframe");
|
|
12235
12211
|
document.body.appendChild(cleanFrame);
|
|
12236
12212
|
Array.from = ((_a = cleanFrame.contentWindow) == null ? undefined : _a.Array.from) || Array.from;
|
|
@@ -12282,7 +12258,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12282
12258
|
if (window.parent.document) {
|
|
12283
12259
|
passEmitsToParent = false;
|
|
12284
12260
|
}
|
|
12285
|
-
} catch (
|
|
12261
|
+
} catch (e2) {
|
|
12286
12262
|
passEmitsToParent = true;
|
|
12287
12263
|
}
|
|
12288
12264
|
}
|
|
@@ -12290,8 +12266,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12290
12266
|
throw new Error("emit function is required");
|
|
12291
12267
|
}
|
|
12292
12268
|
if (!inEmittingFrame && !passEmitsToParent) {
|
|
12293
|
-
return () => {
|
|
12294
|
-
};
|
|
12269
|
+
return () => {};
|
|
12295
12270
|
}
|
|
12296
12271
|
if (mousemoveWait !== undefined && sampling.mousemove === undefined) {
|
|
12297
12272
|
sampling.mousemove = mousemoveWait;
|
|
@@ -12331,71 +12306,71 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12331
12306
|
polyfill$1();
|
|
12332
12307
|
let lastFullSnapshotEvent;
|
|
12333
12308
|
let incrementalSnapshotCount = 0;
|
|
12334
|
-
const eventProcessor = (
|
|
12309
|
+
const eventProcessor = (e2) => {
|
|
12335
12310
|
for (const plugin3 of plugins || []) {
|
|
12336
12311
|
if (plugin3.eventProcessor) {
|
|
12337
|
-
|
|
12312
|
+
e2 = plugin3.eventProcessor(e2);
|
|
12338
12313
|
}
|
|
12339
12314
|
}
|
|
12340
12315
|
if (packFn && !passEmitsToParent) {
|
|
12341
|
-
|
|
12316
|
+
e2 = packFn(e2);
|
|
12342
12317
|
}
|
|
12343
|
-
return
|
|
12318
|
+
return e2;
|
|
12344
12319
|
};
|
|
12345
12320
|
wrappedEmit = (r2, isCheckout) => {
|
|
12346
12321
|
var _a2;
|
|
12347
|
-
const
|
|
12348
|
-
|
|
12349
|
-
if (((_a2 = mutationBuffers[0]) == null ? undefined : _a2.isFrozen()) &&
|
|
12322
|
+
const e2 = r2;
|
|
12323
|
+
e2.timestamp = nowTimestamp();
|
|
12324
|
+
if (((_a2 = mutationBuffers[0]) == null ? undefined : _a2.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
12350
12325
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
12351
12326
|
}
|
|
12352
12327
|
if (inEmittingFrame) {
|
|
12353
|
-
emit == null || emit(eventProcessor(
|
|
12328
|
+
emit == null || emit(eventProcessor(e2), isCheckout);
|
|
12354
12329
|
} else if (passEmitsToParent) {
|
|
12355
12330
|
const message = {
|
|
12356
12331
|
type: "rrweb",
|
|
12357
|
-
event: eventProcessor(
|
|
12332
|
+
event: eventProcessor(e2),
|
|
12358
12333
|
origin: window.location.origin,
|
|
12359
12334
|
isCheckout
|
|
12360
12335
|
};
|
|
12361
12336
|
window.parent.postMessage(message, "*");
|
|
12362
12337
|
}
|
|
12363
|
-
if (
|
|
12364
|
-
lastFullSnapshotEvent =
|
|
12338
|
+
if (e2.type === EventType.FullSnapshot) {
|
|
12339
|
+
lastFullSnapshotEvent = e2;
|
|
12365
12340
|
incrementalSnapshotCount = 0;
|
|
12366
|
-
} else if (
|
|
12367
|
-
if (
|
|
12341
|
+
} else if (e2.type === EventType.IncrementalSnapshot) {
|
|
12342
|
+
if (e2.data.source === IncrementalSource.Mutation && e2.data.isAttachIframe) {
|
|
12368
12343
|
return;
|
|
12369
12344
|
}
|
|
12370
12345
|
incrementalSnapshotCount++;
|
|
12371
12346
|
const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;
|
|
12372
|
-
const exceedTime = checkoutEveryNms &&
|
|
12347
|
+
const exceedTime = checkoutEveryNms && e2.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;
|
|
12373
12348
|
if (exceedCount || exceedTime) {
|
|
12374
12349
|
takeFullSnapshot$1(true);
|
|
12375
12350
|
}
|
|
12376
12351
|
}
|
|
12377
12352
|
};
|
|
12378
|
-
const wrappedMutationEmit = (
|
|
12353
|
+
const wrappedMutationEmit = (m) => {
|
|
12379
12354
|
wrappedEmit({
|
|
12380
12355
|
type: EventType.IncrementalSnapshot,
|
|
12381
12356
|
data: {
|
|
12382
12357
|
source: IncrementalSource.Mutation,
|
|
12383
|
-
...
|
|
12358
|
+
...m
|
|
12384
12359
|
}
|
|
12385
12360
|
});
|
|
12386
12361
|
};
|
|
12387
|
-
const wrappedScrollEmit = (
|
|
12362
|
+
const wrappedScrollEmit = (p) => wrappedEmit({
|
|
12388
12363
|
type: EventType.IncrementalSnapshot,
|
|
12389
12364
|
data: {
|
|
12390
12365
|
source: IncrementalSource.Scroll,
|
|
12391
|
-
...
|
|
12366
|
+
...p
|
|
12392
12367
|
}
|
|
12393
12368
|
});
|
|
12394
|
-
const wrappedCanvasMutationEmit = (
|
|
12369
|
+
const wrappedCanvasMutationEmit = (p) => wrappedEmit({
|
|
12395
12370
|
type: EventType.IncrementalSnapshot,
|
|
12396
12371
|
data: {
|
|
12397
12372
|
source: IncrementalSource.CanvasMutation,
|
|
12398
|
-
...
|
|
12373
|
+
...p
|
|
12399
12374
|
}
|
|
12400
12375
|
});
|
|
12401
12376
|
const wrappedAdoptedStyleSheetEmit = (a2) => wrappedEmit({
|
|
@@ -12536,19 +12511,19 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12536
12511
|
positions
|
|
12537
12512
|
}
|
|
12538
12513
|
}),
|
|
12539
|
-
mouseInteractionCb: (
|
|
12514
|
+
mouseInteractionCb: (d) => wrappedEmit({
|
|
12540
12515
|
type: EventType.IncrementalSnapshot,
|
|
12541
12516
|
data: {
|
|
12542
12517
|
source: IncrementalSource.MouseInteraction,
|
|
12543
|
-
...
|
|
12518
|
+
...d
|
|
12544
12519
|
}
|
|
12545
12520
|
}),
|
|
12546
12521
|
scrollCb: wrappedScrollEmit,
|
|
12547
|
-
viewportResizeCb: (
|
|
12522
|
+
viewportResizeCb: (d) => wrappedEmit({
|
|
12548
12523
|
type: EventType.IncrementalSnapshot,
|
|
12549
12524
|
data: {
|
|
12550
12525
|
source: IncrementalSource.ViewportResize,
|
|
12551
|
-
...
|
|
12526
|
+
...d
|
|
12552
12527
|
}
|
|
12553
12528
|
}),
|
|
12554
12529
|
inputCb: (v2) => wrappedEmit({
|
|
@@ -12558,11 +12533,11 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12558
12533
|
...v2
|
|
12559
12534
|
}
|
|
12560
12535
|
}),
|
|
12561
|
-
mediaInteractionCb: (
|
|
12536
|
+
mediaInteractionCb: (p) => wrappedEmit({
|
|
12562
12537
|
type: EventType.IncrementalSnapshot,
|
|
12563
12538
|
data: {
|
|
12564
12539
|
source: IncrementalSource.MediaInteraction,
|
|
12565
|
-
...
|
|
12540
|
+
...p
|
|
12566
12541
|
}
|
|
12567
12542
|
}),
|
|
12568
12543
|
styleSheetRuleCb: (r2) => wrappedEmit({
|
|
@@ -12580,19 +12555,19 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12580
12555
|
}
|
|
12581
12556
|
}),
|
|
12582
12557
|
canvasMutationCb: wrappedCanvasMutationEmit,
|
|
12583
|
-
fontCb: (
|
|
12558
|
+
fontCb: (p) => wrappedEmit({
|
|
12584
12559
|
type: EventType.IncrementalSnapshot,
|
|
12585
12560
|
data: {
|
|
12586
12561
|
source: IncrementalSource.Font,
|
|
12587
|
-
...
|
|
12562
|
+
...p
|
|
12588
12563
|
}
|
|
12589
12564
|
}),
|
|
12590
|
-
selectionCb: (
|
|
12565
|
+
selectionCb: (p) => {
|
|
12591
12566
|
wrappedEmit({
|
|
12592
12567
|
type: EventType.IncrementalSnapshot,
|
|
12593
12568
|
data: {
|
|
12594
12569
|
source: IncrementalSource.Selection,
|
|
12595
|
-
...
|
|
12570
|
+
...p
|
|
12596
12571
|
}
|
|
12597
12572
|
});
|
|
12598
12573
|
},
|
|
@@ -12632,13 +12607,13 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12632
12607
|
processedNodeManager,
|
|
12633
12608
|
canvasManager,
|
|
12634
12609
|
ignoreCSSAttributes,
|
|
12635
|
-
plugins: ((_a2 = plugins == null ? undefined : plugins.filter((
|
|
12636
|
-
observer:
|
|
12637
|
-
options:
|
|
12610
|
+
plugins: ((_a2 = plugins == null ? undefined : plugins.filter((p) => p.observer)) == null ? undefined : _a2.map((p) => ({
|
|
12611
|
+
observer: p.observer,
|
|
12612
|
+
options: p.options,
|
|
12638
12613
|
callback: (payload) => wrappedEmit({
|
|
12639
12614
|
type: EventType.Plugin,
|
|
12640
12615
|
data: {
|
|
12641
|
-
plugin:
|
|
12616
|
+
plugin: p.name,
|
|
12642
12617
|
payload
|
|
12643
12618
|
}
|
|
12644
12619
|
})
|
|
@@ -12678,7 +12653,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12678
12653
|
}, window));
|
|
12679
12654
|
}
|
|
12680
12655
|
return () => {
|
|
12681
|
-
handlers.forEach((
|
|
12656
|
+
handlers.forEach((h) => h());
|
|
12682
12657
|
processedNodeManager.destroy();
|
|
12683
12658
|
recording = false;
|
|
12684
12659
|
unregisterErrorHandler();
|
|
@@ -12728,6 +12703,9 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12728
12703
|
t2[t2.NotStarted = 0] = "NotStarted", t2[t2.Running = 1] = "Running", t2[t2.Stopped = 2] = "Stopped";
|
|
12729
12704
|
})(n2 || (n2 = {}));
|
|
12730
12705
|
var SKIP_TIME_INTERVAL = 5 * 1000;
|
|
12706
|
+
var { addCustomEvent } = record;
|
|
12707
|
+
var { freezePage } = record;
|
|
12708
|
+
var { takeFullSnapshot } = record;
|
|
12731
12709
|
|
|
12732
12710
|
// ../../node_modules/@rrweb/packer/dist/base-BrE4jft0.js
|
|
12733
12711
|
var u8 = Uint8Array;
|
|
@@ -12803,17 +12781,17 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12803
12781
|
]);
|
|
12804
12782
|
var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
|
|
12805
12783
|
var freb = function(eb, start) {
|
|
12806
|
-
var
|
|
12807
|
-
for (var
|
|
12808
|
-
|
|
12784
|
+
var b = new u16(31);
|
|
12785
|
+
for (var i = 0;i < 31; ++i) {
|
|
12786
|
+
b[i] = start += 1 << eb[i - 1];
|
|
12809
12787
|
}
|
|
12810
|
-
var
|
|
12811
|
-
for (var
|
|
12812
|
-
for (var
|
|
12813
|
-
|
|
12788
|
+
var r = new u32(b[30]);
|
|
12789
|
+
for (var i = 1;i < 30; ++i) {
|
|
12790
|
+
for (var j = b[i];j < b[i + 1]; ++j) {
|
|
12791
|
+
r[j] = j - b[i] << 5 | i;
|
|
12814
12792
|
}
|
|
12815
12793
|
}
|
|
12816
|
-
return [
|
|
12794
|
+
return [b, r];
|
|
12817
12795
|
};
|
|
12818
12796
|
var _a2 = freb(fleb, 2);
|
|
12819
12797
|
var fl = _a2[0];
|
|
@@ -12831,34 +12809,34 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12831
12809
|
}
|
|
12832
12810
|
var x3;
|
|
12833
12811
|
var i2;
|
|
12834
|
-
var hMap = function(cd, mb,
|
|
12835
|
-
var
|
|
12836
|
-
var
|
|
12837
|
-
var
|
|
12838
|
-
for (;
|
|
12839
|
-
++
|
|
12812
|
+
var hMap = function(cd, mb, r) {
|
|
12813
|
+
var s = cd.length;
|
|
12814
|
+
var i = 0;
|
|
12815
|
+
var l = new u16(mb);
|
|
12816
|
+
for (;i < s; ++i)
|
|
12817
|
+
++l[cd[i] - 1];
|
|
12840
12818
|
var le = new u16(mb);
|
|
12841
|
-
for (
|
|
12842
|
-
le[
|
|
12819
|
+
for (i = 0;i < mb; ++i) {
|
|
12820
|
+
le[i] = le[i - 1] + l[i - 1] << 1;
|
|
12843
12821
|
}
|
|
12844
12822
|
var co;
|
|
12845
|
-
if (
|
|
12823
|
+
if (r) {
|
|
12846
12824
|
co = new u16(1 << mb);
|
|
12847
12825
|
var rvb = 15 - mb;
|
|
12848
|
-
for (
|
|
12849
|
-
if (cd[
|
|
12850
|
-
var sv =
|
|
12851
|
-
var r_1 = mb - cd[
|
|
12852
|
-
var
|
|
12853
|
-
for (var
|
|
12854
|
-
co[rev[
|
|
12826
|
+
for (i = 0;i < s; ++i) {
|
|
12827
|
+
if (cd[i]) {
|
|
12828
|
+
var sv = i << 4 | cd[i];
|
|
12829
|
+
var r_1 = mb - cd[i];
|
|
12830
|
+
var v = le[cd[i] - 1]++ << r_1;
|
|
12831
|
+
for (var m = v | (1 << r_1) - 1;v <= m; ++v) {
|
|
12832
|
+
co[rev[v] >>> rvb] = sv;
|
|
12855
12833
|
}
|
|
12856
12834
|
}
|
|
12857
12835
|
}
|
|
12858
12836
|
} else {
|
|
12859
|
-
co = new u16(
|
|
12860
|
-
for (
|
|
12861
|
-
co[
|
|
12837
|
+
co = new u16(s);
|
|
12838
|
+
for (i = 0;i < s; ++i)
|
|
12839
|
+
co[i] = rev[le[cd[i] - 1]++] >>> 15 - cd[i];
|
|
12862
12840
|
}
|
|
12863
12841
|
return co;
|
|
12864
12842
|
};
|
|
@@ -12881,70 +12859,70 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12881
12859
|
var i2;
|
|
12882
12860
|
var flm = /* @__PURE__ */ hMap(flt, 9, 0);
|
|
12883
12861
|
var fdm = /* @__PURE__ */ hMap(fdt, 5, 0);
|
|
12884
|
-
var shft = function(
|
|
12885
|
-
return (
|
|
12886
|
-
};
|
|
12887
|
-
var slc = function(
|
|
12888
|
-
if (
|
|
12889
|
-
|
|
12890
|
-
var
|
|
12891
|
-
|
|
12892
|
-
return
|
|
12893
|
-
};
|
|
12894
|
-
var wbits = function(
|
|
12895
|
-
|
|
12896
|
-
var
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
};
|
|
12900
|
-
var wbits16 = function(
|
|
12901
|
-
|
|
12902
|
-
var
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
};
|
|
12907
|
-
var hTree = function(
|
|
12908
|
-
var
|
|
12909
|
-
for (var
|
|
12910
|
-
if (
|
|
12911
|
-
|
|
12912
|
-
}
|
|
12913
|
-
var
|
|
12914
|
-
var
|
|
12915
|
-
if (!
|
|
12862
|
+
var shft = function(p) {
|
|
12863
|
+
return (p / 8 >> 0) + (p & 7 && 1);
|
|
12864
|
+
};
|
|
12865
|
+
var slc = function(v, s, e) {
|
|
12866
|
+
if (e == null || e > v.length)
|
|
12867
|
+
e = v.length;
|
|
12868
|
+
var n = new (v instanceof u16 ? u16 : v instanceof u32 ? u32 : u8)(e - s);
|
|
12869
|
+
n.set(v.subarray(s, e));
|
|
12870
|
+
return n;
|
|
12871
|
+
};
|
|
12872
|
+
var wbits = function(d, p, v) {
|
|
12873
|
+
v <<= p & 7;
|
|
12874
|
+
var o = p / 8 >> 0;
|
|
12875
|
+
d[o] |= v;
|
|
12876
|
+
d[o + 1] |= v >>> 8;
|
|
12877
|
+
};
|
|
12878
|
+
var wbits16 = function(d, p, v) {
|
|
12879
|
+
v <<= p & 7;
|
|
12880
|
+
var o = p / 8 >> 0;
|
|
12881
|
+
d[o] |= v;
|
|
12882
|
+
d[o + 1] |= v >>> 8;
|
|
12883
|
+
d[o + 2] |= v >>> 16;
|
|
12884
|
+
};
|
|
12885
|
+
var hTree = function(d, mb) {
|
|
12886
|
+
var t = [];
|
|
12887
|
+
for (var i = 0;i < d.length; ++i) {
|
|
12888
|
+
if (d[i])
|
|
12889
|
+
t.push({ s: i, f: d[i] });
|
|
12890
|
+
}
|
|
12891
|
+
var s = t.length;
|
|
12892
|
+
var t2 = t.slice();
|
|
12893
|
+
if (!s)
|
|
12916
12894
|
return [new u8(0), 0];
|
|
12917
|
-
if (
|
|
12918
|
-
var
|
|
12919
|
-
|
|
12920
|
-
return [
|
|
12895
|
+
if (s == 1) {
|
|
12896
|
+
var v = new u8(t[0].s + 1);
|
|
12897
|
+
v[t[0].s] = 1;
|
|
12898
|
+
return [v, 1];
|
|
12921
12899
|
}
|
|
12922
|
-
|
|
12923
|
-
return
|
|
12900
|
+
t.sort(function(a, b) {
|
|
12901
|
+
return a.f - b.f;
|
|
12924
12902
|
});
|
|
12925
|
-
|
|
12926
|
-
var
|
|
12927
|
-
|
|
12928
|
-
while (i1 !=
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
|
|
12932
|
-
}
|
|
12933
|
-
var maxSym =
|
|
12934
|
-
for (var
|
|
12935
|
-
if (
|
|
12936
|
-
maxSym =
|
|
12903
|
+
t.push({ s: -1, f: 25001 });
|
|
12904
|
+
var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;
|
|
12905
|
+
t[0] = { s: -1, f: l.f + r.f, l, r };
|
|
12906
|
+
while (i1 != s - 1) {
|
|
12907
|
+
l = t[t[i0].f < t[i2].f ? i0++ : i2++];
|
|
12908
|
+
r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];
|
|
12909
|
+
t[i1++] = { s: -1, f: l.f + r.f, l, r };
|
|
12910
|
+
}
|
|
12911
|
+
var maxSym = t2[0].s;
|
|
12912
|
+
for (var i = 1;i < s; ++i) {
|
|
12913
|
+
if (t2[i].s > maxSym)
|
|
12914
|
+
maxSym = t2[i].s;
|
|
12937
12915
|
}
|
|
12938
12916
|
var tr = new u16(maxSym + 1);
|
|
12939
|
-
var mbt = ln(
|
|
12917
|
+
var mbt = ln(t[i1 - 1], tr, 0);
|
|
12940
12918
|
if (mbt > mb) {
|
|
12941
|
-
var
|
|
12919
|
+
var i = 0, dt = 0;
|
|
12942
12920
|
var lft = mbt - mb, cst = 1 << lft;
|
|
12943
|
-
|
|
12944
|
-
return tr[
|
|
12921
|
+
t2.sort(function(a, b) {
|
|
12922
|
+
return tr[b.s] - tr[a.s] || a.f - b.f;
|
|
12945
12923
|
});
|
|
12946
|
-
for (;
|
|
12947
|
-
var i2_1 =
|
|
12924
|
+
for (;i < s; ++i) {
|
|
12925
|
+
var i2_1 = t2[i].s;
|
|
12948
12926
|
if (tr[i2_1] > mb) {
|
|
12949
12927
|
dt += cst - (1 << mbt - tr[i2_1]);
|
|
12950
12928
|
tr[i2_1] = mb;
|
|
@@ -12953,14 +12931,14 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12953
12931
|
}
|
|
12954
12932
|
dt >>>= lft;
|
|
12955
12933
|
while (dt > 0) {
|
|
12956
|
-
var i2_2 =
|
|
12934
|
+
var i2_2 = t2[i].s;
|
|
12957
12935
|
if (tr[i2_2] < mb)
|
|
12958
12936
|
dt -= 1 << mb - tr[i2_2]++ - 1;
|
|
12959
12937
|
else
|
|
12960
|
-
++
|
|
12938
|
+
++i;
|
|
12961
12939
|
}
|
|
12962
|
-
for (;
|
|
12963
|
-
var i2_3 =
|
|
12940
|
+
for (;i >= 0 && dt; --i) {
|
|
12941
|
+
var i2_3 = t2[i].s;
|
|
12964
12942
|
if (tr[i2_3] == mb) {
|
|
12965
12943
|
--tr[i2_3];
|
|
12966
12944
|
++dt;
|
|
@@ -12970,73 +12948,73 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
12970
12948
|
}
|
|
12971
12949
|
return [new u8(tr), mbt];
|
|
12972
12950
|
};
|
|
12973
|
-
var ln = function(
|
|
12974
|
-
return
|
|
12951
|
+
var ln = function(n, l, d) {
|
|
12952
|
+
return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;
|
|
12975
12953
|
};
|
|
12976
|
-
var lc = function(
|
|
12977
|
-
var
|
|
12978
|
-
while (
|
|
12954
|
+
var lc = function(c) {
|
|
12955
|
+
var s = c.length;
|
|
12956
|
+
while (s && !c[--s])
|
|
12979
12957
|
;
|
|
12980
|
-
var cl = new u16(++
|
|
12981
|
-
var cli = 0, cln =
|
|
12982
|
-
var
|
|
12983
|
-
cl[cli++] =
|
|
12958
|
+
var cl = new u16(++s);
|
|
12959
|
+
var cli = 0, cln = c[0], cls = 1;
|
|
12960
|
+
var w = function(v) {
|
|
12961
|
+
cl[cli++] = v;
|
|
12984
12962
|
};
|
|
12985
|
-
for (var
|
|
12986
|
-
if (
|
|
12963
|
+
for (var i = 1;i <= s; ++i) {
|
|
12964
|
+
if (c[i] == cln && i != s)
|
|
12987
12965
|
++cls;
|
|
12988
12966
|
else {
|
|
12989
12967
|
if (!cln && cls > 2) {
|
|
12990
12968
|
for (;cls > 138; cls -= 138)
|
|
12991
|
-
|
|
12969
|
+
w(32754);
|
|
12992
12970
|
if (cls > 2) {
|
|
12993
|
-
|
|
12971
|
+
w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);
|
|
12994
12972
|
cls = 0;
|
|
12995
12973
|
}
|
|
12996
12974
|
} else if (cls > 3) {
|
|
12997
|
-
|
|
12975
|
+
w(cln), --cls;
|
|
12998
12976
|
for (;cls > 6; cls -= 6)
|
|
12999
|
-
|
|
12977
|
+
w(8304);
|
|
13000
12978
|
if (cls > 2)
|
|
13001
|
-
|
|
12979
|
+
w(cls - 3 << 5 | 8208), cls = 0;
|
|
13002
12980
|
}
|
|
13003
12981
|
while (cls--)
|
|
13004
|
-
|
|
12982
|
+
w(cln);
|
|
13005
12983
|
cls = 1;
|
|
13006
|
-
cln =
|
|
12984
|
+
cln = c[i];
|
|
13007
12985
|
}
|
|
13008
12986
|
}
|
|
13009
|
-
return [cl.subarray(0, cli),
|
|
12987
|
+
return [cl.subarray(0, cli), s];
|
|
13010
12988
|
};
|
|
13011
12989
|
var clen = function(cf, cl) {
|
|
13012
|
-
var
|
|
13013
|
-
for (var
|
|
13014
|
-
|
|
13015
|
-
return
|
|
12990
|
+
var l = 0;
|
|
12991
|
+
for (var i = 0;i < cl.length; ++i)
|
|
12992
|
+
l += cf[i] * cl[i];
|
|
12993
|
+
return l;
|
|
13016
12994
|
};
|
|
13017
12995
|
var wfblk = function(out, pos, dat) {
|
|
13018
|
-
var
|
|
13019
|
-
var
|
|
13020
|
-
out[
|
|
13021
|
-
out[
|
|
13022
|
-
out[
|
|
13023
|
-
out[
|
|
13024
|
-
for (var
|
|
13025
|
-
out[
|
|
13026
|
-
return (
|
|
13027
|
-
};
|
|
13028
|
-
var wblk = function(dat, out, final, syms, lf, df, eb, li, bs, bl,
|
|
13029
|
-
wbits(out,
|
|
12996
|
+
var s = dat.length;
|
|
12997
|
+
var o = shft(pos + 2);
|
|
12998
|
+
out[o] = s & 255;
|
|
12999
|
+
out[o + 1] = s >>> 8;
|
|
13000
|
+
out[o + 2] = out[o] ^ 255;
|
|
13001
|
+
out[o + 3] = out[o + 1] ^ 255;
|
|
13002
|
+
for (var i = 0;i < s; ++i)
|
|
13003
|
+
out[o + i + 4] = dat[i];
|
|
13004
|
+
return (o + 4 + s) * 8;
|
|
13005
|
+
};
|
|
13006
|
+
var wblk = function(dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
|
|
13007
|
+
wbits(out, p++, final);
|
|
13030
13008
|
++lf[256];
|
|
13031
|
-
var
|
|
13009
|
+
var _a2 = hTree(lf, 15), dlt = _a2[0], mlb = _a2[1];
|
|
13032
13010
|
var _b2 = hTree(df, 15), ddt = _b2[0], mdb = _b2[1];
|
|
13033
13011
|
var _c = lc(dlt), lclt = _c[0], nlc = _c[1];
|
|
13034
13012
|
var _d = lc(ddt), lcdt = _d[0], ndc = _d[1];
|
|
13035
13013
|
var lcfreq = new u16(19);
|
|
13036
|
-
for (var
|
|
13037
|
-
lcfreq[lclt[
|
|
13038
|
-
for (var
|
|
13039
|
-
lcfreq[lcdt[
|
|
13014
|
+
for (var i = 0;i < lclt.length; ++i)
|
|
13015
|
+
lcfreq[lclt[i] & 31]++;
|
|
13016
|
+
for (var i = 0;i < lcdt.length; ++i)
|
|
13017
|
+
lcfreq[lcdt[i] & 31]++;
|
|
13040
13018
|
var _e = hTree(lcfreq, 7), lct = _e[0], mlcb = _e[1];
|
|
13041
13019
|
var nlcc = 19;
|
|
13042
13020
|
for (;nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)
|
|
@@ -13045,111 +13023,111 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13045
13023
|
var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
|
|
13046
13024
|
var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + (2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18]);
|
|
13047
13025
|
if (flen <= ftlen && flen <= dtlen)
|
|
13048
|
-
return wfblk(out,
|
|
13026
|
+
return wfblk(out, p, dat.subarray(bs, bs + bl));
|
|
13049
13027
|
var lm, ll, dm, dl;
|
|
13050
|
-
wbits(out,
|
|
13028
|
+
wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
|
|
13051
13029
|
if (dtlen < ftlen) {
|
|
13052
13030
|
lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;
|
|
13053
13031
|
var llm = hMap(lct, mlcb, 0);
|
|
13054
|
-
wbits(out,
|
|
13055
|
-
wbits(out,
|
|
13056
|
-
wbits(out,
|
|
13057
|
-
|
|
13058
|
-
for (var
|
|
13059
|
-
wbits(out,
|
|
13060
|
-
|
|
13032
|
+
wbits(out, p, nlc - 257);
|
|
13033
|
+
wbits(out, p + 5, ndc - 1);
|
|
13034
|
+
wbits(out, p + 10, nlcc - 4);
|
|
13035
|
+
p += 14;
|
|
13036
|
+
for (var i = 0;i < nlcc; ++i)
|
|
13037
|
+
wbits(out, p + 3 * i, lct[clim[i]]);
|
|
13038
|
+
p += 3 * nlcc;
|
|
13061
13039
|
var lcts = [lclt, lcdt];
|
|
13062
13040
|
for (var it = 0;it < 2; ++it) {
|
|
13063
13041
|
var clct = lcts[it];
|
|
13064
|
-
for (var
|
|
13065
|
-
var len = clct[
|
|
13066
|
-
wbits(out,
|
|
13042
|
+
for (var i = 0;i < clct.length; ++i) {
|
|
13043
|
+
var len = clct[i] & 31;
|
|
13044
|
+
wbits(out, p, llm[len]), p += lct[len];
|
|
13067
13045
|
if (len > 15)
|
|
13068
|
-
wbits(out,
|
|
13046
|
+
wbits(out, p, clct[i] >>> 5 & 127), p += clct[i] >>> 12;
|
|
13069
13047
|
}
|
|
13070
13048
|
}
|
|
13071
13049
|
} else {
|
|
13072
13050
|
lm = flm, ll = flt, dm = fdm, dl = fdt;
|
|
13073
13051
|
}
|
|
13074
|
-
for (var
|
|
13075
|
-
if (syms[
|
|
13076
|
-
var len = syms[
|
|
13077
|
-
wbits16(out,
|
|
13052
|
+
for (var i = 0;i < li; ++i) {
|
|
13053
|
+
if (syms[i] > 255) {
|
|
13054
|
+
var len = syms[i] >>> 18 & 31;
|
|
13055
|
+
wbits16(out, p, lm[len + 257]), p += ll[len + 257];
|
|
13078
13056
|
if (len > 7)
|
|
13079
|
-
wbits(out,
|
|
13080
|
-
var dst = syms[
|
|
13081
|
-
wbits16(out,
|
|
13057
|
+
wbits(out, p, syms[i] >>> 23 & 31), p += fleb[len];
|
|
13058
|
+
var dst = syms[i] & 31;
|
|
13059
|
+
wbits16(out, p, dm[dst]), p += dl[dst];
|
|
13082
13060
|
if (dst > 3)
|
|
13083
|
-
wbits16(out,
|
|
13061
|
+
wbits16(out, p, syms[i] >>> 5 & 8191), p += fdeb[dst];
|
|
13084
13062
|
} else {
|
|
13085
|
-
wbits16(out,
|
|
13063
|
+
wbits16(out, p, lm[syms[i]]), p += ll[syms[i]];
|
|
13086
13064
|
}
|
|
13087
13065
|
}
|
|
13088
|
-
wbits16(out,
|
|
13089
|
-
return
|
|
13066
|
+
wbits16(out, p, lm[256]);
|
|
13067
|
+
return p + ll[256];
|
|
13090
13068
|
};
|
|
13091
13069
|
var deo = /* @__PURE__ */ new u32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);
|
|
13092
13070
|
var dflt = function(dat, lvl, plvl, pre, post, lst) {
|
|
13093
|
-
var
|
|
13094
|
-
var
|
|
13095
|
-
var
|
|
13071
|
+
var s = dat.length;
|
|
13072
|
+
var o = new u8(pre + s + 5 * (1 + Math.floor(s / 7000)) + post);
|
|
13073
|
+
var w = o.subarray(pre, o.length - post);
|
|
13096
13074
|
var pos = 0;
|
|
13097
|
-
if (!lvl ||
|
|
13098
|
-
for (var
|
|
13099
|
-
var
|
|
13100
|
-
if (
|
|
13101
|
-
pos = wfblk(
|
|
13075
|
+
if (!lvl || s < 8) {
|
|
13076
|
+
for (var i = 0;i <= s; i += 65535) {
|
|
13077
|
+
var e = i + 65535;
|
|
13078
|
+
if (e < s) {
|
|
13079
|
+
pos = wfblk(w, pos, dat.subarray(i, e));
|
|
13102
13080
|
} else {
|
|
13103
|
-
|
|
13104
|
-
pos = wfblk(
|
|
13081
|
+
w[i] = lst;
|
|
13082
|
+
pos = wfblk(w, pos, dat.subarray(i, s));
|
|
13105
13083
|
}
|
|
13106
13084
|
}
|
|
13107
13085
|
} else {
|
|
13108
13086
|
var opt = deo[lvl - 1];
|
|
13109
|
-
var
|
|
13087
|
+
var n = opt >>> 13, c = opt & 8191;
|
|
13110
13088
|
var msk_1 = (1 << plvl) - 1;
|
|
13111
13089
|
var prev = new u16(32768), head = new u16(msk_1 + 1);
|
|
13112
13090
|
var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;
|
|
13113
|
-
var hsh = function(
|
|
13114
|
-
return (dat[
|
|
13091
|
+
var hsh = function(i2) {
|
|
13092
|
+
return (dat[i2] ^ dat[i2 + 1] << bs1_1 ^ dat[i2 + 2] << bs2_1) & msk_1;
|
|
13115
13093
|
};
|
|
13116
13094
|
var syms = new u32(25000);
|
|
13117
13095
|
var lf = new u16(288), df = new u16(32);
|
|
13118
|
-
var lc_1 = 0, eb = 0,
|
|
13119
|
-
for (;
|
|
13120
|
-
var hv = hsh(
|
|
13121
|
-
var imod =
|
|
13096
|
+
var lc_1 = 0, eb = 0, i = 0, li = 0, wi = 0, bs = 0;
|
|
13097
|
+
for (;i < s; ++i) {
|
|
13098
|
+
var hv = hsh(i);
|
|
13099
|
+
var imod = i & 32767;
|
|
13122
13100
|
var pimod = head[hv];
|
|
13123
13101
|
prev[imod] = pimod;
|
|
13124
13102
|
head[hv] = imod;
|
|
13125
|
-
if (wi <=
|
|
13126
|
-
var rem =
|
|
13103
|
+
if (wi <= i) {
|
|
13104
|
+
var rem = s - i;
|
|
13127
13105
|
if ((lc_1 > 7000 || li > 24576) && rem > 423) {
|
|
13128
|
-
pos = wblk(dat,
|
|
13129
|
-
li = lc_1 = eb = 0, bs =
|
|
13130
|
-
for (var
|
|
13131
|
-
lf[
|
|
13132
|
-
for (var
|
|
13133
|
-
df[
|
|
13134
|
-
}
|
|
13135
|
-
var
|
|
13136
|
-
if (rem > 2 && hv == hsh(
|
|
13137
|
-
var maxn = Math.min(
|
|
13138
|
-
var maxd = Math.min(32767,
|
|
13106
|
+
pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);
|
|
13107
|
+
li = lc_1 = eb = 0, bs = i;
|
|
13108
|
+
for (var j = 0;j < 286; ++j)
|
|
13109
|
+
lf[j] = 0;
|
|
13110
|
+
for (var j = 0;j < 30; ++j)
|
|
13111
|
+
df[j] = 0;
|
|
13112
|
+
}
|
|
13113
|
+
var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;
|
|
13114
|
+
if (rem > 2 && hv == hsh(i - dif)) {
|
|
13115
|
+
var maxn = Math.min(n, rem) - 1;
|
|
13116
|
+
var maxd = Math.min(32767, i);
|
|
13139
13117
|
var ml = Math.min(258, rem);
|
|
13140
13118
|
while (dif <= maxd && --ch_1 && imod != pimod) {
|
|
13141
|
-
if (dat[
|
|
13119
|
+
if (dat[i + l] == dat[i + l - dif]) {
|
|
13142
13120
|
var nl = 0;
|
|
13143
|
-
for (;nl < ml && dat[
|
|
13121
|
+
for (;nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)
|
|
13144
13122
|
;
|
|
13145
|
-
if (nl >
|
|
13146
|
-
|
|
13123
|
+
if (nl > l) {
|
|
13124
|
+
l = nl, d = dif;
|
|
13147
13125
|
if (nl > maxn)
|
|
13148
13126
|
break;
|
|
13149
13127
|
var mmd = Math.min(dif, nl - 2);
|
|
13150
13128
|
var md = 0;
|
|
13151
|
-
for (var
|
|
13152
|
-
var ti =
|
|
13129
|
+
for (var j = 0;j < mmd; ++j) {
|
|
13130
|
+
var ti = i - dif + j + 32768 & 32767;
|
|
13153
13131
|
var pti = prev[ti];
|
|
13154
13132
|
var cd = ti - pti + 32768 & 32767;
|
|
13155
13133
|
if (cd > md)
|
|
@@ -13161,106 +13139,106 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13161
13139
|
dif += imod - pimod + 32768 & 32767;
|
|
13162
13140
|
}
|
|
13163
13141
|
}
|
|
13164
|
-
if (
|
|
13165
|
-
syms[li++] = 268435456 | revfl[
|
|
13166
|
-
var lin = revfl[
|
|
13142
|
+
if (d) {
|
|
13143
|
+
syms[li++] = 268435456 | revfl[l] << 18 | revfd[d];
|
|
13144
|
+
var lin = revfl[l] & 31, din = revfd[d] & 31;
|
|
13167
13145
|
eb += fleb[lin] + fdeb[din];
|
|
13168
13146
|
++lf[257 + lin];
|
|
13169
13147
|
++df[din];
|
|
13170
|
-
wi =
|
|
13148
|
+
wi = i + l;
|
|
13171
13149
|
++lc_1;
|
|
13172
13150
|
} else {
|
|
13173
|
-
syms[li++] = dat[
|
|
13174
|
-
++lf[dat[
|
|
13151
|
+
syms[li++] = dat[i];
|
|
13152
|
+
++lf[dat[i]];
|
|
13175
13153
|
}
|
|
13176
13154
|
}
|
|
13177
13155
|
}
|
|
13178
|
-
pos = wblk(dat,
|
|
13156
|
+
pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
|
|
13179
13157
|
}
|
|
13180
|
-
return slc(
|
|
13158
|
+
return slc(o, 0, pre + shft(pos) + post);
|
|
13181
13159
|
};
|
|
13182
13160
|
var adler = function() {
|
|
13183
|
-
var
|
|
13161
|
+
var a = 1, b = 0;
|
|
13184
13162
|
return {
|
|
13185
|
-
p: function(
|
|
13186
|
-
var
|
|
13187
|
-
var
|
|
13188
|
-
for (var
|
|
13189
|
-
var
|
|
13190
|
-
for (;
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
}
|
|
13194
|
-
|
|
13163
|
+
p: function(d) {
|
|
13164
|
+
var n = a, m = b;
|
|
13165
|
+
var l = d.length;
|
|
13166
|
+
for (var i = 0;i != l; ) {
|
|
13167
|
+
var e = Math.min(i + 5552, l);
|
|
13168
|
+
for (;i < e; ++i)
|
|
13169
|
+
n += d[i], m += n;
|
|
13170
|
+
n %= 65521, m %= 65521;
|
|
13171
|
+
}
|
|
13172
|
+
a = n, b = m;
|
|
13195
13173
|
},
|
|
13196
13174
|
d: function() {
|
|
13197
|
-
return (
|
|
13175
|
+
return (a >>> 8 << 16 | (b & 255) << 8 | b >>> 8) + ((a & 255) << 23) * 2;
|
|
13198
13176
|
}
|
|
13199
13177
|
};
|
|
13200
13178
|
};
|
|
13201
13179
|
var dopt = function(dat, opt, pre, post, st) {
|
|
13202
13180
|
return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 12 + opt.mem, pre, post, !st);
|
|
13203
13181
|
};
|
|
13204
|
-
var wbytes = function(
|
|
13205
|
-
for (;
|
|
13206
|
-
|
|
13182
|
+
var wbytes = function(d, b, v) {
|
|
13183
|
+
for (;v; ++b)
|
|
13184
|
+
d[b] = v, v >>>= 8;
|
|
13207
13185
|
};
|
|
13208
|
-
var zlh = function(
|
|
13209
|
-
var lv =
|
|
13210
|
-
|
|
13186
|
+
var zlh = function(c, o) {
|
|
13187
|
+
var lv = o.level, fl2 = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;
|
|
13188
|
+
c[0] = 120, c[1] = fl2 << 6 | (fl2 ? 32 - 2 * fl2 : 1);
|
|
13211
13189
|
};
|
|
13212
13190
|
function zlibSync(data, opts) {
|
|
13213
13191
|
if (opts === undefined) {
|
|
13214
13192
|
opts = {};
|
|
13215
13193
|
}
|
|
13216
|
-
var
|
|
13217
|
-
|
|
13218
|
-
var
|
|
13219
|
-
return zlh(
|
|
13194
|
+
var a = adler();
|
|
13195
|
+
a.p(data);
|
|
13196
|
+
var d = dopt(data, opts, 2, 4);
|
|
13197
|
+
return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;
|
|
13220
13198
|
}
|
|
13221
13199
|
function strToU8(str, latin1) {
|
|
13222
|
-
var
|
|
13200
|
+
var l = str.length;
|
|
13223
13201
|
if (!latin1 && typeof TextEncoder != "undefined")
|
|
13224
13202
|
return new TextEncoder().encode(str);
|
|
13225
13203
|
var ar = new u8(str.length + (str.length >>> 1));
|
|
13226
13204
|
var ai = 0;
|
|
13227
|
-
var
|
|
13228
|
-
ar[ai++] =
|
|
13205
|
+
var w = function(v) {
|
|
13206
|
+
ar[ai++] = v;
|
|
13229
13207
|
};
|
|
13230
|
-
for (var
|
|
13208
|
+
for (var i = 0;i < l; ++i) {
|
|
13231
13209
|
if (ai + 5 > ar.length) {
|
|
13232
|
-
var
|
|
13233
|
-
|
|
13234
|
-
ar =
|
|
13235
|
-
}
|
|
13236
|
-
var
|
|
13237
|
-
if (
|
|
13238
|
-
|
|
13239
|
-
else if (
|
|
13240
|
-
|
|
13241
|
-
else if (
|
|
13242
|
-
|
|
13210
|
+
var n = new u8(ai + 8 + (l - i << 1));
|
|
13211
|
+
n.set(ar);
|
|
13212
|
+
ar = n;
|
|
13213
|
+
}
|
|
13214
|
+
var c = str.charCodeAt(i);
|
|
13215
|
+
if (c < 128 || latin1)
|
|
13216
|
+
w(c);
|
|
13217
|
+
else if (c < 2048)
|
|
13218
|
+
w(192 | c >>> 6), w(128 | c & 63);
|
|
13219
|
+
else if (c > 55295 && c < 57344)
|
|
13220
|
+
c = 65536 + (c & 1023 << 10) | str.charCodeAt(++i) & 1023, w(240 | c >>> 18), w(128 | c >>> 12 & 63), w(128 | c >>> 6 & 63), w(128 | c & 63);
|
|
13243
13221
|
else
|
|
13244
|
-
|
|
13222
|
+
w(224 | c >>> 12), w(128 | c >>> 6 & 63), w(128 | c & 63);
|
|
13245
13223
|
}
|
|
13246
13224
|
return slc(ar, 0, ai);
|
|
13247
13225
|
}
|
|
13248
13226
|
function strFromU8(dat, latin1) {
|
|
13249
|
-
var
|
|
13227
|
+
var r = "";
|
|
13250
13228
|
if (!latin1 && typeof TextDecoder != "undefined")
|
|
13251
13229
|
return new TextDecoder().decode(dat);
|
|
13252
|
-
for (var
|
|
13253
|
-
var
|
|
13254
|
-
if (
|
|
13255
|
-
|
|
13256
|
-
else if (
|
|
13257
|
-
|
|
13258
|
-
else if (
|
|
13259
|
-
|
|
13230
|
+
for (var i = 0;i < dat.length; ) {
|
|
13231
|
+
var c = dat[i++];
|
|
13232
|
+
if (c < 128 || latin1)
|
|
13233
|
+
r += String.fromCharCode(c);
|
|
13234
|
+
else if (c < 224)
|
|
13235
|
+
r += String.fromCharCode((c & 31) << 6 | dat[i++] & 63);
|
|
13236
|
+
else if (c < 240)
|
|
13237
|
+
r += String.fromCharCode((c & 15) << 12 | (dat[i++] & 63) << 6 | dat[i++] & 63);
|
|
13260
13238
|
else
|
|
13261
|
-
|
|
13239
|
+
c = ((c & 15) << 18 | (dat[i++] & 63) << 12 | (dat[i++] & 63) << 6 | dat[i++] & 63) - 65536, r += String.fromCharCode(55296 | c >> 10, 56320 | c & 1023);
|
|
13262
13240
|
}
|
|
13263
|
-
return
|
|
13241
|
+
return r;
|
|
13264
13242
|
}
|
|
13265
13243
|
var MARK = "v1";
|
|
13266
13244
|
|
|
@@ -13309,8 +13287,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13309
13287
|
localStorage.removeItem("currentRecordingSessionId");
|
|
13310
13288
|
else
|
|
13311
13289
|
localStorage.setItem("currentRecordingSessionId", sessionId);
|
|
13312
|
-
} catch {
|
|
13313
|
-
}
|
|
13290
|
+
} catch {}
|
|
13314
13291
|
}
|
|
13315
13292
|
function getSessionMetadata() {
|
|
13316
13293
|
if (typeof window === "undefined")
|
|
@@ -13559,8 +13536,8 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13559
13536
|
const unloadUrl = withIngestKey(url, this.ingestKey);
|
|
13560
13537
|
if (isReliable) {
|
|
13561
13538
|
if (navigator.sendBeacon) {
|
|
13562
|
-
const
|
|
13563
|
-
if (!navigator.sendBeacon(unloadUrl,
|
|
13539
|
+
const blob = beaconBlob(JSON.stringify(payload), this.ingestKey);
|
|
13540
|
+
if (!navigator.sendBeacon(unloadUrl, blob)) {
|
|
13564
13541
|
await fetch(unloadUrl, {
|
|
13565
13542
|
method: "POST",
|
|
13566
13543
|
headers: { "Content-Type": "application/json" },
|
|
@@ -13877,8 +13854,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13877
13854
|
}
|
|
13878
13855
|
}, "POST", basePath, ingestKey);
|
|
13879
13856
|
};
|
|
13880
|
-
const identify = async () => {
|
|
13881
|
-
};
|
|
13857
|
+
const identify = async () => {};
|
|
13882
13858
|
if (enabled) {
|
|
13883
13859
|
if (autoTrackPageviews) {
|
|
13884
13860
|
cleanups.push(setupPageviewTracking(trackPageview));
|
|
@@ -13964,8 +13940,7 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
13964
13940
|
const legacy = window.localStorage?.temps_ignore;
|
|
13965
13941
|
if (legacy === "true")
|
|
13966
13942
|
return false;
|
|
13967
|
-
} catch {
|
|
13968
|
-
}
|
|
13943
|
+
} catch {}
|
|
13969
13944
|
return true;
|
|
13970
13945
|
}
|
|
13971
13946
|
function setupPageviewTracking(trackPageview) {
|
|
@@ -14071,12 +14046,12 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
14071
14046
|
function readDataset() {
|
|
14072
14047
|
if (typeof document === "undefined")
|
|
14073
14048
|
return {};
|
|
14074
|
-
const script = document.currentScript ?? document.querySelector("script[data-temps]") ?? Array.from(document.scripts).reverse().find((
|
|
14049
|
+
const script = document.currentScript ?? document.querySelector("script[data-temps]") ?? Array.from(document.scripts).reverse().find((s) => !!s.dataset?.domain || !!s.dataset?.basePath || !!s.dataset?.ingestKey) ?? null;
|
|
14075
14050
|
if (!script)
|
|
14076
14051
|
return {};
|
|
14077
14052
|
const ds = script.dataset;
|
|
14078
14053
|
const opts = {};
|
|
14079
|
-
const
|
|
14054
|
+
const recording = {};
|
|
14080
14055
|
if (ds.basePath)
|
|
14081
14056
|
opts.basePath = ds.basePath;
|
|
14082
14057
|
if (ds.ingestKey)
|
|
@@ -14106,13 +14081,13 @@ or you can use record.mirror to access the mirror instance during recording.`;
|
|
|
14106
14081
|
if (ds.sessionRecording)
|
|
14107
14082
|
opts.enableSessionRecording = ds.sessionRecording === "true";
|
|
14108
14083
|
if (ds.sessionSampleRate)
|
|
14109
|
-
|
|
14084
|
+
recording.sessionSampleRate = Number(ds.sessionSampleRate);
|
|
14110
14085
|
if (ds.maskAllInputs)
|
|
14111
|
-
|
|
14086
|
+
recording.maskAllInputs = ds.maskAllInputs === "true";
|
|
14112
14087
|
if (ds.excludedPaths)
|
|
14113
|
-
|
|
14114
|
-
if (Object.keys(
|
|
14115
|
-
opts.sessionRecordingConfig =
|
|
14088
|
+
recording.excludedPaths = ds.excludedPaths.split(",").map((s) => s.trim());
|
|
14089
|
+
if (Object.keys(recording).length > 0)
|
|
14090
|
+
opts.sessionRecordingConfig = recording;
|
|
14116
14091
|
return opts;
|
|
14117
14092
|
}
|
|
14118
14093
|
function boot() {
|