@highlight-run/rrweb 2.0.9 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/replay/rrweb-replay-unpack.js +1 -1
- package/dist/replay/rrweb-replay-unpack.min.js +1 -1
- package/dist/replay/rrweb-replay-unpack.min.js.map +1 -1
- package/dist/replay/rrweb-replay.js +1 -1
- package/dist/replay/rrweb-replay.min.js +1 -1
- package/dist/replay/rrweb-replay.min.js.map +1 -1
- package/dist/rrweb-all.js +1 -1
- package/dist/rrweb-all.min.js +1 -1
- package/dist/rrweb-all.min.js.map +1 -1
- package/dist/rrweb.js +1 -1
- package/dist/rrweb.min.js +1 -1
- package/dist/rrweb.min.js.map +1 -1
- package/es/rrweb/packages/rrdom/es/virtual-dom.js +10 -10
- package/lib/replay/rrweb-replay-unpack.js +10 -10
- package/lib/replay/rrweb-replay.js +10 -10
- package/lib/rrweb-all.js +10 -10
- package/lib/rrweb.js +10 -10
- package/package.json +2 -2
package/dist/rrweb.js
CHANGED
|
@@ -2,7 +2,7 @@ var rrweb=function(q){"use strict";var k;(function(e){e[e.Document=0]="Document"
|
|
|
2
2
|
`);r=I===-1?r+S.length:S.length-I}function i(){var S={line:n,column:r};return function(v){return v.position=new a(S),f(),v}}var a=function(){function S(v){this.start=v,this.end={line:n,column:r},this.source=t.source}return S}();a.prototype.content=e;var l=[];function c(S){var v=new Error(t.source+":"+n+":"+r+": "+S);if(v.reason=S,v.filename=t.source,v.line=n,v.column=r,v.source=e,t.silent)l.push(v);else throw v}function s(){var S=h();return{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:l}}}function u(){return m(/^{\s*/)}function d(){return m(/^}/)}function h(){var S,v=[];for(f(),g(v);e.length&&e.charAt(0)!=="}"&&(S=P()||B());)S!==!1&&(v.push(S),g(v));return v}function m(S){var v=S.exec(e);if(v){var I=v[0];return o(I),e=e.slice(I.length),v}}function f(){m(/^\s*/)}function g(S){S===void 0&&(S=[]);for(var v;v=N();)v!==!1&&S.push(v),v=N();return S}function N(){var S=i();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var v=2;e.charAt(v)!==""&&(e.charAt(v)!=="*"||e.charAt(v+1)!=="/");)++v;if(v+=2,e.charAt(v-1)==="")return c("End of comment missing");var I=e.slice(2,v-2);return r+=2,o(I),e=e.slice(v),r+=2,S({type:"comment",comment:I})}}function p(){var S=m(/^([^{]+)/);if(S)return ce(S[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(v){return v.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(v){return v.replace(/\u200C/g,",")})}function b(){var S=i(),v=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(v){var I=ce(v[0]);if(!m(/^:\s*/))return c("property missing ':'");var E=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),C=S({type:"declaration",property:I.replace(kt,""),value:E?ce(E[0]).replace(kt,""):""});return m(/^[;\s]*/),C}}function y(){var S=[];if(!u())return c("missing '{'");g(S);for(var v;v=b();)v!==!1&&(S.push(v),g(S)),v=b();return d()?S:c("missing '}'")}function T(){for(var S,v=[],I=i();S=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)v.push(S[1]),m(/^,\s*/);if(v.length)return I({type:"keyframe",values:v,declarations:y()})}function D(){var S=i(),v=m(/^@([-\w]+)?keyframes\s*/);if(v){var I=v[1];if(v=m(/^([-\w]+)\s*/),!v)return c("@keyframes missing name");var E=v[1];if(!u())return c("@keyframes missing '{'");for(var C,J=g();C=T();)J.push(C),J=J.concat(g());return d()?S({type:"keyframes",name:E,vendor:I,keyframes:J}):c("@keyframes missing '}'")}}function R(){var S=i(),v=m(/^@supports *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@supports missing '{'");var E=g().concat(h());return d()?S({type:"supports",supports:I,rules:E}):c("@supports missing '}'")}}function L(){var S=i(),v=m(/^@host\s*/);if(v){if(!u())return c("@host missing '{'");var I=g().concat(h());return d()?S({type:"host",rules:I}):c("@host missing '}'")}}function W(){var S=i(),v=m(/^@media *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@media missing '{'");var E=g().concat(h());return d()?S({type:"media",media:I,rules:E}):c("@media missing '}'")}}function A(){var S=i(),v=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(v)return S({type:"custom-media",name:ce(v[1]),media:ce(v[2])})}function z(){var S=i(),v=m(/^@page */);if(v){var I=p()||[];if(!u())return c("@page missing '{'");for(var E=g(),C;C=b();)E.push(C),E=E.concat(g());return d()?S({type:"page",selectors:I,declarations:E}):c("@page missing '}'")}}function $(){var S=i(),v=m(/^@([-\w]+)?document *([^{]+)/);if(v){var I=ce(v[1]),E=ce(v[2]);if(!u())return c("@document missing '{'");var C=g().concat(h());return d()?S({type:"document",document:E,vendor:I,rules:C}):c("@document missing '}'")}}function K(){var S=i(),v=m(/^@font-face\s*/);if(v){if(!u())return c("@font-face missing '{'");for(var I=g(),E;E=b();)I.push(E),I=I.concat(g());return d()?S({type:"font-face",declarations:I}):c("@font-face missing '}'")}}var Q=X("import"),j=X("charset"),Y=X("namespace");function X(S){var v=new RegExp("^@"+S+"\\s*([^;]+);");return function(){var I=i(),E=m(v);if(E){var C={type:S};return C[S]=E[1].trim(),I(C)}}}function P(){if(e[0]==="@")return D()||W()||A()||R()||Q()||j()||Y()||$()||z()||L()||K()}function B(){var S=i(),v=p();return v?(g(),S({type:"rule",selectors:v,declarations:y()})):c("selector missing")}return et(s())}function ce(e){return e?e.replace(/^\s+|\s+$/g,""):""}function et(e,t){for(var n=e&&typeof e.type=="string",r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],l=e[a];Array.isArray(l)?l.forEach(function(c){et(c,r)}):l&&typeof l=="object"&&et(l,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Dt={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 Nr(e){var t=Dt[e.tagName]?Dt[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Rt=/([^\\]):hover/,wr=new RegExp(Rt.source,"g");function Ot(e,t){var n;if(!(!((n=window?.HIG_CONFIGURATION)===null||n===void 0)&&n.enableOnHoverClass))return e;var r=t?.stylesWithHoverClass.get(e);if(r)return r;var o=Tr(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach(function(c){"selectors"in c&&(c.selectors||[]).forEach(function(s){Rt.test(s)&&i.push(s)})}),i.length===0)return e;var a=new RegExp(i.filter(function(c,s){return i.indexOf(c)===s}).sort(function(c,s){return s.length-c.length}).map(function(c){return Er(c)}).join("|"),"g"),l=e.replace(a,function(c){var s=c.replace(wr,"$1.\\:hover");return c+", "+s});return t?.stylesWithHoverClass.set(e,l),l}function At(){var e=new Map;return{stylesWithHoverClass:e}}function Cr(e,t){var n=t.doc,r=t.hackCss,o=t.cache;switch(e.type){case k.Document:return n.implementation.createDocument(null,"",null);case k.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case k.Element:var i=Nr(e),a;e.isSVG?a=n.createElementNS("http://www.w3.org/2000/svg",i):a=n.createElement(i);var l=function(d){if(!e.attributes.hasOwnProperty(d))return"continue";var h=e.attributes[d];if(i==="option"&&d==="selected"&&h===!1)return"continue";if(h=typeof h=="boolean"||typeof h=="number"?"":h,d.startsWith("rr_")){if(i==="canvas"&&d==="rr_dataURL"){var m=document.createElement("img");m.src=h,m.onload=function(){var A=a.getContext("2d");A&&A.drawImage(m,0,0,m.width,m.height)}}else if(i==="img"&&d==="rr_dataURL"){var f=a;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=h,f.setAttribute("rrweb-inline-src",h))}if(d==="rr_width")a.style.width=h;else if(d==="rr_height")a.style.height=h;else if(d==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(d==="rr_mediaState")switch(h){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var g=i==="textarea"&&d==="value",N=i==="style"&&d==="_cssText";if(N&&r&&(h=Ot(h,o),typeof h=="string")){for(var p=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,b=void 0,y=[],T="https://replay-cors-proxy.highlightrun.workers.dev";(b=p.exec(h))!==null;)b.index===p.lastIndex&&p.lastIndex++,b.forEach(function(A,z){if(z===0){var $=A.slice(5,A.length-2);y.push({originalUrl:$,proxyUrl:$.replace($,T+"?url="+$)})}});y.forEach(function(A){h=h.replace(A.originalUrl,A.proxyUrl)})}if(g||N){for(var D=n.createTextNode(h),R=0,L=Array.from(a.childNodes);R<L.length;R++){var W=L[R];W.nodeType===a.TEXT_NODE&&a.removeChild(W)}return a.appendChild(D),"continue"}try{if(e.isSVG&&d==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",d,h);else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")a.setAttribute("_"+d,h);else{if(i==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content")return a.setAttribute("csp-content",h),"continue";i==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||i==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(i==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(d,h))}}catch{}}};for(var c in e.attributes)l(c);if(i==="img"){var s=a;if(!s.currentSrc.startsWith("data:")){var u=s.getAttribute("rrweb-inline-src");u!=null&&u.startsWith("data:")&&(s.src=u)}}if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case k.Text:return n.createTextNode(e.isStyle&&r?Ot(e.textContent,o):e.textContent);case k.CDATA:return n.createCDATASection(e.textContent);case k.Comment:return n.createComment(e.textContent);default:return null}}function je(e,t){var n=t.doc,r=t.mirror,o=t.skipChild,i=o===void 0?!1:o,a=t.hackCss,l=a===void 0?!0:a,c=t.afterAppend,s=t.cache,u=Cr(e,{doc:n,hackCss:l,cache:s});if(!u)return null;if(e.rootId&&console.assert(r.getNode(e.rootId)===n,"Target document should have the same root id."),e.type===k.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==k.DocumentType&&(e.childNodes[0].type===k.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=n),r.add(u,e),(e.type===k.Document||e.type===k.Element)&&!i)for(var d=0,h=e.childNodes;d<h.length;d++){var m=h[d],f=je(m,{doc:n,mirror:r,skipChild:!1,hackCss:l,afterAppend:c,cache:s});if(!f){console.warn("Failed to rebuild",m);continue}m.isShadow&&Nt(u)&&u.shadowRoot?u.shadowRoot.appendChild(f):u.appendChild(f),c&&c(f)}return u}function Ir(e,t){function n(a){t(a)}for(var r=0,o=e.getIds();r<o.length;r++){var i=o[r];e.has(i)&&n(e.getNode(i))}}function Mr(e,t){var n=t.getMeta(e);if(n?.type===k.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];o==="rr_scrollLeft"&&(r.scrollLeft=i),o==="rr_scrollTop"&&(r.scrollTop=i)}}}function xr(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,i=o===void 0?!0:o,a=t.afterAppend,l=t.cache,c=t.mirror,s=c===void 0?new Ke:c,u=je(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:l});return Ir(s,function(d){r&&r(d),Mr(d,s)}),u}function te(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Se=`Please stop import mirror directly. Instead of that,\r
|
|
3
3
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
4
4
|
or you can use record.mirror to access the mirror instance during recording.`;q.mirror={map:{},getId(){return console.error(Se),-1},getNode(){return console.error(Se),null},removeNodeFromMap(){console.error(Se)},has(){return console.error(Se),!1},reset(){console.error(Se)}},typeof window<"u"&&window.Proxy&&window.Reflect&&(q.mirror=new Proxy(q.mirror,{get(e,t,n){return t==="map"&&console.error(Se),Reflect.get(e,t,n)}}));function Te(e,t,n={}){let r=null,o=0;return function(i){const a=Date.now();!o&&n.leading===!1&&(o=a);const l=t-(a-o),c=this,s=arguments;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},l))}}function Oe(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>Oe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function tt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Lt=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function ne(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Ue(r,t,n))return!0;return!1}function Pt(e,t){return t.getId(e)!==-1}function Be(e,t){return t.getId(e)===Re}function rt(e,t){if(De(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?rt(e.parentNode,t):!0:!0}function ot(e){return Boolean(e.changedTouches)}function it(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function _t(e){const t={},n=(o,i)=>{const a={value:o,parent:i,children:[]};return t[o.node.id]=a,a},r=[];for(const o of e){const{nextId:i,parentId:a}=o;if(i&&i in t){const l=t[i];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,n(o,l.parent))}else{const c=r.indexOf(l);r.splice(c,0,n(o,null))}continue}if(a in t){const l=t[a];l.children.push(n(o,l));continue}r.push(n(o,null))}return r}function st(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)st(e.children[n],t)}function Ne(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function at(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function lt(e,t){var n,r;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=lt(o,t),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}}function Ae(e){return Boolean(e?.shadowRoot)}function Ee(e,t){const n=e[t[0]];return t.length===1?n:Ee(n.cssRules[t[1]].cssRules,t.slice(2))}function ct(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Ft(e){const t=new Set,n=[];for(let r=e.length;r--;){const o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}var kr=Object.freeze({__proto__:null,on:te,get _mirror(){return q.mirror},throttle:Te,hookSetter:Oe,patch:he,getWindowHeight:tt,getWindowWidth:nt,isCanvasNode:Lt,isBlocked:ne,isSerialized:Pt,isIgnored:Be,isAncestorRemoved:rt,isTouchEvent:ot,polyfill:it,queueToResolveTrees:_t,iterateResolveTree:st,isSerializedIframe:Ne,isSerializedStylesheet:at,getBaseDimension:lt,hasShadowRoot:Ae,getNestedRule:Ee,getPositionsAndIndex:ct,uniqueTextMutations:Ft}),w=(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",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(w||{}),M=(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.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(M||{}),H=(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_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(H||{}),ue=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ue||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(me||{}),O=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(O||{});function Wt(e){return"__ln"in e}class Dr{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wt(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Wt(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const $t=(e,t)=>`${e}@${t}`;class Rr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Dr,r=l=>{let c=l,s=Re;for(;s===Re;)c=c&&c.nextSibling,s=c&&this.mirror.getId(c);return s},o=l=>{var c,s,u,d,h;const m=l.getRootNode?(c=l.getRootNode())==null?void 0:c.host:null;let f=m;for(;(u=(s=f?.getRootNode)==null?void 0:s.call(f))!=null&&u.host;)f=((h=(d=f?.getRootNode)==null?void 0:d.call(f))==null?void 0:h.host)||null;const g=!this.doc.contains(l)&&(!f||!this.doc.contains(f));if(!l.parentNode||g)return;const N=De(l.parentNode)?this.mirror.getId(m):this.mirror.getId(l.parentNode),p=r(l);if(N===-1||p===-1)return n.addNode(l);const b=be(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Ne(y,this.mirror)&&this.iframeManager.addIframe(y),at(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ae(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,document)},onIframeLoad:(y,T)=>{this.iframeManager.attachIframe(y,T,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,T)=>{this.stylesheetManager.attachStylesheet(y,T,this.mirror)},newlyAddedElement:!0});b&&t.push({parentId:N,nextId:p,node:b})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of Array.from(this.movedSet.values()))Vt(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of Array.from(this.addedSet.values()))!jt(this.droppedSet,l)&&!Vt(this.removes,l,this.mirror)||jt(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;n.length;){let l=null;if(i){const c=this.mirror.getId(i.value.parentNode),s=r(i.value);c!==-1&&s!==-1&&(l=i)}if(!l)for(let c=n.length-1;c>=0;c--){const s=n.get(c);if(s){const u=this.mirror.getId(s.value.parentNode),d=r(s.value);if(u!==-1&&d!==-1){l=s;break}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}i=l.previous,n.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{let c=l.value;return this.enableStrictPrivacy&&c&&(c=Ct(c)),{id:this.mirror.getId(l.node),value:c}}).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>({id:this.mirror.getId(l.node),attributes:l.attributes})).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Be(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ne(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:xt(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Qe({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ne(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const a=o.attributes.style;for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),s=n.style.getPropertyPriority(l);(c!==i.style.getPropertyValue(l)||s!==i.style.getPropertyPriority(l))&&(s===""?a[l]=c:a[l]=[c,s])}for(const l of Array.from(i.style))n.style.getPropertyValue(l)===""&&(a[l]=!1)}else{if(t.target.tagName==="INPUT"){const i=t.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[t.attributeName]=Mt(this.doc,t.target.tagName,t.attributeName,r)}break}case"childList":{if(ne(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=De(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ne(t.target,this.blockClass,!1)||Be(n,this.mirror)||!Pt(n,this.mirror)||(this.addedSet.has(n)?(ut(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||rt(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[$t(r,o)]?ut(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:De(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Be(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[$t(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ne(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ut(e,t){e.delete(t),t.childNodes.forEach(n=>ut(e,n))}function Vt(e,t,n){return e.length===0?!1:Ut(e,t,n)}function Ut(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(i=>i.id===o)?!0:Ut(e,r,n)}function jt(e,t){return e.size===0?!1:Bt(e,t)}function Bt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Bt(e,n):!1}var Or=Object.defineProperty,Ar=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,zt=(e,t,n)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t)=>{for(var n in t||(t={}))Pr.call(t,n)&&zt(e,n,t[n]);if(Gt)for(var n of Gt(t))_r.call(t,n)&&zt(e,n,t[n]);return e},Fr=(e,t)=>Ar(e,Lr(t));const pe=[],Yt=typeof CSSGroupingRule<"u",Xt=typeof CSSMediaRule<"u",Zt=typeof CSSSupportsRule<"u",Kt=typeof CSSConditionRule<"u";function Le(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Qt(e,t){var n,r;const o=new Rr;pe.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const a=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);const l=new i(o.processMutations.bind(o));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Wr({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const c=Te(d=>{const h=Date.now()-l;e(a.map(m=>(m.timeOffset-=h,m)),d),a=[],l=null},i),s=Te(d=>{const h=Le(d),{clientX:m,clientY:f}=ot(d)?d.changedTouches[0]:d;l||(l=Date.now()),a.push({x:m,y:f,id:r.getId(h),timeOffset:Date.now()-l}),c(typeof DragEvent<"u"&&d instanceof DragEvent?M.Drag:d instanceof MouseEvent?M.MouseMove:M.TouchMove)},o,{trailing:!1}),u=[te("mousemove",s,n),te("touchmove",s,n),te("drag",s,n)];return()=>{u.forEach(d=>d())}}function $r({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>s=>{const u=Le(s);if(ne(u,r,!0)||Lt(u))return;const d=ot(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(u),{clientX:m,clientY:f}=d;e({type:H[c],id:h,x:m,y:f})};return Object.keys(H).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&i[c]!==!1).forEach(c=>{const s=c.toLowerCase(),u=l(c);a.push(te(s,u,t))}),()=>{a.forEach(c=>c())}}function Jt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const i=Te(a=>{const l=Le(a);if(!l||ne(l,r,!0))return;const c=n.getId(l);if(l===t){const s=t.scrollingElement||t.documentElement;e({id:c,x:s.scrollLeft,y:s.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return te("scroll",i,t)}function Vr({viewportResizeCb:e}){let t=-1,n=-1;const r=Te(()=>{const o=tt(),i=nt();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return te("resize",r,window)}function qt(e,t){const n=Ht({},e);return t||delete n.userTriggered,n}const Ur=["INPUT","TEXTAREA","SELECT"],en=new WeakMap;function jr({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function s(f){let g=Le(f);const N=f.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Ur.indexOf(g.tagName)<0||ne(g,r,!0))return;const p=g.type;if(g.classList.contains(o))return;let b=g.value,y=!1;p==="radio"||p==="checkbox"?y=g.checked:(i[g.tagName.toLowerCase()]||i[p])&&(b=Qe({maskInputOptions:i,tagName:g.tagName,type:p,value:b,maskInputFn:a})),u(g,qt({text:b,isChecked:y,userTriggered:N},c));const T=g.name;p==="radio"&&T&&y&&t.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(D=>{D!==g&&u(D,qt({text:D.value,isChecked:!y,userTriggered:!1},c))})}function u(f,g){const N=en.get(f);if(!N||N.text!==g.text||N.isChecked!==g.isChecked){en.set(f,g);const p=n.getId(f);e(Fr(Ht({},g),{id:p}))}}const d=(l.input==="last"?["change"]:["input","change"]).map(f=>te(f,s,t)),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),m=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&d.push(...m.map(f=>Oe(f[0],f[1],{set(){s({target:this})}}))),()=>{d.forEach(f=>f())}}function Ge(e){const t=[];function n(r,o){if(Yt&&r.parentRule instanceof CSSGroupingRule||Xt&&r.parentRule instanceof CSSMediaRule||Zt&&r.parentRule instanceof CSSSupportsRule||Kt&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Br({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(l,c){const s=t.getId(this.ownerNode);return s!==-1&&e({id:s,adds:[{rule:l,index:c}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(l){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,removes:[{index:l}]}),o.apply(this,arguments)};const i={};Yt?i.CSSGroupingRule=n.CSSGroupingRule:(Xt&&(i.CSSMediaRule=n.CSSMediaRule),Kt&&(i.CSSConditionRule=n.CSSConditionRule),Zt&&(i.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(i).forEach(([l,c])=>{a[l]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=function(s,u){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:s,index:[...Ge(this),u||0]}]}),a[l].insertRule.apply(this,arguments)},c.prototype.deleteRule=function(s){const u=t.getId(this.parentStyleSheet.ownerNode);return u!==-1&&e({id:u,removes:[{index:[...Ge(this),s]}]}),a[l].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([l,c])=>{c.prototype.insertRule=a[l].insertRule,c.prototype.deleteRule=a[l].deleteRule})}}function Gr({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,a,l){var c,s;const u=t.getId((s=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:s.ownerNode);return u!==-1&&e({id:u,set:{property:i,value:a,priority:l},index:Ge(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var a,l;const c=t.getId((l=(a=this.parentRule)==null?void 0:a.parentStyleSheet)==null?void 0:l.ownerNode);return c!==-1&&e({id:c,remove:{property:i},index:Ge(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function zr({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=a=>Te(l=>{const c=Le(l);if(!c||ne(c,t,!0))return;const{currentTime:s,volume:u,muted:d}=c;e({type:a,id:n.getId(c),currentTime:s,volume:u,muted:d})},r.media||500),i=[te("play",o(me.Play)),te("pause",o(me.Pause)),te("seeked",o(me.Seeked)),te("volumechange",o(me.VolumeChange))];return()=>{i.forEach(a=>a())}}function Hr({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,s){const u=new i(l,c,s);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:s,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};const a=he(t.fonts,"add",function(l){return function(c){return setTimeout(()=>{const s=o.get(c);s&&(e(s),o.delete(c))},0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(l=>l())}}function Yr(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:s,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),n(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),r(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),o(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),i(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),s(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),u(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),d(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),h(...m)}}function Xr(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Yr(e,t);const r=Qt(e,e.doc),o=Wr(e),i=$r(e),a=Jt(e),l=Vr(e),c=jr(e),s=zr(e),u=Br(e,{win:n}),d=Gr(e,{win:n}),h=e.collectFonts?Hr(e):()=>{},m=[];for(const f of e.plugins)m.push(f.observer(f.callback,n,f.options));return()=>{pe.forEach(f=>f.reset()),r.disconnect(),o(),i(),a(),l(),c(),s(),u(),d(),h(),m.forEach(f=>f())}}class Zr{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Kr=Object.defineProperty,Qr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,nn=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))qr.call(t,n)&&nn(e,n,t[n]);if(tn)for(var n of tn(t))eo.call(t,n)&&nn(e,n,t[n]);return e},on=(e,t)=>Qr(e,Jr(t));class to{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(he(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,n){Qt(on(rn({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Jt(on(rn({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(he(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe=typeof Uint8Array>"u"?[]:new Uint8Array(256),ze=0;ze<we.length;ze++)Pe[we.charCodeAt(ze)]=ze;var no=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=we[t[n]>>2],o+=we[(t[n]&3)<<4|t[n+1]>>4],o+=we[(t[n+1]&15)<<2|t[n+2]>>6],o+=we[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},ro=function(e){var t=e.length*.75,n=e.length,r,o=0,i,a,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var s=new ArrayBuffer(t),u=new Uint8Array(s);for(r=0;r<n;r+=4)i=Pe[e.charCodeAt(r)],a=Pe[e.charCodeAt(r+1)],l=Pe[e.charCodeAt(r+2)],c=Pe[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|l>>2,u[o++]=(l&3)<<6|c&63;return s};const sn=new Map;function oo(e,t){let n=sn.get(e);return n||(n=new Map,sn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const an=(e,t,n)=>{if(!e||!(cn(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=oo(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function He(e,t,n){if(e instanceof Array)return e.map(r=>He(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=no(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[He(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[He(e.data,t,n),e.width,e.height]};if(cn(e,t)||typeof e=="object"){const r=e.constructor.name,o=an(e,t,n);return{rr_type:r,index:o}}}}return e}const ln=(e,t,n)=>[...e].map(r=>He(r,t,n)),cn=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function io(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=he(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...s){return ne(this.canvas,n,!0)||setTimeout(()=>{const u=ln([...s],t,this);e(this.canvas,{type:ue["2D"],property:a,args:u})},0),c.apply(this,s)}});o.push(l)}catch{const c=Oe(t.CanvasRenderingContext2D.prototype,a,{set(s){e(this.canvas,{type:ue["2D"],property:a,args:[s],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function un(e,t){const n=[];try{const r=he(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...a){return ne(this,t,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...a])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function dn(e,t,n,r,o,i){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)try{if(typeof e[c]!="function")continue;const s=he(e,c,function(u){return function(...d){const h=u.apply(this,d);if(an(h,i,e),!ne(this.canvas,r,!0)){const m=ln([...d],i,e),f={type:t,property:c,args:m};n(this.canvas,f)}return h}});a.push(s)}catch{const u=Oe(e,c,{set(d){n(this.canvas,{type:t,property:c,args:[d],setter:!0})}});a.push(u)}return a}function so(e,t,n,r){const o=[];return o.push(...dn(t.WebGLRenderingContext.prototype,ue.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...dn(t.WebGL2RenderingContext.prototype,ue.WebGL2,e,n,r,t)),()=>{o.forEach(i=>i())}}function ao(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function lo(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=ao(e,o),a=i.indexOf(`
|
|
5
|
-
`,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:f,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:f}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const f=this.mirror.getId(h);if(i.get(f))return;if(i.set(f,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}const g=yield createImageBitmap(h);a.postMessage({id:f,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=Et();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:g,packFn:N,sampling:p={},mousemoveWait:b,recordCanvas:y=!1,userTriggeredOnInput:T=!1,collectFonts:D=!1,inlineImages:R=!1,plugins:L,keepIframeSrcFn:W=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&p.mousemove===void 0&&(p.mousemove=b),se.reset();const z=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};it();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===M.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===M.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:M.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Scroll},E)})),P=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),S=new vo({mutationCb:Y}),v=new go({recordCanvas:y,mutationCb:P,win:window,blockClass:o,mirror:se,sampling:p.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:f,maskInputFn:m,recordCanvas:y,inlineImages:R,sampling:p,slimDOMOptions:$,iframeManager:B,stylesheetManager:S,canvasManager:v,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:nt(),height:tt()}}),E),pe.forEach(U=>U.lock());const _=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:f,slimDOM:$,recordCanvas:y,inlineImages:R,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),at(U,se)&&S.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{S.attachStylesheet(U,ve,se)},keepIframeSrcFn:W});if(!_)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:_,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(_,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:_}})),mouseInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MouseInteraction},_)})),scrollCb:X,viewportResizeCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.ViewportResize},_)})),inputCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Input},_)})),mediaInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MediaInteraction},_)})),styleSheetRuleCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleSheetRule},_)})),styleDeclarationCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleDeclaration},_)})),canvasMutationCb:P,fontCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Font},_)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:p,recordCanvas:y,inlineImages:R,userTriggeredOnInput:T,collectFonts:D,doc:ee,maskInputFn:m,maskTextFn:f,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:S,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(_=>_.observer))==null?void 0:le.map(_=>({observer:_.observer,options:_.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:_.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var x;(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"})(x||(x={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[dt(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Do(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,dt=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Do=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Ro(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=x.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===x.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===x.Element||r===x.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===x.Element||o===x.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=x.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=x.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=dt(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=dt(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=x.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=x.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=x.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case x.Document:{l=t.scrollData;break}case x.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case x.Text:case x.Comment:case x.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&ht[i])e.setAttributeNS(ht[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i,a;let l=0,c=e.length-1,s=0,u=t.length-1,d=e[l],h=e[c],m=t[s],f=t[u],g,N;for(;l<=c&&s<=u;)if(d===void 0)d=e[++l];else if(h===void 0)h=e[--c];else if(r.mirror.getId(d)===o.getId(m))ae(d,m,r,o),d=e[++l],m=t[++s];else if(r.mirror.getId(h)===o.getId(f))ae(h,f,r,o),h=e[--c],f=t[--u];else if(r.mirror.getId(d)===o.getId(f))try{n.insertBefore(d,h.nextSibling),ae(d,f,r,o),d=e[++l],f=t[--u]}catch(p){console.error(p,n,d,h)}else if(r.mirror.getId(h)===o.getId(m))try{n.insertBefore(h,d),ae(h,m,r,o),h=e[--c],m=t[++s]}catch(p){console.error(p,n,h,d)}else{if(!g){g={};for(let p=l;p<=c;p++){const b=e[p];b&&r.mirror.hasNode(b)&&(g[r.mirror.getId(b)]=p)}}if(N=g[o.getId(m)],N){const p=e[N];try{n.insertBefore(p,d),ae(p,m,r,o),e[N]=void 0}catch(b){console.error(b,n,p,d)}}else{const p=mt(m,r.mirror,o);((i=r.mirror.getMeta(n))===null||i===void 0?void 0:i.type)===x.Document&&((a=r.mirror.getMeta(p))===null||a===void 0?void 0:a.type)===x.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[l]=void 0,d=void 0);try{n.insertBefore(p,d||null),ae(p,m,r,o)}catch(b){console.error(b,n,p,d||null)}}m=t[++s]}if(l>c){const p=t[u+1];let b=null;for(p&&n.childNodes.forEach(y=>{r.mirror.getId(y)===o.getId(p)&&(b=y)});s<=u;++s){const y=mt(t[s],r.mirror,o);try{n.insertBefore(y,b),ae(y,t[s],r,o)}catch(T){console.error(T,n,y,b)}}}else if(s>u)for(;l<=c;l++){const p=e[l];p&&(n.removeChild(p),r.mirror.removeNodeFromMap(p))}}function mt(e,t,n){let r=t.getNode(n.getId(e));const o=n.getMeta(e);if(r!==null)return r;switch(e.RRNodeType){case x.Document:r=new Document;break;case x.DocumentType:r=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case x.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?r=document.createElementNS(ht.svg,e.tagName.toLowerCase()):r=document.createElement(e.tagName);break}case x.Text:r=document.createTextNode(e.data);break;case x.Comment:r=document.createComment(e.data);break;case x.CDATA:r=document.createCDATASection(e.data);break}return o&&t.add(r,Object.assign({},o)),r}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Ro(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case x.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case x.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case x.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case x.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(p){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(p)}const l=a(e.navigator.userAgent)?1:0;function c(p,b){this.scrollLeft=p,this.scrollTop=b}function s(p){return .5*(1-Math.cos(Math.PI*p))}function u(p){if(p===null||typeof p!="object"||p.behavior===void 0||p.behavior==="auto"||p.behavior==="instant")return!0;if(typeof p=="object"&&p.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+p.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(p,b){if(b==="Y")return p.clientHeight+l<p.scrollHeight;if(b==="X")return p.clientWidth+l<p.scrollWidth}function h(p,b){const y=e.getComputedStyle(p,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(p){const b=d(p,"Y")&&h(p,"Y"),y=d(p,"X")&&h(p,"X");return b||y}function f(p){for(;p!==t.body&&m(p)===!1;)p=p.parentNode||p.host;return p}function g(p){const b=i();let y,T,D,R=(b-p.startTime)/r;R=R>1?1:R,y=s(R),T=p.startX+(p.x-p.startX)*y,D=p.startY+(p.y-p.startY)*y,p.method.call(p.scrollable,T,D),(T!==p.x||D!==p.y)&&e.requestAnimationFrame(g.bind(e,p))}function N(p,b,y){let T,D,R,L;const W=i();p===t.body?(T=e,D=e.scrollX||e.pageXOffset,R=e.scrollY||e.pageYOffset,L=o.scroll):(T=p,D=p.scrollLeft,R=p.scrollTop,L=c),g({scrollable:T,method:L,startTime:W,startX:D,startY:R,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const p=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof p>"u"?this.scrollLeft:~~p,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const p=f(this),b=p.getBoundingClientRect(),y=this.getBoundingClientRect();p!==t.body?(N.call(this,p,p.scrollLeft+y.left-b.left,p.scrollTop+y.top-b.top),e.getComputedStyle(p).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function pt(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===M.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
5
|
+
`,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:f,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:f}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const f=this.mirror.getId(h);if(i.get(f))return;if(i.set(f,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}const g=yield createImageBitmap(h);a.postMessage({id:f,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=Et();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:g,packFn:N,sampling:p={},mousemoveWait:b,recordCanvas:y=!1,userTriggeredOnInput:T=!1,collectFonts:D=!1,inlineImages:R=!1,plugins:L,keepIframeSrcFn:W=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&p.mousemove===void 0&&(p.mousemove=b),se.reset();const z=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};it();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===M.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===M.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:M.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Scroll},E)})),P=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),S=new vo({mutationCb:Y}),v=new go({recordCanvas:y,mutationCb:P,win:window,blockClass:o,mirror:se,sampling:p.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:f,maskInputFn:m,recordCanvas:y,inlineImages:R,sampling:p,slimDOMOptions:$,iframeManager:B,stylesheetManager:S,canvasManager:v,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:nt(),height:tt()}}),E),pe.forEach(U=>U.lock());const _=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:f,slimDOM:$,recordCanvas:y,inlineImages:R,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),at(U,se)&&S.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{S.attachStylesheet(U,ve,se)},keepIframeSrcFn:W});if(!_)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:_,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(_,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:_}})),mouseInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MouseInteraction},_)})),scrollCb:X,viewportResizeCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.ViewportResize},_)})),inputCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Input},_)})),mediaInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MediaInteraction},_)})),styleSheetRuleCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleSheetRule},_)})),styleDeclarationCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleDeclaration},_)})),canvasMutationCb:P,fontCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Font},_)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:p,recordCanvas:y,inlineImages:R,userTriggeredOnInput:T,collectFonts:D,doc:ee,maskInputFn:m,maskTextFn:f,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:S,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(_=>_.observer))==null?void 0:le.map(_=>({observer:_.observer,options:_.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:_.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var x;(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"})(x||(x={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[dt(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Do(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,dt=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Do=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Ro(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=x.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===x.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===x.Element||r===x.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===x.Element||o===x.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=x.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=x.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=dt(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=dt(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=x.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=x.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=x.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case x.Document:{l=t.scrollData;break}case x.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case x.Text:case x.Comment:case x.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&ht[i])e.setAttributeNS(ht[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i,a;let l=0,c=e.length-1,s=0,u=t.length-1,d=e[l],h=e[c],m=t[s],f=t[u],g,N;for(;l<=c&&s<=u;)if(d===void 0)d=e[++l];else if(h===void 0)h=e[--c];else if(r.mirror.getId(d)===o.getId(m))ae(d,m,r,o),d=e[++l],m=t[++s];else if(r.mirror.getId(h)===o.getId(f))ae(h,f,r,o),h=e[--c],f=t[--u];else if(r.mirror.getId(d)===o.getId(f))try{n.insertBefore(d,h.nextSibling)}catch(p){console.error(p,n,d,h),ae(d,f,r,o),d=e[++l],f=t[--u]}else if(r.mirror.getId(h)===o.getId(m))try{n.insertBefore(h,d)}catch(p){console.error(p,n,h,d),ae(h,m,r,o),h=e[--c],m=t[++s]}else{if(!g){g={};for(let p=l;p<=c;p++){const b=e[p];b&&r.mirror.hasNode(b)&&(g[r.mirror.getId(b)]=p)}}if(N=g[o.getId(m)],N){const p=e[N];try{n.insertBefore(p,d)}catch(b){console.error(b,n,p,d),ae(p,m,r,o),e[N]=void 0}}else{const p=mt(m,r.mirror,o);((i=r.mirror.getMeta(n))===null||i===void 0?void 0:i.type)===x.Document&&((a=r.mirror.getMeta(p))===null||a===void 0?void 0:a.type)===x.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[l]=void 0,d=void 0);try{n.insertBefore(p,d||null)}catch(b){console.error(b,n,p,d||null),ae(p,m,r,o)}}m=t[++s]}if(l>c){const p=t[u+1];let b=null;for(p&&n.childNodes.forEach(y=>{r.mirror.getId(y)===o.getId(p)&&(b=y)});s<=u;++s){const y=mt(t[s],r.mirror,o);try{n.insertBefore(y,b)}catch(T){console.error(T,n,y,b),ae(y,t[s],r,o)}}}else if(s>u)for(;l<=c;l++){const p=e[l];p&&(n.removeChild(p),r.mirror.removeNodeFromMap(p))}}function mt(e,t,n){let r=t.getNode(n.getId(e));const o=n.getMeta(e);if(r!==null)return r;switch(e.RRNodeType){case x.Document:r=new Document;break;case x.DocumentType:r=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case x.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?r=document.createElementNS(ht.svg,e.tagName.toLowerCase()):r=document.createElement(e.tagName);break}case x.Text:r=document.createTextNode(e.data);break;case x.Comment:r=document.createComment(e.data);break;case x.CDATA:r=document.createCDATASection(e.data);break}return o&&t.add(r,Object.assign({},o)),r}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Ro(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case x.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case x.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case x.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case x.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(p){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(p)}const l=a(e.navigator.userAgent)?1:0;function c(p,b){this.scrollLeft=p,this.scrollTop=b}function s(p){return .5*(1-Math.cos(Math.PI*p))}function u(p){if(p===null||typeof p!="object"||p.behavior===void 0||p.behavior==="auto"||p.behavior==="instant")return!0;if(typeof p=="object"&&p.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+p.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(p,b){if(b==="Y")return p.clientHeight+l<p.scrollHeight;if(b==="X")return p.clientWidth+l<p.scrollWidth}function h(p,b){const y=e.getComputedStyle(p,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(p){const b=d(p,"Y")&&h(p,"Y"),y=d(p,"X")&&h(p,"X");return b||y}function f(p){for(;p!==t.body&&m(p)===!1;)p=p.parentNode||p.host;return p}function g(p){const b=i();let y,T,D,R=(b-p.startTime)/r;R=R>1?1:R,y=s(R),T=p.startX+(p.x-p.startX)*y,D=p.startY+(p.y-p.startY)*y,p.method.call(p.scrollable,T,D),(T!==p.x||D!==p.y)&&e.requestAnimationFrame(g.bind(e,p))}function N(p,b,y){let T,D,R,L;const W=i();p===t.body?(T=e,D=e.scrollX||e.pageXOffset,R=e.scrollY||e.pageYOffset,L=o.scroll):(T=p,D=p.scrollLeft,R=p.scrollTop,L=c),g({scrollable:T,method:L,startTime:W,startX:D,startY:R,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const p=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof p>"u"?this.scrollLeft:~~p,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const p=f(this),b=p.getBoundingClientRect(),y=this.getBoundingClientRect();p!==t.body?(N.call(this,p,p.scrollLeft+y.left-b.left,p.scrollTop+y.top-b.top),e.getComputedStyle(p).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function pt(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===M.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
7
7
|
|
|
8
8
|
Permission to use, copy, modify, and/or distribute this software for any
|
package/dist/rrweb.min.js
CHANGED
|
@@ -2,7 +2,7 @@ var rrweb=function(q){"use strict";var k;(function(e){e[e.Document=0]="Document"
|
|
|
2
2
|
`);r=I===-1?r+S.length:S.length-I}function i(){var S={line:n,column:r};return function(v){return v.position=new a(S),f(),v}}var a=function(){function S(v){this.start=v,this.end={line:n,column:r},this.source=t.source}return S}();a.prototype.content=e;var l=[];function c(S){var v=new Error(t.source+":"+n+":"+r+": "+S);if(v.reason=S,v.filename=t.source,v.line=n,v.column=r,v.source=e,t.silent)l.push(v);else throw v}function s(){var S=h();return{type:"stylesheet",stylesheet:{source:t.source,rules:S,parsingErrors:l}}}function u(){return m(/^{\s*/)}function d(){return m(/^}/)}function h(){var S,v=[];for(f(),g(v);e.length&&e.charAt(0)!=="}"&&(S=P()||B());)S!==!1&&(v.push(S),g(v));return v}function m(S){var v=S.exec(e);if(v){var I=v[0];return o(I),e=e.slice(I.length),v}}function f(){m(/^\s*/)}function g(S){S===void 0&&(S=[]);for(var v;v=N();)v!==!1&&S.push(v),v=N();return S}function N(){var S=i();if(!(e.charAt(0)!=="/"||e.charAt(1)!=="*")){for(var v=2;e.charAt(v)!==""&&(e.charAt(v)!=="*"||e.charAt(v+1)!=="/");)++v;if(v+=2,e.charAt(v-1)==="")return c("End of comment missing");var I=e.slice(2,v-2);return r+=2,o(I),e=e.slice(v),r+=2,S({type:"comment",comment:I})}}function p(){var S=m(/^([^{]+)/);if(S)return ce(S[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(v){return v.replace(/,/g,"\u200C")}).split(/\s*(?![^(]*\)),\s*/).map(function(v){return v.replace(/\u200C/g,",")})}function b(){var S=i(),v=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(v){var I=ce(v[0]);if(!m(/^:\s*/))return c("property missing ':'");var E=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),C=S({type:"declaration",property:I.replace(kt,""),value:E?ce(E[0]).replace(kt,""):""});return m(/^[;\s]*/),C}}function y(){var S=[];if(!u())return c("missing '{'");g(S);for(var v;v=b();)v!==!1&&(S.push(v),g(S)),v=b();return d()?S:c("missing '}'")}function T(){for(var S,v=[],I=i();S=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)v.push(S[1]),m(/^,\s*/);if(v.length)return I({type:"keyframe",values:v,declarations:y()})}function D(){var S=i(),v=m(/^@([-\w]+)?keyframes\s*/);if(v){var I=v[1];if(v=m(/^([-\w]+)\s*/),!v)return c("@keyframes missing name");var E=v[1];if(!u())return c("@keyframes missing '{'");for(var C,J=g();C=T();)J.push(C),J=J.concat(g());return d()?S({type:"keyframes",name:E,vendor:I,keyframes:J}):c("@keyframes missing '}'")}}function R(){var S=i(),v=m(/^@supports *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@supports missing '{'");var E=g().concat(h());return d()?S({type:"supports",supports:I,rules:E}):c("@supports missing '}'")}}function L(){var S=i(),v=m(/^@host\s*/);if(v){if(!u())return c("@host missing '{'");var I=g().concat(h());return d()?S({type:"host",rules:I}):c("@host missing '}'")}}function W(){var S=i(),v=m(/^@media *([^{]+)/);if(v){var I=ce(v[1]);if(!u())return c("@media missing '{'");var E=g().concat(h());return d()?S({type:"media",media:I,rules:E}):c("@media missing '}'")}}function A(){var S=i(),v=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(v)return S({type:"custom-media",name:ce(v[1]),media:ce(v[2])})}function z(){var S=i(),v=m(/^@page */);if(v){var I=p()||[];if(!u())return c("@page missing '{'");for(var E=g(),C;C=b();)E.push(C),E=E.concat(g());return d()?S({type:"page",selectors:I,declarations:E}):c("@page missing '}'")}}function $(){var S=i(),v=m(/^@([-\w]+)?document *([^{]+)/);if(v){var I=ce(v[1]),E=ce(v[2]);if(!u())return c("@document missing '{'");var C=g().concat(h());return d()?S({type:"document",document:E,vendor:I,rules:C}):c("@document missing '}'")}}function K(){var S=i(),v=m(/^@font-face\s*/);if(v){if(!u())return c("@font-face missing '{'");for(var I=g(),E;E=b();)I.push(E),I=I.concat(g());return d()?S({type:"font-face",declarations:I}):c("@font-face missing '}'")}}var Q=X("import"),j=X("charset"),Y=X("namespace");function X(S){var v=new RegExp("^@"+S+"\\s*([^;]+);");return function(){var I=i(),E=m(v);if(E){var C={type:S};return C[S]=E[1].trim(),I(C)}}}function P(){if(e[0]==="@")return D()||W()||A()||R()||Q()||j()||Y()||$()||z()||L()||K()}function B(){var S=i(),v=p();return v?(g(),S({type:"rule",selectors:v,declarations:y()})):c("selector missing")}return et(s())}function ce(e){return e?e.replace(/^\s+|\s+$/g,""):""}function et(e,t){for(var n=e&&typeof e.type=="string",r=n?e:t,o=0,i=Object.keys(e);o<i.length;o++){var a=i[o],l=e[a];Array.isArray(l)?l.forEach(function(c){et(c,r)}):l&&typeof l=="object"&&et(l,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Dt={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 Nr(e){var t=Dt[e.tagName]?Dt[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Er(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Rt=/([^\\]):hover/,wr=new RegExp(Rt.source,"g");function Ot(e,t){var n;if(!(!((n=window?.HIG_CONFIGURATION)===null||n===void 0)&&n.enableOnHoverClass))return e;var r=t?.stylesWithHoverClass.get(e);if(r)return r;var o=Tr(e,{silent:!0});if(!o.stylesheet)return e;var i=[];if(o.stylesheet.rules.forEach(function(c){"selectors"in c&&(c.selectors||[]).forEach(function(s){Rt.test(s)&&i.push(s)})}),i.length===0)return e;var a=new RegExp(i.filter(function(c,s){return i.indexOf(c)===s}).sort(function(c,s){return s.length-c.length}).map(function(c){return Er(c)}).join("|"),"g"),l=e.replace(a,function(c){var s=c.replace(wr,"$1.\\:hover");return c+", "+s});return t?.stylesWithHoverClass.set(e,l),l}function At(){var e=new Map;return{stylesWithHoverClass:e}}function Cr(e,t){var n=t.doc,r=t.hackCss,o=t.cache;switch(e.type){case k.Document:return n.implementation.createDocument(null,"",null);case k.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case k.Element:var i=Nr(e),a;e.isSVG?a=n.createElementNS("http://www.w3.org/2000/svg",i):a=n.createElement(i);var l=function(d){if(!e.attributes.hasOwnProperty(d))return"continue";var h=e.attributes[d];if(i==="option"&&d==="selected"&&h===!1)return"continue";if(h=typeof h=="boolean"||typeof h=="number"?"":h,d.startsWith("rr_")){if(i==="canvas"&&d==="rr_dataURL"){var m=document.createElement("img");m.src=h,m.onload=function(){var A=a.getContext("2d");A&&A.drawImage(m,0,0,m.width,m.height)}}else if(i==="img"&&d==="rr_dataURL"){var f=a;f.currentSrc.startsWith("data:")||(f.setAttribute("rrweb-original-src",e.attributes.src),f.src=h,f.setAttribute("rrweb-inline-src",h))}if(d==="rr_width")a.style.width=h;else if(d==="rr_height")a.style.height=h;else if(d==="rr_mediaCurrentTime")a.currentTime=e.attributes.rr_mediaCurrentTime;else if(d==="rr_mediaState")switch(h){case"played":a.play().catch(function(A){return console.warn("media playback error",A)});break;case"paused":a.pause();break}}else{var g=i==="textarea"&&d==="value",N=i==="style"&&d==="_cssText";if(N&&r&&(h=Ot(h,o),typeof h=="string")){for(var p=/url\(\"https:\/\/\S*(.eot|.woff2|.ttf|.woff)\S*\"\)/gm,b=void 0,y=[],T="https://replay-cors-proxy.highlightrun.workers.dev";(b=p.exec(h))!==null;)b.index===p.lastIndex&&p.lastIndex++,b.forEach(function(A,z){if(z===0){var $=A.slice(5,A.length-2);y.push({originalUrl:$,proxyUrl:$.replace($,T+"?url="+$)})}});y.forEach(function(A){h=h.replace(A.originalUrl,A.proxyUrl)})}if(g||N){for(var D=n.createTextNode(h),R=0,L=Array.from(a.childNodes);R<L.length;R++){var W=L[R];W.nodeType===a.TEXT_NODE&&a.removeChild(W)}return a.appendChild(D),"continue"}try{if(e.isSVG&&d==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",d,h);else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")a.setAttribute("_"+d,h);else{if(i==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content")return a.setAttribute("csp-content",h),"continue";i==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||i==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(i==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(d,h))}}catch{}}};for(var c in e.attributes)l(c);if(i==="img"){var s=a;if(!s.currentSrc.startsWith("data:")){var u=s.getAttribute("rrweb-inline-src");u!=null&&u.startsWith("data:")&&(s.src=u)}}if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return a;case k.Text:return n.createTextNode(e.isStyle&&r?Ot(e.textContent,o):e.textContent);case k.CDATA:return n.createCDATASection(e.textContent);case k.Comment:return n.createComment(e.textContent);default:return null}}function je(e,t){var n=t.doc,r=t.mirror,o=t.skipChild,i=o===void 0?!1:o,a=t.hackCss,l=a===void 0?!0:a,c=t.afterAppend,s=t.cache,u=Cr(e,{doc:n,hackCss:l,cache:s});if(!u)return null;if(e.rootId&&console.assert(r.getNode(e.rootId)===n,"Target document should have the same root id."),e.type===k.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==k.DocumentType&&(e.childNodes[0].type===k.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),u=n),r.add(u,e),(e.type===k.Document||e.type===k.Element)&&!i)for(var d=0,h=e.childNodes;d<h.length;d++){var m=h[d],f=je(m,{doc:n,mirror:r,skipChild:!1,hackCss:l,afterAppend:c,cache:s});if(!f){console.warn("Failed to rebuild",m);continue}m.isShadow&&Nt(u)&&u.shadowRoot?u.shadowRoot.appendChild(f):u.appendChild(f),c&&c(f)}return u}function Ir(e,t){function n(a){t(a)}for(var r=0,o=e.getIds();r<o.length;r++){var i=o[r];e.has(i)&&n(e.getNode(i))}}function Mr(e,t){var n=t.getMeta(e);if(n?.type===k.Element){var r=e;for(var o in n.attributes)if(n.attributes.hasOwnProperty(o)&&o.startsWith("rr_")){var i=n.attributes[o];o==="rr_scrollLeft"&&(r.scrollLeft=i),o==="rr_scrollTop"&&(r.scrollTop=i)}}}function xr(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,i=o===void 0?!0:o,a=t.afterAppend,l=t.cache,c=t.mirror,s=c===void 0?new Ke:c,u=je(e,{doc:n,mirror:s,skipChild:!1,hackCss:i,afterAppend:a,cache:l});return Ir(s,function(d){r&&r(d),Mr(d,s)}),u}function te(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Se=`Please stop import mirror directly. Instead of that,\r
|
|
3
3
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
4
4
|
or you can use record.mirror to access the mirror instance during recording.`;q.mirror={map:{},getId(){return console.error(Se),-1},getNode(){return console.error(Se),null},removeNodeFromMap(){console.error(Se)},has(){return console.error(Se),!1},reset(){console.error(Se)}},typeof window<"u"&&window.Proxy&&window.Reflect&&(q.mirror=new Proxy(q.mirror,{get(e,t,n){return t==="map"&&console.error(Se),Reflect.get(e,t,n)}}));function Te(e,t,n={}){let r=null,o=0;return function(i){const a=Date.now();!o&&n.leading===!1&&(o=a);const l=t-(a-o),c=this,s=arguments;l<=0||l>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,s)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},l))}}function Oe(e,t,n,r,o=window){const i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>Oe(e,t,i||{},!0)}function he(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function tt(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nt(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}const Lt=e=>{try{if(e instanceof HTMLElement)return e.tagName==="CANVAS"}catch{return!1}return!1};function ne(e,t,n){if(!e)return!1;const r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!r)return!1;if(typeof t=="string"){if(r.classList.contains(t)||n&&r.closest("."+t)!==null)return!0}else if(Ue(r,t,n))return!0;return!1}function Pt(e,t){return t.getId(e)!==-1}function Be(e,t){return t.getId(e)===Re}function rt(e,t){if(De(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?rt(e.parentNode,t):!0:!0}function ot(e){return Boolean(e.changedTouches)}function it(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}function _t(e){const t={},n=(o,i)=>{const a={value:o,parent:i,children:[]};return t[o.node.id]=a,a},r=[];for(const o of e){const{nextId:i,parentId:a}=o;if(i&&i in t){const l=t[i];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,n(o,l.parent))}else{const c=r.indexOf(l);r.splice(c,0,n(o,null))}continue}if(a in t){const l=t[a];l.children.push(n(o,l));continue}r.push(n(o,null))}return r}function st(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)st(e.children[n],t)}function Ne(e,t){return Boolean(e.nodeName==="IFRAME"&&t.getMeta(e))}function at(e,t){return Boolean(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function lt(e,t){var n,r;const o=(r=(n=e.ownerDocument)==null?void 0:n.defaultView)==null?void 0:r.frameElement;if(!o||o===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=lt(o,t),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}}function Ae(e){return Boolean(e?.shadowRoot)}function Ee(e,t){const n=e[t[0]];return t.length===1?n:Ee(n.cssRules[t[1]].cssRules,t.slice(2))}function ct(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Ft(e){const t=new Set,n=[];for(let r=e.length;r--;){const o=e[r];t.has(o.id)||(n.push(o),t.add(o.id))}return n}var kr=Object.freeze({__proto__:null,on:te,get _mirror(){return q.mirror},throttle:Te,hookSetter:Oe,patch:he,getWindowHeight:tt,getWindowWidth:nt,isCanvasNode:Lt,isBlocked:ne,isSerialized:Pt,isIgnored:Be,isAncestorRemoved:rt,isTouchEvent:ot,polyfill:it,queueToResolveTrees:_t,iterateResolveTree:st,isSerializedIframe:Ne,isSerializedStylesheet:at,getBaseDimension:lt,hasShadowRoot:Ae,getNestedRule:Ee,getPositionsAndIndex:ct,uniqueTextMutations:Ft}),w=(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",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(w||{}),M=(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.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e))(M||{}),H=(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_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(H||{}),ue=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ue||{}),me=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e))(me||{}),O=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e))(O||{});function Wt(e){return"__ln"in e}class Dr{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Wt(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Wt(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){const n=t.__ln;!this.head||(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const $t=(e,t)=>`${e}@${t}`;class Rr{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Dr,r=l=>{let c=l,s=Re;for(;s===Re;)c=c&&c.nextSibling,s=c&&this.mirror.getId(c);return s},o=l=>{var c,s,u,d,h;const m=l.getRootNode?(c=l.getRootNode())==null?void 0:c.host:null;let f=m;for(;(u=(s=f?.getRootNode)==null?void 0:s.call(f))!=null&&u.host;)f=((h=(d=f?.getRootNode)==null?void 0:d.call(f))==null?void 0:h.host)||null;const g=!this.doc.contains(l)&&(!f||!this.doc.contains(f));if(!l.parentNode||g)return;const N=De(l.parentNode)?this.mirror.getId(m):this.mirror.getId(l.parentNode),p=r(l);if(N===-1||p===-1)return n.addNode(l);const b=be(l,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,enableStrictPrivacy:this.enableStrictPrivacy,onSerialize:y=>{Ne(y,this.mirror)&&this.iframeManager.addIframe(y),at(y,this.mirror)&&this.stylesheetManager.addStylesheet(y),Ae(l)&&this.shadowDomManager.addShadowRoot(l.shadowRoot,document)},onIframeLoad:(y,T)=>{this.iframeManager.attachIframe(y,T,this.mirror),this.shadowDomManager.observeAttachShadow(y)},onStylesheetLoad:(y,T)=>{this.stylesheetManager.attachStylesheet(y,T,this.mirror)},newlyAddedElement:!0});b&&t.push({parentId:N,nextId:p,node:b})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const l of Array.from(this.movedSet.values()))Vt(this.removes,l,this.mirror)&&!this.movedSet.has(l.parentNode)||o(l);for(const l of Array.from(this.addedSet.values()))!jt(this.droppedSet,l)&&!Vt(this.removes,l,this.mirror)||jt(this.movedSet,l)?o(l):this.droppedSet.add(l);let i=null;for(;n.length;){let l=null;if(i){const c=this.mirror.getId(i.value.parentNode),s=r(i.value);c!==-1&&s!==-1&&(l=i)}if(!l)for(let c=n.length-1;c>=0;c--){const s=n.get(c);if(s){const u=this.mirror.getId(s.value.parentNode),d=r(s.value);if(u!==-1&&d!==-1){l=s;break}}}if(!l){for(;n.head;)n.removeNode(n.head.value);break}i=l.previous,n.removeNode(l.value),o(l.value)}const a={texts:this.texts.map(l=>{let c=l.value;return this.enableStrictPrivacy&&c&&(c=Ct(c)),{id:this.mirror.getId(l.node),value:c}}).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>({id:this.mirror.getId(l.node),attributes:l.attributes})).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!Be(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!ne(t.target,this.blockClass,!1)&&n!==t.oldValue&&this.texts.push({value:xt(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=Qe({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ne(t.target,this.blockClass,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){const i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});const a=o.attributes.style;for(const l of Array.from(n.style)){const c=n.style.getPropertyValue(l),s=n.style.getPropertyPriority(l);(c!==i.style.getPropertyValue(l)||s!==i.style.getPropertyPriority(l))&&(s===""?a[l]=c:a[l]=[c,s])}for(const l of Array.from(i.style))n.style.getPropertyValue(l)===""&&(a[l]=!1)}else{if(t.target.tagName==="INPUT"){const i=t.target;if(i.type==="password"){o.attributes.value="*".repeat(i.value.length);break}}o.attributes[t.attributeName]=Mt(this.doc,t.target.tagName,t.attributeName,r)}break}case"childList":{if(ne(t.target,this.blockClass,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=De(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ne(t.target,this.blockClass,!1)||Be(n,this.mirror)||!Pt(n,this.mirror)||(this.addedSet.has(n)?(ut(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||rt(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[$t(r,o)]?ut(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:De(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(Be(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[$t(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ne(t,this.blockClass,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","enableStrictPrivacy"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ut(e,t){e.delete(t),t.childNodes.forEach(n=>ut(e,n))}function Vt(e,t,n){return e.length===0?!1:Ut(e,t,n)}function Ut(e,t,n){const{parentNode:r}=t;if(!r)return!1;const o=n.getId(r);return e.some(i=>i.id===o)?!0:Ut(e,r,n)}function jt(e,t){return e.size===0?!1:Bt(e,t)}function Bt(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Bt(e,n):!1}var Or=Object.defineProperty,Ar=Object.defineProperties,Lr=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Pr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable,zt=(e,t,n)=>t in e?Or(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ht=(e,t)=>{for(var n in t||(t={}))Pr.call(t,n)&&zt(e,n,t[n]);if(Gt)for(var n of Gt(t))_r.call(t,n)&&zt(e,n,t[n]);return e},Fr=(e,t)=>Ar(e,Lr(t));const pe=[],Yt=typeof CSSGroupingRule<"u",Xt=typeof CSSMediaRule<"u",Zt=typeof CSSSupportsRule<"u",Kt=typeof CSSConditionRule<"u";function Le(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Qt(e,t){var n,r;const o=new Rr;pe.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver;const a=(r=(n=window?.Zone)==null?void 0:n.__symbol__)==null?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);const l=new i(o.processMutations.bind(o));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Wr({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const c=Te(d=>{const h=Date.now()-l;e(a.map(m=>(m.timeOffset-=h,m)),d),a=[],l=null},i),s=Te(d=>{const h=Le(d),{clientX:m,clientY:f}=ot(d)?d.changedTouches[0]:d;l||(l=Date.now()),a.push({x:m,y:f,id:r.getId(h),timeOffset:Date.now()-l}),c(typeof DragEvent<"u"&&d instanceof DragEvent?M.Drag:d instanceof MouseEvent?M.MouseMove:M.TouchMove)},o,{trailing:!1}),u=[te("mousemove",s,n),te("touchmove",s,n),te("drag",s,n)];return()=>{u.forEach(d=>d())}}function $r({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const i=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,a=[],l=c=>s=>{const u=Le(s);if(ne(u,r,!0)||Lt(u))return;const d=ot(s)?s.changedTouches[0]:s;if(!d)return;const h=n.getId(u),{clientX:m,clientY:f}=d;e({type:H[c],id:h,x:m,y:f})};return Object.keys(H).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&i[c]!==!1).forEach(c=>{const s=c.toLowerCase(),u=l(c);a.push(te(s,u,t))}),()=>{a.forEach(c=>c())}}function Jt({scrollCb:e,doc:t,mirror:n,blockClass:r,sampling:o}){const i=Te(a=>{const l=Le(a);if(!l||ne(l,r,!0))return;const c=n.getId(l);if(l===t){const s=t.scrollingElement||t.documentElement;e({id:c,x:s.scrollLeft,y:s.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},o.scroll||100);return te("scroll",i,t)}function Vr({viewportResizeCb:e}){let t=-1,n=-1;const r=Te(()=>{const o=tt(),i=nt();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return te("resize",r,window)}function qt(e,t){const n=Ht({},e);return t||delete n.userTriggered,n}const Ur=["INPUT","TEXTAREA","SELECT"],en=new WeakMap;function jr({inputCb:e,doc:t,mirror:n,blockClass:r,ignoreClass:o,maskInputOptions:i,maskInputFn:a,sampling:l,userTriggeredOnInput:c}){function s(f){let g=Le(f);const N=f.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Ur.indexOf(g.tagName)<0||ne(g,r,!0))return;const p=g.type;if(g.classList.contains(o))return;let b=g.value,y=!1;p==="radio"||p==="checkbox"?y=g.checked:(i[g.tagName.toLowerCase()]||i[p])&&(b=Qe({maskInputOptions:i,tagName:g.tagName,type:p,value:b,maskInputFn:a})),u(g,qt({text:b,isChecked:y,userTriggered:N},c));const T=g.name;p==="radio"&&T&&y&&t.querySelectorAll(`input[type="radio"][name="${T}"]`).forEach(D=>{D!==g&&u(D,qt({text:D.value,isChecked:!y,userTriggered:!1},c))})}function u(f,g){const N=en.get(f);if(!N||N.text!==g.text||N.isChecked!==g.isChecked){en.set(f,g);const p=n.getId(f);e(Fr(Ht({},g),{id:p}))}}const d=(l.input==="last"?["change"]:["input","change"]).map(f=>te(f,s,t)),h=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),m=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return h&&h.set&&d.push(...m.map(f=>Oe(f[0],f[1],{set(){s({target:this})}}))),()=>{d.forEach(f=>f())}}function Ge(e){const t=[];function n(r,o){if(Yt&&r.parentRule instanceof CSSGroupingRule||Xt&&r.parentRule instanceof CSSMediaRule||Zt&&r.parentRule instanceof CSSSupportsRule||Kt&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else{const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function Br({styleSheetRuleCb:e,mirror:t},{win:n}){const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(l,c){const s=t.getId(this.ownerNode);return s!==-1&&e({id:s,adds:[{rule:l,index:c}]}),r.apply(this,arguments)};const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(l){const c=t.getId(this.ownerNode);return c!==-1&&e({id:c,removes:[{index:l}]}),o.apply(this,arguments)};const i={};Yt?i.CSSGroupingRule=n.CSSGroupingRule:(Xt&&(i.CSSMediaRule=n.CSSMediaRule),Kt&&(i.CSSConditionRule=n.CSSConditionRule),Zt&&(i.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(i).forEach(([l,c])=>{a[l]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=function(s,u){const d=t.getId(this.parentStyleSheet.ownerNode);return d!==-1&&e({id:d,adds:[{rule:s,index:[...Ge(this),u||0]}]}),a[l].insertRule.apply(this,arguments)},c.prototype.deleteRule=function(s){const u=t.getId(this.parentStyleSheet.ownerNode);return u!==-1&&e({id:u,removes:[{index:[...Ge(this),s]}]}),a[l].deleteRule.apply(this,arguments)}}),()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=o,Object.entries(i).forEach(([l,c])=>{c.prototype.insertRule=a[l].insertRule,c.prototype.deleteRule=a[l].deleteRule})}}function Gr({styleDeclarationCb:e,mirror:t},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=function(i,a,l){var c,s;const u=t.getId((s=(c=this.parentRule)==null?void 0:c.parentStyleSheet)==null?void 0:s.ownerNode);return u!==-1&&e({id:u,set:{property:i,value:a,priority:l},index:Ge(this.parentRule)}),r.apply(this,arguments)};const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=function(i){var a,l;const c=t.getId((l=(a=this.parentRule)==null?void 0:a.parentStyleSheet)==null?void 0:l.ownerNode);return c!==-1&&e({id:c,remove:{property:i},index:Ge(this.parentRule)}),o.apply(this,arguments)},()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=o}}function zr({mediaInteractionCb:e,blockClass:t,mirror:n,sampling:r}){const o=a=>Te(l=>{const c=Le(l);if(!c||ne(c,t,!0))return;const{currentTime:s,volume:u,muted:d}=c;e({type:a,id:n.getId(c),currentTime:s,volume:u,muted:d})},r.media||500),i=[te("play",o(me.Play)),te("pause",o(me.Pause)),te("seeked",o(me.Seeked)),te("volumechange",o(me.VolumeChange))];return()=>{i.forEach(a=>a())}}function Hr({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,s){const u=new i(l,c,s);return o.set(u,{family:l,buffer:typeof c!="string",descriptors:s,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),u};const a=he(t.fonts,"add",function(l){return function(c){return setTimeout(()=>{const s=o.get(c);s&&(e(s),o.delete(c))},0),l.apply(this,[c])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(l=>l())}}function Yr(e,t){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:s,styleDeclarationCb:u,canvasMutationCb:d,fontCb:h}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),n(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),r(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),o(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),i(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),s(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),u(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),d(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),h(...m)}}function Xr(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};Yr(e,t);const r=Qt(e,e.doc),o=Wr(e),i=$r(e),a=Jt(e),l=Vr(e),c=jr(e),s=zr(e),u=Br(e,{win:n}),d=Gr(e,{win:n}),h=e.collectFonts?Hr(e):()=>{},m=[];for(const f of e.plugins)m.push(f.observer(f.callback,n,f.options));return()=>{pe.forEach(f=>f.reset()),r.disconnect(),o(),i(),a(),l(),c(),s(),u(),d(),h(),m.forEach(f=>f())}}class Zr{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,n,r){var o;this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(o=this.loadListener)==null||o.call(this,t)}}var Kr=Object.defineProperty,Qr=Object.defineProperties,Jr=Object.getOwnPropertyDescriptors,tn=Object.getOwnPropertySymbols,qr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,nn=(e,t,n)=>t in e?Kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rn=(e,t)=>{for(var n in t||(t={}))qr.call(t,n)&&nn(e,n,t[n]);if(tn)for(var n of tn(t))eo.call(t,n)&&nn(e,n,t[n]);return e},on=(e,t)=>Qr(e,Jr(t));class to{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const n=this;this.restorePatches.push(he(HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),o}}))}addShadowRoot(t,n){Qt(on(rn({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Jt(on(rn({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const n=this;this.restorePatches.push(he(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(){const o=r.apply(this,arguments);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),o}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pe=typeof Uint8Array>"u"?[]:new Uint8Array(256),ze=0;ze<we.length;ze++)Pe[we.charCodeAt(ze)]=ze;var no=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=we[t[n]>>2],o+=we[(t[n]&3)<<4|t[n+1]>>4],o+=we[(t[n+1]&15)<<2|t[n+2]>>6],o+=we[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o},ro=function(e){var t=e.length*.75,n=e.length,r,o=0,i,a,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var s=new ArrayBuffer(t),u=new Uint8Array(s);for(r=0;r<n;r+=4)i=Pe[e.charCodeAt(r)],a=Pe[e.charCodeAt(r+1)],l=Pe[e.charCodeAt(r+2)],c=Pe[e.charCodeAt(r+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|l>>2,u[o++]=(l&3)<<6|c&63;return s};const sn=new Map;function oo(e,t){let n=sn.get(e);return n||(n=new Map,sn.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const an=(e,t,n)=>{if(!e||!(cn(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=oo(n,r);let i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function He(e,t,n){if(e instanceof Array)return e.map(r=>He(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const r=e.constructor.name,o=no(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[He(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[He(e.data,t,n),e.width,e.height]};if(cn(e,t)||typeof e=="object"){const r=e.constructor.name,o=an(e,t,n);return{rr_type:r,index:o}}}}return e}const ln=(e,t,n)=>[...e].map(r=>He(r,t,n)),cn=(e,t)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function");return Boolean(n.find(r=>e instanceof t[r]))};function io(e,t,n,r){const o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=he(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...s){return ne(this.canvas,n,!0)||setTimeout(()=>{const u=ln([...s],t,this);e(this.canvas,{type:ue["2D"],property:a,args:u})},0),c.apply(this,s)}});o.push(l)}catch{const c=Oe(t.CanvasRenderingContext2D.prototype,a,{set(s){e(this.canvas,{type:ue["2D"],property:a,args:[s],setter:!0})}});o.push(c)}return()=>{o.forEach(a=>a())}}function un(e,t){const n=[];try{const r=he(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(i,...a){return ne(this,t,!0)||"__context"in this||(this.__context=i),o.apply(this,[i,...a])}});n.push(r)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(r=>r())}}function dn(e,t,n,r,o,i){const a=[],l=Object.getOwnPropertyNames(e);for(const c of l)try{if(typeof e[c]!="function")continue;const s=he(e,c,function(u){return function(...d){const h=u.apply(this,d);if(an(h,i,e),!ne(this.canvas,r,!0)){const m=ln([...d],i,e),f={type:t,property:c,args:m};n(this.canvas,f)}return h}});a.push(s)}catch{const u=Oe(e,c,{set(d){n(this.canvas,{type:t,property:c,args:[d],setter:!0})}});a.push(u)}return a}function so(e,t,n,r){const o=[];return o.push(...dn(t.WebGLRenderingContext.prototype,ue.WebGL,e,n,r,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...dn(t.WebGL2RenderingContext.prototype,ue.WebGL2,e,n,r,t)),()=>{o.forEach(i=>i())}}function ao(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function lo(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=ao(e,o),a=i.indexOf(`
|
|
5
|
-
`,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:f,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:f}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const f=this.mirror.getId(h);if(i.get(f))return;if(i.set(f,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}const g=yield createImageBitmap(h);a.postMessage({id:f,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=Et();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:g,packFn:N,sampling:p={},mousemoveWait:b,recordCanvas:y=!1,userTriggeredOnInput:T=!1,collectFonts:D=!1,inlineImages:R=!1,plugins:L,keepIframeSrcFn:W=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&p.mousemove===void 0&&(p.mousemove=b),se.reset();const z=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};it();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===M.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===M.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:M.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Scroll},E)})),P=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),S=new vo({mutationCb:Y}),v=new go({recordCanvas:y,mutationCb:P,win:window,blockClass:o,mirror:se,sampling:p.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:f,maskInputFn:m,recordCanvas:y,inlineImages:R,sampling:p,slimDOMOptions:$,iframeManager:B,stylesheetManager:S,canvasManager:v,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:nt(),height:tt()}}),E),pe.forEach(U=>U.lock());const _=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:f,slimDOM:$,recordCanvas:y,inlineImages:R,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),at(U,se)&&S.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{S.attachStylesheet(U,ve,se)},keepIframeSrcFn:W});if(!_)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:_,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(_,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:_}})),mouseInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MouseInteraction},_)})),scrollCb:X,viewportResizeCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.ViewportResize},_)})),inputCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Input},_)})),mediaInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MediaInteraction},_)})),styleSheetRuleCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleSheetRule},_)})),styleDeclarationCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleDeclaration},_)})),canvasMutationCb:P,fontCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Font},_)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:p,recordCanvas:y,inlineImages:R,userTriggeredOnInput:T,collectFonts:D,doc:ee,maskInputFn:m,maskTextFn:f,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:S,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(_=>_.observer))==null?void 0:le.map(_=>({observer:_.observer,options:_.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:_.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var x;(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"})(x||(x={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[dt(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Do(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,dt=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Do=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Ro(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=x.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===x.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===x.Element||r===x.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===x.Element||o===x.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=x.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=x.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=dt(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=dt(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=x.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=x.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=x.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case x.Document:{l=t.scrollData;break}case x.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case x.Text:case x.Comment:case x.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&ht[i])e.setAttributeNS(ht[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i,a;let l=0,c=e.length-1,s=0,u=t.length-1,d=e[l],h=e[c],m=t[s],f=t[u],g,N;for(;l<=c&&s<=u;)if(d===void 0)d=e[++l];else if(h===void 0)h=e[--c];else if(r.mirror.getId(d)===o.getId(m))ae(d,m,r,o),d=e[++l],m=t[++s];else if(r.mirror.getId(h)===o.getId(f))ae(h,f,r,o),h=e[--c],f=t[--u];else if(r.mirror.getId(d)===o.getId(f))try{n.insertBefore(d,h.nextSibling),ae(d,f,r,o),d=e[++l],f=t[--u]}catch(p){console.error(p,n,d,h)}else if(r.mirror.getId(h)===o.getId(m))try{n.insertBefore(h,d),ae(h,m,r,o),h=e[--c],m=t[++s]}catch(p){console.error(p,n,h,d)}else{if(!g){g={};for(let p=l;p<=c;p++){const b=e[p];b&&r.mirror.hasNode(b)&&(g[r.mirror.getId(b)]=p)}}if(N=g[o.getId(m)],N){const p=e[N];try{n.insertBefore(p,d),ae(p,m,r,o),e[N]=void 0}catch(b){console.error(b,n,p,d)}}else{const p=mt(m,r.mirror,o);((i=r.mirror.getMeta(n))===null||i===void 0?void 0:i.type)===x.Document&&((a=r.mirror.getMeta(p))===null||a===void 0?void 0:a.type)===x.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[l]=void 0,d=void 0);try{n.insertBefore(p,d||null),ae(p,m,r,o)}catch(b){console.error(b,n,p,d||null)}}m=t[++s]}if(l>c){const p=t[u+1];let b=null;for(p&&n.childNodes.forEach(y=>{r.mirror.getId(y)===o.getId(p)&&(b=y)});s<=u;++s){const y=mt(t[s],r.mirror,o);try{n.insertBefore(y,b),ae(y,t[s],r,o)}catch(T){console.error(T,n,y,b)}}}else if(s>u)for(;l<=c;l++){const p=e[l];p&&(n.removeChild(p),r.mirror.removeNodeFromMap(p))}}function mt(e,t,n){let r=t.getNode(n.getId(e));const o=n.getMeta(e);if(r!==null)return r;switch(e.RRNodeType){case x.Document:r=new Document;break;case x.DocumentType:r=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case x.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?r=document.createElementNS(ht.svg,e.tagName.toLowerCase()):r=document.createElement(e.tagName);break}case x.Text:r=document.createTextNode(e.data);break;case x.Comment:r=document.createComment(e.data);break;case x.CDATA:r=document.createCDATASection(e.data);break}return o&&t.add(r,Object.assign({},o)),r}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Ro(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case x.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case x.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case x.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case x.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(p){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(p)}const l=a(e.navigator.userAgent)?1:0;function c(p,b){this.scrollLeft=p,this.scrollTop=b}function s(p){return .5*(1-Math.cos(Math.PI*p))}function u(p){if(p===null||typeof p!="object"||p.behavior===void 0||p.behavior==="auto"||p.behavior==="instant")return!0;if(typeof p=="object"&&p.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+p.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(p,b){if(b==="Y")return p.clientHeight+l<p.scrollHeight;if(b==="X")return p.clientWidth+l<p.scrollWidth}function h(p,b){const y=e.getComputedStyle(p,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(p){const b=d(p,"Y")&&h(p,"Y"),y=d(p,"X")&&h(p,"X");return b||y}function f(p){for(;p!==t.body&&m(p)===!1;)p=p.parentNode||p.host;return p}function g(p){const b=i();let y,T,D,R=(b-p.startTime)/r;R=R>1?1:R,y=s(R),T=p.startX+(p.x-p.startX)*y,D=p.startY+(p.y-p.startY)*y,p.method.call(p.scrollable,T,D),(T!==p.x||D!==p.y)&&e.requestAnimationFrame(g.bind(e,p))}function N(p,b,y){let T,D,R,L;const W=i();p===t.body?(T=e,D=e.scrollX||e.pageXOffset,R=e.scrollY||e.pageYOffset,L=o.scroll):(T=p,D=p.scrollLeft,R=p.scrollTop,L=c),g({scrollable:T,method:L,startTime:W,startX:D,startY:R,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const p=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof p>"u"?this.scrollLeft:~~p,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const p=f(this),b=p.getBoundingClientRect(),y=this.getBoundingClientRect();p!==t.body?(N.call(this,p,p.scrollLeft+y.left-b.left,p.scrollTop+y.top-b.top),e.getComputedStyle(p).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function pt(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===M.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
5
|
+
`,10)+1,l=i.substring(a)+(r?"//# sourceMappingURL="+r:""),c=new Blob([l],{type:"application/javascript"});return URL.createObjectURL(c)}function co(e,t,n){var r;return function(i){return r=r||lo(e,t,n),new Worker(r,i)}}var uo=co("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Zm9yKHZhciByPSJBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6MDEyMzQ1Njc4OSsvIixsPXR5cGVvZiBVaW50OEFycmF5PiJ1Ij9bXTpuZXcgVWludDhBcnJheSgyNTYpLGY9MDtmPHIubGVuZ3RoO2YrKylsW3IuY2hhckNvZGVBdChmKV09Zjt2YXIgZD1mdW5jdGlvbihzKXt2YXIgZT1uZXcgVWludDhBcnJheShzKSxuLGE9ZS5sZW5ndGgsdD0iIjtmb3Iobj0wO248YTtuKz0zKXQrPXJbZVtuXT4+Ml0sdCs9clsoZVtuXSYzKTw8NHxlW24rMV0+PjRdLHQrPXJbKGVbbisxXSYxNSk8PDJ8ZVtuKzJdPj42XSx0Kz1yW2VbbisyXSY2M107cmV0dXJuIGElMz09PTI/dD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTEpKyI9IjphJTM9PT0xJiYodD10LnN1YnN0cmluZygwLHQubGVuZ3RoLTIpKyI9PSIpLHR9O2NvbnN0IGM9bmV3IE1hcCx1PW5ldyBNYXA7YXN5bmMgZnVuY3Rpb24gcChzLGUpe2NvbnN0IG49YCR7c30tJHtlfWA7aWYodS5oYXMobikpcmV0dXJuIHUuZ2V0KG4pO2NvbnN0IGE9bmV3IE9mZnNjcmVlbkNhbnZhcyhzLGUpO2EuZ2V0Q29udGV4dCgiMmQiKTtjb25zdCB0PWF3YWl0KGF3YWl0IGEuY29udmVydFRvQmxvYigpKS5hcnJheUJ1ZmZlcigpLGc9ZCh0KTtyZXR1cm4gdS5zZXQobixnKSxnfWNvbnN0IGk9c2VsZjtpLm9ubWVzc2FnZT1hc3luYyBmdW5jdGlvbihzKXtpZighKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcykpcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOnMuZGF0YS5pZH0pO2NvbnN0e2lkOmUsYml0bWFwOm4sd2lkdGg6YSxoZWlnaHQ6dH09cy5kYXRhLGc9cChhLHQpLGg9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2guZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCB3PWF3YWl0IGguY29udmVydFRvQmxvYigpLHk9dy50eXBlLGI9YXdhaXQgdy5hcnJheUJ1ZmZlcigpLG89ZChiKTtpZighYy5oYXMoZSkmJmF3YWl0IGc9PT1vKXJldHVybiBjLnNldChlLG8pLGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpZihjLmdldChlKT09PW8pcmV0dXJuIGkucG9zdE1lc3NhZ2Uoe2lkOmV9KTtpLnBvc3RNZXNzYWdlKHtpZDplLHR5cGU6eSxiYXNlNjQ6byx3aWR0aDphLGhlaWdodDp0fSksYy5zZXQoZSxvKX19KSgpOwoK",null,!1),hn=Object.getOwnPropertySymbols,ho=Object.prototype.hasOwnProperty,mo=Object.prototype.propertyIsEnumerable,po=(e,t)=>{var n={};for(var r in e)ho.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&hn)for(var r of hn(e))t.indexOf(r)<0&&mo.call(e,r)&&(n[r]=e[r]);return n},fo=(e,t,n)=>new Promise((r,o)=>{var i=c=>{try{l(n.next(c))}catch(s){o(s)}},a=c=>{try{l(n.throw(c))}catch(s){o(s)}},l=c=>c.done?r(c.value):Promise.resolve(c.value).then(i,a);l((n=n.apply(e,t)).next())});class go{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(a,l){(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(l)};const{sampling:n="all",win:r,blockClass:o,recordCanvas:i}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,i&&n==="all"&&this.initCanvasMutationObserver(r,o),i&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o)}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r){const o=un(n,r),i=new Map,a=new uo;a.onmessage=d=>{const{id:h}=d.data;if(i.set(h,!1),!("base64"in d.data))return;const{base64:m,type:f,width:g,height:N}=d.data;this.mutationCb({id:h,type:ue["2D"],commands:[{property:"clearRect",args:[0,0,g,N]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:m}],type:f}]},0,0]}]})};const l=1e3/t;let c=0,s;const u=d=>{if(c&&d-c<l){s=requestAnimationFrame(u);return}c=d,n.document.querySelectorAll(`canvas:not(.${r} *)`).forEach(h=>fo(this,null,function*(){var m;const f=this.mirror.getId(h);if(i.get(f))return;if(i.set(f,!0),["webgl","webgl2"].includes(h.__context)){const N=h.getContext(h.__context);((m=N?.getContextAttributes())==null?void 0:m.preserveDrawingBuffer)===!1&&N?.clear(N.COLOR_BUFFER_BIT)}const g=yield createImageBitmap(h);a.postMessage({id:f,bitmap:g,width:h.width,height:h.height},[g])})),s=requestAnimationFrame(u)};s=requestAnimationFrame(u),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=un(t,n),o=io(this.processMutation.bind(this),t,n,this.mirror),i=so(this.processMutation.bind(this),t,n,this.mirror);this.resetObservers=()=>{r(),o(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(a=>po(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}}class vo{constructor(t){this.trackedStylesheets=new WeakSet,this.mutationCb=t.mutationCb}addStylesheet(t){this.trackedStylesheets.has(t)||(this.trackedStylesheets.add(t),this.trackStylesheet(t))}trackStylesheet(t){}attachStylesheet(t,n,r){this.mutationCb({adds:[{parentId:r.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[]}),this.addStylesheet(t)}}var yo=Object.defineProperty,bo=Object.defineProperties,So=Object.getOwnPropertyDescriptors,mn=Object.getOwnPropertySymbols,To=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable,pn=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,re=(e,t)=>{for(var n in t||(t={}))To.call(t,n)&&pn(e,n,t[n]);if(mn)for(var n of mn(t))No.call(t,n)&&pn(e,n,t[n]);return e},Eo=(e,t)=>bo(e,So(t));function Z(e){return Eo(re({},e),{timestamp:Date.now()})}let G,_e;const se=Et();function fe(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="highlight-block",blockSelector:i=null,ignoreClass:a="highlight-ignore",maskTextClass:l="highlight-mask",maskTextSelector:c=null,inlineStylesheet:s=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:h,maskInputFn:m,maskTextFn:f,hooks:g,packFn:N,sampling:p={},mousemoveWait:b,recordCanvas:y=!1,userTriggeredOnInput:T=!1,collectFonts:D=!1,inlineImages:R=!1,plugins:L,keepIframeSrcFn:W=()=>!1,enableStrictPrivacy:A=!1}=e;if(!t)throw new Error("emit function is required");b!==void 0&&p.mousemove===void 0&&(p.mousemove=b),se.reset();const z=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:d!==void 0?d:{password:!0},$=h===!0||h==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};it();let K,Q=0;const j=E=>{for(const C of L||[])C.eventProcessor&&(E=C.eventProcessor(E));return N&&(E=N(E)),E};G=(E,C)=>{var J;if(((J=pe[0])==null?void 0:J.isFrozen())&&E.type!==w.FullSnapshot&&!(E.type===w.IncrementalSnapshot&&E.data.source===M.Mutation)&&pe.forEach(ee=>ee.unfreeze()),t(j(E),C),E.type===w.FullSnapshot)K=E,Q=0;else if(E.type===w.IncrementalSnapshot){if(E.data.source===M.Mutation&&E.data.isAttachIframe)return;Q++;const ee=r&&Q>=r,le=n&&E.timestamp-K.timestamp>n;(ee||le)&&_e(!0)}};const Y=E=>{G(Z({type:w.IncrementalSnapshot,data:re({source:M.Mutation},E)}))},X=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Scroll},E)})),P=E=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.CanvasMutation},E)})),B=new Zr({mutationCb:Y}),S=new vo({mutationCb:Y}),v=new go({recordCanvas:y,mutationCb:P,win:window,blockClass:o,mirror:se,sampling:p.canvas}),I=new to({mutationCb:Y,scrollCb:X,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskInputOptions:z,maskTextFn:f,maskInputFn:m,recordCanvas:y,inlineImages:R,sampling:p,slimDOMOptions:$,iframeManager:B,stylesheetManager:S,canvasManager:v,enableStrictPrivacy:A},mirror:se});_e=(E=!1)=>{var C,J,ee,le;G(Z({type:w.Meta,data:{href:window.location.href,width:nt(),height:tt()}}),E),pe.forEach(U=>U.lock());const _=Sr(document,{mirror:se,blockClass:o,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:s,maskAllInputs:z,maskTextFn:f,slimDOM:$,recordCanvas:y,inlineImages:R,enableStrictPrivacy:A,onSerialize:U=>{Ne(U,se)&&B.addIframe(U),at(U,se)&&S.addStylesheet(U),Ae(U)&&I.addShadowRoot(U.shadowRoot,document)},onIframeLoad:(U,ve)=>{B.attachIframe(U,ve,se),I.observeAttachShadow(U)},onStylesheetLoad:(U,ve)=>{S.attachStylesheet(U,ve,se)},keepIframeSrcFn:W});if(!_)return console.warn("Failed to snapshot the document");G(Z({type:w.FullSnapshot,data:{node:_,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((J=(C=document?.body)==null?void 0:C.parentElement)==null?void 0:J.scrollLeft)||document?.body.scrollLeft||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((le=(ee=document?.body)==null?void 0:ee.parentElement)==null?void 0:le.scrollTop)||document?.body.scrollTop||0}}})),pe.forEach(U=>U.unlock())};try{const E=[];E.push(te("DOMContentLoaded",()=>{G(Z({type:w.DomContentLoaded,data:{}}))}));const C=ee=>{var le;return Xr({mutationCb:Y,mousemoveCb:(_,U)=>G(Z({type:w.IncrementalSnapshot,data:{source:U,positions:_}})),mouseInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MouseInteraction},_)})),scrollCb:X,viewportResizeCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.ViewportResize},_)})),inputCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Input},_)})),mediaInteractionCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.MediaInteraction},_)})),styleSheetRuleCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleSheetRule},_)})),styleDeclarationCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.StyleDeclaration},_)})),canvasMutationCb:P,fontCb:_=>G(Z({type:w.IncrementalSnapshot,data:re({source:M.Font},_)})),blockClass:o,ignoreClass:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:s,sampling:p,recordCanvas:y,inlineImages:R,userTriggeredOnInput:T,collectFonts:D,doc:ee,maskInputFn:m,maskTextFn:f,blockSelector:i,slimDOMOptions:$,mirror:se,iframeManager:B,stylesheetManager:S,shadowDomManager:I,canvasManager:v,enableStrictPrivacy:A,plugins:((le=L?.filter(_=>_.observer))==null?void 0:le.map(_=>({observer:_.observer,options:_.options,callback:U=>G(Z({type:w.Plugin,data:{plugin:_.name,payload:U}}))})))||[]},g)};B.addLoadListener(ee=>{E.push(C(ee.contentDocument))});const J=()=>{_e(),E.push(C(document))};return document.readyState==="interactive"||document.readyState==="complete"?J():E.push(te("load",()=>{G(Z({type:w.Load,data:{}})),J()},window)),()=>{E.forEach(ee=>ee())}}catch(E){console.warn(E)}}fe.addCustomEvent=(e,t)=>{!G||G(Z({type:w.Custom,data:{tag:e,payload:t}}))},fe.freezePage=()=>{pe.forEach(e=>e.freeze())},fe.takeFullSnapshot=e=>{if(!_e)throw new Error("please take full snapshot after start recording");_e(e)},fe.mirror=se;var x;(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"})(x||(x={}));var wo=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function Co(){return new wo}function Io(e){const t={},n=/;(?![^(]*\))/g,r=/:(.+)/,o=/\/\*.*?\*\//g;return e.replace(o,"").split(n).forEach(function(i){if(i){const a=i.split(r);a.length>1&&(t[dt(a[0].trim())]=a[1].trim())}}),t}function fn(e){const t=[];for(const n in e){const r=e[n];if(typeof r!="string")continue;const o=Do(n);t.push(`${o}: ${r};`)}return t.join(" ")}const Mo=/-([a-z])/g,xo=/^--[a-zA-Z0-9-]+$/,dt=e=>xo.test(e)?e:e.replace(Mo,(t,n)=>n?n.toUpperCase():""),ko=/\B([A-Z])/g,Do=e=>e.replace(ko,"-$1").toLowerCase();class oe{constructor(...t){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=V.ELEMENT_NODE,this.TEXT_NODE=V.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){const t=this.parentNode;if(!t)return null;const n=t.childNodes,r=n.indexOf(this);return n[r+1]||null}contains(t){if(t===this)return!0;for(const n of this.childNodes)if(n.contains(t))return!0;return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function Ro(e){return class Xn extends e{constructor(){super(...arguments),this.nodeType=V.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=x.Document,this.textContent=null}get documentElement(){return this.childNodes.find(n=>n.RRNodeType===x.Element&&n.tagName==="HTML")||null}get body(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="BODY"))||null}get head(){var n;return((n=this.documentElement)===null||n===void 0?void 0:n.childNodes.find(r=>r.RRNodeType===x.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(n){const r=n.RRNodeType;if((r===x.Element||r===x.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return n.parentElement=null,n.parentNode=this,this.childNodes.push(n),n}insertBefore(n,r){const o=n.RRNodeType;if((o===x.Element||o===x.DocumentType)&&this.childNodes.some(a=>a.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===x.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(r===null)return this.appendChild(n);const i=this.childNodes.indexOf(r);if(i==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(i,0,n),n.parentElement=null,n.parentNode=this,n}removeChild(n){const r=this.childNodes.indexOf(n);if(r===-1)throw new Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(r,1),n.parentElement=null,n.parentNode=null,n}open(){this.childNodes=[]}close(){}write(n){let r;if(n==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":n==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(n,r,o){return new Xn}createDocumentType(n,r,o){const i=new(gn(oe))(n,r,o);return i.ownerDocument=this,i}createElement(n){const r=new(vn(oe))(n);return r.ownerDocument=this,r}createElementNS(n,r){return this.createElement(r)}createTextNode(n){const r=new(yn(oe))(n);return r.ownerDocument=this,r}createComment(n){const r=new(bn(oe))(n);return r.ownerDocument=this,r}createCDATASection(n){const r=new(Sn(oe))(n);return r.ownerDocument=this,r}toString(){return"RRDocument"}}}function gn(e){return class extends e{constructor(t,n,r){super(),this.nodeType=V.DOCUMENT_TYPE_NODE,this.RRNodeType=x.DocumentType,this.textContent=null,this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}}function vn(e){return class extends e{constructor(t){super(),this.nodeType=V.ELEMENT_NODE,this.RRNodeType=x.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.childNodes=[this.ownerDocument.createTextNode(t)]}get classList(){return new Ao(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Io(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,o,i)=>{if(n.test(r))return;const a=dt(r);o?t[a]=o:delete t[a],i==="important"&&(t[a]+=" !important"),this.attributes.style=fn(t)},t.removeProperty=r=>{if(n.test(r))return"";const o=dt(r),i=t[o]||"";return delete t[o],this.attributes.style=fn(t),i},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return this.childNodes.push(t),t.parentNode=this,t.parentElement=this,t}insertBefore(t,n){if(n===null)return this.appendChild(t);const r=this.childNodes.indexOf(n);if(r==-1)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return this.childNodes.splice(r,0,t),t.parentElement=this,t.parentNode=this,t}removeChild(t){const n=this.childNodes.indexOf(t);if(n===-1)throw new Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(n,1),t.parentElement=null,t.parentNode=null,t}attachShadow(t){const n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(const n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}}}function Oo(e){return class extends e{attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}}function yn(e){return class extends e{constructor(t){super(),this.nodeType=V.TEXT_NODE,this.nodeName="#text",this.RRNodeType=x.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function bn(e){return class extends e{constructor(t){super(),this.nodeType=V.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=x.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function Sn(e){return class extends e{constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=V.CDATA_SECTION_NODE,this.RRNodeType=x.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class Ao{constructor(t,n){if(this.classes=[],this.add=(...r)=>{for(const o of r){const i=String(o);this.classes.indexOf(i)>=0||this.classes.push(i)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...r)=>{this.classes=this.classes.filter(o=>r.indexOf(o)===-1),this.onChange&&this.onChange(this.classes.join(" "))},t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}}var V;(function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(V||(V={}));const ht={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"};function ae(e,t,n,r){const o=e.childNodes,i=t.childNodes;r=r||t.mirror||t.ownerDocument.mirror,(o.length>0||i.length>0)&&Tn(Array.from(o),i,e,n,r);let a=null,l=null;switch(t.RRNodeType){case x.Document:{l=t.scrollData;break}case x.Element:{const c=e,s=t;switch(Lo(c,s,r),l=s.scrollData,a=s.inputData,s.tagName){case"AUDIO":case"VIDEO":{const u=e,d=s;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime);break}case"CANVAS":t.canvasMutations.forEach(u=>n.applyCanvas(u.event,u.mutation,e));break;case"STYLE":Po(c,t.rules);break}if(s.shadowRoot){c.shadowRoot||c.attachShadow({mode:"open"});const u=c.shadowRoot.childNodes,d=s.shadowRoot.childNodes;(u.length>0||d.length>0)&&Tn(Array.from(u),d,c.shadowRoot,n,r)}break}case x.Text:case x.Comment:case x.CDATA:e.textContent!==t.data&&(e.textContent=t.data);break}if(l&&n.applyScroll(l,!0),a&&n.applyInput(a),t.nodeName==="IFRAME"){const c=e.contentDocument,s=t;if(c){const u=r.getMeta(s.contentDocument);u&&n.mirror.add(c,Object.assign({},u)),ae(c,s.contentDocument,n,r)}}}function Lo(e,t,n){const r=e.attributes,o=t.attributes;for(const i in o){const a=o[i],l=n.getMeta(t);if(l&&"isSVG"in l&&l.isSVG&&ht[i])e.setAttributeNS(ht[i],i,a);else if(t.tagName==="CANVAS"&&i==="rr_dataURL"){const c=document.createElement("img");c.src=a,c.onload=()=>{const s=e.getContext("2d");s&&s.drawImage(c,0,0,c.width,c.height)}}else e.setAttribute(i,a)}for(const{name:i}of Array.from(r))i in o||e.removeAttribute(i);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function Tn(e,t,n,r,o){var i,a;let l=0,c=e.length-1,s=0,u=t.length-1,d=e[l],h=e[c],m=t[s],f=t[u],g,N;for(;l<=c&&s<=u;)if(d===void 0)d=e[++l];else if(h===void 0)h=e[--c];else if(r.mirror.getId(d)===o.getId(m))ae(d,m,r,o),d=e[++l],m=t[++s];else if(r.mirror.getId(h)===o.getId(f))ae(h,f,r,o),h=e[--c],f=t[--u];else if(r.mirror.getId(d)===o.getId(f))try{n.insertBefore(d,h.nextSibling)}catch(p){console.error(p,n,d,h),ae(d,f,r,o),d=e[++l],f=t[--u]}else if(r.mirror.getId(h)===o.getId(m))try{n.insertBefore(h,d)}catch(p){console.error(p,n,h,d),ae(h,m,r,o),h=e[--c],m=t[++s]}else{if(!g){g={};for(let p=l;p<=c;p++){const b=e[p];b&&r.mirror.hasNode(b)&&(g[r.mirror.getId(b)]=p)}}if(N=g[o.getId(m)],N){const p=e[N];try{n.insertBefore(p,d)}catch(b){console.error(b,n,p,d),ae(p,m,r,o),e[N]=void 0}}else{const p=mt(m,r.mirror,o);((i=r.mirror.getMeta(n))===null||i===void 0?void 0:i.type)===x.Document&&((a=r.mirror.getMeta(p))===null||a===void 0?void 0:a.type)===x.Element&&n.documentElement&&(n.removeChild(n.documentElement),e[l]=void 0,d=void 0);try{n.insertBefore(p,d||null)}catch(b){console.error(b,n,p,d||null),ae(p,m,r,o)}}m=t[++s]}if(l>c){const p=t[u+1];let b=null;for(p&&n.childNodes.forEach(y=>{r.mirror.getId(y)===o.getId(p)&&(b=y)});s<=u;++s){const y=mt(t[s],r.mirror,o);try{n.insertBefore(y,b)}catch(T){console.error(T,n,y,b),ae(y,t[s],r,o)}}}else if(s>u)for(;l<=c;l++){const p=e[l];p&&(n.removeChild(p),r.mirror.removeNodeFromMap(p))}}function mt(e,t,n){let r=t.getNode(n.getId(e));const o=n.getMeta(e);if(r!==null)return r;switch(e.RRNodeType){case x.Document:r=new Document;break;case x.DocumentType:r=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case x.Element:{e.tagName.toLowerCase(),o&&"isSVG"in o&&o?.isSVG?r=document.createElementNS(ht.svg,e.tagName.toLowerCase()):r=document.createElement(e.tagName);break}case x.Text:r=document.createTextNode(e.data);break;case x.Comment:r=document.createComment(e.data);break;case x.CDATA:r=document.createCDATASection(e.data);break}return o&&t.add(r,Object.assign({},o)),r}function Fe(e,t){const n=e[t[0]];return t.length===1?n:Fe(n.cssRules[t[1]].cssRules,t.slice(2))}var ie;(function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"})(ie||(ie={}));function Nn(e){const t=[...e],n=t.pop();return{positions:t,index:n}}function Po(e,t){const n=e.sheet;t.forEach(r=>{if(r.type===ie.Insert)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).insertRule(r.cssText,i)}else n.insertRule(r.cssText,r.index)}catch{}else if(r.type===ie.Remove)try{if(Array.isArray(r.index)){const{positions:o,index:i}=Nn(r.index);Fe(n.cssRules,o).deleteRule(i||0)}else n.deleteRule(r.index)}catch{}else r.type===ie.SetProperty?Fe(n.cssRules,r.index).style.setProperty(r.property,r.value,r.priority):r.type===ie.RemoveProperty&&Fe(n.cssRules,r.index).style.removeProperty(r.property)})}class Ce extends Ro(oe){constructor(t){super(),this._unserializedId=-1,this.mirror=Ho(),this.scrollData=null,t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new Ce}createDocumentType(t,n,r){const o=new _o(t,n,r);return o.ownerDocument=this,o}createElement(t){const n=t.toUpperCase();let r;switch(n){case"AUDIO":case"VIDEO":r=new Fo(n);break;case"IFRAME":r=new Vo(n,this.mirror);break;case"CANVAS":r=new Wo(n);break;case"STYLE":r=new $o(n);break;default:r=new We(n);break}return r.ownerDocument=this,r}createComment(t){const n=new jo(t);return n.ownerDocument=this,n}createCDATASection(t){const n=new Bo(t);return n.ownerDocument=this,n}createTextNode(t){const n=new Uo(t);return n.ownerDocument=this,n}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=-1}}const _o=gn(oe);class We extends vn(oe){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class Fo extends Oo(We){}class Wo extends We{constructor(){super(...arguments),this.canvasMutations=[]}getContext(){return null}}class $o extends We{constructor(){super(...arguments),this.rules=[]}}class Vo extends We{constructor(t,n){super(t),this.contentDocument=new Ce,this.contentDocument.mirror=n}}const Uo=yn(oe),jo=bn(oe),Bo=Sn(oe);function Go(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function En(e,t,n,r){let o;switch(e.nodeType){case V.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?o=r.contentDocument:(o=t,o.compatMode=e.compatMode);break;case V.DOCUMENT_TYPE_NODE:const a=e;o=t.createDocumentType(a.name,a.publicId,a.systemId);break;case V.ELEMENT_NODE:const l=e,c=Go(l);o=t.createElement(c);const s=o;for(const{name:u,value:d}of Array.from(l.attributes))s.attributes[u]=d;l.scrollLeft&&(s.scrollLeft=l.scrollLeft),l.scrollTop&&(s.scrollTop=l.scrollTop);break;case V.TEXT_NODE:o=t.createTextNode(e.textContent||"");break;case V.CDATA_SECTION_NODE:o=t.createCDATASection(e.data);break;case V.COMMENT_NODE:o=t.createComment(e.textContent||"");break;case V.DOCUMENT_FRAGMENT_NODE:o=r.attachShadow({mode:"open"});break;default:return null}let i=n.getMeta(e);return t instanceof Ce&&(i||(i=wn(o,t.unserializedId),n.add(e,i)),t.mirror.add(o,Object.assign({},i))),o}function zo(e,t=Co(),n=new Ce){function r(o,i){const a=En(o,n,t,i);a!==null&&(i?.nodeName!=="IFRAME"&&o.nodeType!==V.DOCUMENT_FRAGMENT_NODE&&(i?.appendChild(a),a.parentNode=i,a.parentElement=i),o.nodeName==="IFRAME"?r(o.contentDocument,a):(o.nodeType===V.DOCUMENT_NODE||o.nodeType===V.ELEMENT_NODE||o.nodeType===V.DOCUMENT_FRAGMENT_NODE)&&(o.nodeType===V.ELEMENT_NODE&&o.shadowRoot&&r(o.shadowRoot,a),o.childNodes.forEach(l=>r(l,a))))}return r(e,null),n}function Ho(){return new Yo}class Yo{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var n;if(!t)return-1;const r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wn(e,t){switch(e.RRNodeType){case x.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case x.DocumentType:const n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case x.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case x.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case x.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Cn(e){return e=e||Object.create(null),{on:function(n,r){(e[n]||(e[n]=[])).push(r)},off:function(n,r){e[n]&&e[n].splice(e[n].indexOf(r)>>>0,1)},emit:function(n,r){(e[n]||[]).slice().map(function(o){o(r)}),(e["*"]||[]).slice().map(function(o){o(n,r)})}}}var Xo=Object.freeze({__proto__:null,default:Cn});function Zo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const n=e.HTMLElement||e.Element,r=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||c,scrollIntoView:n.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(p){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(p)}const l=a(e.navigator.userAgent)?1:0;function c(p,b){this.scrollLeft=p,this.scrollTop=b}function s(p){return .5*(1-Math.cos(Math.PI*p))}function u(p){if(p===null||typeof p!="object"||p.behavior===void 0||p.behavior==="auto"||p.behavior==="instant")return!0;if(typeof p=="object"&&p.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+p.behavior+" is not a valid value for enumeration ScrollBehavior.")}function d(p,b){if(b==="Y")return p.clientHeight+l<p.scrollHeight;if(b==="X")return p.clientWidth+l<p.scrollWidth}function h(p,b){const y=e.getComputedStyle(p,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(p){const b=d(p,"Y")&&h(p,"Y"),y=d(p,"X")&&h(p,"X");return b||y}function f(p){for(;p!==t.body&&m(p)===!1;)p=p.parentNode||p.host;return p}function g(p){const b=i();let y,T,D,R=(b-p.startTime)/r;R=R>1?1:R,y=s(R),T=p.startX+(p.x-p.startX)*y,D=p.startY+(p.y-p.startY)*y,p.method.call(p.scrollable,T,D),(T!==p.x||D!==p.y)&&e.requestAnimationFrame(g.bind(e,p))}function N(p,b,y){let T,D,R,L;const W=i();p===t.body?(T=e,D=e.scrollX||e.pageXOffset,R=e.scrollY||e.pageYOffset,L=o.scroll):(T=p,D=p.scrollLeft,R=p.scrollTop,L=c),g({scrollable:T,method:L,startTime:W,startX:D,startY:R,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}N.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){o.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}N.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const p=arguments[0].left,b=arguments[0].top;N.call(this,this,typeof p>"u"?this.scrollLeft:~~p,typeof b>"u"?this.scrollTop:~~b)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){o.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){o.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const p=f(this),b=p.getBoundingClientRect(),y=this.getBoundingClientRect();p!==t.body?(N.call(this,p,p.scrollLeft+y.left-b.left,p.scrollTop+y.top-b.top),e.getComputedStyle(p).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}class Ko{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n}addAction(t){const n=this.findActionIndex(t);this.actions.splice(n,0,t)}addActions(t){this.actions=this.actions.concat(t)}replaceActions(t){this.actions.length=0,this.actions.splice(0,0,...t)}start(){this.timeOffset=0;let t=performance.now();const{actions:n}=this,r=this;function o(){const i=performance.now();for(r.timeOffset+=(i-t)*r.speed,t=i;n.length;){const a=n[0];if(r.timeOffset>=a.delay)n.shift(),a.doAction();else break}(n.length>0||r.liveMode)&&(r.raf=requestAnimationFrame(o))}this.raf=requestAnimationFrame(o)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}toggleLiveMode(t){this.liveMode=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){const o=Math.floor((n+r)/2);if(this.actions[o].delay<t.delay)n=o+1;else if(this.actions[o].delay>t.delay)r=o-1;else return o+1}return n}}function pt(e,t){if(e.type===w.IncrementalSnapshot&&e.data.source===M.MouseMove){const n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}/*! *****************************************************************************
|
|
6
6
|
Copyright (c) Microsoft Corporation.
|
|
7
7
|
|
|
8
8
|
Permission to use, copy, modify, and/or distribute this software for any
|