Socket
Socket
Sign inDemoInstall

rrweb

Package Overview
Dependencies
Maintainers
1
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rrweb - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

LICENSE

49

dist/record/rrweb-record.js

@@ -72,7 +72,8 @@ var rrwebRecord = (function () {

}
var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var URL_IN_CSS_REF = /url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
var DATA_URI = /^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
return cssText.replace(URL_IN_CSS_REF, function (_1, path1, path2, path3) {
var filePath = path1 || path2 || path3;
if (!RELATIVE_PATH.test(filePath)) {

@@ -137,2 +138,5 @@ return "url('" + filePath + "')";

}
else if (name === 'style') {
attributes_1[name] = absoluteToStylesheet(value, location.href);
}
else {

@@ -334,2 +338,13 @@ attributes_1[name] = value;

}
var BLOCK_CLASS$1 = 'rr-block';
function isBlocked(node) {
if (!node) {
return false;
}
if (node.nodeType === node.ELEMENT_NODE) {
return (node.classList.contains(BLOCK_CLASS$1) ||
isBlocked(node.parentNode));
}
return isBlocked(node.parentNode);
}

@@ -376,2 +391,5 @@ var EventType;

var genAdds = function (n) {
if (isBlocked(n)) {
return;
}
addsSet.add(n);

@@ -385,3 +403,3 @@ n.childNodes.forEach(function (childN) { return genAdds(childN); });

var value = target.textContent;
if (value !== oldValue) {
if (!isBlocked(target) && value !== oldValue) {
texts.push({

@@ -396,3 +414,3 @@ value: value,

var value = target.getAttribute(attributeName);
if (value === oldValue) {
if (isBlocked(target) || value === oldValue) {
return;

@@ -409,2 +427,3 @@ }

item.attributes[attributeName] = value;
break;
}

@@ -414,2 +433,5 @@ case 'childList': {

removedNodes.forEach(function (n) {
if (isBlocked(n)) {
return;
}
if (addsSet.has(n)) {

@@ -479,3 +501,3 @@ addsSet["delete"](n);

});
cb({
var payload = {
texts: texts

@@ -495,3 +517,10 @@ .map(function (text) { return ({

adds: adds
});
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
cb(payload);
});

@@ -541,2 +570,5 @@ observer.observe(document, {

return function (event) {
if (isBlocked(event.target)) {
return;
}
var id = mirror.getId(event.target);

@@ -565,3 +597,3 @@ var clientX = event.clientX, clientY = event.clientY;

var updatePosition = throttle(function (evt) {
if (!evt.target) {
if (!evt.target || isBlocked(evt.target)) {
return;

@@ -613,3 +645,4 @@ }

!target.tagName ||
INPUT_TAGS.indexOf(target.tagName) < 0) {
INPUT_TAGS.indexOf(target.tagName) < 0 ||
isBlocked(target)) {
return;

@@ -616,0 +649,0 @@ }

2

dist/record/rrweb-record.min.js

@@ -1,2 +0,2 @@

var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var n=1;var r=/url\((['"]|)([^'"]*)\1\)/gm,o=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,u=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function a(e,t){return e.replace(r,function(e,n,r){if(!o.test(r))return"url('"+r+"')";if(u.test(r))return"url("+r+")";if("/"===r[0])return"url('"+(((a=t).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+r)+"')";var a,i=t.split("/"),c=r.split("/");i.pop();for(var s=0,d=c;s<d.length;s++){var l=d[s];"."!==l&&(".."===l?i.pop():i.push(l))}return"url('"+i.join("/")+"')"})}function i(e,t){var n=e.createElement("a");return n.href=t,n.href}var c="rr-block";function s(t,n){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var r=t.classList.contains(c),o=t.tagName.toLowerCase(),u={},s=0,d=Array.from(t.attributes);s<d.length;s++){var l=d[s],p=l.name,f=l.value;u[p]="src"===p||"href"===p?i(n,f):f}if("link"===o){var m=Array.from(n.styleSheets).find(function(e){return e.href===t.href}),h=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(m);h&&(u={_cssText:a(h,m.href)})}if("input"===o||"textarea"===o||"select"===o){f=t.value;"radio"!==u.type&&"checkbox"!==u.type&&f?u.value=f:t.checked&&(u.checked=t.checked)}if("option"===o){var v=t.parentElement;u.value===v.value&&(u.selected=t.selected)}if(r){var g=t.getBoundingClientRect(),y=g.width,E=g.height;u.rr_width=y+"px",u.rr_height=E+"px"}return{type:e.Element,tagName:o,attributes:u,childNodes:[],isSVG:(I=t,"svg"===I.tagName||I instanceof SVGElement||void 0),needBlock:r};case t.TEXT_NODE:var b=t.parentNode&&t.parentNode.tagName,w=t.textContent,C="STYLE"===b||void 0;return C&&w&&(w=a(w,location.href)),"SCRIPT"===b&&(w="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:w||"",isStyle:C};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var I}function d(t,r,o,u){void 0===u&&(u=!1);var a=s(t,r);if(!a)return console.warn(t,"not serialized"),null;var i=Object.assign(a,{id:n++});t.__sn=i,o[i.id]=t;var c=!u;if(i.type===e.Element&&(c=c&&!i.needBlock,delete i.needBlock),(i.type===e.Document||i.type===e.Element)&&c)for(var l=0,p=Array.from(t.childNodes);l<p.length;l++){var f=d(p[l],r,o);f&&i.childNodes.push(f)}return i}function l(e){n=1;var t={};return[d(e,e,t),t]}function p(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var f,m,h,v={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return v.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete v.map[t],e.childNodes&&e.childNodes.forEach(function(e){return v.removeNodeFromMap(e)})},has:function(e){return v.map.hasOwnProperty(e)}};function g(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var u=Date.now();o||!1!==n.leading||(o=u);var a=t-(u-o),i=this,c=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=u,e.apply(i,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(i,c)},a))}}function y(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function E(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function b(e){var t=[];return Object.keys(h).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){var r=v.getId(n.target),o=n.clientX,u=n.clientY;e({type:h[t],id:r,x:o,y:u})}}(n);t.push(p(r,o))}),function(){t.forEach(function(e){return e()})}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(f||(f={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(m||(m={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(h||(h={}));var w=["INPUT","TEXTAREA","SELECT"],C=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],I="rr-ignore",N=new WeakMap;function T(e){function n(e){var t=e.target;if(t&&t.tagName&&!(w.indexOf(t.tagName)<0)){var n=t.type;if("password"!==n&&!t.classList.contains(I)){var o=t.value,u=!1;"radio"!==n&&"checkbox"!==n||(u=t.checked),r(t,{text:o,isChecked:u});var a=t.name;"radio"===n&&a&&u&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&r(e,{text:e.value,isChecked:!u})})}}}function r(n,r){var o=N.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){N.set(n,r);var u=v.getId(n);e(t({},r,{id:u}))}}var o=["input","change"].map(function(e){return p(e,n)}),u=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return u&&u.set&&o.push.apply(o,C.map(function(e){return function e(t,n,r){var o=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return e(t,n,o||{})}}(e[0],e[1],{set:function(){n({target:this})}})})),function(){o.forEach(function(e){return e()})}}function D(e){var t,n,r=(t=e.mutationCb,(n=new MutationObserver(function(e){var n=[],r=[],o=[],u=[],a=[],i=new Set,c=function(e){i.add(e),e.childNodes.forEach(function(e){return c(e)})};e.forEach(function(e){var t=e.type,u=e.target,s=e.oldValue,d=e.addedNodes,l=e.removedNodes,p=e.attributeName;switch(t){case"characterData":(f=u.textContent)!==s&&n.push({value:f,node:u});break;case"attributes":var f;if((f=u.getAttribute(p))===s)return;var m=r.find(function(e){return e.node===u});m||(m={node:u,attributes:{}},r.push(m)),m.attributes[p]=f;case"childList":d.forEach(function(e){return c(e)}),l.forEach(function(e){i.has(e)?(i.delete(e),a.push(e)):i.has(u)&&!v.getId(e)||o.push({parentId:v.getId(u),id:v.getId(e)}),v.removeNodeFromMap(e)})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=v.getId(e.parentNode),delete e.parentNode),e});var s=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||s(t))},l=function(e){var t=e.parentNode;if(!t)return!1;var n=v.getId(t);return!!o.some(function(e){return e.id===n})||l(t)};Array.from(i).forEach(function(e){s(e)||l(e)?a.push(e):u.push({parentId:v.getId(e.parentNode),previousId:e.previousSibling?v.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?v.getId(e.nextSibling):e.nextSibling,node:d(e,document,v.map,!0)})}),t({texts:n.map(function(e){return{id:v.getId(e.node),value:e.value}}).filter(function(e){return v.has(e.id)}),attributes:r.map(function(e){return{id:v.getId(e.node),attributes:e.attributes}}).filter(function(e){return v.has(e.id)}),removes:o,adds:u})})).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n),o=function(e){var t,n=[],r=g(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return p("mousemove",g(function(e){var o=e.clientX,u=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:o,y:u,id:v.getId(a),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}(e.mousemoveCb),u=b(e.mouseInteractionCb),a=function(e){return p("scroll",g(function(t){if(t.target){var n=v.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}(e.scrollCb),i=function(e){return p("resize",g(function(){var t=y(),n=E();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),c=T(e.inputCb);return function(){r.disconnect(),o(),u(),a(),i(),c()}}function M(e){return t({},e,{timestamp:Date.now()})}return function(e){void 0===e&&(e={});var n=e.emit;if(!n)throw new Error("emit function is required");try{var r=[];r.push(p("DOMContentLoaded",function(){n(M({type:f.DomContentLoaded,data:{}}))}));var o=function(){n(M({type:f.Meta,data:{href:window.location.href,width:E(),height:y()}}));var e=l(document),o=e[0],u=e[1];if(!o)return console.warn("Failed to snapshot the document");v.map=u,n(M({type:f.FullSnapshot,data:{node:o,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),r.push(D({mutationCb:function(e){return n(M({type:f.IncrementalSnapshot,data:t({source:m.Mutation},e)}))},mousemoveCb:function(e){return n(M({type:f.IncrementalSnapshot,data:{source:m.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return n(M({type:f.IncrementalSnapshot,data:t({source:m.MouseInteraction},e)}))},scrollCb:function(e){return n(M({type:f.IncrementalSnapshot,data:t({source:m.Scroll},e)}))},viewportResizeCb:function(e){return n(M({type:f.IncrementalSnapshot,data:t({source:m.ViewportResize},e)}))},inputCb:function(e){return n(M({type:f.IncrementalSnapshot,data:t({source:m.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?o():r.push(p("load",function(){n(M({type:f.Load,data:{}})),o()},window)),function(){r.forEach(function(e){return e()})}}catch(e){console.warn(e)}}}();
var rrwebRecord=function(){"use strict";var e,t=function(){return(t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(e||(e={}));var n=1;var r=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,o=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,a=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function u(e,t){return e.replace(r,function(e,n,r,u){var i,c=n||r||u;if(!o.test(c))return"url('"+c+"')";if(a.test(c))return"url("+c+")";if("/"===c[0])return"url('"+(((i=t).indexOf("//")>-1?i.split("/").slice(0,3).join("/"):i.split("/")[0]).split("?")[0]+c)+"')";var s=t.split("/"),d=c.split("/");s.pop();for(var l=0,f=d;l<f.length;l++){var p=f[l];"."!==p&&(".."===p?s.pop():s.push(p))}return"url('"+s.join("/")+"')"})}function i(e,t){var n=e.createElement("a");return n.href=t,n.href}var c="rr-block";function s(t,n){switch(t.nodeType){case t.DOCUMENT_NODE:return{type:e.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:e.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId};case t.ELEMENT_NODE:for(var r=t.classList.contains(c),o=t.tagName.toLowerCase(),a={},s=0,d=Array.from(t.attributes);s<d.length;s++){var l=d[s],f=l.name,p=l.value;a[f]="src"===f||"href"===f?i(n,p):"style"===f?u(p,location.href):p}if("link"===o){var m=Array.from(n.styleSheets).find(function(e){return e.href===t.href}),h=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(m);h&&(a={_cssText:u(h,m.href)})}if("input"===o||"textarea"===o||"select"===o){p=t.value;"radio"!==a.type&&"checkbox"!==a.type&&p?a.value=p:t.checked&&(a.checked=t.checked)}if("option"===o){var v=t.parentElement;a.value===v.value&&(a.selected=t.selected)}if(r){var g=t.getBoundingClientRect(),y=g.width,E=g.height;a.rr_width=y+"px",a.rr_height=E+"px"}return{type:e.Element,tagName:o,attributes:a,childNodes:[],isSVG:(N=t,"svg"===N.tagName||N instanceof SVGElement||void 0),needBlock:r};case t.TEXT_NODE:var b=t.parentNode&&t.parentNode.tagName,w=t.textContent,C="STYLE"===b||void 0;return C&&w&&(w=u(w,location.href)),"SCRIPT"===b&&(w="SCRIPT_PLACEHOLDER"),{type:e.Text,textContent:w||"",isStyle:C};case t.CDATA_SECTION_NODE:return{type:e.CDATA,textContent:""};case t.COMMENT_NODE:return{type:e.Comment,textContent:t.textContent||""};default:return!1}var N}function d(t,r,o,a){void 0===a&&(a=!1);var u=s(t,r);if(!u)return console.warn(t,"not serialized"),null;var i=Object.assign(u,{id:n++});t.__sn=i,o[i.id]=t;var c=!a;if(i.type===e.Element&&(c=c&&!i.needBlock,delete i.needBlock),(i.type===e.Document||i.type===e.Element)&&c)for(var l=0,f=Array.from(t.childNodes);l<f.length;l++){var p=d(f[l],r,o);p&&i.childNodes.push(p)}return i}function l(e){n=1;var t={};return[d(e,e,t),t]}function f(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var p={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return p.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete p.map[t],e.childNodes&&e.childNodes.forEach(function(e){return p.removeNodeFromMap(e)})},has:function(e){return p.map.hasOwnProperty(e)}};function m(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var a=Date.now();o||!1!==n.leading||(o=a);var u=t-(a-o),i=this,c=arguments;u<=0||u>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(i,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(i,c)},u))}}function h(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function v(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}var g,y,E,b="rr-block";function w(e){return!!e&&(e.nodeType===e.ELEMENT_NODE&&e.classList.contains(b)||w(e.parentNode))}function C(e){var t=[];return Object.keys(E).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){if(!w(n.target)){var r=p.getId(n.target),o=n.clientX,a=n.clientY;e({type:E[t],id:r,x:o,y:a})}}}(n);t.push(f(r,o))}),function(){t.forEach(function(e){return e()})}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(g||(g={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(y||(y={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(E||(E={}));var N=["INPUT","TEXTAREA","SELECT"],T=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],I="rr-ignore",D=new WeakMap;function M(e){function n(e){var t=e.target;if(t&&t.tagName&&!(N.indexOf(t.tagName)<0)&&!w(t)){var n=t.type;if("password"!==n&&!t.classList.contains(I)){var o=t.value,a=!1;"radio"!==n&&"checkbox"!==n||(a=t.checked),r(t,{text:o,isChecked:a});var u=t.name;"radio"===n&&u&&a&&document.querySelectorAll('input[type="radio"][name="'+u+'"]').forEach(function(e){e!==t&&r(e,{text:e.value,isChecked:!a})})}}}function r(n,r){var o=D.get(n);if(!o||o.text!==r.text||o.isChecked!==r.isChecked){D.set(n,r);var a=p.getId(n);e(t({},r,{id:a}))}}var o=["input","change"].map(function(e){return f(e,n)}),a=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return a&&a.set&&o.push.apply(o,T.map(function(e){return function e(t,n,r){var o=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,{set:function(e){var t=this;setTimeout(function(){r.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return e(t,n,o||{})}}(e[0],e[1],{set:function(){n({target:this})}})})),function(){o.forEach(function(e){return e()})}}function S(e){var t,n,r=(t=e.mutationCb,(n=new MutationObserver(function(e){var n=[],r=[],o=[],a=[],u=[],i=new Set,c=function(e){w(e)||(i.add(e),e.childNodes.forEach(function(e){return c(e)}))};e.forEach(function(e){var t=e.type,a=e.target,s=e.oldValue,d=e.addedNodes,l=e.removedNodes,f=e.attributeName;switch(t){case"characterData":var m=a.textContent;w(a)||m===s||n.push({value:m,node:a});break;case"attributes":if(m=a.getAttribute(f),w(a)||m===s)return;var h=r.find(function(e){return e.node===a});h||(h={node:a,attributes:{}},r.push(h)),h.attributes[f]=m;break;case"childList":d.forEach(function(e){return c(e)}),l.forEach(function(e){w(e)||(i.has(e)?(i.delete(e),u.push(e)):i.has(a)&&!p.getId(e)||o.push({parentId:p.getId(a),id:p.getId(e)}),p.removeNodeFromMap(e))})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=p.getId(e.parentNode),delete e.parentNode),e});var s=function(e){var t=e.parentNode;return!!t&&(!!u.some(function(e){return e===t})||s(t))},l=function(e){var t=e.parentNode;if(!t)return!1;var n=p.getId(t);return!!o.some(function(e){return e.id===n})||l(t)};Array.from(i).forEach(function(e){s(e)||l(e)?u.push(e):a.push({parentId:p.getId(e.parentNode),previousId:e.previousSibling?p.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?p.getId(e.nextSibling):e.nextSibling,node:d(e,document,p.map,!0)})});var f={texts:n.map(function(e){return{id:p.getId(e.node),value:e.value}}).filter(function(e){return p.has(e.id)}),attributes:r.map(function(e){return{id:p.getId(e.node),attributes:e.attributes}}).filter(function(e){return p.has(e.id)}),removes:o,adds:a};(f.texts.length||f.attributes.length||f.removes.length||f.adds.length)&&t(f)})).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n),o=function(e){var t,n=[],r=m(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return f("mousemove",m(function(e){var o=e.clientX,a=e.clientY,u=e.target;t||(t=Date.now()),n.push({x:o,y:a,id:p.getId(u),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}(e.mousemoveCb),a=C(e.mouseInteractionCb),u=function(e){return f("scroll",m(function(t){if(t.target&&!w(t.target)){var n=p.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}(e.scrollCb),i=function(e){return f("resize",m(function(){var t=h(),n=v();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),c=M(e.inputCb);return function(){r.disconnect(),o(),a(),u(),i(),c()}}function x(e){return t({},e,{timestamp:Date.now()})}return function(e){void 0===e&&(e={});var n=e.emit;if(!n)throw new Error("emit function is required");try{var r=[];r.push(f("DOMContentLoaded",function(){n(x({type:g.DomContentLoaded,data:{}}))}));var o=function(){n(x({type:g.Meta,data:{href:window.location.href,width:v(),height:h()}}));var e=l(document),o=e[0],a=e[1];if(!o)return console.warn("Failed to snapshot the document");p.map=a,n(x({type:g.FullSnapshot,data:{node:o,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),r.push(S({mutationCb:function(e){return n(x({type:g.IncrementalSnapshot,data:t({source:y.Mutation},e)}))},mousemoveCb:function(e){return n(x({type:g.IncrementalSnapshot,data:{source:y.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return n(x({type:g.IncrementalSnapshot,data:t({source:y.MouseInteraction},e)}))},scrollCb:function(e){return n(x({type:g.IncrementalSnapshot,data:t({source:y.Scroll},e)}))},viewportResizeCb:function(e){return n(x({type:g.IncrementalSnapshot,data:t({source:y.ViewportResize},e)}))},inputCb:function(e){return n(x({type:g.IncrementalSnapshot,data:t({source:y.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?o():r.push(f("load",function(){n(x({type:g.Load,data:{}})),o()},window)),function(){r.forEach(function(e){return e()})}}catch(e){console.warn(e)}}}();
//# sourceMappingURL=rrweb-record.min.js.map

@@ -1,2 +0,2 @@

var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var o=1;var r=/url\((['"]|)([^'"]*)\1\)/gm,i=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,a=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function s(e,t){return e.replace(r,function(e,n,o){if(!i.test(o))return"url('"+o+"')";if(a.test(o))return"url("+o+")";if("/"===o[0])return"url('"+(((r=t).indexOf("//")>-1?r.split("/").slice(0,3).join("/"):r.split("/")[0]).split("?")[0]+o)+"')";var r,s=t.split("/"),c=o.split("/");s.pop();for(var l=0,u=c;l<u.length;l++){var d=u[l];"."!==d&&(".."===d?s.pop():s.push(d))}return"url('"+s.join("/")+"')"})}function c(e,t){var n=e.createElement("a");return n.href=t,n.href}var l="rr-block";function u(e,n){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var o=e.classList.contains(l),r=e.tagName.toLowerCase(),i={},a=0,u=Array.from(e.attributes);a<u.length;a++){var d=u[a],f=d.name,p=d.value;i[f]="src"===f||"href"===f?c(n,p):p}if("link"===r){var h=Array.from(n.styleSheets).find(function(t){return t.href===e.href}),m=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(h);m&&(i={_cssText:s(m,h.href)})}if("input"===r||"textarea"===r||"select"===r){p=e.value;"radio"!==i.type&&"checkbox"!==i.type&&p?i.value=p:e.checked&&(i.checked=e.checked)}if("option"===r){var v=e.parentElement;i.value===v.value&&(i.selected=e.selected)}if(o){var y=e.getBoundingClientRect(),g=y.width,b=y.height;i.rr_width=g+"px",i.rr_height=b+"px"}return{type:t.Element,tagName:r,attributes:i,childNodes:[],isSVG:(T=e,"svg"===T.tagName||T instanceof SVGElement||void 0),needBlock:o};case e.TEXT_NODE:var w=e.parentNode&&e.parentNode.tagName,E=e.textContent,I="STYLE"===w||void 0;return I&&E&&(E=s(E,location.href)),"SCRIPT"===w&&(E="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:E||"",isStyle:I};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var T}function d(e,n,r,i){void 0===i&&(i=!1);var a=u(e,n);if(!a)return console.warn(e,"not serialized"),null;var s=Object.assign(a,{id:o++});e.__sn=s,r[s.id]=e;var c=!i;if(s.type===t.Element&&(c=c&&!s.needBlock,delete s.needBlock),(s.type===t.Document||s.type===t.Element)&&c)for(var l=0,f=Array.from(e.childNodes);l<f.length;l++){var p=d(f[l],n,r);p&&s.childNodes.push(p)}return s}function f(e){o=1;var t={};return[d(e,e,t),t]}var p={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var h=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,m=/([^\\]):hover/g;function v(e){return e.replace(h,function(e,t,n){if(m.test(t)){var o=t.replace(m,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+o.replace(/^\s*/,"")+n}return e})}function y(e,n){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var o=function(e){var t=p[e.tagName]?p[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e),r=void 0;for(var i in r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o),e.attributes)if(e.attributes.hasOwnProperty(i)&&!i.startsWith("rr_")){var a=e.attributes[i];a="boolean"==typeof a?"":a;var s="textarea"===o&&"value"===i,c="style"===o&&"_cssText"===i;if(c&&(a=v(a)),s||c){var l=n.createTextNode(a);r.appendChild(l);continue}if("iframe"===o&&"src"===i)continue;try{r.setAttribute(i,a)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case t.Text:return n.createTextNode(e.isStyle?v(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function g(e,n,o,r){void 0===r&&(r=!1);var i=y(e,n);if(!i)return null;if(e.type===t.Document&&(n.close(),n.open(),i=n),i.__sn=e,o[e.id]=i,(e.type===t.Document||e.type===t.Element)&&!r)for(var a=0,s=e.childNodes;a<s.length;a++){var c=s[a],l=g(c,n,o);l?i.appendChild(l):console.warn("Failed to rebuild",c)}return i}function b(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var w,E,I,T={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return T.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete T.map[t],e.childNodes&&e.childNodes.forEach(function(e){return T.removeNodeFromMap(e)})},has:function(e){return T.map.hasOwnProperty(e)}};function x(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(){var i=Date.now();r||!1!==n.leading||(r=i);var a=t-(i-r),s=this,c=arguments;a<=0||a>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,c)):o||!1===n.trailing||(o=window.setTimeout(function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,c)},a))}}function C(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function N(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function S(e){var t=[];return Object.keys(I).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var o=n.toLowerCase(),r=function(t){return function(n){var o=T.getId(n.target),r=n.clientX,i=n.clientY;e({type:I[t],id:o,x:r,y:i})}}(n);t.push(b(o,r))}),function(){t.forEach(function(e){return e()})}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(w||(w={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(E||(E={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(I||(I={}));var M=["INPUT","TEXTAREA","SELECT"],D=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],O="rr-ignore",L=new WeakMap;function k(e){function t(e){var t=e.target;if(t&&t.tagName&&!(M.indexOf(t.tagName)<0)){var n=t.type;if("password"!==n&&!t.classList.contains(O)){var r=t.value,i=!1;"radio"!==n&&"checkbox"!==n||(i=t.checked),o(t,{text:r,isChecked:i});var a=t.name;"radio"===n&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&o(e,{text:e.value,isChecked:!i})})}}}function o(t,o){var r=L.get(t);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){L.set(t,o);var i=T.getId(t);e(n({},o,{id:i}))}}var r=["input","change"].map(function(e){return b(e,t)}),i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return i&&i.set&&r.push.apply(r,D.map(function(e){return function e(t,n,o){var r=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,{set:function(e){var t=this;setTimeout(function(){o.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return e(t,n,r||{})}}(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function A(e){var t,n,o=(t=e.mutationCb,(n=new MutationObserver(function(e){var n=[],o=[],r=[],i=[],a=[],s=new Set,c=function(e){s.add(e),e.childNodes.forEach(function(e){return c(e)})};e.forEach(function(e){var t=e.type,i=e.target,l=e.oldValue,u=e.addedNodes,d=e.removedNodes,f=e.attributeName;switch(t){case"characterData":(p=i.textContent)!==l&&n.push({value:p,node:i});break;case"attributes":var p;if((p=i.getAttribute(f))===l)return;var h=o.find(function(e){return e.node===i});h||(h={node:i,attributes:{}},o.push(h)),h.attributes[f]=p;case"childList":u.forEach(function(e){return c(e)}),d.forEach(function(e){s.has(e)?(s.delete(e),a.push(e)):s.has(i)&&!T.getId(e)||r.push({parentId:T.getId(i),id:T.getId(e)}),T.removeNodeFromMap(e)})}}),r=r.map(function(e){return e.parentNode&&(e.parentId=T.getId(e.parentNode),delete e.parentNode),e});var l=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||l(t))},u=function(e){var t=e.parentNode;if(!t)return!1;var n=T.getId(t);return!!r.some(function(e){return e.id===n})||u(t)};Array.from(s).forEach(function(e){l(e)||u(e)?a.push(e):i.push({parentId:T.getId(e.parentNode),previousId:e.previousSibling?T.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?T.getId(e.nextSibling):e.nextSibling,node:d(e,document,T.map,!0)})}),t({texts:n.map(function(e){return{id:T.getId(e.node),value:e.value}}).filter(function(e){return T.has(e.id)}),attributes:o.map(function(e){return{id:T.getId(e.node),attributes:e.attributes}}).filter(function(e){return T.has(e.id)}),removes:r,adds:i})})).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n),r=function(e){var t,n=[],o=x(function(){var o=Date.now()-t;e(n.map(function(e){return e.timeOffset-=o,e})),n=[],t=null},500);return b("mousemove",x(function(e){var r=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:r,y:i,id:T.getId(a),timeOffset:Date.now()-t}),o()},20,{trailing:!1}))}(e.mousemoveCb),i=S(e.mouseInteractionCb),a=function(e){return b("scroll",x(function(t){if(t.target){var n=T.getId(t.target);if(t.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}(e.scrollCb),s=function(e){return b("resize",x(function(){var t=C(),n=N();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),c=k(e.inputCb);return function(){o.disconnect(),r(),i(),a(),s(),c()}}function _(e){return n({},e,{timestamp:Date.now()})}function R(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var F=Object.freeze({default:R});var B,j=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,o=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:o.prototype.scroll||c,scrollIntoView:o.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},o.prototype.scroll=o.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},o.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},o.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=function(e){var n;do{n=(e=e.parentNode)===t.body}while(!1===n&&!1===f(e));return n=null,e}(this),o=n.getBoundingClientRect(),r=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+r.left-o.left,n.scrollTop+r.top-o.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})):e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function c(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var o=e.getComputedStyle(t,null)["overflow"+n];return"auto"===o||"scroll"===o}function f(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function p(t){var n,o,i,s,c=(a()-t.startTime)/r;s=c=c>1?1:c,n=.5*(1-Math.cos(Math.PI*s)),o=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,o,i),o===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,o,r){var s,l,u,d,f=a();n===t.body?(s=e,l=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,l=n.scrollLeft,u=n.scrollTop,d=c),p({scrollable:s,method:d,startTime:f,startX:l,startY:u,x:o,y:r})}}}}()}(B={exports:{}},B.exports),B.exports).polyfill,z=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,o=this;this.raf=requestAnimationFrame(function r(i){for(o.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(o.timeOffset>=a.delay))break;t.shift(),a.doAction()}t.length>0&&(o.raf=requestAnimationFrame(r))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var o=Math.floor((t+n)/2);if(this.actions[o].delay<e.delay)t=o+1;else{if(!(this.actions[o].delay>e.delay))return o;n=o-1}}return t},e}(),P=["iframe, .rr-block { background: #ccc }","noscript { display: none !important; }"];j();var X=R||F,Y={speed:1,root:document.body,loadTimeout:0,skipInactive:!1},V=function(){function e(e,t){if(this.events=[],this.config=Y,this.emitter=X(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this),this.timer=new z(this.config),this.setConfig(Object.assign({},t)),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,o=this.events;n<o.length;n++){var r=o[n],i=r.timestamp<this.baselineTime,a=this.getCastFn(r,i);i?a():t.push({doAction:a,delay:this.getDelay(r)})}this.timer.addActions(t),this.timer.start()},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit("pause")},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,o=this.events;n<o.length;n++){var r=o[n];if(!(r.timestamp<=this.lastPlayedEvent.timestamp||r===this.lastPlayedEvent)){var i=this.getCastFn(r);t.push({doAction:i,delay:this.getDelay(r)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit("resume")},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===w.IncrementalSnapshot&&e.data.source===E.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,o=this;switch(void 0===t&&(t=!1),e.type){case w.DomContentLoaded:case w.Load:break;case w.Meta:n=function(){return o.emitter.emit("resize",{width:e.data.width,height:e.data.height})};break;case w.FullSnapshot:n=function(){o.rebuildFullSnapshot(e),o.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case w.IncrementalSnapshot:n=function(){if(o.applyIncremental(e,t),e===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){for(var n=0,r=o.events;n<r.length;n++){var i=r[n];if(!(i.timestamp<=e.timestamp)&&o.isUserInteraction(i)){i.delay-e.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=i);break}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var a=o.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),360)};o.setConfig(s),o.emitter.emit("skip-start",s)}}}}return function(){n&&n(),o.lastPlayedEvent=e,e===o.events[o.events.length-1]&&(o.restoreSpeed(),o.emitter.emit("finish"))}},e.prototype.rebuildFullSnapshot=function(e){var t,n,o;Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},T.map=(t=e.data.node,n=this.iframe.contentDocument,o={},[g(t,n,o),o])[1];var r=document.createElement("style"),i=this.iframe.contentDocument,a=i.documentElement,s=i.head;a.insertBefore(r,s);for(var c=0;c<P.length;c++)r.sheet.insertRule(P[c],c);this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,o=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===o.size&&(e.pause(),e.emitter.emit("wait-stylesheet"),n=window.setTimeout(function(){e.resume(),n=-1},e.config.loadTimeout)),o.add(t),t.addEventListener("load",function(){o.delete(t),0===o.size&&-1!==n&&(e.resume(),e.emitter.emit("stylesheet-loaded"),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var o=this,r=e.data;switch(r.source){case E.Mutation:r.removes.forEach(function(e){var t=T.getNode(e.id);if(t){var n=T.getNode(e.parentId);T.removeNodeFromMap(t),n&&n.removeChild(t)}});var i=n({},this.missingNodeRetryMap);r.adds.forEach(function(e){var t=g(e.node,o.iframe.contentDocument,T.map,!0),n=T.getNode(e.parentId),r=null,a=null;e.previousId&&(r=T.getNode(e.previousId)),e.nextId&&(a=T.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?n.insertBefore(t,r.nextSibling):a&&a.parentNode?n.insertBefore(t,a):n.appendChild(t),(e.previousId||e.nextId)&&o.resolveMissingNode(i,n,t,e)):i[e.node.id]={node:t,mutation:e}}),Object.keys(i).length&&Object.assign(this.missingNodeRetryMap,i),r.texts.forEach(function(e){T.getNode(e.id).textContent=e.value}),r.attributes.forEach(function(e){var t=T.getNode(e.id);for(var n in e.attributes)if("string"==typeof n){var o=e.attributes[n];o?t.setAttribute(n,o):t.removeAttribute(n)}});break;case E.MouseMove:t||r.positions.forEach(function(t){var n={doAction:function(){o.mouse.style.left=t.x+"px",o.mouse.style.top=t.y+"px";var e=T.getNode(t.id);e&&o.hoverElements(e)},delay:t.timeOffset+e.timestamp-o.baselineTime};o.timer.addAction(n)});break;case E.MouseInteraction:if(-1===r.id)break;var a=new Event(I[r.type].toLowerCase()),s=T.getNode(r.id);switch(r.type){case I.Blur:s.blur();break;case I.Focus:s.focus({preventScroll:!0});break;case I.Click:t||(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:s.dispatchEvent(a)}break;case E.Scroll:if(-1===r.id)break;if((s=T.getNode(r.id))===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"instant":"smooth"});else try{s.scrollTop=r.y,s.scrollLeft=r.x}catch(e){}break;case E.ViewportResize:this.emitter.emit("resize",{width:r.width,height:r.height});break;case E.Input:if(-1===r.id)break;s=T.getNode(r.id);try{s.checked=r.isChecked,s.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,o){var r=o.previousId,i=o.nextId,a=r&&e[r],s=i&&e[i];if(a){var c=a,l=c.node,u=c.mutation;t.insertBefore(l,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}if(s){var d=s;l=d.node,u=d.mutation;t.insertBefore(l,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,l,u)}},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===w.IncrementalSnapshot&&(e.data.source>E.Mutation&&e.data.source<=E.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit("skip-end",e),this.noramlSpeed=-1}},e}();return e.record=function(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var o=[];o.push(b("DOMContentLoaded",function(){t(_({type:w.DomContentLoaded,data:{}}))}));var r=function(){t(_({type:w.Meta,data:{href:window.location.href,width:N(),height:C()}}));var e=f(document),r=e[0],i=e[1];if(!r)return console.warn("Failed to snapshot the document");T.map=i,t(_({type:w.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),o.push(A({mutationCb:function(e){return t(_({type:w.IncrementalSnapshot,data:n({source:E.Mutation},e)}))},mousemoveCb:function(e){return t(_({type:w.IncrementalSnapshot,data:{source:E.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(_({type:w.IncrementalSnapshot,data:n({source:E.MouseInteraction},e)}))},scrollCb:function(e){return t(_({type:w.IncrementalSnapshot,data:n({source:E.Scroll},e)}))},viewportResizeCb:function(e){return t(_({type:w.IncrementalSnapshot,data:n({source:E.ViewportResize},e)}))},inputCb:function(e){return t(_({type:w.IncrementalSnapshot,data:n({source:E.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():o.push(b("load",function(){t(_({type:w.Load,data:{}})),r()},window)),function(){o.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e.Replayer=V,e.mirror=T,e}({});
var rrweb=function(e){"use strict";var t,n=function(){return(n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(t||(t={}));var o=1;var r=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,i=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,a=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function s(e,t){return e.replace(r,function(e,n,o,r){var s,l=n||o||r;if(!i.test(l))return"url('"+l+"')";if(a.test(l))return"url("+l+")";if("/"===l[0])return"url('"+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)+"')";var c=t.split("/"),u=l.split("/");c.pop();for(var d=0,f=u;d<f.length;d++){var p=f[d];"."!==p&&(".."===p?c.pop():c.push(p))}return"url('"+c.join("/")+"')"})}function l(e,t){var n=e.createElement("a");return n.href=t,n.href}var c="rr-block";function u(e,n){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:t.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:t.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var o=e.classList.contains(c),r=e.tagName.toLowerCase(),i={},a=0,u=Array.from(e.attributes);a<u.length;a++){var d=u[a],f=d.name,p=d.value;i[f]="src"===f||"href"===f?l(n,p):"style"===f?s(p,location.href):p}if("link"===r){var h=Array.from(n.styleSheets).find(function(t){return t.href===e.href}),m=function(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}(h);m&&(i={_cssText:s(m,h.href)})}if("input"===r||"textarea"===r||"select"===r){p=e.value;"radio"!==i.type&&"checkbox"!==i.type&&p?i.value=p:e.checked&&(i.checked=e.checked)}if("option"===r){var v=e.parentElement;i.value===v.value&&(i.selected=e.selected)}if(o){var y=e.getBoundingClientRect(),g=y.width,b=y.height;i.rr_width=g+"px",i.rr_height=b+"px"}return{type:t.Element,tagName:r,attributes:i,childNodes:[],isSVG:(I=e,"svg"===I.tagName||I instanceof SVGElement||void 0),needBlock:o};case e.TEXT_NODE:var w=e.parentNode&&e.parentNode.tagName,E=e.textContent,T="STYLE"===w||void 0;return T&&E&&(E=s(E,location.href)),"SCRIPT"===w&&(E="SCRIPT_PLACEHOLDER"),{type:t.Text,textContent:E||"",isStyle:T};case e.CDATA_SECTION_NODE:return{type:t.CDATA,textContent:""};case e.COMMENT_NODE:return{type:t.Comment,textContent:e.textContent||""};default:return!1}var I}function d(e,n,r,i){void 0===i&&(i=!1);var a=u(e,n);if(!a)return console.warn(e,"not serialized"),null;var s=Object.assign(a,{id:o++});e.__sn=s,r[s.id]=e;var l=!i;if(s.type===t.Element&&(l=l&&!s.needBlock,delete s.needBlock),(s.type===t.Document||s.type===t.Element)&&l)for(var c=0,f=Array.from(e.childNodes);c<f.length;c++){var p=d(f[c],n,r);p&&s.childNodes.push(p)}return s}function f(e){o=1;var t={};return[d(e,e,t),t]}var p={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};var h=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,m=/([^\\]):hover/g;function v(e){return e.replace(h,function(e,t,n){if(m.test(t)){var o=t.replace(m,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+o.replace(/^\s*/,"")+n}return e})}function y(e,n){switch(e.type){case t.Document:return n.implementation.createDocument(null,"",null);case t.DocumentType:return n.implementation.createDocumentType(e.name,e.publicId,e.systemId);case t.Element:var o=function(e){var t=p[e.tagName]?p[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e),r=void 0;for(var i in r=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",o):n.createElement(o),e.attributes)if(e.attributes.hasOwnProperty(i)&&!i.startsWith("rr_")){var a=e.attributes[i];a="boolean"==typeof a?"":a;var s="textarea"===o&&"value"===i,l="style"===o&&"_cssText"===i;if(l&&(a=v(a)),s||l){var c=n.createTextNode(a);r.appendChild(c);continue}if("iframe"===o&&"src"===i)continue;try{r.setAttribute(i,a)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case t.Text:return n.createTextNode(e.isStyle?v(e.textContent):e.textContent);case t.CDATA:return n.createCDATASection(e.textContent);case t.Comment:return n.createComment(e.textContent);default:return null}}function g(e,n,o,r){void 0===r&&(r=!1);var i=y(e,n);if(!i)return null;if(e.type===t.Document&&(n.close(),n.open(),i=n),i.__sn=e,o[e.id]=i,(e.type===t.Document||e.type===t.Element)&&!r)for(var a=0,s=e.childNodes;a<s.length;a++){var l=s[a],c=g(l,n,o);c?i.appendChild(c):console.warn("Failed to rebuild",l)}return i}function b(e,t,n){void 0===n&&(n=document);var o={capture:!0,passive:!0};return n.addEventListener(e,t,o),function(){return n.removeEventListener(e,t,o)}}var w={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return w.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete w.map[t],e.childNodes&&e.childNodes.forEach(function(e){return w.removeNodeFromMap(e)})},has:function(e){return w.map.hasOwnProperty(e)}};function E(e,t,n){void 0===n&&(n={});var o=null,r=0;return function(){var i=Date.now();r||!1!==n.leading||(r=i);var a=t-(i-r),s=this,l=arguments;a<=0||a>t?(o&&(window.clearTimeout(o),o=null),r=i,e.apply(s,l)):o||!1===n.trailing||(o=window.setTimeout(function(){r=!1===n.leading?0:Date.now(),o=null,e.apply(s,l)},a))}}function T(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function I(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}var x,C,N,S="rr-block";function M(e){return!!e&&(e.nodeType===e.ELEMENT_NODE&&e.classList.contains(S)||M(e.parentNode))}function D(e){var t=[];return Object.keys(N).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var o=n.toLowerCase(),r=function(t){return function(n){if(!M(n.target)){var o=w.getId(n.target),r=n.clientX,i=n.clientY;e({type:N[t],id:o,x:r,y:i})}}}(n);t.push(b(o,r))}),function(){t.forEach(function(e){return e()})}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(x||(x={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(C||(C={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(N||(N={}));var O=["INPUT","TEXTAREA","SELECT"],L=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],k="rr-ignore",A=new WeakMap;function _(e){function t(e){var t=e.target;if(t&&t.tagName&&!(O.indexOf(t.tagName)<0)&&!M(t)){var n=t.type;if("password"!==n&&!t.classList.contains(k)){var r=t.value,i=!1;"radio"!==n&&"checkbox"!==n||(i=t.checked),o(t,{text:r,isChecked:i});var a=t.name;"radio"===n&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&o(e,{text:e.value,isChecked:!i})})}}}function o(t,o){var r=A.get(t);if(!r||r.text!==o.text||r.isChecked!==o.isChecked){A.set(t,o);var i=w.getId(t);e(n({},o,{id:i}))}}var r=["input","change"].map(function(e){return b(e,t)}),i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return i&&i.set&&r.push.apply(r,L.map(function(e){return function e(t,n,o){var r=Object.getOwnPropertyDescriptor(t,n);return Object.defineProperty(t,n,{set:function(e){var t=this;setTimeout(function(){o.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return e(t,n,r||{})}}(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function R(e){var t,n,o=(t=e.mutationCb,(n=new MutationObserver(function(e){var n=[],o=[],r=[],i=[],a=[],s=new Set,l=function(e){M(e)||(s.add(e),e.childNodes.forEach(function(e){return l(e)}))};e.forEach(function(e){var t=e.type,i=e.target,c=e.oldValue,u=e.addedNodes,d=e.removedNodes,f=e.attributeName;switch(t){case"characterData":var p=i.textContent;M(i)||p===c||n.push({value:p,node:i});break;case"attributes":if(p=i.getAttribute(f),M(i)||p===c)return;var h=o.find(function(e){return e.node===i});h||(h={node:i,attributes:{}},o.push(h)),h.attributes[f]=p;break;case"childList":u.forEach(function(e){return l(e)}),d.forEach(function(e){M(e)||(s.has(e)?(s.delete(e),a.push(e)):s.has(i)&&!w.getId(e)||r.push({parentId:w.getId(i),id:w.getId(e)}),w.removeNodeFromMap(e))})}}),r=r.map(function(e){return e.parentNode&&(e.parentId=w.getId(e.parentNode),delete e.parentNode),e});var c=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||c(t))},u=function(e){var t=e.parentNode;if(!t)return!1;var n=w.getId(t);return!!r.some(function(e){return e.id===n})||u(t)};Array.from(s).forEach(function(e){c(e)||u(e)?a.push(e):i.push({parentId:w.getId(e.parentNode),previousId:e.previousSibling?w.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?w.getId(e.nextSibling):e.nextSibling,node:d(e,document,w.map,!0)})});var f={texts:n.map(function(e){return{id:w.getId(e.node),value:e.value}}).filter(function(e){return w.has(e.id)}),attributes:o.map(function(e){return{id:w.getId(e.node),attributes:e.attributes}}).filter(function(e){return w.has(e.id)}),removes:r,adds:i};(f.texts.length||f.attributes.length||f.removes.length||f.adds.length)&&t(f)})).observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n),r=function(e){var t,n=[],o=E(function(){var o=Date.now()-t;e(n.map(function(e){return e.timeOffset-=o,e})),n=[],t=null},500);return b("mousemove",E(function(e){var r=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:r,y:i,id:w.getId(a),timeOffset:Date.now()-t}),o()},20,{trailing:!1}))}(e.mousemoveCb),i=D(e.mouseInteractionCb),a=function(e){return b("scroll",E(function(t){if(t.target&&!M(t.target)){var n=w.getId(t.target);if(t.target===document){var o=document.scrollingElement||document.documentElement;e({id:n,x:o.scrollLeft,y:o.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}(e.scrollCb),s=function(e){return b("resize",E(function(){var t=T(),n=I();e({width:Number(n),height:Number(t)})},200),window)}(e.viewportResizeCb),l=_(e.inputCb);return function(){o.disconnect(),r(),i(),a(),s(),l()}}function F(e){return n({},e,{timestamp:Date.now()})}function B(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var j=Object.freeze({default:B});var z,P=(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,o=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:o.prototype.scroll||l,scrollIntoView:o.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},o.prototype.scroll=o.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},o.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},o.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){var n;do{n=(e=e.parentNode)===t.body}while(!1===n&&!1===f(e));return n=null,e}(this),o=n.getBoundingClientRect(),r=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+r.left-o.left,n.scrollTop+r.top-o.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})):e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var o=e.getComputedStyle(t,null)["overflow"+n];return"auto"===o||"scroll"===o}function f(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function p(t){var n,o,i,s,l=(a()-t.startTime)/r;s=l=l>1?1:l,n=.5*(1-Math.cos(Math.PI*s)),o=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,o,i),o===t.x&&i===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,o,r){var s,c,u,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,c=n.scrollLeft,u=n.scrollTop,d=l),p({scrollable:s,method:d,startTime:f,startX:c,startY:u,x:o,y:r})}}}}()}(z={exports:{}},z.exports),z.exports).polyfill,X=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,o=this;this.raf=requestAnimationFrame(function r(i){for(o.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(o.timeOffset>=a.delay))break;t.shift(),a.doAction()}t.length>0&&(o.raf=requestAnimationFrame(r))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var o=Math.floor((t+n)/2);if(this.actions[o].delay<e.delay)t=o+1;else{if(!(this.actions[o].delay>e.delay))return o;n=o-1}}return t},e}(),Y=["iframe, .rr-block { background: #ccc }","noscript { display: none !important; }"];P();var V=B||j,U={speed:1,root:document.body,loadTimeout:0,skipInactive:!1},H=function(){function e(e,t){if(this.events=[],this.config=U,this.emitter=V(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this),this.timer=new X(this.config),this.setConfig(Object.assign({},t)),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,o=this.events;n<o.length;n++){var r=o[n],i=r.timestamp<this.baselineTime,a=this.getCastFn(r,i);i?a():t.push({doAction:a,delay:this.getDelay(r)})}this.timer.addActions(t),this.timer.start()},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit("pause")},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,o=this.events;n<o.length;n++){var r=o[n];if(!(r.timestamp<=this.lastPlayedEvent.timestamp||r===this.lastPlayedEvent)){var i=this.getCastFn(r);t.push({doAction:i,delay:this.getDelay(r)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit("resume")},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===x.IncrementalSnapshot&&e.data.source===C.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,o=this;switch(void 0===t&&(t=!1),e.type){case x.DomContentLoaded:case x.Load:break;case x.Meta:n=function(){return o.emitter.emit("resize",{width:e.data.width,height:e.data.height})};break;case x.FullSnapshot:n=function(){o.rebuildFullSnapshot(e),o.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case x.IncrementalSnapshot:n=function(){if(o.applyIncremental(e,t),e===o.nextUserInteractionEvent&&(o.nextUserInteractionEvent=null,o.restoreSpeed()),o.config.skipInactive&&!o.nextUserInteractionEvent){for(var n=0,r=o.events;n<r.length;n++){var i=r[n];if(!(i.timestamp<=e.timestamp)&&o.isUserInteraction(i)){i.delay-e.delay>1e4*o.config.speed&&(o.nextUserInteractionEvent=i);break}}if(o.nextUserInteractionEvent){o.noramlSpeed=o.config.speed;var a=o.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),360)};o.setConfig(s),o.emitter.emit("skip-start",s)}}}}return function(){n&&n(),o.lastPlayedEvent=e,e===o.events[o.events.length-1]&&(o.restoreSpeed(),o.emitter.emit("finish"))}},e.prototype.rebuildFullSnapshot=function(e){var t,n,o;Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},w.map=(t=e.data.node,n=this.iframe.contentDocument,o={},[g(t,n,o),o])[1];var r=document.createElement("style"),i=this.iframe.contentDocument,a=i.documentElement,s=i.head;a.insertBefore(r,s);for(var l=0;l<Y.length;l++)r.sheet.insertRule(Y[l],l);this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,o=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===o.size&&(e.pause(),e.emitter.emit("wait-stylesheet"),n=window.setTimeout(function(){e.resume(),n=-1},e.config.loadTimeout)),o.add(t),t.addEventListener("load",function(){o.delete(t),0===o.size&&-1!==n&&(e.resume(),e.emitter.emit("stylesheet-loaded"),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var o=this,r=e.data;switch(r.source){case C.Mutation:r.removes.forEach(function(e){var t=w.getNode(e.id);if(t){var n=w.getNode(e.parentId);w.removeNodeFromMap(t),n&&n.removeChild(t)}});var i=n({},this.missingNodeRetryMap);r.adds.forEach(function(e){var t=g(e.node,o.iframe.contentDocument,w.map,!0),n=w.getNode(e.parentId),r=null,a=null;e.previousId&&(r=w.getNode(e.previousId)),e.nextId&&(a=w.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(r&&r.nextSibling&&r.nextSibling.parentNode?n.insertBefore(t,r.nextSibling):a&&a.parentNode?n.insertBefore(t,a):n.appendChild(t),(e.previousId||e.nextId)&&o.resolveMissingNode(i,n,t,e)):i[e.node.id]={node:t,mutation:e}}),Object.keys(i).length&&Object.assign(this.missingNodeRetryMap,i),r.texts.forEach(function(e){w.getNode(e.id).textContent=e.value}),r.attributes.forEach(function(e){var t=w.getNode(e.id);for(var n in e.attributes)if("string"==typeof n){var o=e.attributes[n];o?t.setAttribute(n,o):t.removeAttribute(n)}});break;case C.MouseMove:t||r.positions.forEach(function(t){var n={doAction:function(){o.mouse.style.left=t.x+"px",o.mouse.style.top=t.y+"px";var e=w.getNode(t.id);e&&o.hoverElements(e)},delay:t.timeOffset+e.timestamp-o.baselineTime};o.timer.addAction(n)});break;case C.MouseInteraction:if(-1===r.id)break;var a=new Event(N[r.type].toLowerCase()),s=w.getNode(r.id);switch(r.type){case N.Blur:s.blur();break;case N.Focus:s.focus({preventScroll:!0});break;case N.Click:t||(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:s.dispatchEvent(a)}break;case C.Scroll:if(-1===r.id)break;if((s=w.getNode(r.id))===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"auto":"smooth"});else try{s.scrollTop=r.y,s.scrollLeft=r.x}catch(e){}break;case C.ViewportResize:this.emitter.emit("resize",{width:r.width,height:r.height});break;case C.Input:if(-1===r.id)break;s=w.getNode(r.id);try{s.checked=r.isChecked,s.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,o){var r=o.previousId,i=o.nextId,a=r&&e[r],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===x.IncrementalSnapshot&&(e.data.source>C.Mutation&&e.data.source<=C.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit("skip-end",e),this.noramlSpeed=-1}},e}();return e.record=function(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var o=[];o.push(b("DOMContentLoaded",function(){t(F({type:x.DomContentLoaded,data:{}}))}));var r=function(){t(F({type:x.Meta,data:{href:window.location.href,width:I(),height:T()}}));var e=f(document),r=e[0],i=e[1];if(!r)return console.warn("Failed to snapshot the document");w.map=i,t(F({type:x.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),o.push(R({mutationCb:function(e){return t(F({type:x.IncrementalSnapshot,data:n({source:C.Mutation},e)}))},mousemoveCb:function(e){return t(F({type:x.IncrementalSnapshot,data:{source:C.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(F({type:x.IncrementalSnapshot,data:n({source:C.MouseInteraction},e)}))},scrollCb:function(e){return t(F({type:x.IncrementalSnapshot,data:n({source:C.Scroll},e)}))},viewportResizeCb:function(e){return t(F({type:x.IncrementalSnapshot,data:n({source:C.ViewportResize},e)}))},inputCb:function(e){return t(F({type:x.IncrementalSnapshot,data:n({source:C.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():o.push(b("load",function(){t(F({type:x.Load,data:{}})),r()},window)),function(){o.forEach(function(e){return e()})}}catch(e){console.warn(e)}},e.Replayer=H,e.mirror=w,e}({});
//# sourceMappingURL=rrweb.min.js.map

@@ -69,7 +69,8 @@ /*! *****************************************************************************

}
var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var URL_IN_CSS_REF = /url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
var DATA_URI = /^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
return cssText.replace(URL_IN_CSS_REF, function (_1, path1, path2, path3) {
var filePath = path1 || path2 || path3;
if (!RELATIVE_PATH.test(filePath)) {

@@ -134,2 +135,5 @@ return "url('" + filePath + "')";

}
else if (name === 'style') {
attributes_1[name] = absoluteToStylesheet(value, location.href);
}
else {

@@ -331,2 +335,13 @@ attributes_1[name] = value;

}
var BLOCK_CLASS$1 = 'rr-block';
function isBlocked(node) {
if (!node) {
return false;
}
if (node.nodeType === node.ELEMENT_NODE) {
return (node.classList.contains(BLOCK_CLASS$1) ||
isBlocked(node.parentNode));
}
return isBlocked(node.parentNode);
}

@@ -373,2 +388,5 @@ var EventType;

var genAdds = function (n) {
if (isBlocked(n)) {
return;
}
addsSet.add(n);

@@ -382,3 +400,3 @@ n.childNodes.forEach(function (childN) { return genAdds(childN); });

var value = target.textContent;
if (value !== oldValue) {
if (!isBlocked(target) && value !== oldValue) {
texts.push({

@@ -393,3 +411,3 @@ value: value,

var value = target.getAttribute(attributeName);
if (value === oldValue) {
if (isBlocked(target) || value === oldValue) {
return;

@@ -406,2 +424,3 @@ }

item.attributes[attributeName] = value;
break;
}

@@ -411,2 +430,5 @@ case 'childList': {

removedNodes.forEach(function (n) {
if (isBlocked(n)) {
return;
}
if (addsSet.has(n)) {

@@ -476,3 +498,3 @@ addsSet["delete"](n);

});
cb({
var payload = {
texts: texts

@@ -492,3 +514,10 @@ .map(function (text) { return ({

adds: adds
});
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
cb(payload);
});

@@ -538,2 +567,5 @@ observer.observe(document, {

return function (event) {
if (isBlocked(event.target)) {
return;
}
var id = mirror.getId(event.target);

@@ -562,3 +594,3 @@ var clientX = event.clientX, clientY = event.clientY;

var updatePosition = throttle(function (evt) {
if (!evt.target) {
if (!evt.target || isBlocked(evt.target)) {
return;

@@ -610,3 +642,4 @@ }

!target.tagName ||
INPUT_TAGS.indexOf(target.tagName) < 0) {
INPUT_TAGS.indexOf(target.tagName) < 0 ||
isBlocked(target)) {
return;

@@ -613,0 +646,0 @@ }

@@ -1,2 +0,2 @@

var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((['"]|)([^'"]*)\1\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r){if(!RELATIVE_PATH.test(r))return"url('"+r+"')";if(DATA_URI.test(r))return"url("+r+")";if("/"===r[0])return"url('"+(extractOrigin(t)+r)+"')";var o=t.split("/"),i=r.split("/");o.pop();for(var a=0,u=i;a<u.length;a++){var c=u[a];"."!==c&&(".."===c?o.pop():o.push(c))}return"url('"+o.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}var BLOCK_CLASS="rr-block";function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var n=e.classList.contains(BLOCK_CLASS),r=e.tagName.toLowerCase(),o={},i=0,a=Array.from(e.attributes);i<a.length;i++){var u=a[i],c=u.name,s=u.value;o[c]="src"===c||"href"===c?absoluteToDoc(t,s):s}if("link"===r){var d=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),l=getCssRulesString(d);l&&(o={_cssText:absoluteToStylesheet(l,d.href)})}if("input"===r||"textarea"===r||"select"===r){s=e.value;"radio"!==o.type&&"checkbox"!==o.type&&s?o.value=s:e.checked&&(o.checked=e.checked)}if("option"===r){var p=e.parentElement;o.value===p.value&&(o.selected=e.selected)}if(n){var m=e.getBoundingClientRect(),f=m.width,v=m.height;o.rr_width=f+"px",o.rr_height=v+"px"}return{type:NodeType.Element,tagName:r,attributes:o,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:n};case e.TEXT_NODE:var h=e.parentNode&&e.parentNode.tagName,E=e.textContent,y="STYLE"===h||void 0;return y&&E&&(E=absoluteToStylesheet(E,location.href)),"SCRIPT"===h&&(E="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:E||"",isStyle:y};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r){void 0===r&&(r=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var i=Object.assign(o,{id:genId()});e.__sn=i,n[i.id]=e;var a=!r;if(i.type===NodeType.Element&&(a=a&&!i.needBlock,delete i.needBlock),(i.type===NodeType.Document||i.type===NodeType.Element)&&a)for(var u=0,c=Array.from(e.childNodes);u<c.length;u++){var s=serializeNodeWithId(c[u],t,n);s&&i.childNodes.push(s)}return i}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var EventType,IncrementalSource,MouseInteractions,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),u=this,c=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(u,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,c)},a))}}function hookSetter(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return hookSetter(e,t,r||{})}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function initMutationObserver(e){var t=new MutationObserver(function(t){var n=[],r=[],o=[],i=[],a=[],u=new Set,c=function(e){u.add(e),e.childNodes.forEach(function(e){return c(e)})};t.forEach(function(e){var t=e.type,i=e.target,s=e.oldValue,d=e.addedNodes,l=e.removedNodes,p=e.attributeName;switch(t){case"characterData":(m=i.textContent)!==s&&n.push({value:m,node:i});break;case"attributes":var m;if((m=i.getAttribute(p))===s)return;var f=r.find(function(e){return e.node===i});f||(f={node:i,attributes:{}},r.push(f)),f.attributes[p]=m;case"childList":d.forEach(function(e){return c(e)}),l.forEach(function(e){u.has(e)?(u.delete(e),a.push(e)):u.has(i)&&!mirror.getId(e)||o.push({parentId:mirror.getId(i),id:mirror.getId(e)}),mirror.removeNodeFromMap(e)})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=mirror.getId(e.parentNode),delete e.parentNode),e});var s=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||s(t))},d=function(e){var t=e.parentNode;if(!t)return!1;var n=mirror.getId(t);return!!o.some(function(e){return e.id===n})||d(t)};Array.from(u).forEach(function(e){s(e)||d(e)?a.push(e):i.push({parentId:mirror.getId(e.parentNode),previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,!0)})}),e({texts:n.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:r.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:o,adds:i})});return t.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function initMousemoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return on("mousemove",throttle(function(e){var o=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:o,y:i,id:mirror.getId(a),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}function initMouseInteractionObserver(e){var t=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){var r=mirror.getId(n.target),o=n.clientX,i=n.clientY;e({type:MouseInteractions[t],id:r,x:o,y:i})}}(n);t.push(on(r,o))}),function(){t.forEach(function(e){return e()})}}function initScrollObserver(e){return on("scroll",throttle(function(t){if(t.target){var n=mirror.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={}));var INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],HOOK_PROPERTIES=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],IGNORE_CLASS="rr-ignore",lastInputValueMap=new WeakMap;function initInputObserver(e){function t(e){var t=e.target;if(t&&t.tagName&&!(INPUT_TAGS.indexOf(t.tagName)<0)){var r=t.type;if("password"!==r&&!t.classList.contains(IGNORE_CLASS)){var o=t.value,i=!1;"radio"!==r&&"checkbox"!==r||(i=t.checked),n(t,{text:o,isChecked:i});var a=t.name;"radio"===r&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&n(e,{text:e.value,isChecked:!i})})}}}function n(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var r=["input","change"].map(function(e){return on(e,t)}),o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return o&&o.set&&r.push.apply(r,HOOK_PROPERTIES.map(function(e){return hookSetter(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb),n=initMousemoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb),o=initScrollObserver(e.scrollCb),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var n=[];n.push(on("DOMContentLoaded",function(){t(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var r=function(){t(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}));var e=snapshot(document),r=e[0],o=e[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=o,t(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),n.push(initObservers({mutationCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():n.push(on("load",function(){t(wrapEvent({type:EventType.Load,data:{}})),r()},window)),function(){n.forEach(function(e){return e()})}}catch(e){console.warn(e)}}export default record;
var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),u=i.split("/");a.pop();for(var c=0,s=u;c<s.length;c++){var l=s[c];"."!==l&&(".."===l?a.pop():a.push(l))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}var BLOCK_CLASS="rr-block";function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var n=e.classList.contains(BLOCK_CLASS),r=e.tagName.toLowerCase(),o={},i=0,a=Array.from(e.attributes);i<a.length;i++){var u=a[i],c=u.name,s=u.value;o[c]="src"===c||"href"===c?absoluteToDoc(t,s):"style"===c?absoluteToStylesheet(s,location.href):s}if("link"===r){var l=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),d=getCssRulesString(l);d&&(o={_cssText:absoluteToStylesheet(d,l.href)})}if("input"===r||"textarea"===r||"select"===r){s=e.value;"radio"!==o.type&&"checkbox"!==o.type&&s?o.value=s:e.checked&&(o.checked=e.checked)}if("option"===r){var p=e.parentElement;o.value===p.value&&(o.selected=e.selected)}if(n){var m=e.getBoundingClientRect(),f=m.width,v=m.height;o.rr_width=f+"px",o.rr_height=v+"px"}return{type:NodeType.Element,tagName:r,attributes:o,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:n};case e.TEXT_NODE:var h=e.parentNode&&e.parentNode.tagName,E=e.textContent,g="STYLE"===h||void 0;return g&&E&&(E=absoluteToStylesheet(E,location.href)),"SCRIPT"===h&&(E="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:E||"",isStyle:g};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r){void 0===r&&(r=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var i=Object.assign(o,{id:genId()});e.__sn=i,n[i.id]=e;var a=!r;if(i.type===NodeType.Element&&(a=a&&!i.needBlock,delete i.needBlock),(i.type===NodeType.Document||i.type===NodeType.Element)&&a)for(var u=0,c=Array.from(e.childNodes);u<c.length;u++){var s=serializeNodeWithId(c[u],t,n);s&&i.childNodes.push(s)}return i}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),u=this,c=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(u,c)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(u,c)},a))}}function hookSetter(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return hookSetter(e,t,r||{})}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}var EventType,IncrementalSource,MouseInteractions,BLOCK_CLASS$1="rr-block";function isBlocked(e){return!!e&&(e.nodeType===e.ELEMENT_NODE&&e.classList.contains(BLOCK_CLASS$1)||isBlocked(e.parentNode))}function initMutationObserver(e){var t=new MutationObserver(function(t){var n=[],r=[],o=[],i=[],a=[],u=new Set,c=function(e){isBlocked(e)||(u.add(e),e.childNodes.forEach(function(e){return c(e)}))};t.forEach(function(e){var t=e.type,i=e.target,s=e.oldValue,l=e.addedNodes,d=e.removedNodes,p=e.attributeName;switch(t){case"characterData":var m=i.textContent;isBlocked(i)||m===s||n.push({value:m,node:i});break;case"attributes":m=i.getAttribute(p);if(isBlocked(i)||m===s)return;var f=r.find(function(e){return e.node===i});f||(f={node:i,attributes:{}},r.push(f)),f.attributes[p]=m;break;case"childList":l.forEach(function(e){return c(e)}),d.forEach(function(e){isBlocked(e)||(u.has(e)?(u.delete(e),a.push(e)):u.has(i)&&!mirror.getId(e)||o.push({parentId:mirror.getId(i),id:mirror.getId(e)}),mirror.removeNodeFromMap(e))})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=mirror.getId(e.parentNode),delete e.parentNode),e});var s=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||s(t))},l=function(e){var t=e.parentNode;if(!t)return!1;var n=mirror.getId(t);return!!o.some(function(e){return e.id===n})||l(t)};Array.from(u).forEach(function(e){s(e)||l(e)?a.push(e):i.push({parentId:mirror.getId(e.parentNode),previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,!0)})});var d={texts:n.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:r.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:o,adds:i};(d.texts.length||d.attributes.length||d.removes.length||d.adds.length)&&e(d)});return t.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function initMousemoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return on("mousemove",throttle(function(e){var o=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:o,y:i,id:mirror.getId(a),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}function initMouseInteractionObserver(e){var t=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){if(!isBlocked(n.target)){var r=mirror.getId(n.target),o=n.clientX,i=n.clientY;e({type:MouseInteractions[t],id:r,x:o,y:i})}}}(n);t.push(on(r,o))}),function(){t.forEach(function(e){return e()})}}function initScrollObserver(e){return on("scroll",throttle(function(t){if(t.target&&!isBlocked(t.target)){var n=mirror.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={}));var INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],HOOK_PROPERTIES=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],IGNORE_CLASS="rr-ignore",lastInputValueMap=new WeakMap;function initInputObserver(e){function t(e){var t=e.target;if(t&&t.tagName&&!(INPUT_TAGS.indexOf(t.tagName)<0)&&!isBlocked(t)){var r=t.type;if("password"!==r&&!t.classList.contains(IGNORE_CLASS)){var o=t.value,i=!1;"radio"!==r&&"checkbox"!==r||(i=t.checked),n(t,{text:o,isChecked:i});var a=t.name;"radio"===r&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&n(e,{text:e.value,isChecked:!i})})}}}function n(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var r=["input","change"].map(function(e){return on(e,t)}),o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return o&&o.set&&r.push.apply(r,HOOK_PROPERTIES.map(function(e){return hookSetter(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb),n=initMousemoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb),o=initScrollObserver(e.scrollCb),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var n=[];n.push(on("DOMContentLoaded",function(){t(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var r=function(){t(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}));var e=snapshot(document),r=e[0],o=e[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=o,t(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),n.push(initObservers({mutationCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():n.push(on("load",function(){t(wrapEvent({type:EventType.Load,data:{}})),r()},window)),function(){n.forEach(function(e){return e()})}}catch(e){console.warn(e)}}export default record;
//# sourceMappingURL=rrweb-record.min.js.map

@@ -1,2 +0,2 @@

var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((['"]|)([^'"]*)\1\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r){if(!RELATIVE_PATH.test(r))return"url('"+r+"')";if(DATA_URI.test(r))return"url("+r+")";if("/"===r[0])return"url('"+(extractOrigin(t)+r)+"')";var o=t.split("/"),i=r.split("/");o.pop();for(var a=0,s=i;a<s.length;a++){var l=s[a];"."!==l&&(".."===l?o.pop():o.push(l))}return"url('"+o.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}var BLOCK_CLASS="rr-block";function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var n=e.classList.contains(BLOCK_CLASS),r=e.tagName.toLowerCase(),o={},i=0,a=Array.from(e.attributes);i<a.length;i++){var s=a[i],l=s.name,c=s.value;o[l]="src"===l||"href"===l?absoluteToDoc(t,c):c}if("link"===r){var u=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),d=getCssRulesString(u);d&&(o={_cssText:absoluteToStylesheet(d,u.href)})}if("input"===r||"textarea"===r||"select"===r){c=e.value;"radio"!==o.type&&"checkbox"!==o.type&&c?o.value=c:e.checked&&(o.checked=e.checked)}if("option"===r){var p=e.parentElement;o.value===p.value&&(o.selected=e.selected)}if(n){var f=e.getBoundingClientRect(),m=f.width,h=f.height;o.rr_width=m+"px",o.rr_height=h+"px"}return{type:NodeType.Element,tagName:r,attributes:o,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:n};case e.TEXT_NODE:var v=e.parentNode&&e.parentNode.tagName,y=e.textContent,g="STYLE"===v||void 0;return g&&y&&(y=absoluteToStylesheet(y,location.href)),"SCRIPT"===v&&(y="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:y||"",isStyle:g};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r){void 0===r&&(r=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var i=Object.assign(o,{id:genId()});e.__sn=i,n[i.id]=e;var a=!r;if(i.type===NodeType.Element&&(a=a&&!i.needBlock,delete i.needBlock),(i.type===NodeType.Document||i.type===NodeType.Element)&&a)for(var s=0,l=Array.from(e.childNodes);s<l.length;s++){var c=serializeNodeWithId(l[s],t,n);c&&i.childNodes.push(c)}return i}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var CSS_SELECTOR=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){return e.replace(CSS_SELECTOR,function(e,t,n){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+r.replace(/^\s*/,"")+n}return e})}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n=getTagName(e),r=void 0;for(var o in r=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",n):t.createElement(n),e.attributes)if(e.attributes.hasOwnProperty(o)&&!o.startsWith("rr_")){var i=e.attributes[o];i="boolean"==typeof i?"":i;var a="textarea"===n&&"value"===o,s="style"===n&&"_cssText"===o;if(s&&(i=addHoverClass(i)),a||s){var l=t.createTextNode(i);r.appendChild(l);continue}if("iframe"===n&&"src"===o)continue;try{r.setAttribute(o,i)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,n,r){void 0===r&&(r=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),o=t),o.__sn=e,n[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!r)for(var i=0,a=e.childNodes;i<a.length;i++){var s=a[i],l=buildNodeWithSN(s,t,n);l?o.appendChild(l):console.warn("Failed to rebuild",s)}return o}function rebuild(e,t){var n={};return[buildNodeWithSN(e,t,n),n]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var EventType,IncrementalSource,MouseInteractions,mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),s=this,l=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(s,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,l)},a))}}function hookSetter(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return hookSetter(e,t,r||{})}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function initMutationObserver(e){var t=new MutationObserver(function(t){var n=[],r=[],o=[],i=[],a=[],s=new Set,l=function(e){s.add(e),e.childNodes.forEach(function(e){return l(e)})};t.forEach(function(e){var t=e.type,i=e.target,c=e.oldValue,u=e.addedNodes,d=e.removedNodes,p=e.attributeName;switch(t){case"characterData":(f=i.textContent)!==c&&n.push({value:f,node:i});break;case"attributes":var f;if((f=i.getAttribute(p))===c)return;var m=r.find(function(e){return e.node===i});m||(m={node:i,attributes:{}},r.push(m)),m.attributes[p]=f;case"childList":u.forEach(function(e){return l(e)}),d.forEach(function(e){s.has(e)?(s.delete(e),a.push(e)):s.has(i)&&!mirror.getId(e)||o.push({parentId:mirror.getId(i),id:mirror.getId(e)}),mirror.removeNodeFromMap(e)})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=mirror.getId(e.parentNode),delete e.parentNode),e});var c=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||c(t))},u=function(e){var t=e.parentNode;if(!t)return!1;var n=mirror.getId(t);return!!o.some(function(e){return e.id===n})||u(t)};Array.from(s).forEach(function(e){c(e)||u(e)?a.push(e):i.push({parentId:mirror.getId(e.parentNode),previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,!0)})}),e({texts:n.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:r.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:o,adds:i})});return t.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function initMousemoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return on("mousemove",throttle(function(e){var o=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:o,y:i,id:mirror.getId(a),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}function initMouseInteractionObserver(e){var t=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){var r=mirror.getId(n.target),o=n.clientX,i=n.clientY;e({type:MouseInteractions[t],id:r,x:o,y:i})}}(n);t.push(on(r,o))}),function(){t.forEach(function(e){return e()})}}function initScrollObserver(e){return on("scroll",throttle(function(t){if(t.target){var n=mirror.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={}));var INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],HOOK_PROPERTIES=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],IGNORE_CLASS="rr-ignore",lastInputValueMap=new WeakMap;function initInputObserver(e){function t(e){var t=e.target;if(t&&t.tagName&&!(INPUT_TAGS.indexOf(t.tagName)<0)){var r=t.type;if("password"!==r&&!t.classList.contains(IGNORE_CLASS)){var o=t.value,i=!1;"radio"!==r&&"checkbox"!==r||(i=t.checked),n(t,{text:o,isChecked:i});var a=t.name;"radio"===r&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&n(e,{text:e.value,isChecked:!i})})}}}function n(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var r=["input","change"].map(function(e){return on(e,t)}),o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return o&&o.set&&r.push.apply(r,HOOK_PROPERTIES.map(function(e){return hookSetter(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb),n=initMousemoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb),o=initScrollObserver(e.scrollCb),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var n=[];n.push(on("DOMContentLoaded",function(){t(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var r=function(){t(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}));var e=snapshot(document),r=e[0],o=e[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=o,t(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),n.push(initObservers({mutationCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():n.push(on("load",function(){t(wrapEvent({type:EventType.Load,data:{}})),r()},window)),function(){n.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||l,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.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(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){var n;do{n=(e=e.parentNode)===t.body}while(!1===n&&!1===p(e));return n=null,e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function p(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function f(t){var n,r,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(n,r,o){var s,c,u,d,p=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,c=n.scrollLeft,u=n.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:r,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}t.length>0&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}(),rules=["iframe, .rr-block { background: #ccc }","noscript { display: none !important; }"],SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3;smoothscroll_1();var mitt$1=mitt||mittProxy,defaultConfig={speed:1,root:document.body,loadTimeout:0,skipInactive:!1},Replayer=function(){function e(e,t){if(this.events=[],this.config=defaultConfig,this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this),this.timer=new Timer(this.config),this.setConfig(Object.assign({},t)),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n],i=o.timestamp<this.baselineTime,a=this.getCastFn(o,i);i?a():t.push({doAction:a,delay:this.getDelay(o)})}this.timer.addActions(t),this.timer.start()},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit("pause")},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n];if(!(o.timestamp<=this.lastPlayedEvent.timestamp||o===this.lastPlayedEvent)){var i=this.getCastFn(o);t.push({doAction:i,delay:this.getDelay(o)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit("resume")},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:n=function(){return r.emitter.emit("resize",{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:n=function(){r.rebuildFullSnapshot(e),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:n=function(){if(r.applyIncremental(e,t),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.restoreSpeed()),r.config.skipInactive&&!r.nextUserInteractionEvent){for(var n=0,o=r.events;n<o.length;n++){var i=o[n];if(!(i.timestamp<=e.timestamp)&&r.isUserInteraction(i)){i.delay-e.delay>SKIP_TIME_THRESHOLD*r.config.speed&&(r.nextUserInteractionEvent=i);break}}if(r.nextUserInteractionEvent){r.noramlSpeed=r.config.speed;var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/SKIP_TIME_INTERVAL),360)};r.setConfig(s),r.emitter.emit("skip-start",s)}}}}return function(){n&&n(),r.lastPlayedEvent=e,e===r.events[r.events.length-1]&&(r.restoreSpeed(),r.emitter.emit("finish"))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,o=n.head;r.insertBefore(t,o);for(var i=0;i<rules.length;i++)t.sheet.insertRule(rules[i],i);this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,r=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===r.size&&(e.pause(),e.emitter.emit("wait-stylesheet"),n=window.setTimeout(function(){e.resume(),n=-1},e.config.loadTimeout)),r.add(t),t.addEventListener("load",function(){r.delete(t),0===r.size&&-1!==n&&(e.resume(),e.emitter.emit("stylesheet-loaded"),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var n=this,r=e.data;switch(r.source){case IncrementalSource.Mutation:r.removes.forEach(function(e){var t=mirror.getNode(e.id);if(t){var n=mirror.getNode(e.parentId);mirror.removeNodeFromMap(t),n&&n.removeChild(t)}});var o=__assign({},this.missingNodeRetryMap);r.adds.forEach(function(e){var t=buildNodeWithSN(e.node,n.iframe.contentDocument,mirror.map,!0),r=mirror.getNode(e.parentId),i=null,a=null;e.previousId&&(i=mirror.getNode(e.previousId)),e.nextId&&(a=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(i&&i.nextSibling&&i.nextSibling.parentNode?r.insertBefore(t,i.nextSibling):a&&a.parentNode?r.insertBefore(t,a):r.appendChild(t),(e.previousId||e.nextId)&&n.resolveMissingNode(o,r,t,e)):o[e.node.id]={node:t,mutation:e}}),Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),r.texts.forEach(function(e){mirror.getNode(e.id).textContent=e.value}),r.attributes.forEach(function(e){var t=mirror.getNode(e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case IncrementalSource.MouseMove:t||r.positions.forEach(function(t){var r={doAction:function(){n.mouse.style.left=t.x+"px",n.mouse.style.top=t.y+"px";var e=mirror.getNode(t.id);e&&n.hoverElements(e)},delay:t.timeOffset+e.timestamp-n.baselineTime};n.timer.addAction(r)});break;case IncrementalSource.MouseInteraction:if(-1===r.id)break;var i=new Event(MouseInteractions[r.type].toLowerCase()),a=mirror.getNode(r.id);switch(r.type){case MouseInteractions.Blur:a.blur();break;case MouseInteractions.Focus:a.focus({preventScroll:!0});break;case MouseInteractions.Click:t||(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:a.dispatchEvent(i)}break;case IncrementalSource.Scroll:if(-1===r.id)break;if((a=mirror.getNode(r.id))===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"instant":"smooth"});else try{a.scrollTop=r.y,a.scrollLeft=r.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit("resize",{width:r.width,height:r.height});break;case IncrementalSource.Input:if(-1===r.id)break;a=mirror.getNode(r.id);try{a.checked=r.isChecked,a.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit("skip-end",e),this.noramlSpeed=-1}},e}();export{record,Replayer,mirror};
var NodeType,__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(NodeType||(NodeType={}));var _id=1;function genId(){return _id++}function resetId(){_id=1}function getCssRulesString(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).reduce(function(e,t){return e+t.cssText},""):null}catch(e){return null}}function extractOrigin(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}var URL_IN_CSS_REF=/url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm,RELATIVE_PATH=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/,DATA_URI=/^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;function absoluteToStylesheet(e,t){return e.replace(URL_IN_CSS_REF,function(e,n,r,o){var i=n||r||o;if(!RELATIVE_PATH.test(i))return"url('"+i+"')";if(DATA_URI.test(i))return"url("+i+")";if("/"===i[0])return"url('"+(extractOrigin(t)+i)+"')";var a=t.split("/"),s=i.split("/");a.pop();for(var l=0,c=s;l<c.length;l++){var u=c[l];"."!==u&&(".."===u?a.pop():a.push(u))}return"url('"+a.join("/")+"')"})}function absoluteToDoc(e,t){var n=e.createElement("a");return n.href=t,n.href}function isSVGElement(e){return"svg"===e.tagName||e instanceof SVGElement}var BLOCK_CLASS="rr-block";function serializeNode(e,t){switch(e.nodeType){case e.DOCUMENT_NODE:return{type:NodeType.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId};case e.ELEMENT_NODE:for(var n=e.classList.contains(BLOCK_CLASS),r=e.tagName.toLowerCase(),o={},i=0,a=Array.from(e.attributes);i<a.length;i++){var s=a[i],l=s.name,c=s.value;o[l]="src"===l||"href"===l?absoluteToDoc(t,c):"style"===l?absoluteToStylesheet(c,location.href):c}if("link"===r){var u=Array.from(t.styleSheets).find(function(t){return t.href===e.href}),d=getCssRulesString(u);d&&(o={_cssText:absoluteToStylesheet(d,u.href)})}if("input"===r||"textarea"===r||"select"===r){c=e.value;"radio"!==o.type&&"checkbox"!==o.type&&c?o.value=c:e.checked&&(o.checked=e.checked)}if("option"===r){var p=e.parentElement;o.value===p.value&&(o.selected=e.selected)}if(n){var f=e.getBoundingClientRect(),m=f.width,h=f.height;o.rr_width=m+"px",o.rr_height=h+"px"}return{type:NodeType.Element,tagName:r,attributes:o,childNodes:[],isSVG:isSVGElement(e)||void 0,needBlock:n};case e.TEXT_NODE:var v=e.parentNode&&e.parentNode.tagName,y=e.textContent,g="STYLE"===v||void 0;return g&&y&&(y=absoluteToStylesheet(y,location.href)),"SCRIPT"===v&&(y="SCRIPT_PLACEHOLDER"),{type:NodeType.Text,textContent:y||"",isStyle:g};case e.CDATA_SECTION_NODE:return{type:NodeType.CDATA,textContent:""};case e.COMMENT_NODE:return{type:NodeType.Comment,textContent:e.textContent||""};default:return!1}}function serializeNodeWithId(e,t,n,r){void 0===r&&(r=!1);var o=serializeNode(e,t);if(!o)return console.warn(e,"not serialized"),null;var i=Object.assign(o,{id:genId()});e.__sn=i,n[i.id]=e;var a=!r;if(i.type===NodeType.Element&&(a=a&&!i.needBlock,delete i.needBlock),(i.type===NodeType.Document||i.type===NodeType.Element)&&a)for(var s=0,l=Array.from(e.childNodes);s<l.length;s++){var c=serializeNodeWithId(l[s],t,n);c&&i.childNodes.push(c)}return i}function snapshot(e){resetId();var t={};return[serializeNodeWithId(e,e,t),t]}var tagMap={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function getTagName(e){var t=tagMap[e.tagName]?tagMap[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}var CSS_SELECTOR=/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,HOVER_SELECTOR=/([^\\]):hover/g;function addHoverClass(e){return e.replace(CSS_SELECTOR,function(e,t,n){if(HOVER_SELECTOR.test(t)){var r=t.replace(HOVER_SELECTOR,"$1.\\:hover");return t.replace(/\s*$/,"")+", "+r.replace(/^\s*/,"")+n}return e})}function buildNode(e,t){switch(e.type){case NodeType.Document:return t.implementation.createDocument(null,"",null);case NodeType.DocumentType:return t.implementation.createDocumentType(e.name,e.publicId,e.systemId);case NodeType.Element:var n=getTagName(e),r=void 0;for(var o in r=e.isSVG?t.createElementNS("http://www.w3.org/2000/svg",n):t.createElement(n),e.attributes)if(e.attributes.hasOwnProperty(o)&&!o.startsWith("rr_")){var i=e.attributes[o];i="boolean"==typeof i?"":i;var a="textarea"===n&&"value"===o,s="style"===n&&"_cssText"===o;if(s&&(i=addHoverClass(i)),a||s){var l=t.createTextNode(i);r.appendChild(l);continue}if("iframe"===n&&"src"===o)continue;try{r.setAttribute(o,i)}catch(e){}}else e.attributes.rr_width&&(r.style.width=e.attributes.rr_width),e.attributes.rr_height&&(r.style.height=e.attributes.rr_height);return r;case NodeType.Text:return t.createTextNode(e.isStyle?addHoverClass(e.textContent):e.textContent);case NodeType.CDATA:return t.createCDATASection(e.textContent);case NodeType.Comment:return t.createComment(e.textContent);default:return null}}function buildNodeWithSN(e,t,n,r){void 0===r&&(r=!1);var o=buildNode(e,t);if(!o)return null;if(e.type===NodeType.Document&&(t.close(),t.open(),o=t),o.__sn=e,n[e.id]=o,(e.type===NodeType.Document||e.type===NodeType.Element)&&!r)for(var i=0,a=e.childNodes;i<a.length;i++){var s=a[i],l=buildNodeWithSN(s,t,n);l?o.appendChild(l):console.warn("Failed to rebuild",s)}return o}function rebuild(e,t){var n={};return[buildNodeWithSN(e,t,n),n]}function on(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var mirror={map:{},getId:function(e){return e.__sn?e.__sn.id:-1},getNode:function(e){return mirror.map[e]||null},removeNodeFromMap:function(e){var t=e.__sn&&e.__sn.id;delete mirror.map[t],e.childNodes&&e.childNodes.forEach(function(e){return mirror.removeNodeFromMap(e)})},has:function(e){return mirror.map.hasOwnProperty(e)}};function throttle(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(){var i=Date.now();o||!1!==n.leading||(o=i);var a=t-(i-o),s=this,l=arguments;a<=0||a>t?(r&&(window.clearTimeout(r),r=null),o=i,e.apply(s,l)):r||!1===n.trailing||(r=window.setTimeout(function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(s,l)},a))}}function hookSetter(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t);return Object.defineProperty(e,t,{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),r&&r.set&&r.set.call(this,e)}}),function(){return hookSetter(e,t,r||{})}}function getWindowHeight(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function getWindowWidth(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}var EventType,IncrementalSource,MouseInteractions,BLOCK_CLASS$1="rr-block";function isBlocked(e){return!!e&&(e.nodeType===e.ELEMENT_NODE&&e.classList.contains(BLOCK_CLASS$1)||isBlocked(e.parentNode))}function initMutationObserver(e){var t=new MutationObserver(function(t){var n=[],r=[],o=[],i=[],a=[],s=new Set,l=function(e){isBlocked(e)||(s.add(e),e.childNodes.forEach(function(e){return l(e)}))};t.forEach(function(e){var t=e.type,i=e.target,c=e.oldValue,u=e.addedNodes,d=e.removedNodes,p=e.attributeName;switch(t){case"characterData":var f=i.textContent;isBlocked(i)||f===c||n.push({value:f,node:i});break;case"attributes":f=i.getAttribute(p);if(isBlocked(i)||f===c)return;var m=r.find(function(e){return e.node===i});m||(m={node:i,attributes:{}},r.push(m)),m.attributes[p]=f;break;case"childList":u.forEach(function(e){return l(e)}),d.forEach(function(e){isBlocked(e)||(s.has(e)?(s.delete(e),a.push(e)):s.has(i)&&!mirror.getId(e)||o.push({parentId:mirror.getId(i),id:mirror.getId(e)}),mirror.removeNodeFromMap(e))})}}),o=o.map(function(e){return e.parentNode&&(e.parentId=mirror.getId(e.parentNode),delete e.parentNode),e});var c=function(e){var t=e.parentNode;return!!t&&(!!a.some(function(e){return e===t})||c(t))},u=function(e){var t=e.parentNode;if(!t)return!1;var n=mirror.getId(t);return!!o.some(function(e){return e.id===n})||u(t)};Array.from(s).forEach(function(e){c(e)||u(e)?a.push(e):i.push({parentId:mirror.getId(e.parentNode),previousId:e.previousSibling?mirror.getId(e.previousSibling):e.previousSibling,nextId:e.nextSibling?mirror.getId(e.nextSibling):e.nextSibling,node:serializeNodeWithId(e,document,mirror.map,!0)})});var d={texts:n.map(function(e){return{id:mirror.getId(e.node),value:e.value}}).filter(function(e){return mirror.has(e.id)}),attributes:r.map(function(e){return{id:mirror.getId(e.node),attributes:e.attributes}}).filter(function(e){return mirror.has(e.id)}),removes:o,adds:i};(d.texts.length||d.attributes.length||d.removes.length||d.adds.length)&&e(d)});return t.observe(document,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),t}function initMousemoveObserver(e){var t,n=[],r=throttle(function(){var r=Date.now()-t;e(n.map(function(e){return e.timeOffset-=r,e})),n=[],t=null},500);return on("mousemove",throttle(function(e){var o=e.clientX,i=e.clientY,a=e.target;t||(t=Date.now()),n.push({x:o,y:i,id:mirror.getId(a),timeOffset:Date.now()-t}),r()},20,{trailing:!1}))}function initMouseInteractionObserver(e){var t=[];return Object.keys(MouseInteractions).filter(function(e){return Number.isNaN(Number(e))}).forEach(function(n){var r=n.toLowerCase(),o=function(t){return function(n){if(!isBlocked(n.target)){var r=mirror.getId(n.target),o=n.clientX,i=n.clientY;e({type:MouseInteractions[t],id:r,x:o,y:i})}}}(n);t.push(on(r,o))}),function(){t.forEach(function(e){return e()})}}function initScrollObserver(e){return on("scroll",throttle(function(t){if(t.target&&!isBlocked(t.target)){var n=mirror.getId(t.target);if(t.target===document){var r=document.scrollingElement||document.documentElement;e({id:n,x:r.scrollLeft,y:r.scrollTop})}else e({id:n,x:t.target.scrollLeft,y:t.target.scrollTop})}},100))}function initViewportResizeObserver(e){return on("resize",throttle(function(){var t=getWindowHeight(),n=getWindowWidth();e({width:Number(n),height:Number(t)})},200),window)}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta"}(EventType||(EventType={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input"}(IncrementalSource||(IncrementalSource={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove=8]="TouchMove",e[e.TouchEnd=9]="TouchEnd"}(MouseInteractions||(MouseInteractions={}));var INPUT_TAGS=["INPUT","TEXTAREA","SELECT"],HOOK_PROPERTIES=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"]],IGNORE_CLASS="rr-ignore",lastInputValueMap=new WeakMap;function initInputObserver(e){function t(e){var t=e.target;if(t&&t.tagName&&!(INPUT_TAGS.indexOf(t.tagName)<0)&&!isBlocked(t)){var r=t.type;if("password"!==r&&!t.classList.contains(IGNORE_CLASS)){var o=t.value,i=!1;"radio"!==r&&"checkbox"!==r||(i=t.checked),n(t,{text:o,isChecked:i});var a=t.name;"radio"===r&&a&&i&&document.querySelectorAll('input[type="radio"][name="'+a+'"]').forEach(function(e){e!==t&&n(e,{text:e.value,isChecked:!i})})}}}function n(t,n){var r=lastInputValueMap.get(t);if(!r||r.text!==n.text||r.isChecked!==n.isChecked){lastInputValueMap.set(t,n);var o=mirror.getId(t);e(__assign({},n,{id:o}))}}var r=["input","change"].map(function(e){return on(e,t)}),o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");return o&&o.set&&r.push.apply(r,HOOK_PROPERTIES.map(function(e){return hookSetter(e[0],e[1],{set:function(){t({target:this})}})})),function(){r.forEach(function(e){return e()})}}function initObservers(e){var t=initMutationObserver(e.mutationCb),n=initMousemoveObserver(e.mousemoveCb),r=initMouseInteractionObserver(e.mouseInteractionCb),o=initScrollObserver(e.scrollCb),i=initViewportResizeObserver(e.viewportResizeCb),a=initInputObserver(e.inputCb);return function(){t.disconnect(),n(),r(),o(),i(),a()}}function wrapEvent(e){return __assign({},e,{timestamp:Date.now()})}function record(e){void 0===e&&(e={});var t=e.emit;if(!t)throw new Error("emit function is required");try{var n=[];n.push(on("DOMContentLoaded",function(){t(wrapEvent({type:EventType.DomContentLoaded,data:{}}))}));var r=function(){t(wrapEvent({type:EventType.Meta,data:{href:window.location.href,width:getWindowWidth(),height:getWindowHeight()}}));var e=snapshot(document),r=e[0],o=e[1];if(!r)return console.warn("Failed to snapshot the document");mirror.map=o,t(wrapEvent({type:EventType.FullSnapshot,data:{node:r,initialOffset:{left:document.documentElement.scrollLeft,top:document.documentElement.scrollTop}}})),n.push(initObservers({mutationCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Mutation},e)}))},mousemoveCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:{source:IncrementalSource.MouseMove,positions:e}}))},mouseInteractionCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.MouseInteraction},e)}))},scrollCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Scroll},e)}))},viewportResizeCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return t(wrapEvent({type:EventType.IncrementalSnapshot,data:__assign({source:IncrementalSource.Input},e)}))}}))};return"interactive"===document.readyState||"complete"===document.readyState?r():n.push(on("load",function(){t(wrapEvent({type:EventType.Load,data:{}})),r()},window)),function(){n.forEach(function(e){return e()})}}catch(e){console.warn(e)}}function mitt(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map(function(e){e(n)}),(e["*"]||[]).slice().map(function(e){e(t,n)})}}}var mittProxy=Object.freeze({default:mitt});function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var smoothscroll=createCommonjsModule(function(e,t){!function(){e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)){var n,r=e.HTMLElement||e.Element,o=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||l,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?m.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):i.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?i.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):m.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(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;m.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){var n;do{n=(e=e.parentNode)===t.body}while(!1===n&&!1===p(e));return n=null,e}(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==t.body?(m.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function l(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function p(e){var t=u(e,"Y")&&d(e,"Y"),n=u(e,"X")&&d(e,"X");return t||n}function f(t){var n,r,i,s,l=(a()-t.startTime)/o;s=l=l>1?1:l,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,i=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,i),r===t.x&&i===t.y||e.requestAnimationFrame(f.bind(e,t))}function m(n,r,o){var s,c,u,d,p=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=i.scroll):(s=n,c=n.scrollLeft,u=n.scrollTop,d=l),f({scrollable:s,method:d,startTime:p,startX:c,startY:u,x:r,y:o})}}}}()}),smoothscroll_1=smoothscroll.polyfill,Timer=function(){function e(e,t){void 0===t&&(t=[]),this.timeOffset=0,this.actions=t,this.config=e}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){var t;(t=this.actions).push.apply(t,e)},e.prototype.start=function(){this.actions.sort(function(e,t){return e.delay-t.delay}),this.timeOffset=0;var e=performance.now(),t=this.actions,n=this.config,r=this;this.raf=requestAnimationFrame(function o(i){for(r.timeOffset+=(i-e)*n.speed,e=i;t.length;){var a=t[0];if(!(r.timeOffset>=a.delay))break;t.shift(),a.doAction()}t.length>0&&(r.raf=requestAnimationFrame(o))})},e.prototype.clear=function(){this.raf&&cancelAnimationFrame(this.raf),this.actions.length=0},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}(),rules=["iframe, .rr-block { background: #ccc }","noscript { display: none !important; }"],SKIP_TIME_THRESHOLD=1e4,SKIP_TIME_INTERVAL=5e3;smoothscroll_1();var mitt$1=mitt||mittProxy,defaultConfig={speed:1,root:document.body,loadTimeout:0,skipInactive:!1},Replayer=function(){function e(e,t){if(this.events=[],this.config=defaultConfig,this.emitter=mitt$1(),this.baselineTime=0,this.noramlSpeed=-1,this.missingNodeRetryMap={},e.length<2)throw new Error("Replayer need at least 2 events.");this.events=e,this.handleResize=this.handleResize.bind(this),this.timer=new Timer(this.config),this.setConfig(Object.assign({},t)),this.setupDom(),this.emitter.on("resize",this.handleResize)}return e.prototype.on=function(e,t){this.emitter.on(e,t)},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach(function(n){t.config[n]=e[n]}),this.config.skipInactive||(this.noramlSpeed=-1)},e.prototype.getMetaData=function(){var e=this.events[0];return{totalTime:this.events[this.events.length-1].timestamp-e.timestamp}},e.prototype.getTimeOffset=function(){return this.baselineTime-this.events[0].timestamp},e.prototype.play=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n],i=o.timestamp<this.baselineTime,a=this.getCastFn(o,i);i?a():t.push({doAction:a,delay:this.getDelay(o)})}this.timer.addActions(t),this.timer.start()},e.prototype.pause=function(){this.timer.clear(),this.emitter.emit("pause")},e.prototype.resume=function(e){void 0===e&&(e=0),this.timer.clear(),this.baselineTime=this.events[0].timestamp+e;for(var t=new Array,n=0,r=this.events;n<r.length;n++){var o=r[n];if(!(o.timestamp<=this.lastPlayedEvent.timestamp||o===this.lastPlayedEvent)){var i=this.getCastFn(o);t.push({doAction:i,delay:this.getDelay(o)})}}this.timer.addActions(t),this.timer.start(),this.emitter.emit("resume")},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin"),this.iframe.setAttribute("scrolling","no"),this.wrapper.appendChild(this.iframe)},e.prototype.handleResize=function(e){this.iframe.width=e.width+"px",this.iframe.height=e.height+"px"},e.prototype.getDelay=function(e){if(e.type===EventType.IncrementalSnapshot&&e.data.source===IncrementalSource.MouseMove){var t=e.data.positions[0].timeOffset,n=e.timestamp+t;return e.delay=n-this.baselineTime,n-this.baselineTime}return e.delay=e.timestamp-this.baselineTime,e.timestamp-this.baselineTime},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case EventType.DomContentLoaded:case EventType.Load:break;case EventType.Meta:n=function(){return r.emitter.emit("resize",{width:e.data.width,height:e.data.height})};break;case EventType.FullSnapshot:n=function(){r.rebuildFullSnapshot(e),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case EventType.IncrementalSnapshot:n=function(){if(r.applyIncremental(e,t),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.restoreSpeed()),r.config.skipInactive&&!r.nextUserInteractionEvent){for(var n=0,o=r.events;n<o.length;n++){var i=o[n];if(!(i.timestamp<=e.timestamp)&&r.isUserInteraction(i)){i.delay-e.delay>SKIP_TIME_THRESHOLD*r.config.speed&&(r.nextUserInteractionEvent=i);break}}if(r.nextUserInteractionEvent){r.noramlSpeed=r.config.speed;var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/SKIP_TIME_INTERVAL),360)};r.setConfig(s),r.emitter.emit("skip-start",s)}}}}return function(){n&&n(),r.lastPlayedEvent=e,e===r.events[r.events.length-1]&&(r.restoreSpeed(),r.emitter.emit("finish"))}},e.prototype.rebuildFullSnapshot=function(e){Object.keys(this.missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.missingNodeRetryMap),this.missingNodeRetryMap={},mirror.map=rebuild(e.data.node,this.iframe.contentDocument)[1];var t=document.createElement("style"),n=this.iframe.contentDocument,r=n.documentElement,o=n.head;r.insertBefore(t,o);for(var i=0;i<rules.length;i++)t.sheet.insertRule(rules[i],i);this.waitForStylesheetLoad()},e.prototype.waitForStylesheetLoad=function(){var e=this,t=this.iframe.contentDocument.head;if(t){var n,r=new Set;t.querySelectorAll('link[rel="stylesheet"]').forEach(function(t){t.sheet||(0===r.size&&(e.pause(),e.emitter.emit("wait-stylesheet"),n=window.setTimeout(function(){e.resume(),n=-1},e.config.loadTimeout)),r.add(t),t.addEventListener("load",function(){r.delete(t),0===r.size&&-1!==n&&(e.resume(),e.emitter.emit("stylesheet-loaded"),n&&window.clearTimeout(n))}))})}},e.prototype.applyIncremental=function(e,t){var n=this,r=e.data;switch(r.source){case IncrementalSource.Mutation:r.removes.forEach(function(e){var t=mirror.getNode(e.id);if(t){var n=mirror.getNode(e.parentId);mirror.removeNodeFromMap(t),n&&n.removeChild(t)}});var o=__assign({},this.missingNodeRetryMap);r.adds.forEach(function(e){var t=buildNodeWithSN(e.node,n.iframe.contentDocument,mirror.map,!0),r=mirror.getNode(e.parentId),i=null,a=null;e.previousId&&(i=mirror.getNode(e.previousId)),e.nextId&&(a=mirror.getNode(e.nextId)),-1!==e.previousId&&-1!==e.nextId?(i&&i.nextSibling&&i.nextSibling.parentNode?r.insertBefore(t,i.nextSibling):a&&a.parentNode?r.insertBefore(t,a):r.appendChild(t),(e.previousId||e.nextId)&&n.resolveMissingNode(o,r,t,e)):o[e.node.id]={node:t,mutation:e}}),Object.keys(o).length&&Object.assign(this.missingNodeRetryMap,o),r.texts.forEach(function(e){mirror.getNode(e.id).textContent=e.value}),r.attributes.forEach(function(e){var t=mirror.getNode(e.id);for(var n in e.attributes)if("string"==typeof n){var r=e.attributes[n];r?t.setAttribute(n,r):t.removeAttribute(n)}});break;case IncrementalSource.MouseMove:t||r.positions.forEach(function(t){var r={doAction:function(){n.mouse.style.left=t.x+"px",n.mouse.style.top=t.y+"px";var e=mirror.getNode(t.id);e&&n.hoverElements(e)},delay:t.timeOffset+e.timestamp-n.baselineTime};n.timer.addAction(r)});break;case IncrementalSource.MouseInteraction:if(-1===r.id)break;var i=new Event(MouseInteractions[r.type].toLowerCase()),a=mirror.getNode(r.id);switch(r.type){case MouseInteractions.Blur:a.blur();break;case MouseInteractions.Focus:a.focus({preventScroll:!0});break;case MouseInteractions.Click:t||(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active"));break;default:a.dispatchEvent(i)}break;case IncrementalSource.Scroll:if(-1===r.id)break;if((a=mirror.getNode(r.id))===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:r.y,left:r.x,behavior:t?"auto":"smooth"});else try{a.scrollTop=r.y,a.scrollLeft=r.x}catch(e){}break;case IncrementalSource.ViewportResize:this.emitter.emit("resize",{width:r.width,height:r.height});break;case IncrementalSource.Input:if(-1===r.id)break;a=mirror.getNode(r.id);try{a.checked=r.isChecked,a.value=r.text}catch(e){}}},e.prototype.resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation;t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.resolveMissingNode(e,t,c,u)}},e.prototype.hoverElements=function(e){this.iframe.contentDocument.querySelectorAll(".\\:hover").forEach(function(e){e.classList.remove(":hover")});for(var t=e;t;)t.classList.add(":hover"),t=t.parentElement},e.prototype.isUserInteraction=function(e){return e.type===EventType.IncrementalSnapshot&&(e.data.source>IncrementalSource.Mutation&&e.data.source<=IncrementalSource.Input)},e.prototype.restoreSpeed=function(){if(-1!==this.noramlSpeed){var e={speed:this.noramlSpeed};this.setConfig(e),this.emitter.emit("skip-end",e),this.noramlSpeed=-1}},e}();export{record,Replayer,mirror};
//# sourceMappingURL=rrweb.min.js.map

@@ -71,7 +71,8 @@ 'use strict';

}
var URL_IN_CSS_REF = /url\((['"]|)([^'"]*)\1\)/gm;
var URL_IN_CSS_REF = /url\((?:'([^']*)'|"([^"]*)"|([^)]*))\)/gm;
var RELATIVE_PATH = /^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/).*/;
var DATA_URI = /^(data:)([\w\/\+]+);(charset=[\w-]+|base64).*,(.*)/gi;
function absoluteToStylesheet(cssText, href) {
return cssText.replace(URL_IN_CSS_REF, function (_1, _2, filePath) {
return cssText.replace(URL_IN_CSS_REF, function (_1, path1, path2, path3) {
var filePath = path1 || path2 || path3;
if (!RELATIVE_PATH.test(filePath)) {

@@ -136,2 +137,5 @@ return "url('" + filePath + "')";

}
else if (name === 'style') {
attributes_1[name] = absoluteToStylesheet(value, location.href);
}
else {

@@ -333,2 +337,13 @@ attributes_1[name] = value;

}
var BLOCK_CLASS$1 = 'rr-block';
function isBlocked(node) {
if (!node) {
return false;
}
if (node.nodeType === node.ELEMENT_NODE) {
return (node.classList.contains(BLOCK_CLASS$1) ||
isBlocked(node.parentNode));
}
return isBlocked(node.parentNode);
}

@@ -375,2 +390,5 @@ var EventType;

var genAdds = function (n) {
if (isBlocked(n)) {
return;
}
addsSet.add(n);

@@ -384,3 +402,3 @@ n.childNodes.forEach(function (childN) { return genAdds(childN); });

var value = target.textContent;
if (value !== oldValue) {
if (!isBlocked(target) && value !== oldValue) {
texts.push({

@@ -395,3 +413,3 @@ value: value,

var value = target.getAttribute(attributeName);
if (value === oldValue) {
if (isBlocked(target) || value === oldValue) {
return;

@@ -408,2 +426,3 @@ }

item.attributes[attributeName] = value;
break;
}

@@ -413,2 +432,5 @@ case 'childList': {

removedNodes.forEach(function (n) {
if (isBlocked(n)) {
return;
}
if (addsSet.has(n)) {

@@ -478,3 +500,3 @@ addsSet["delete"](n);

});
cb({
var payload = {
texts: texts

@@ -494,3 +516,10 @@ .map(function (text) { return ({

adds: adds
});
};
if (!payload.texts.length &&
!payload.attributes.length &&
!payload.removes.length &&
!payload.adds.length) {
return;
}
cb(payload);
});

@@ -540,2 +569,5 @@ observer.observe(document, {

return function (event) {
if (isBlocked(event.target)) {
return;
}
var id = mirror.getId(event.target);

@@ -564,3 +596,3 @@ var clientX = event.clientX, clientY = event.clientY;

var updatePosition = throttle(function (evt) {
if (!evt.target) {
if (!evt.target || isBlocked(evt.target)) {
return;

@@ -612,3 +644,4 @@ }

!target.tagName ||
INPUT_TAGS.indexOf(target.tagName) < 0) {
INPUT_TAGS.indexOf(target.tagName) < 0 ||
isBlocked(target)) {
return;

@@ -615,0 +648,0 @@ }

{
"name": "rrweb",
"version": "0.7.2",
"version": "0.7.3",
"description": "record and replay the web",
"scripts": {
"test": "npm run bundle:browser && TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",
"repl": "npm run bundle:browser && TS_NODE_CACHE=false TS_NODE_FILES=true ts-node scripts/repl.ts",
"bundle:browser": "BROWSER_ONLY=true rollup --config",
"test": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true mocha -r ts-node/register test/**/*.test.ts",
"repl": "npm run bundle:browser && cross-env TS_NODE_CACHE=false TS_NODE_FILES=true ts-node scripts/repl.ts",
"bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",
"bundle": "rollup --config"

@@ -41,2 +41,3 @@ },

"chai": "^4.2.0",
"cross-env": "^5.2.0",
"jest-snapshot": "^23.6.0",

@@ -59,5 +60,5 @@ "mocha": "^5.2.0",

"mitt": "^1.1.3",
"rrweb-snapshot": "^0.7.0",
"rrweb-snapshot": "^0.7.2",
"smoothscroll-polyfill": "^0.4.3"
}
}

@@ -45,8 +45,10 @@ <p align="center">

<!-- ## Internal Design
## Internal Design
*Since the design docs were originally written in Chinese, we do not have the English version yet, but it would be available as soon as possible.*
- [serialization](./docs/serialization.md)
- [incremental snapshot](./docs/observer.md)
- [replay](./docs/replay.md)
- [sandbox](./docs/sandbox.md) -->
- [sandbox](./docs/sandbox.md)

@@ -53,0 +55,0 @@ ## Contribute Guide

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc