@posthog/rrweb-player 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/rrweb-player.cjs +1 -1
- package/dist/rrweb-player.cjs.map +1 -1
- package/dist/rrweb-player.js +1 -1
- package/dist/rrweb-player.js.map +1 -1
- package/dist/rrweb-player.umd.cjs +1 -1
- package/dist/rrweb-player.umd.cjs.map +1 -1
- package/dist/rrweb-player.umd.min.cjs +2 -1
- package/dist/rrweb-player.umd.min.cjs.map +2 -2
- package/package.json +3 -3
|
@@ -126,11 +126,12 @@ or you can use record.mirror to access the mirror instance during recording.`;le
|
|
|
126
126
|
});
|
|
127
127
|
lastBlobMap.set(id, base64);
|
|
128
128
|
} else {
|
|
129
|
+
e.data.bitmap.close();
|
|
129
130
|
return worker.postMessage({ id: e.data.id });
|
|
130
131
|
}
|
|
131
132
|
};
|
|
132
133
|
})();
|
|
133
|
-
//# sourceMappingURL=image-bitmap-data-url-worker-
|
|
134
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-DqRH07Di.js.map
|
|
134
135
|
`;typeof self!="undefined"&&self.Blob&&new Blob([Tu],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Vi=e.contentWindow)==null?void 0:Vi.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Zn();function Lo(e){return{all:e=e||new Map,on:function(t,r){var s=e.get(t);s?s.push(r):e.set(t,[r])},off:function(t,r){var s=e.get(t);s&&(r?s.splice(s.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var s=e.get(t);s&&s.slice().map(function(i){i(r)}),(s=e.get("*"))&&s.slice().map(function(i){i(t,r)})}}}const ku=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"}));function Iu(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const r=e.HTMLElement||e.Element,s=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||d,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(v){const y=["MSIE ","Trident/","Edge/"];return new RegExp(y.join("|")).test(v)}const u=o(e.navigator.userAgent)?1:0;function d(v,y){this.scrollLeft=v,this.scrollTop=y}function l(v){return .5*(1-Math.cos(Math.PI*v))}function n(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(v,y){if(y==="Y")return v.clientHeight+u<v.scrollHeight;if(y==="X")return v.clientWidth+u<v.scrollWidth}function f(v,y){const S=e.getComputedStyle(v,null)["overflow"+y];return S==="auto"||S==="scroll"}function h(v){const y=c(v,"Y")&&f(v,"Y"),S=c(v,"X")&&f(v,"X");return y||S}function p(v){for(;v!==t.body&&h(v)===!1;)v=v.parentNode||v.host;return v}function m(v){const y=a();let S,C,w,b=(y-v.startTime)/s;b=b>1?1:b,S=l(b),C=v.startX+(v.x-v.startX)*S,w=v.startY+(v.y-v.startY)*S,v.method.call(v.scrollable,C,w),(C!==v.x||w!==v.y)&&e.requestAnimationFrame(m.bind(e,v))}function g(v,y,S){let C,w,b,E;const R=a();v===t.body?(C=e,w=e.scrollX||e.pageXOffset,b=e.scrollY||e.pageYOffset,E=i.scroll):(C=v,w=v.scrollLeft,b=v.scrollTop,E=d),m({scrollable:C,method:E,startTime:R,startX:w,startY:b,x:y,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(n(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,y=arguments[0].top;g.call(this,this,typeof v=="undefined"?this.scrollLeft:~~v,typeof y=="undefined"?this.scrollTop:~~y)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(n(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(n(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=p(this),y=v.getBoundingClientRect(),S=this.getBoundingClientRect();v!==t.body?(g.call(this,v,v.scrollLeft+S.left-y.left,v.scrollTop+S.top-y.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}class Lu{constructor(t=[],r){F(this,"timeOffset",0),F(this,"speed"),F(this,"actions"),F(this,"raf",null),F(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const s=this.findActionIndex(t);this.actions.splice(s,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,s=this.actions.length-1;for(;r<=s;){const i=Math.floor((r+s)/2);if(this.actions[i].delay<t.delay)r=i+1;else if(this.actions[i].delay>t.delay)s=i-1;else return i+1}return r}}function gn(e,t){if(e.type===te.IncrementalSnapshot&&e.data.source===Y.MouseMove&&e.data.positions&&e.data.positions.length){const r=e.data.positions[0].timeOffset,s=e.timestamp+r;return e.delay=s-t,s-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
135
136
|
Copyright (c) Microsoft Corporation.
|
|
136
137
|
|