1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7108,2601],{62601:function(e,t,i){"use strict";var n,r;e.exports=(null==(n=i.g.process)?void 0:n.env)&&"object"==typeof(null==(r=i.g.process)?void 0:r.env)?i.g.process:i(58960)},58960:function(e){!function(){var t={229:function(e){var t,i,n,r=e.exports={};function o(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(i){try{return t.call(null,e,0)}catch(i){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l=[],c=!1,u=-1;function d(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u<t;)n&&n[u].run();u=-1,t=l.length}n=null,c=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}r.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];l.push(new p(e,t)),1!==l.length||c||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=g,r.addListener=g,r.once=g,r.off=g,r.removeListener=g,r.removeAllListeners=g,r.emit=g,r.prependListener=g,r.prependOnceListener=g,r.listeners=function(e){return[]},r.binding=function(e){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw Error("process.chdir is not supported")},r.umask=function(){return 0}}},i={};function n(e){var r=i[e];if(void 0!==r)return r.exports;var o=i[e]={exports:{}},s=!0;try{t[e](o,o.exports,n),s=!1}finally{s&&delete i[e]}return o.exports}n.ab="//";var r=n(229);e.exports=r}()},87108:function(e,t,i){"use strict";let n,r;i.r(t),i.d(t,{default:function(){return im}});var o,s=i(67133).Buffer,a=i(62601);function l(){}function c(e,t){for(let i in t)e[i]=t[i];return e}function u(e){return e()}function d(){return Object.create(null)}function h(e){e.forEach(u)}function p(e){return"function"==typeof e}function g(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}function m(e){let t={};for(let i in e)"$"!==i[0]&&(t[i]=e[i]);return t}function f(e,t){e.appendChild(t)}function y(e,t,i){e.insertBefore(t,i||null)}function v(e){e.parentNode.removeChild(e)}function C(e,t){for(let i=0;i<e.length;i+=1)e[i]&&e[i].d(t)}function I(e){return document.createElement(e)}function A(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function b(e){return document.createTextNode(e)}function N(){return b(" ")}function w(e,t,i,n){return e.addEventListener(t,i,n),()=>e.removeEventListener(t,i,n)}function E(e,t,i){null==i?e.removeAttribute(t):e.getAttribute(t)!==i&&e.setAttribute(t,i)}function T(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function S(e,t,i,n){null===i?e.style.removeProperty(t):e.style.setProperty(t,i,n?"important":"")}function D(e,t,i){e.classList[i?"add":"remove"](t)}function M(){if(!n)throw Error("Function called outside component initialization");return n}function x(e){M().$$.on_mount.push(e)}function R(e){M().$$.on_destroy.push(e)}let k=[],F=[],O=[],B=[],L=Promise.resolve(),V=!1;function G(e){O.push(e)}let W=new Set,_=0;function Z(){let e=n;do{for(;_<k.length;){let e=k[_];_++,n=e,function(e){if(null!==e.fragment){e.update(),h(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(G)}}(e.$$)}for(n=null,k.length=0,_=0;F.length;)F.pop()();for(let e=0;e<O.length;e+=1){let t=O[e];W.has(t)||(W.add(t),t())}O.length=0}while(k.length);for(;B.length;)B.pop()();V=!1,W.clear(),n=e}let U=new Set;function $(){r={r:0,c:[],p:r}}function K(){r.r||h(r.c),r=r.p}function Y(e,t){e&&e.i&&(U.delete(e),e.i(t))}function P(e,t,i,n){e&&e.o?U.has(e)||(U.add(e),r.c.push(()=>{U.delete(e),n&&(i&&e.d(1),n())}),e.o(t)):n&&n()}function Q(e,t,i,n){let{fragment:r,on_mount:o,on_destroy:s,after_update:a}=e.$$;r&&r.m(t,i),n||G(()=>
1{let t=o.map(u).filter(p);s?s.push(...t):h(t),e.$$.on_mount=[]}),a.forEach(G)}function z(e,t){let i=e.$$;null!==i.fragment&&(h(i.on_destroy),i.fragment&&i.fragment.d(t),i.on_destroy=i.fragment=null,i.ctx=[])}function J(e,t,i,r,o,s,a,c=[-1]){let u=n;n=e;let p=e.$$={fragment:null,ctx:null,props:s,update:l,not_equal:o,bound:d(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(u?u.$$.context:[])),callbacks:d(),dirty:c,skip_bound:!1,root:t.target||u.$$.root};a&&a(p.root);let g=!1;if(p.ctx=i?i(e,t.props||{},(t,i,...n)=>{let r=n.length?n[0]:i;return p.ctx&&o(p.ctx[t],p.ctx[t]=r)&&(!p.skip_bound&&p.bound[t]&&p.bound[t](r),g&&(-1===e.$$.dirty[0]&&(k.push(e),V||(V=!0,L.then(Z)),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31)),i}):[],p.update(),g=!0,h(p.before_update),p.fragment=!!r&&r(p.ctx),t.target){if(t.hydrate){let e=Array.from(t.target.childNodes);p.fragment&&p.fragment.l(e),e.forEach(v)}else p.fragment&&p.fragment.c();t.intro&&Y(e.$$.fragment),Q(e,t.target,t.anchor,t.customElement),Z()}n=u}class X{$destroy(){z(this,1),this.$destroy=l}$on(e,t){let i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{let e=i.indexOf(t);-1!==e&&i.splice(e,1)}}$set(e){this.$$set&&0!==Object.keys(e).length&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}(tm=tA||(tA={}))[tm.Document=0]="Document",tm[tm.DocumentType=1]="DocumentType",tm[tm.Element=2]="Element",tm[tm.Text=3]="Text",tm[tm.CDATA=4]="CDATA",tm[tm.Comment=5]="Comment";var H=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){if(!e)return -1;var t,i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,i=this.getId(e);this.idNodeMap.delete(i),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var i=this.getNode(e);if(i){var n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}(),j=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function q(e){return e?e.replace(/^\s+|\s+$/g,""):""}var ee={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"},et=/([^\\]):hover/,ei=RegExp(et.source,"g");function en(e,t){var i=null==t?void 0:t.stylesWithHoverClass.get(e);if(i)return i;var n=function(e,t){void 0===t&&(t={});var i=1,n=1;function r(e){var t=e.match(/\n/g);t&&(i+=t.length);var r=e.lastIndexOf("\n");n=-1===r?n+e.length:e.length-r}function o(){var e={line:i,column:n};return function(t){return t.position=new s(e),d(/^\s*/),t}}var s=function(e){this.start=e,this.end={line:i,column:n},this.source=t.source};s.prototype.content=e;var a=[];function l(r){var o=Error("".concat(t.source||"",":").concat(i,":").concat(n,": ").concat(r));if(o.reason=r,o.filename=t.source,o.line=i,o.column=n,o.source=e,!t.silent)throw o;a.push(o)}function c(){return d(/^{\s*/)}function u(){return d(/^}/)}function d(t){var i=t.exec(e);if(i){var n=i[0];return r(n),e=e.slice(n.length),i}}function h(e){var t;for(void 0===e&&(e=[]);t=p();)!1!==t&&e.push(t),t=p();return e}function p(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var i=2;""!==e.charAt(i)&&("*"!==e.charAt(i)||"/"!==e.charAt(i+1));)++i;if(i+=2,""===e.charAt(i-1))return l("End of comment missing");var s=e.slice(2,i-2);return n+=2,r(s),e=e.slice(i),n+=2,t({type:"comment",comment:s})}}function g(){var e=d(/^([^{]+)/);if(e)return q(e[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(e){return e.replace(/,/g,"â")}).split(/\s*(?![^(]*\)),\s*/).map(function(e){return e.replace(/\u200C/g,",")})}function m(){var e=o(),t=d(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var i=q(t[0]);if(!d(/^:\s*/))return l("property missing ':'");var n=d(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),r=e({type:"declaration",property:i.replace(j,""),value:n?q(n[0]).replace(j,""):""});return d(/^[;
1\s]*/),r}}function f(){var e,t=[];if(!c())return l("missing '{'");for(h(t);e=m();)!1!==e&&(t.push(e),h(t)),e=m();return u()?t:l("missing '}'")}var y,v=A("import"),C=A("charset"),I=A("namespace");function A(e){var t=RegExp("^@"+e+"\\s*([^;]+);");return function(){var i=o(),n=d(t);if(n){var r={type:e};return r[e]=n[1].trim(),i(r)}}}return function e(t,i){for(var n=t&&"string"==typeof t.type,r=n?t:i,o=0,s=Object.keys(t);o<s.length;o++){var a=t[s[o]];Array.isArray(a)?a.forEach(function(t){e(t,r)}):a&&"object"==typeof a&&e(a,r)}return n&&Object.defineProperty(t,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),t}((y=function t(){var i,n,r,s=[];for(d(/^\s*/),h(s);e.length&&"}"!==e.charAt(0)&&(r=function(){if("@"===e[0])return function(){var e=o(),t=d(/^@([-\w]+)?keyframes\s*/);if(t){var i=t[1];if(!(t=d(/^([-\w]+)\s*/)))return l("@keyframes missing name");var n,r=t[1];if(!c())return l("@keyframes missing '{'");for(var s=h();n=function(){for(var e,t=[],i=o();e=d(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),d(/^,\s*/);if(t.length)return i({type:"keyframe",values:t,declarations:f()})}();)s.push(n),s=s.concat(h());return u()?e({type:"keyframes",name:r,vendor:i,keyframes:s}):l("@keyframes missing '}'")}}()||function(){var e=o(),i=d(/^@media *([^{]+)/);if(i){var n=q(i[1]);if(!c())return l("@media missing '{'");var r=h().concat(t());return u()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=o(),t=d(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:q(t[1]),media:q(t[2])})}()||function(){var e=o(),i=d(/^@supports *([^{]+)/);if(i){var n=q(i[1]);if(!c())return l("@supports missing '{'");var r=h().concat(t());return u()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||v()||C()||I()||function(){var e=o(),i=d(/^@([-\w]+)?document *([^{]+)/);if(i){var n=q(i[1]),r=q(i[2]);if(!c())return l("@document missing '{'");var s=h().concat(t());return u()?e({type:"document",document:r,vendor:n,rules:s}):l("@document missing '}'")}}()||function(){var e=o();if(d(/^@page */)){var t=g()||[];if(!c())return l("@page missing '{'");for(var i,n=h();i=m();)n.push(i),n=n.concat(h());return u()?e({type:"page",selectors:t,declarations:n}):l("@page missing '}'")}}()||function(){var e=o();if(d(/^@host\s*/)){if(!c())return l("@host missing '{'");var i=h().concat(t());return u()?e({type:"host",rules:i}):l("@host missing '}'")}}()||function(){var e=o();if(d(/^@font-face\s*/)){if(!c())return l("@font-face missing '{'");for(var t,i=h();t=m();)i.push(t),i=i.concat(h());return u()?e({type:"font-face",declarations:i}):l("@font-face missing '}'")}}()}()||(i=o(),(n=g())?(h(),i({type:"rule",selectors:n,declarations:f()})):l("selector missing")));)!1!==r&&(s.push(r),h(s));return s}(),{type:"stylesheet",stylesheet:{source:t.source,rules:y,parsingErrors:a}}))}(e,{silent:!0});if(!n.stylesheet)return e;var r=[];
1if(n.stylesheet.rules.forEach(function(e){"selectors"in e&&(e.selectors||[]).forEach(function(e){et.test(e)&&r.push(e)})}),0===r.length)return e;var o=RegExp(r.filter(function(e,t){return r.indexOf(e)===t}).sort(function(e,t){return t.length-e.length}).map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}).join("|"),"g"),s=e.replace(o,function(e){var t=e.replace(ei,"$1.\\:hover");return"".concat(e,", ").concat(t)});return null==t||t.stylesWithHoverClass.set(e,s),s}function er(){return{stylesWithHoverClass:new Map}}function eo(e,t){var i=t.doc,n=t.mirror,r=t.skipChild,o=t.hackCss,s=void 0===o||o,a=t.afterAppend,l=t.cache,c=function(e,t){var i=t.doc,n=t.hackCss,r=t.cache;switch(e.type){case tA.Document:return i.implementation.createDocument(null,"",null);case tA.DocumentType:return i.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case tA.Element:var o,s,a=("link"===(o=ee[e.tagName]?ee[e.tagName]:e.tagName)&&e.attributes._cssText&&(o="style"),o);s=e.isSVG?i.createElementNS("http://www.w3.org/2000/svg",a):i.createElement(a);var l={};for(var c in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,c)){var u=e.attributes[c];if("option"!==a||"selected"!==c||!1!==u){if(!0===u&&(u=""),c.startsWith("rr_"))l[c]=u;else{var d="textarea"===a&&"value"===c,h="style"===a&&"_cssText"===c;if(h&&n&&"string"==typeof u&&(u=en(u,r)),(d||h)&&"string"==typeof u){for(var p=i.createTextNode(u),g=0,m=Array.from(s.childNodes);g<m.length;g++){var f=m[g];f.nodeType===s.TEXT_NODE&&s.removeChild(f)}s.appendChild(p)}else try{if(e.isSVG&&"xlink:href"===c)s.setAttributeNS("http://www.w3.org/1999/xlink",c,u.toString());else if("onload"===c||"onclick"===c||"onmouse"===c.substring(0,7))s.setAttribute("_"+c,u.toString());else{if("meta"===a&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===c){s.setAttribute("csp-content",u.toString());continue}"link"===a&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===a&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===a&&e.attributes.srcset&&e.attributes.rr_dataURL?s.setAttribute("rrweb-original-srcset",e.attributes.srcset):s.setAttribute(c,u.toString()))}}catch(e){}}}}for(var y in l)!function(t){var i=l[t];if("canvas"===a&&"rr_dataURL"===t){var n=document.createElement("img");n.onload=function(){var e=s.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=i.toString(),s.RRNodeType&&(s.rr_dataURL=i.toString())}else"img"===a&&"rr_dataURL"===t&&(s.currentSrc.startsWith("data:")||(s.setAttribute("rrweb-original-src",e.attributes.src),s.src=i.toString()));if("rr_width"===t)s.style.width=i.toString();else if("rr_height"===t)s.style.height=i.toString();else if("rr_mediaCurrentTime"===t&&"number"==typeof i)s.currentTime=i;else if("rr_mediaState"===t)switch(i){case"played":s.play().catch(function(e){return console.warn("media playback error",e)});break;case"paused":s.pause()}}(y);if(e.isShadowHost){if(s.shadowRoot)for(;s.shadowRoot.firstChild;)s.shadowRoot.removeChild(s.shadowRoot.firstChild);else s.attachShadow({mode:"open"})}return s;case tA.Text:return i.createTextNode(e.isStyle&&n?en(e.textContent,r):e.textContent);case tA.CDATA:return i.createCDATASection(e.textContent);case tA.Comment:return i.createComment(e.textContent);default:return null}}(e,{doc:i,hackCss:s,cache:l});if(!c)return null;if(e.rootId&&n.getNode(e.rootId)!==i&&n.replace(e.rootId,i),e.type===tA.Document&&(i.close(),i.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==tA.DocumentType&&(e.childNodes[0].type===tA.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?i.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):i.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=i),n.add(c,e),(e.type===tA.Document||e.type===tA.Element)&&!(void 0!==r&&r))for(var u=0,d=e.childNodes;u<d.length;u++){var h,p=d[u],g=eo(p,{doc:i,mirror:n,skipChild:!1,hackCss:s,afterAppend:a,cache:l});g?(p.isShadow&&(h=c).nodeType===h.ELEMENT_NODE&&c.shadowRoot?c.shadowRoot.appendChild(g):c.appendChild(g),a&&a(g,p.id)):console.warn("Failed to rebuild",p)}return c}let es="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ea={map:{},getId:()=>(console.error(es),-1),getNode:()=>(console.error(es),null),removeNodeFromMap(){console.error(es)},has:()=>(console.error(es),!1),reset(){console.error(es)}};
1function el(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function ec(e){return!!(null==e?void 0:e.shadowRoot)}function eu(e,t){let i=e[t[0]];return 1===t.length?i:eu(i.cssRules[t[1]].cssRules,t.slice(2))}function ed(e){let t=[...e],i=t.pop();return{positions:t,index:i}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ea=new Proxy(ea,{get:(e,t,i)=>("map"===t&&console.error(es),Reflect.get(e,t,i))}));class eh{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){let i;return this.has(e)?this.getId(e):(i=void 0===t?this.id++:t,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var ep=((tf=ep||{})[tf.DomContentLoaded=0]="DomContentLoaded",tf[tf.Load=1]="Load",tf[tf.FullSnapshot=2]="FullSnapshot",tf[tf.IncrementalSnapshot=3]="IncrementalSnapshot",tf[tf.Meta=4]="Meta",tf[tf.Custom=5]="Custom",tf[tf.Plugin=6]="Plugin",tf),eg=((ty=eg||{})[ty.Mutation=0]="Mutation",ty[ty.MouseMove=1]="MouseMove",ty[ty.MouseInteraction=2]="MouseInteraction",ty[ty.Scroll=3]="Scroll",ty[ty.ViewportResize=4]="ViewportResize",ty[ty.Input=5]="Input",ty[ty.TouchMove=6]="TouchMove",ty[ty.MediaInteraction=7]="MediaInteraction",ty[ty.StyleSheetRule=8]="StyleSheetRule",ty[ty.CanvasMutation=9]="CanvasMutation",ty[ty.Font=10]="Font",ty[ty.Log=11]="Log",ty[ty.Drag=12]="Drag",ty[ty.StyleDeclaration=13]="StyleDeclaration",ty[ty.Selection=14]="Selection",ty[ty.AdoptedStyleSheet=15]="AdoptedStyleSheet",ty),em=((tv=em||{})[tv.MouseUp=0]="MouseUp",tv[tv.MouseDown=1]="MouseDown",tv[tv.Click=2]="Click",tv[tv.ContextMenu=3]="ContextMenu",tv[tv.DblClick=4]="DblClick",tv[tv.Focus=5]="Focus",tv[tv.Blur=6]="Blur",tv[tv.TouchStart=7]="TouchStart",tv[tv.TouchMove_Departed=8]="TouchMove_Departed",tv[tv.TouchEnd=9]="TouchEnd",tv[tv.TouchCancel=10]="TouchCancel",tv),ef=((tC=ef||{})[tC["2D"]=0]="2D",tC[tC.WebGL=1]="WebGL",tC[tC.WebGL2=2]="WebGL2",tC),ey=((tI=ey||{}).Start="start",tI.Pause="pause",tI.Resume="resume",tI.Resize="resize",tI.Finish="finish",tI.FullsnapshotRebuilded="fullsnapshot-rebuilded",tI.LoadStylesheetStart="load-stylesheet-start",tI.LoadStylesheetEnd="load-stylesheet-end",tI.SkipStart="skip-start",tI.SkipEnd="skip-end",tI.MouseInteraction="mouse-interaction",tI.EventCast="event-cast",tI.CustomEvent="custom-event",tI.Flush="flush",tI.StateChange="state-change",tI.PlayBack="play-back",tI.Destroy="destroy",tI);/*! ***************************************************************************** 2Copyright (c) Microsoft Corporation. 3 4Permission to use, copy, modify, and/or distribute this software for any 5purpose with or without fee is hereby granted. 6 7THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 8REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 9AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 10INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 11LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 12OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 13PERFORMANCE OF THIS SOFTWARE. 14***************************************************************************** */function ev(e,t,i,n){return new(i||(i=Promise))(function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(s,a)}l((n=n.apply(e,t||[])).next())})}for(var eC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",eI="undefined"==typeof Uint8Array?[]:new Uint8Array(256),eA=0;eA<eC.length;eA++)eI[eC.charCodeAt(eA)]=eA;try{("undefined"!=typeof module&&"function"==typeof module.require&&module.require("worker_threads")||"function"==typeof require&&require("worker_threads")||"function"==typeof require&&require("worker_threads")).Worker}catch(e){}"[object process]"===Object.prototype.toString.call(void 0!==a?a:0)&&(tw=(tN=s.from("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhF
14IFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9i
14ID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=","base64").toString("utf8")).indexOf("\n",10)+1,tN.substring(tw)),new H,(tE=tb||(tb={}))[tE.Document=0]="Document",tE[tE.DocumentType=1]="DocumentType",tE[tE.Element=2]="Element",tE[tE.Text=3]="Text",tE[tE.CDATA=4]="CDATA",tE[tE.Comment=5]="Comment";var eb=function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(e){if(!e)return -1;var t,i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1},e.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},e.prototype.removeNodeFromMap=function(e){var t=this,i=this.getId(e);this.idNodeMap.delete(i),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},e.prototype.has=function(e){return this.idNodeMap.has(e)},e.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},e.prototype.add=function(e,t){var i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)},e.prototype.replace=function(e,t){var i=this.getNode(e);if(i){var n=this.nodeMetaMap.get(i);n&&this.nodeMetaMap.set(t,n)}this.idNodeMap.set(e,t)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function eN(e){let t=[];for(let i in e){let n=e[i];if("string"!=typeof n)continue;let r=eD(i);t.push(`${r}: ${n};`)}return t.join(" ")}let ew=/-([a-z])/g,eE=/^--[a-zA-Z0-9-]+$/,eT=e=>eE.test(e)?e:e.replace(ew,(e,t)=>t?t.toUpperCase():""),eS=/\B([A-Z])/g,eD=e=>e.replace(eS,"-$1").toLowerCase();class eM{constructor(...e){this.childNodes=[],this.parentElement=null,this.parentNode=null,this.ELEMENT_NODE=tS.ELEMENT_NODE,this.TEXT_NODE=tS.TEXT_NODE}get firstChild(){return this.childNodes[0]||null}get lastChild(){return this.childNodes[this.childNodes.length-1]||null}get nextSibling(){let e=this.parentNode;if(!e)return null;let t=e.childNodes,i=t.indexOf(this);return t[i+1]||null}contains(e){if(e===this)return!0;for(let t of this.childNodes)if(t.contains(e))return!0;return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}function ex(e){return class extends e{constructor(e,t,i){super(),this.nodeType=tS.DOCUMENT_TYPE_NODE,this.RRNodeType=tb.DocumentType,this.textContent=null,this.name=e,this.publicId=t,this.systemId=i,this.nodeName=e}toString(){return"RRDocumentType"}}}function eR(e){return class extends e{constructor(e){super(),this.nodeType=tS.ELEMENT_NODE,this.RRNodeType=tb.Element,this.attributes={},this.shadowRoot=null,this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";
14return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.childNodes=[this.ownerDocument.createTextNode(e)]}get classList(){return new eB(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?function(e){let t={},i=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(e){if(e){let n=e.split(i);n.length>1&&(t[eT(n[0].trim())]=n[1].trim())}}),t}(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(i,n,r)=>{if(t.test(i))return;let o=eT(i);n?e[o]=n:delete e[o],"important"===r&&(e[o]+=" !important"),this.attributes.style=eN(e)},e.removeProperty=i=>{if(t.test(i))return"";let n=eT(i),r=e[n]||"";return delete e[n],this.attributes.style=eN(e),r},e}getAttribute(e){return this.attributes[e]||null}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,i){this.setAttribute(t,i)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return this.childNodes.push(e),e.parentNode=this,e.parentElement=this,e}insertBefore(e,t){if(null===t)return this.appendChild(e);let i=this.childNodes.indexOf(t);if(-1==i)throw 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,e),e.parentElement=this,e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(-1===t)throw Error("Failed to execute 'removeChild' on 'RRElement': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(t,1),e.parentElement=null,e.parentNode=null,e}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}}function ek(e){return class extends e{constructor(e){super(),this.nodeType=tS.TEXT_NODE,this.nodeName="#text",this.RRNodeType=tb.Text,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}function eF(e){return class extends e{constructor(e){super(),this.nodeType=tS.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=tb.Comment,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}function eO(e){return class extends e{constructor(e){super(),this.nodeName="#cdata-section",this.nodeType=tS.CDATA_SECTION_NODE,this.RRNodeType=tb.CDATA,this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}class eB{constructor(e,t){if(this.classes=[],this.add=(...e)=>{for(let t of e){let e=String(t);this.classes.indexOf(e)>=0||this.classes.push(e)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...e)=>{this.classes=this.classes.filter(t=>-1===e.indexOf(t)),this.onChange&&this.onChange(this.classes.join(" "))},e){let t=e.trim().split(/\s+/);this.classes.push(...t)}this.onChange=t}}(tT=tS||(tS={}))[tT.PLACEHOLDER=0]="PLACEHOLDER",tT[tT.ELEMENT_NODE=1]="ELEMENT_NODE",tT[tT.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",tT[tT.TEXT_NODE=3]="TEXT_NODE",tT[tT.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",tT[tT.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",tT[tT.ENTITY_NODE=6]="ENTITY_NODE",tT[tT.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",tT[tT.COMMENT_NODE=8]="COMMENT_NODE",tT[tT.DOCUMENT_NODE=9]="DOCUMENT_NODE",tT[tT.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",tT[tT.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";let eL={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},eV={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
14:"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 eG(e,t,i,n){let r=e.childNodes,o=t.childNodes;n=n||t.mirror||t.ownerDocument.mirror,(r.length>0||o.length>0)&&eW(Array.from(r),o,e,i,n);let s=null,a=null;switch(t.RRNodeType){case tb.Document:a=t.scrollData;break;case tb.Element:switch(function(e,t,i){let n=e.attributes,r=t.attributes;for(let n in r){let o=r[n],s=i.getMeta(t);if(s&&"isSVG"in s&&s.isSVG&&eL[n])e.setAttributeNS(eL[n],n,o);else if("CANVAS"===t.tagName&&"rr_dataURL"===n){let t=document.createElement("img");t.src=o,t.onload=()=>{let i=e.getContext("2d");i&&i.drawImage(t,0,0,t.width,t.height)}}else e.setAttribute(n,o)}for(let{name:t}of Array.from(n))t in r||e.removeAttribute(t);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(e,t,n),a=t.scrollData,s=t.inputData,t.tagName){case"AUDIO":case"VIDEO":void 0!==t.paused&&(t.paused?e.pause():e.play()),void 0!==t.muted&&(e.muted=t.muted),void 0!==t.volume&&(e.volume=t.volume),void 0!==t.currentTime&&(e.currentTime=t.currentTime),void 0!==t.playbackRate&&(e.playbackRate=t.playbackRate);break;case"CANVAS":if(null!==t.rr_dataURL){let i=document.createElement("img");i.onload=()=>{let t=e.getContext("2d");t&&t.drawImage(i,0,0,i.width,i.height)},i.src=t.rr_dataURL}t.canvasMutations.forEach(t=>i.applyCanvas(t.event,t.mutation,e));break;case"STYLE":{let n=e.sheet;
14n&&t.rules.forEach(e=>i.applyStyleSheetMutation(e,n))}}if(t.shadowRoot){e.shadowRoot||e.attachShadow({mode:"open"});let r=e.shadowRoot.childNodes,o=t.shadowRoot.childNodes;(r.length>0||o.length>0)&&eW(Array.from(r),o,e.shadowRoot,i,n)}break;case tb.Text:case tb.Comment:case tb.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}if(a&&i.applyScroll(a,!0),s&&i.applyInput(s),"IFRAME"===t.nodeName){let r=e.contentDocument;if(r){let e=n.getMeta(t.contentDocument);e&&i.mirror.add(r,Object.assign({},e)),eG(r,t.contentDocument,i,n)}}}function eW(e,t,i,n,r){var o;let s,a,l=0,c=e.length-1,u=0,d=t.length-1,h=e[l],p=e[c],g=t[u],m=t[d];for(;l<=c&&u<=d;){let f=n.mirror.getId(h),y=n.mirror.getId(p),v=r.getId(g),C=r.getId(m);if(void 0===h)h=e[++l];else if(void 0===p)p=e[--c];else if(-1!==f&&f===v)eG(h,g,n,r),h=e[++l],g=t[++u];else if(-1!==y&&y===C)eG(p,m,n,r),p=e[--c],m=t[--d];else if(-1!==f&&f===C)i.insertBefore(h,p.nextSibling),eG(h,m,n,r),h=e[++l],m=t[--d];else if(-1!==y&&y===v)i.insertBefore(p,h),eG(p,g,n,r),p=e[--c],g=t[++u];else{if(!s){s={};for(let t=l;t<=c;t++){let i=e[t];i&&n.mirror.hasNode(i)&&(s[n.mirror.getId(i)]=t)}}if(a=s[r.getId(g)]){let t=e[a];i.insertBefore(t,h),eG(t,g,n,r),e[a]=void 0}else{let t=e_(g,n.mirror,r);"#document"===i.nodeName&&(null===(o=n.mirror.getMeta(t))||void 0===o?void 0:o.type)===tb.Element&&i.documentElement&&(i.removeChild(i.documentElement),e[l]=void 0,h=void 0),i.insertBefore(t,h||null),eG(t,g,n,r)}g=t[++u]}}if(l>c){let e=t[d+1],o=null;for(e&&i.childNodes.forEach(t=>{n.mirror.getId(t)===r.getId(e)&&(o=t)});u<=d;++u){let e=e_(t[u],n.mirror,r);i.insertBefore(e,o),eG(e,t[u],n,r)}}else if(u>d)for(;l<=c;l++){let t=e[l];t&&(i.removeChild(t),n.mirror.removeNodeFromMap(t))}}function e_(e,t,i){let n=i.getId(e),r=i.getMeta(e),o=null;if(n>-1&&(o=t.getNode(n)),null!==o)return o;switch(e.RRNodeType){case tb.Document:o=new Document;break;case tb.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case tb.Element:{let t=e.tagName.toLowerCase();t=eV[t]||t,o=r&&"isSVG"in r&&(null==r?void 0:r.isSVG)?document.createElementNS(eL.svg,t):document.createElement(e.tagName);break}case tb.Text:o=document.createTextNode(e.data);break;case tb.Comment:o=document.createComment(e.data);break;case tb.CDATA:o=document.createCDATASection(e.data)}return r&&t.add(o,Object.assign({},r)),o}class eZ extends(function(e){return class t extends e{constructor(){super(...arguments),this.nodeType=tS.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=tb.Document,this.textContent=null}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===tb.Element&&"HTML"===e.tagName)||null}get body(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find(e=>e.RRNodeType===tb.Element&&"BODY"===e.tagName))||null}get head(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find(e=>e.RRNodeType===tb.Element&&"HEAD"===e.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===tb.Element||t===tb.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===t))throw Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===tb.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);return e.parentElement=null,e.parentNode=this,this.childNodes.push(e),e}insertBefore(e,t){let i=e.RRNodeType;if((i===tb.Element||i===tb.DocumentType)&&this.childNodes.some(e=>e.RRNodeType===i))throw Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===tb.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);if(null===t)return this.appendChild(e);let n=this.childNodes.indexOf(t);if(-1==n)throw 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(n,0,e),e.parentElement=null,e.parentNode=this,e}removeChild(e){let t=this.childNodes.indexOf(e);if(-1===t)throw Error("Failed to execute 'removeChild' on 'RRDocument': The RRNode to be removed is not a child of this RRNode.");return this.childNodes.splice(t,1),e.parentElement=null,e.parentNode=null,e}open(){this.childNodes=[]}close(){}write(e){let t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let e=this.createDocumentType("html",t,"");this.open(),this.appendChild(e)}}createDocument(e,i,n){return new t}createDocumentType(e,t,i){let n=new(ex(eM))(e,t,i);return n.ownerDocument=this,n}createElement(e){let t=new(eR(eM))(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new(ek(eM))(e);return t.ownerDocument=this,t}createComment(e){let t=new(eF(eM))(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new(eO(eM))(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}}
14)(eM){constructor(e){super(),this.UNSERIALIZED_STARTING_ID=-2,this._unserializedId=this.UNSERIALIZED_STARTING_ID,this.mirror=new ej,this.scrollData=null,e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,i){return new eZ}createDocumentType(e,t,i){let n=new eU(e,t,i);return n.ownerDocument=this,n}createElement(e){let t;let i=e.toUpperCase();switch(i){case"AUDIO":case"VIDEO":t=new eK(i);break;case"IFRAME":t=new eQ(i,this.mirror);break;case"CANVAS":t=new eY(i);break;case"STYLE":t=new eP(i);break;default:t=new e$(i)}return t.ownerDocument=this,t}createComment(e){let t=new eJ(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new eX(e);return t.ownerDocument=this,t}createTextNode(e){let t=new ez(e);return t.ownerDocument=this,t}destroyTree(){this.childNodes=[],this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}let eU=ex(eM);class e$ extends eR(eM){constructor(){super(...arguments),this.inputData=null,this.scrollData=null}}class eK extends(function(e){return class extends e{attachShadow(e){throw Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}})(e$){}class eY extends e${constructor(){super(...arguments),this.rr_dataURL=null,this.canvasMutations=[]}getContext(){return null}}class eP extends e${constructor(){super(...arguments),this.rules=[]}}class eQ extends e${constructor(e,t){super(e),this.contentDocument=new eZ,this.contentDocument.mirror=t}}let ez=ek(eM),eJ=eF(eM),eX=eO(eM);function eH(e,t,i,n){let r;switch(e.nodeType){case tS.DOCUMENT_NODE:n&&"IFRAME"===n.nodeName?r=n.contentDocument:(r=t).compatMode=e.compatMode;break;case tS.DOCUMENT_TYPE_NODE:r=t.createDocumentType(e.name,e.publicId,e.systemId);break;case tS.ELEMENT_NODE:{let i=e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase(),n=r=t.createElement(i);for(let{name:t,value:i}of Array.from(e.attributes))n.attributes[t]=i;e.scrollLeft&&(n.scrollLeft=e.scrollLeft),e.scrollTop&&(n.scrollTop=e.scrollTop);break}case tS.TEXT_NODE:r=t.createTextNode(e.textContent||"");break;case tS.CDATA_SECTION_NODE:r=t.createCDATASection(e.data);break;case tS.COMMENT_NODE:r=t.createComment(e.textContent||"");break;case tS.DOCUMENT_FRAGMENT_NODE:r=n.attachShadow({mode:"open"});break;default:return null}let o=i.getMeta(e);return t instanceof eZ&&(o||(o=eq(r,t.unserializedId),i.add(e,o)),t.mirror.add(r,Object.assign({},o))),r}class ej{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return -1;let i=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!=i?i:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let e=this.nodeMetaMap.get(i);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function eq(e,t){switch(e.RRNodeType){case tb.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case tb.DocumentType:return{id:t,type:e.RRNodeType,name:e.name,publicId:e.publicId,systemId:e.systemId};case tb.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case tb.Text:case tb.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case tb.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}var e0=Uint8Array,e1=Uint16Array,e2=Uint32Array,e4=new e0([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),e3=new e0([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),e8=new e0([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e9=function(e,t){for(var i=new e1(31),n=0;n<31;++n)i[n]=t+=1<<e[n-1];var r=new e2(i[30]);for(n=1;n<30;++n)for(var o=i[n];o<i[n+1];++o)r[o]=o-i[n]<<5|n;return[i,r]},e5=e9(e4,2),e6=e5[0],e7=e5[1];e6[28]=258,e7[258]=28;for(var te=e9(e3,0)[0],tt=new e1(32768),ti=0;ti<32768;++ti){var tn=(43690&ti)>>>1|(21845&ti)<<1;tn=(61680&(tn=(52428&tn)>>>2|(13107&tn)<<2))>>>4|(3855&tn)<<4,tt[ti]=((65280&tn)>>>8|(255&tn)<<8)>>>1}
14var tr=function(e,t,i){for(var n=e.length,r=0,o=new e1(t);r<n;++r)++o[e[r]-1];var s,a=new e1(t);for(r=0;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;if(i){s=new e1(1<<t);var l=15-t;for(r=0;r<n;++r)if(e[r])for(var c=r<<4|e[r],u=t-e[r],d=a[e[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[tt[d]>>>l]=c}else for(s=new e1(n),r=0;r<n;++r)s[r]=tt[a[e[r]-1]++]>>>15-e[r];return s},to=new e0(288);for(ti=0;ti<144;++ti)to[ti]=8;for(ti=144;ti<256;++ti)to[ti]=9;for(ti=256;ti<280;++ti)to[ti]=7;for(ti=280;ti<288;++ti)to[ti]=8;var ts=new e0(32);for(ti=0;ti<32;++ti)ts[ti]=5;var ta=tr(to,9,1),tl=tr(ts,5,1),tc=function(e){for(var t=e[0],i=1;i<e.length;++i)e[i]>t&&(t=e[i]);return t},tu=function(e,t,i){var n=t/8>>0;return(e[n]|e[n+1]<<8)>>>(7&t)&i},td=function(e,t){var i=t/8>>0;return(e[i]|e[i+1]<<8|e[i+2]<<16)>>>(7&t)},th=function(e,t,i){(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length);var n=new(e instanceof e1?e1:e instanceof e2?e2:e0)(i-t);return n.set(e.subarray(t,i)),n};let tp=e=>{if("string"!=typeof e)return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch(e){}try{var t;let i=JSON.parse(function(e,t){var i="";if(!t&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);for(var n=0;n<e.length;){var r=e[n++];r<128||t?i+=String.fromCharCode(r):r<224?i+=String.fromCharCode((31&r)<<6|63&e[n++]):r<240?i+=String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r))}return i}((t=function(e,t){var i=e.length;if(!t&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(e);for(var n=new e0(e.length+(e.length>>>1)),r=0,o=function(e){n[r++]=e},s=0;s<i;++s){if(r+5>n.length){var a=new e0(r+8+(i-s<<1));a.set(n),n=a}var l=e.charCodeAt(s);l<128||t?o(l):(l<2048?o(192|l>>>6):(l>55295&&l<57344?(o(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++s))>>>18),o(128|l>>>12&63)):o(224|l>>>12),o(128|l>>>6&63)),o(128|63&l))}return th(n,0,r)}(e,!0),function(e,t,i){var n=e.length,r=!t||i,o=!i||i.i;i||(i={}),t||(t=new e0(3*n));var s,a=function(e){var i=t.length;if(e>i){var n=new e0(Math.max(2*i,e));n.set(t),t=n}},l=i.f||0,c=i.p||0,u=i.b||0,d=i.l,h=i.d,p=i.m,g=i.n,m=8*n;do{if(!d){i.f=l=tu(e,c,1);var f=tu(e,c+1,3);if(c+=3,!f){var y=e[(D=((s=c)/8>>0)+(7&s&&1)+4)-4]|e[D-3]<<8,v=D+y;if(v>n){if(o)throw"unexpected EOF";break}r&&a(u+y),t.set(e.subarray(D,v),u),i.b=u+=y,i.p=c=8*v;continue}if(1==f)d=ta,h=tl,p=9,g=5;else{if(2!=f)throw"invalid block type";var C=tu(e,c,31)+257,I=tu(e,c+10,15)+4,A=C+tu(e,c+5,31)+1;c+=14;for(var b=new e0(A),N=new e0(19),w=0;w<I;++w)N[e8[w]]=tu(e,c+3*w,7);c+=3*I;var E=tc(N),T=(1<<E)-1;if(!o&&c+A*(E+7)>m)break;var S=tr(N,E,1);for(w=0;w<A;){var D,M=S[tu(e,c,T)];if(c+=15&M,(D=M>>>4)<16)b[w++]=D;else{var x=0,R=0;for(16==D?(R=3+tu(e,c,3),c+=2,x=b[w-1]):17==D?(R=3+tu(e,c,7),c+=3):18==D&&(R=11+tu(e,c,127),c+=7);R--;)b[w++]=x}}var k=b.subarray(0,C),F=b.subarray(C);p=tc(k),g=tc(F),d=tr(k,p,1),h=tr(F,g,1)}if(c>m)throw"unexpected EOF"}r&&a(u+131072);for(var O=(1<<p)-1,B=(1<<g)-1,L=p+g+18;o||c+L<m;){var V=(x=d[td(e,c)&O])>>>4;if((c+=15&x)>m)throw"unexpected EOF";if(!x)throw"invalid length/literal";if(V<256)t[u++]=V;else{if(256==V){d=null;break}var G=V-254;if(V>264){var W=e4[w=V-257];G=tu(e,c,(1<<W)-1)+e6[w],c+=W}var _=h[td(e,c)&B],Z=_>>>4;if(!_)throw"invalid distance";if(c+=15&_,F=te[Z],Z>3&&(W=e3[Z],F+=td(e,c)&(1<<W)-1,c+=W),c>m)throw"unexpected EOF";r&&a(u+131072);for(var U=u+G;u<U;u+=4)t[u]=t[u-F],t[u+1]=t[u+1-F],t[u+2]=t[u+2-F],t[u+3]=t[u+3-F];u=U}}i.l=d,i.p=c,i.b=u,d&&(l=1,i.m=p,i.d=h,i.n=g)}while(!l);return u==t.length?t:th(t,0,u)}((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(t),t.subarray(2,-4)),void 0))));if("v1"===i.v)return i;throw Error(`These events were packed with packer ${i.v} which is incompatible with current packer v1.`)}catch(e){throw console.error(e),Error("Unknown data format.")}};function tg(e){return{all:e=e||new Map,on:function(t,i){var n=e.get(t);n?n.push(i):e.set(t,[i])},off:function(t,i){var n=e.get(t);n&&(i?n.splice(n.indexOf(i)>>>0,1):e.set(t,[]))},emit:function(t,i){var n=e.get(t);n&&n.slice().map(function(e){e(i)}),(n=e.get("*"))&&n.slice().map(function(e){e(t,i)})}}}var tm,tf,ty,tv,tC,tI,tA,tb,tN,tw,tE,tT,tS,tD,tM=Object.freeze({__proto__:null,default:tg});class tx{constructor(e=[],t){this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t.speed,this.liveMode=t.liveMode}addAction(e){if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)return void this.actions.push(e);let t=this.findActionIndex(e);this.actions.splice(t,0,e)}start(){this.timeOffset=0;let e=performance.now(),t=()=>{let i=performance.now();for(this.timeOffset+=(i-e)*this.speed,e=i;this.actions.length;){let e=this.actions[0];if(!(this.timeOffset>=e.delay))break;this.actions.shift(),e.doAction()}(this.actions.length>0||this.liveMode)&&(this.raf=requestAnimationFrame(t))};this.raf=requestAnimationFrame(t)}clear(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}toggleLiveMode(e){this.liveMode=e}isActive(){return null!==this.raf}findActionIndex(e){let t=0,i=this.actions.length-1;for(;t<=i;){let n=Math.floor((t+i)/2);if(this.actions[n].delay<e.delay)t=n+1;else{if(!(this.actions[n].delay>e.delay))return n+1;i=n-1}}return t}}function tR(e,t){if(e.type===ep.IncrementalSnapshot&&e.data.source===eg.MouseMove&&e.data.positions&&e.data.positions.length){let i=e.data.positions[0].timeOffset,n=e.timestamp+i;
vendor: 4,854 bytes, lines 14-27
14return e.delay=n-t,n-t}return e.delay=e.timestamp-t,e.delay}/*! ***************************************************************************** 15Copyright (c) Microsoft Corporation. 16 17Permission to use, copy, modify, and/or distribute this software for any 18purpose with or without fee is hereby granted. 19 20THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 21REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 22AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 23INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 24LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 25OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 26PERFORMANCE OF THIS SOFTWARE. 27***************************************************************************** */function tk(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var n,r,o=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return s}(o=tD||(tD={}))[o.NotStarted=0]="NotStarted",o[o.Running=1]="Running",o[o.Stopped=2]="Stopped";var tF={type:"xstate.init"};function tO(e){return void 0===e?[]:[].concat(e)}function tB(e){return{type:"xstate.assign",assignment:e}}function tL(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function tV(e){return function(t){return e===t}}function tG(e){return"string"==typeof e?{type:e}:e}function tW(e,t){return{value:e,context:t,actions:[],changed:!1,matches:tV(e)}}function t_(e,t,i){var n=t,r=!1;return[e.filter(function(e){if("xstate.assign"===e.type){r=!0;var t=Object.assign({},n);return"function"==typeof e.assignment?t=e.assignment(n,i):Object.keys(e.assignment).forEach(function(r){t[r]="function"==typeof e.assignment[r]?e.assignment[r](n,i):e.assignment[r]}),n=t,!1}return!0}),n,r]}function tZ(e,t){void 0===t&&(t={});var i=tk(t_(tO(e.states[e.initial].entry).map(function(e){return tL(e,t.actions)}),e.context,tF),2),n=i[0],r=i[1],o={config:e,_options:t,initialState:{value:e.initial,actions:n,context:r,matches:tV(e.initial)},transition:function(t,i){var n,r,s="string"==typeof t?{value:t,context:e.context}:t,a=s.value,l=s.context,c=tG(i),u=e.states[a];if(u.on){var d=tO(u.on[c.type]);try{for(var h=function(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],n=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(void 0===g)return tW(a,l);var m="string"==typeof g?{target:g}:g,f=m.target,y=m.actions,v=void 0===y?[]:y,C=m.cond,I=void 0===C?function(){return!0}:C,A=void 0===f,b=null!=f?f:a,N=e.states[b];if(I(l,c)){var w=tk(t_((A?tO(v):[].concat(u.exit,v,N.entry).filter(function(e){return e})).map(function(e){return tL(e,o._options.actions)}),l,c),3),E=w[0],T=w[1],S=w[2],D=null!=f?f:a;return{value:D,context:T,actions:E,changed:f!==a||E.length>0||S,matches:tV(D)}}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}return tW(a,l)}};return o}var tU=function(e,t){return e.actions.forEach(function(i){var n=i.exec;return n&&n(e.context,t)})};function t$(e){var t=e.initialState,i=tD.NotStarted,n=new Set,r={_machine:e,send:function(r){i===tD.Running&&(tU(t=e.transition(t,r),tG(r)),n.forEach(function(e){return e(t)}))},subscribe:function(e){return n.add(e),e(t),{unsubscribe:function(){return n.delete(e)}}},start:function(n){if(n){var o="object"==typeof n?n:{context:e.config.context,value:n};t={value:o.value,actions:[],context:o.context,matches:tV(o.value)}}return i=tD.Running,tU(t,tF),r},stop:function(){return i=tD.Stopped,n.clear(),r},get state(){return t},get status(){return i}};return r}let tK=new Map;function tY(e,t){let i=tK.get(e);return i||(i=new Map,tK.set(e,i)),i.has(t)||i.set(t,[]),i.get(t)}function tP(e,t,i){return n=>ev(this,void 0,void 0,function*(){if(n&&"object"==typeof n&&"rr_type"in n){if(i&&(i.isUnchanged=!1),"ImageBitmap"===n.rr_type&&"args"in n){let r=yield tP(e,t,i)(n.args);return yield createImageBitmap.apply(null,r)}if("index"in n){if(i||null===t)return n;let{rr_type:e,index:r}=n;return tY(t,e)[r]}if("args"in n){let{rr_type:r,args:o}=n;return new window[r](...yield Promise.all(o.map(tP(e,t,i))))}if("base64"in n)return function(e){var t,i,n,r,o,s=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(t=0;t<a;t+=4)i=eI[e.charCodeAt(t)],n=eI[e.charCodeAt(t+1)],r=eI[e.charCodeAt(t+2)],o=eI[e.charCodeAt(t+3)],u[l++]=i<<2|n>>
274,u[l++]=(15&n)<<4|r>>2,u[l++]=(3&r)<<6|63&o;return c}(n.base64);if("src"in n){let t=e.get(n.src);if(t)return t;{let t=new Image;return t.src=n.src,e.set(n.src,t),t}}if("data"in n&&"Blob"===n.rr_type){let r=yield Promise.all(n.data.map(tP(e,t,i)));return new Blob(r,{type:n.type})}}else if(Array.isArray(n))return yield Promise.all(n.map(tP(e,t,i)));return n})}let tQ=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function tz({event:e,mutation:t,target:i,imageMap:n,canvasEventMap:r,errorHandler:o}){return ev(this,void 0,void 0,function*(){try{let s=r.get(e)||t,a="commands"in s?s.commands:[s];if([ef.WebGL,ef.WebGL2].includes(t.type)){for(let e=0;e<a.length;e++){let r=a[e];yield function({mutation:e,target:t,type:i,imageMap:n,errorHandler:r}){return ev(this,void 0,void 0,function*(){try{let r=function(e,t){try{return t===ef.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(e){return null}}(t,i);if(!r)return;if(e.setter)return void(r[e.property]=e.args[0]);let o=r[e.property],s=yield Promise.all(e.args.map(tP(n,r)));!function(e,t){if(!(null==t?void 0:t.constructor))return;let{name:i}=t.constructor;if(!tQ.includes(i))return;let n=tY(e,i);n.includes(t)||n.push(t)}(r,o.apply(r,s))}catch(t){r(e,t)}})}({mutation:r,type:t.type,target:i,imageMap:n,errorHandler:o})}return}for(let t=0;t<a.length;t++){let r=a[t];yield function({event:e,mutation:t,target:i,imageMap:n,errorHandler:r}){return ev(this,void 0,void 0,function*(){try{let r=i.getContext("2d");if(t.setter)return void(r[t.property]=t.args[0]);let o=r[t.property];if("drawImage"===t.property&&"string"==typeof t.args[0])n.get(e),o.apply(r,t.args);else{let e=yield Promise.all(t.args.map(tP(n,r)));o.apply(r,e)}}catch(e){r(t,e)}})}({event:e,mutation:r,target:i,imageMap:n,errorHandler:o})}}catch(e){o(t,e)}})}let tJ=tg||tM,tX={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function tH(e){return e.type==ep.IncrementalSnapshot&&(e.data.source==eg.TouchMove||e.data.source==eg.MouseInteraction&&e.data.type==em.TouchStart)}class tj{constructor(e,t){if(this.usingVirtualDom=!1,this.virtualDom=new eZ,this.mouseTail=null,this.tailPositions=[],this.emitter=tJ(),this.legacy_missingNodeRetryMap={},this.cache=er(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=new H,this.styleMirror=new eh,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=e=>{for(let t of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))t&&(t.setAttribute("width",String(e.width)),t.setAttribute("height",String(e.height)))},this.applyEventsSynchronously=e=>{for(let t of e){switch(t.type){case ep.DomContentLoaded:case ep.Load:case ep.Custom:continue;case ep.FullSnapshot:case ep.Meta:case ep.Plugin:case ep.IncrementalSnapshot:}this.getCastFn(t,!0)()}!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},this.getCastFn=(e,t=!1)=>{let i;switch(e.type){case ep.DomContentLoaded:case ep.Load:break;case ep.Custom:i=()=>{this.emitter.emit(ey.CustomEvent,e)};break;case ep.Meta:i=()=>this.emitter.emit(ey.Resize,{width:e.data.width,height:e.data.height});break;case ep.FullSnapshot:i=()=>{var i;if(this.firstFullSnapshot){if(this.firstFullSnapshot===e)return void(this.firstFullSnapshot=!0)}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(e,t),null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo(e.data.initialOffset),this.styleMirror.reset()};break;case ep.IncrementalSnapshot:i=()=>{if(this.applyIncremental(e,t),!t&&(e===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let t of this.service.state.context.events)if(!(t.timestamp<=e.timestamp)&&this.isUserInteraction(t)){t.delay-e.delay>1e4*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=t);break}if(this.nextUserInteractionEvent){let t={speed:Math.min(Math.round((this.nextUserInteractionEvent.delay-e.delay)/5e3),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:t}),this.emitter.emit(ey.SkipStart,t)}}}}return()=>{for(let n of(i&&i(),this.config.plugins||[]))n.handler&&n.handler(e,t,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:e}});let n=this.service.state.context.events.length-1;if(e===this.service.state.context.events[n]){let t=()=>{n<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(ey.Finish))};e.type===ep.IncrementalSnapshot&&e.data.source===eg.MouseMove&&e.data.positions.length?setTimeout(()=>{t()},Math.max(0,50-e.data.positions[0].timeOffset)):t()}this.emitter.emit(ey.EventCast,e)}},!(null==t?void 0:t.liveMode)&&e.length<2)throw Error("Replayer need at least 2 events.");let i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"rr
27-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:tX,useVirtualDom:!0};for(let e of(this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(ey.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))e.getMirror&&e.getMirror({nodeMirror:this.mirror});this.emitter.on(ey.Flush,()=>{if(this.usingVirtualDom){let e={mirror:this.mirror,applyCanvas:(e,t,i)=>{tz({event:e,mutation:t,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(e,t)=>{e.source===eg.StyleSheetRule?this.applyStyleSheetRule(e,t):e.source===eg.StyleDeclaration&&this.applyStyleDeclaration(e,t)}};if(this.iframe.contentDocument&&eG(this.iframe.contentDocument,this.virtualDom,e,this.virtualDom.mirror),this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let t in this.legacy_missingNodeRetryMap)try{let i=this.legacy_missingNodeRetryMap[t],n=e_(i.node,this.mirror,this.virtualDom.mirror);eG(n,i.node,e,this.virtualDom.mirror),i.node=n}catch(e){this.config.showWarning&&console.warn(e)}this.constructedStyleMutations.forEach(e=>{this.applyStyleSheetMutation(e)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(e=>{this.applyAdoptedStyleSheet(e)}),this.adoptedStyleSheets=[]}this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(ey.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset()});let n=new tx([],{speed:this.config.speed,liveMode:this.config.liveMode});this.service=function(e,{getCastFn:t,applyEventsSynchronously:i,emitter:n}){return t$(tZ({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:tB({lastPlayedEvent:(e,t)=>"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}),recordTimeOffset:tB((e,t)=>{let i=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(i=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:i,baselineTime:e.events[0].timestamp+i})}),play(e){var r;let{timer:o,events:s,baselineTime:a,lastPlayedEvent:l}=e;for(let e of(o.clear(),s))tR(e,a);let c=function(e,t){for(let i=e.length-1;i>=0;i--){let n=e[i];if(n.type===ep.Meta&&n.timestamp<=t)return e.slice(i)}return e}(s,a),u=null==l?void 0:l.timestamp;(null==l?void 0:l.type)===ep.IncrementalSnapshot&&l.data.source===eg.MouseMove&&(u=l.timestamp+(null===(r=l.data.positions[0])||void 0===r?void 0:r.timeOffset)),a<(u||0)&&n.emit(ey.PlayBack);let d=[];for(let e of c)if(!(u&&u<a&&(e.timestamp<=u||e===l))){if(e.timestamp<a)d.push(e);else{let i=t(e,!1);o.addAction({doAction:()=>{i()},delay:e.delay})}}i(d),n.emit(ey.Flush),o.start()},pause(e){e.timer.clear()},resetLastPlayedEvent:tB(e=>Object.assign(Object.assign({},e),{lastPlayedEvent:null})),startLive:tB({baselineTime:(e,t)=>(e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now())}),addEvent:tB((e,i)=>{let{baselineTime:n,timer:r,events:o}=e;if("ADD_EVENT"===i.type){let{event:e}=i.payload;tR(e,n);let s=o.length-1;if(!o[s]||o[s].timestamp<=e.timestamp)o.push(e);else{let t=-1,i=0;for(;i<=s;){let t=Math.floor((i+s)/2);o[t].timestamp<=e.timestamp?i=t+1:s=t-1}-1===t&&(t=i),o.splice(t,0,e)}let a=e.timestamp<n,l=t(e,a);a?l():r.isActive()&&r.addAction({doAction:()=>{l()},delay:e.delay})}return Object.assign(Object.assign({},e),{events:o})})}}))}({events:e.map(e=>t&&t.unpackFn?t.unpackFn(e):e).sort((e,t)=>
vendor: 5,451 bytes, line 27
27e.timestamp-t.timestamp),timer:n,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(e=>{this.emitter.emit(ey.StateChange,{player:e})}),this.speedService=t$(tZ({id:"speed",context:{normalSpeed:-1,timer:n},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(e,t)=>{"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:tB({normalSpeed:e=>e.timer.speed}),restoreSpeed:e=>{e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe(e=>{this.emitter.emit(ey.StateChange,{speed:e})});let r=this.service.state.context.events.find(e=>e.type===ep.Meta),o=this.service.state.context.events.find(e=>e.type===ep.FullSnapshot);if(r){let{width:e,height:t}=r.data;setTimeout(()=>{this.emitter.emit(ey.Resize,{width:e,height:t})},0)}o&&setTimeout(()=>{var e;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),null===(e=this.iframe.contentWindow)||void 0===e||e.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(tH)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),void 0!==e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),void 0!==e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,i;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(i=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===i||i.classList.remove("rrweb-paused"),this.emitter.emit(ey.Start)}pause(e){var t,i;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(i=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===i||i.classList.add("rrweb-paused"),this.emitter.emit(ey.Pause)}resume(e=0){console.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(ey.Resume)}destroy(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(ey.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;tH(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=er()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(function(e=window,t=document){var i;if("scrollBehavior"in t.documentElement.style&&!0!==e.__forceSmoothScrollPolyfill__)return;let n=e.HTMLElement||e.Element,r={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||a,scrollIntoView:n.prototype.scrollIntoView},o=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(i=e.navigator.userAgent,RegExp("MSIE |Trident/|Edge/").test(i)?1:0);function a(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;
27if("object"==typeof e&&"smooth"===e.behavior)return!1;throw TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function u(t,i){let n=e.getComputedStyle(t,null)["overflow"+i];return"auto"===n||"scroll"===n}function d(i,n,s){let l,c,u,d;let h=o();i===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=r.scroll):(l=i,c=i.scrollLeft,u=i.scrollTop,d=a),function t(i){let n,r,s,a=(o()-i.startTime)/468;n=.5*(1-Math.cos(Math.PI*(a=a>1?1:a))),r=i.startX+(i.x-i.startX)*n,s=i.startY+(i.y-i.startY)*n,i.method.call(i.scrollable,r,s),r===i.x&&s===i.y||e.requestAnimationFrame(t.bind(e,i))}({scrollable:l,method:d,startTime:h,startX:c,startY:u,x:n,y:s})}e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?d.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):r.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?r.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):d.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(void 0===arguments[0])return;if(!0===l(arguments[0])){if("number"==typeof arguments[0]&&void 0===arguments[1])throw SyntaxError("Value could not be converted");return void r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}let e=arguments[0].left,t=arguments[0].top;d.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)},n.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):r.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},n.prototype.scrollIntoView=function(){if(!0===l(arguments[0]))return void r.scrollIntoView.call(this,void 0===arguments[0]||arguments[0]);let i=function(e){for(;e!==t.body&&!1===function(e){let t=c(e,"Y")&&u(e,"Y"),i=c(e,"X")&&u(e,"X");return t||i}(e);)e=e.parentNode||e.host;return e}(this),n=i.getBoundingClientRect(),o=this.getBoundingClientRect();i!==t.body?(d.call(this,i,i.scrollLeft+o.left-n.left,i.scrollTop+o.top-n.top),"fixed"!==e.getComputedStyle(i).position&&e.scrollBy({left:n.left,top:n.top,behavior:"smooth"})):e.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}}(this.iframe.contentWindow,this.iframe.contentDocument),function(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=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){var i,n,r,o,s,a,l,c,u;if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&console.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let d=[],h=(e,t)=>{for(let i of(this.collectIframeAndAttachDocument(d,e),this.config.plugins||[]))i.onBuild&&i.onBuild(e,{id:t,replayer:this})};for(let{mutationInQueue:t,builtNode:p}of(i=e.data.node,r=(n={doc:this.iframe.contentDocument,afterAppend:h,cache:this.cache,mirror:this.mirror}).doc,o=n.onVisit,s=n.hackCss,a=n.afterAppend,l=n.cache,eo(i,{doc:r,mirror:u=void 0===(c=n.mirror)?new H:c,skipChild:!1,hackCss:void 0===s||s,afterAppend:a,cache:l}),function(e,t){for(var i=0,n=e.getIds();i<n.length;i++){var r=n[i];e.has(r)&&t(e.getNode(r))}}(u,function(e){o&&o(e),function(e,t){var i=t.getMeta(e);
27if((null==i?void 0:i.type)===tA.Element){for(var n in i.attributes)if(Object.prototype.hasOwnProperty.call(i.attributes,n)&&n.startsWith("rr_")){var r=i.attributes[n];"rr_scrollLeft"===n&&(e.scrollLeft=r),"rr_scrollTop"===n&&(e.scrollTop=r)}}}(e,u)}),h(this.iframe.contentDocument,e.data.node.id),d))this.attachDocumentToIframe(t,p),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t);let{documentElement:p,head:g}=this.iframe.contentDocument;this.insertStyleRules(p,g),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(ey.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var i,n;let r=(n=this.config.blockClass,[`.${n} { background: currentColor }`,"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){let i=this.virtualDom.createElement("style");this.virtualDom.mirror.add(i,eq(i,this.virtualDom.unserializedId)),e.insertBefore(i,t),i.rules.push({source:eg.StyleSheetRule,adds:r.map((e,t)=>({rule:e,index:t}))})}else{let n=document.createElement("style");e.insertBefore(n,t);for(let e=0;e<r.length;e++)null===(i=n.sheet)||void 0===i||i.insertRule(r[e],e)}}attachDocumentToIframe(e,t){let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],r=(e,r)=>{this.collectIframeAndAttachDocument(n,e);let o=i.getMeta(e);if((null==o?void 0:o.type)===tA.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){let{documentElement:e,head:i}=t.contentDocument;this.insertStyleRules(e,i)}for(let t of this.config.plugins||[])t.onBuild&&t.onBuild(e,{id:r,replayer:this})};for(let{mutationInQueue:o,builtNode:s}of(eo(e.node,{doc:t.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:r,cache:this.cache}),r(t.contentDocument,e.node.id),n))this.attachDocumentToIframe(o,s),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==o)}collectIframeAndAttachDocument(e,t){if(el(t,this.mirror)){let i=this.newDocumentQueue.find(e=>e.parentId===this.mirror.getId(t));i&&e.push({mutationInQueue:i,builtNode:t})}}waitForStylesheetLoad(){var e;let t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(t){let e=new Set,i,n=this.service.state,r=()=>{n=this.service.state};this.emitter.on(ey.Start,r),this.emitter.on(ey.Pause,r);let o=()=>{this.emitter.off(ey.Start,r),this.emitter.off(ey.Pause,r)};t.querySelectorAll('link[rel="stylesheet"]').forEach(t=>{t.sheet||(e.add(t),t.addEventListener("load",()=>{e.delete(t),0===e.size&&-1!==i&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(ey.LoadStylesheetEnd),i&&clearTimeout(i),o())}))}),e.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(ey.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,o()},this.config.loadTimeout))}}preloadAllImages(){return ev(this,void 0,void 0,function*(){this.service.state;let e=()=>{this.service.state};this.emitter.on(ey.Start,e),this.emitter.on(ey.Pause,e);let t=[];for(let e of this.service.state.context.events)e.type===ep.IncrementalSnapshot&&e.data.source===eg.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(e.data,e)),("commands"in e.data?e.data.commands:[e.data]).forEach(t=>{this.preloadImages(t,e)}));return Promise.all(t)})}preloadImages(e,t){if("drawImage"===e.property&&"string"==typeof e.args[0]&&!this.imageMap.has(t)){let t=document.createElement("canvas"),i=t.getContext("2d"),n=null==i?void 0:i.createImageData(t.width,t.height);null==n||n.data,JSON.parse(e.args[0]),null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(e,t){return ev(this,void 0,void 0,function*(){if(!this.canvasEventMap.has(t)){let i={isUnchanged:!0};if("commands"in e){let n=yield Promise.all(e.commands.map(e=>ev(this,void 0,void 0,function*(){let t=yield Promise.all(e.args.map(tP(this.imageMap,null,i)));return Object.assign(Object.assign({},e),{args:t})})));!1===i.isUnchanged&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{commands:n}))}else{let n=yield Promise.all(e.args.map(tP(this.imageMap,null,i)));!1===i.isUnchanged&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{args:n}))}}})}applyIncremental(e,t){var i,n,r;let{data:o}=e;switch(o.source){case eg.Mutation:try{this.applyMutation(o,t)}catch(e){this.warn(`Exception in mutation ${e.message||e}`,o)}break;case eg.Drag:case eg.TouchMove:case eg.MouseMove:if(t){let e=o.positions[o.positions.length-1];this.mousePos={x:e.x,y:e.y,id:e.id,debugData:o}}else o.positions.forEach(i=>
27{let n={doAction:()=>{this.moveAndHover(i.x,i.y,i.id,t,o)},delay:i.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(n)}),this.timer.addAction({doAction(){},delay:e.delay-(null===(i=o.positions[0])||void 0===i?void 0:i.timeOffset)});break;case eg.MouseInteraction:{if(-1===o.id||t)break;let e=new Event(em[o.type].toLowerCase()),i=this.mirror.getNode(o.id);if(!i)return this.debugNodeNotFound(o,o.id);this.emitter.emit(ey.MouseInteraction,{type:o.type,target:i});let{triggerFocus:n}=this.config;switch(o.type){case em.Blur:"blur"in i&&i.blur();break;case em.Focus:n&&i.focus&&i.focus({preventScroll:!0});break;case em.Click:case em.TouchStart:case em.TouchEnd:t?(o.type===em.TouchStart?this.touchActive=!0:o.type===em.TouchEnd&&(this.touchActive=!1),this.mousePos={x:o.x,y:o.y,id:o.id,debugData:o}):(o.type===em.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x,o.y,o.id,t,o),o.type===em.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===em.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===em.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case em.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:i.dispatchEvent(e)}break}case eg.Scroll:if(-1===o.id)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(o.id);if(!e)return this.debugNodeNotFound(o,o.id);e.scrollData=o;break}this.applyScroll(o,t);break;case eg.ViewportResize:this.emitter.emit(ey.Resize,{width:o.width,height:o.height});break;case eg.Input:if(-1===o.id)break;if(this.usingVirtualDom){let e=this.virtualDom.mirror.getNode(o.id);if(!e)return this.debugNodeNotFound(o,o.id);e.inputData=o;break}this.applyInput(o);break;case eg.MediaInteraction:{let e=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!e)return this.debugNodeNotFound(o,o.id);try{o.currentTime&&(e.currentTime=o.currentTime),o.volume&&(e.volume=o.volume),o.muted&&(e.muted=o.muted),1===o.type&&e.pause(),0===o.type&&e.play(),4===o.type&&(e.playbackRate=o.playbackRate)}catch(e){this.config.showWarning&&console.warn(`Failed to replay media interactions: ${e.message||e}`)}break}case eg.StyleSheetRule:case eg.StyleDeclaration:this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&(null===(n=this.virtualDom.mirror.getNode(o.id))||void 0===n||n.rules.push(o)):this.applyStyleSheetMutation(o);break;case eg.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let t=this.virtualDom.mirror.getNode(o.id);if(!t)return this.debugNodeNotFound(o,o.id);t.canvasMutations.push({event:e,mutation:o})}else{let t=this.mirror.getNode(o.id);if(!t)return this.debugNodeNotFound(o,o.id);tz({event:e,mutation:o,target:t,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case eg.Font:try{let e=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);null===(r=this.iframe.contentDocument)||void 0===r||r.fonts.add(e)}catch(e){this.config.showWarning&&console.warn(e)}break;case eg.Selection:if(t){this.lastSelectionData=o;break}this.applySelection(o);break;case eg.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o)}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,function(e,t=new eb,i=new eZ){(function e(n,r){let o=eH(n,i,t,r);if(null!==o){if("IFRAME"!==(null==r?void 0:r.nodeName)&&n.nodeType!==tS.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(o),o.parentNode=r,o.parentElement=r),"IFRAME"===n.nodeName){let t=n.contentDocument;t&&e(t,o)}else n.nodeType!==tS.DOCUMENT_NODE&&n.nodeType!==tS.ELEMENT_NODE&&n.nodeType!==tS.DOCUMENT_FRAGMENT_NODE||(n.nodeType===tS.ELEMENT_NODE&&n.shadowRoot&&e(n.shadowRoot,o),n.childNodes.forEach(t=>e(t,o)))}})(e,null)}(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let e in this.legacy_missingNodeRetryMap)try{let t=this.legacy_missingNodeRetryMap[e],i=eH(t.node,this.virtualDom,this.mirror);
27i&&(t.node=i)}catch(e){this.config.showWarning&&console.warn(e)}let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes.forEach(t=>{var n;let r=i.getNode(t.id);if(!r){if(e.removes.find(e=>e.id===t.parentId))return;return this.warnNodeNotFound(e,t.id)}let o=i.getNode(t.parentId);if(!o)return this.warnNodeNotFound(e,t.parentId);if(t.isShadow&&ec(o)&&(o=o.shadowRoot),i.removeNodeFromMap(r),o)try{o.removeChild(r),this.usingVirtualDom&&"#text"===r.nodeName&&"STYLE"===o.nodeName&&(null===(n=o.rules)||void 0===n?void 0:n.length)>0&&(o.rules=[])}catch(t){if(!(t instanceof DOMException))throw t;this.warn("parent could not remove child in mutation",o,r,e)}});let n=Object.assign({},this.legacy_missingNodeRetryMap),r=[],o=e=>{var t;let o;if(!this.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");let s=i.getNode(e.parentId);if(!s)return e.node.type===tA.Document?this.newDocumentQueue.push(e):r.push(e);e.node.isShadow&&(ec(s)||s.attachShadow({mode:"open"}),s=s.shadowRoot);let a=null,l=null;if(e.previousId&&(a=i.getNode(e.previousId)),e.nextId&&(l=i.getNode(e.nextId)),o=null,e.nextId&&(o=i.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!o)return r.push(e);if(e.node.rootId&&!i.getNode(e.node.rootId))return;let c=e.node.rootId?i.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(el(s,i))return void this.attachDocumentToIframe(e,s);let u=(e,t)=>{for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(e,{id:t,replayer:this})},d=eo(e.node,{doc:c,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1===e.previousId||-1===e.nextId)return void(n[e.node.id]={node:d,mutation:e});let h=i.getMeta(s);if(h&&h.type===tA.Element&&"textarea"===h.tagName&&e.node.type===tA.Text)for(let e of Array.isArray(s.childNodes)?s.childNodes:Array.from(s.childNodes))e.nodeType===s.TEXT_NODE&&s.removeChild(e);if(a&&a.nextSibling&&a.nextSibling.parentNode)s.insertBefore(d,a.nextSibling);else if(l&&l.parentNode)s.contains(l)?s.insertBefore(d,l):s.insertBefore(d,null);else{if(s===c)for(;c.firstChild;)c.removeChild(c.firstChild);s.appendChild(d)}if(u(d,e.node.id),this.usingVirtualDom&&"#text"===d.nodeName&&"STYLE"===s.nodeName&&(null===(t=s.rules)||void 0===t?void 0:t.length)>0&&(s.rules=[]),el(d,this.mirror)){let e=this.mirror.getId(d),t=this.newDocumentQueue.find(t=>t.parentId===e);t&&(this.attachDocumentToIframe(t,d),this.newDocumentQueue=this.newDocumentQueue.filter(e=>e!==t))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(n,s,d,e)};e.adds.forEach(e=>{o(e)});let s=Date.now();for(;r.length;){let e=function(e){let t={},i=(e,i)=>{let n={value:e,parent:i,children:[]};return t[e.node.id]=n,n},n=[];for(let r of e){let{nextId:e,parentId:o}=r;if(e&&e in t){let o=t[e];if(o.parent){let e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,i(r,o.parent))}else{let e=n.indexOf(o);n.splice(e,0,i(r,null))}}else if(o in t){let e=t[o];e.children.push(i(r,e))}else n.push(i(r,null))}return n}(r);if(r.length=0,Date.now()-s>500){this.warn("Timeout in the loop, please check the resolve tree data:",e);break}for(let t of e)i.getNode(t.value.parentId)?function e(t,i){i(t.value);for(let n=t.children.length-1;n>=0;n--)e(t.children[n],i)}(t,e=>{o(e)}):this.debug("Drop resolve tree since there is no parent for the root node.",t)}Object.keys(n).length&&Object.assign(this.legacy_missingNodeRetryMap,n),(function(e){let t=new Set,i=[];for(let n=e.length;n--;){let r=e[n];t.has(r.id)||(i.push(r),t.add(r.id))}return i})(e.texts).forEach(t=>{var n;let r=i.getNode(t.id);if(!r){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}if(r.textContent=t.value,this.usingVirtualDom){let e=r.parentNode;(null===(n=null==e?void 0:e.rules)||void 0===n?void 0:n.length)>0&&(e.rules=[])}}),e.attributes.forEach(t=>{let n=i.getNode(t.id);if(!n){if(e.removes.find(e=>e.id===t.id))return;return this.warnNodeNotFound(e,t.id)}for(let e in t.attributes)if("string"==typeof e){let r=t.attributes[e];if(null===r)n.removeAttribute(e);else if("string"==typeof r)try{if("_cssText"===e&&("LINK"===n.nodeName||"STYLE"===n.nodeName))try{let e=i.getMeta(n);Object.assign(e.attributes,t.attributes);let r=eo(e,{doc:n.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache}),o=n.nextSibling,s=n.parentNode;if(r&&s){s.removeChild(n),s.insertBefore(r,o),i.replace(t.id,r);break}}catch(e){}n.setAttribute(e,r)}catch(e){this.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===e)for(let e in r)if(!1===r[e])n.style.removeProperty(e);else if(r[e]instanceof Array){let t=r[e];n.style.setProperty(e,t[0],t[1])}else{let t=r[e];n.style.setProperty(e,t)}}})}applyScroll(e,t){var i,n;let r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);let o=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo({top:e.y,left
27:e.x,behavior:t?"auto":"smooth"});else if((null==o?void 0:o.type)===tA.Document)null===(n=r.defaultView)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(e){}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(e){}}applySelection(e){try{let t=new Set,i=e.ranges.map(({start:e,startOffset:i,end:n,endOffset:r})=>{let o=this.mirror.getNode(e),s=this.mirror.getNode(n);if(!o||!s)return;let a=new Range;a.setStart(o,i),a.setEnd(s,r);let l=o.ownerDocument,c=null==l?void 0:l.getSelection();return c&&t.add(c),{range:a,selection:c}});t.forEach(e=>e.removeAllRanges()),i.forEach(e=>{var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))})}catch(e){}}applyStyleSheetMutation(e){var t;let i=null;e.styleId?i=this.styleMirror.getStyle(e.styleId):e.id&&(i=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),i&&(e.source===eg.StyleSheetRule?this.applyStyleSheetRule(e,i):e.source===eg.StyleDeclaration&&this.applyStyleDeclaration(e,i))}applyStyleSheetRule(e,t){var i,n,r,o;
27if(null===(i=e.adds)||void 0===i||i.forEach(({rule:e,index:i})=>{try{if(Array.isArray(i)){let{positions:n,index:r}=ed(i);eu(t.cssRules,n).insertRule(e,r)}else{let n=void 0===i?void 0:Math.min(i,t.cssRules.length);null==t||t.insertRule(e,n)}}catch(e){}}),null===(n=e.removes)||void 0===n||n.forEach(({index:e})=>{try{if(Array.isArray(e)){let{positions:i,index:n}=ed(e);eu(t.cssRules,i).deleteRule(n||0)}else null==t||t.deleteRule(e)}catch(e){}}),e.replace)try{null===(r=t.replace)||void 0===r||r.call(t,e.replace)}catch(e){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch(e){}}applyStyleDeclaration(e,t){e.set&&eu(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&eu(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let i=this.mirror.getNode(e.id);if(!i)return;null===(t=e.styles)||void 0===t||t.forEach(e=>{var t;let n=null,r=null;if(ec(i)?r=(null===(t=i.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===i.nodeName&&(r=i.defaultView),r)try{n=new r.CSSStyleSheet,this.styleMirror.add(n,e.styleId),this.applyStyleSheetRule({source:eg.StyleSheetRule,adds:e.rules},n)}catch(e){}});let n=0,r=(e,t)=>{let i=t.map(e=>this.styleMirror.getStyle(e)).filter(e=>null!==e);ec(e)?e.shadowRoot.adoptedStyleSheets=i:"#document"===e.nodeName&&(e.adoptedStyleSheets=i),i.length!==t.length&&n<10&&(setTimeout(()=>r(e,t),0+100*n),n++)};r(i,e.styleIds)}legacy_resolveMissingNode(e,t,i,n){let{previousId:r,nextId:o}=n,s=r&&e[r],a=o&&e[o];if(s){let{node:n,mutation:r}=s;t.insertBefore(n,i),delete e[r.node.id],delete this.legacy_missingNodeRetryMap[r.node.id],(r.previousId||r.nextId)&&this.legacy_resolveMissingNode(e,t,n,r)}if(a){let{node:n,mutation:r}=a;t.insertBefore(n,i.nextSibling),delete e[r.node.id],delete this.legacy_missingNodeRetryMap[r.node.id],(r.previousId||r.nextId)&&this.legacy_resolveMissingNode(e,t,n,r)}}moveAndHover(e,t,i,n,r){let o=this.mirror.getNode(i);if(!o)return this.debugNodeNotFound(r,i);let s=function e(t,i){var n,r;let o=null===(r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!o||o===i)return{x:0,y:0,relativeScale:1,absoluteScale:1};let s=o.getBoundingClientRect(),a=e(o,i),l=s.height/o.clientHeight;return{x:s.x*a.relativeScale+a.x,y:s.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}}(o,this.iframe),a=e*s.absoluteScale+s.x,l=t*s.absoluteScale+s.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${l}px`,n||this.drawMouseTail({x:a,y:l}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:i,strokeStyle:n,duration:r}=!0===this.config.mouseTail?tX:Object.assign({},tX,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;let e=this.mouseTail.getContext("2d");e&&this.tailPositions.length&&(e.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=t,e.strokeStyle=n,e.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(t=>e.lineTo(t.x,t.y)),e.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(t=>t!==e),o()},r/this.speedService.state.context.timer.speed)}hoverElements(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach(e=>{e.classList.remove(":hover")});let i=e;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(e){return e.type===ep.IncrementalSnapshot&&e.data.source>eg.Mutation&&e.data.source<=eg.Input}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(ey.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}
27debugNodeNotFound(e,t){this.debug("[replayer]",`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&console.warn("[replayer]",...e)}debug(...e){this.config.showDebug&&console.log("[replayer]",...e)}}function tq(e){let t="";return Object.keys(e).forEach(i=>{t+=`${i}: ${e[i]};`}),t}function t0(e,t=2){let i=String(e),n=Math.pow(10,t-1);if(e<n)for(;String(n).length>i.length;)i=`0${e}`;return i}function t1(e){if(e<=0)return"00:00";let t=Math.floor(e/36e5),i=Math.floor((e%=36e5)/6e4),n=Math.floor((e%=6e4)/1e3);return t?`${t0(t)}:${t0(i)}:${t0(n)}`:`${t0(i)}:${t0(n)}`}function t2(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function t4(e){return({"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"})[Object.prototype.toString.call(e)]}function t3(e){let t,i,n,r,o,s,a,c,u;return{c(){t=I("div"),i=I("input"),n=N(),r=I("label"),o=N(),s=I("span"),a=b(e[3]),E(i,"type","checkbox"),E(i,"id",e[2]),i.disabled=e[1],E(i,"class","svelte-9brlez"),E(r,"for",e[2]),E(r,"class","svelte-9brlez"),E(s,"class","label svelte-9brlez"),E(t,"class","switch svelte-9brlez"),D(t,"disabled",e[1])},m(l,d){y(l,t,d),f(t,i),i.checked=e[0],f(t,n),f(t,r),f(t,o),f(t,s),f(s,a),c||(u=w(i,"change",e[4]),c=!0)},p(e,[n]){4&n&&E(i,"id",e[2]),2&n&&(i.disabled=e[1]),1&n&&(i.checked=e[0]),4&n&&E(r,"for",e[2]),8&n&&T(a,e[3]),2&n&&D(t,"disabled",e[1])},i:l,o:l,d(e){e&&v(t),c=!1,u()}}}function t8(e,t,i){let{disabled:n}=t,{checked:r}=t,{id:o}=t,{label:s}=t;return e.$$set=e=>{"disabled"in e&&i(1,n=e.disabled),"checked"in e&&i(0,r=e.checked),"id"in e&&i(2,o=e.id),"label"in e&&i(3,s=e.label)},[r,n,o,s,function(){i(0,r=this.checked)}]}class t9 extends X{constructor(e){super(),J(this,e,t8,t3,g,{disabled:1,checked:0,id:2,label:3})}}function t5(e,t,i){let n=e.slice();return n[39]=t[i],n}function t6(e,t,i){let n=e.slice();return n[42]=t[i],n}function t7(e,t,i){let n=e.slice();return n[45]=t[i],n}function ie(e){let t,i,n,r,o,s,a,l,c,u,d,p,g,m,A,M,x,R,k,O,L,V,G,W,_,Z,U=t1(e[6])+"",$=t1(e[8].totalTime)+"",K=e[14],J=[];for(let t=0;t<K.length;t+=1)J[t]=it(t7(e,K,t));let X=e[9],H=[];for(let t=0;t<X.length;t+=1)H[t]=ii(t6(e,X,t));function j(e,t){return"playing"===e[7]?io:ir}let q=j(e),ee=q(e),et=e[3],ei=[];for(let t=0;t<et.length;t+=1)ei[t]=is(t5(e,et,t));function en(t){e[30](t)}let er={id:"skip",disabled:"skipping"===e[10],label:"skip inactive"};return void 0!==e[0]&&(er.checked=e[0]),O=new t9({props:er}),F.push(()=>(function(e,t,i){let n=e.$$.props[t];void 0!==n&&(e.$$.bound[n]=i,i(e.$$.ctx[n]))})(O,"checked",en)),{c(){var h;t=I("div"),i=I("div"),n=I("span"),r=b(U),o=N(),s=I("div"),a=I("div"),l=N();for(let e=0;e<J.length;e+=1)J[e].c();c=N();for(let e=0;e<H.length;e+=1)H[e].c();u=N(),d=I("div"),p=N(),g=I("span"),m=b($),A=N(),M=I("div"),x=I("button"),ee.c(),R=N();for(let e=0;e<ei.length;e+=1)ei[e].c();k=N(),(h=O.$$.fragment)&&h.c(),V=N(),(G=I("button")).innerHTML='<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4\n 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4\n 0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0\n 224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48\n 48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48\n 48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4\n 68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z" p-id="1286"></path></svg>',E(n,"class","rr-timeline__time svelte-19ke1iv"),E(a,"class","rr-progress__step svelte-19ke1iv"),S(a,"width",e[13]),E(d,"class","rr-progress__handler svelte-19ke1iv"),S(d,"left",e[13]),E(s,"class","rr-progress svelte-19ke1iv"),D(s,"disabled","skipping"===e[10]),E(g,"class","rr-timeline__time svelte-19ke1iv"),E(i,"class","rr-timeline svelte-19ke1iv"),E(x,"class","svelte-19ke1iv"),E(G,"class","svelte-19ke1iv"),E(M,"class","rr-controller__btns svelte-19ke1iv"),E(t,"class","rr-controller svelte-19ke1iv")},m(h,v){y(h,t,v),f(t,i),f(i,n),f(n,r),f(i,o),f(i,s),f(s,a),e[27](a),f(s,l);for(let e=0;e<J.length;e+=1)J[e].m(s,null);f(s,c);for(let e=0;e<H.length;e+=1)H[e].m(s,null);f(s,u),f(s,d),e[28](s),f(i,p),f(i,g),f(g,m),f(t,A),f(t,M),f(M,x),ee.m(x,null),f(M,R);for(let e=0;e<ei.length;e+=1)ei[e].m(M,null);f(M,k),Q(O,M,null),f(M,V),f(M,G),W=!0,_||(Z=[w(s,"click",e[16]),w(x,"click",e[4]),w(G,"click",e[31])],_=!0)},p(e,t){if((!W||64&t[0])&&U!==(U=t1(e[6])+"")&&T(r,U),(!W||8192&t[0])&&S(a,"width",e[13]),16384&t[0]){let i;for(K=e[14],i=0;i<K.length;i+=1){let n=t7(e,K,i);J[i]?J[i].p(n,t):(J[i]=it(n),J[i].c(),J[i].m(s,c))}for(;i<J.length;i+=1)J[i].d(1);J.length=K.length}if(512&t[0]){let i;for(X=e[9],i=0;i<X.length;i+=1){let n=t6(e,X,i);H[i]?H[i].p(n,t):(H[i]=ii(n),H[i].c(),H[i].m(s,u))}for(;i<H.length;i+=1)H[i].d(1);H.length=X.length}if((!W||8192&t[0])&&S(d,"left",e[13]),1024&t[0]&&D(s,"disabled","skipping"===e[10]),(!W||256&t[0])&&$!==($=t1(e[8].totalTime)+"")&&T(m,$),q!==(q=j(e))&&(ee.d(1),(ee=q(e))&&(ee.c(),ee.m(x,null))),1066&t[0]){let i;for(et=e[3],i=0;i<et.length;
27i+=1){let n=t5(e,et,i);ei[i]?ei[i].p(n,t):(ei[i]=is(n),ei[i].c(),ei[i].m(M,k))}for(;i<ei.length;i+=1)ei[i].d(1);ei.length=et.length}let i={};1024&t[0]&&(i.disabled="skipping"===e[10]),!L&&1&t[0]&&(L=!0,i.checked=e[0],B.push(()=>L=!1)),O.$set(i)},i(e){W||(Y(O.$$.fragment,e),W=!0)},o(e){P(O.$$.fragment,e),W=!1},d(i){i&&v(t),e[27](null),C(J,i),C(H,i),e[28](null),ee.d(),C(ei,i),z(O),_=!1,h(Z)}}}function it(e){let t,i;return{c(){E(t=I("div"),"title",i=e[45].name),S(t,"width",e[45].width),S(t,"height","4px"),S(t,"position","absolute"),S(t,"background",e[45].background),S(t,"left",e[45].position)},m(e,i){y(e,t,i)},p(e,n){16384&n[0]&&i!==(i=e[45].name)&&E(t,"title",i),16384&n[0]&&S(t,"width",e[45].width),16384&n[0]&&S(t,"background",e[45].background),16384&n[0]&&S(t,"left",e[45].position)},d(e){e&&v(t)}}}function ii(e){let t,i;return{c(){E(t=I("div"),"title",i=e[42].name),S(t,"width","10px"),S(t,"height","5px"),S(t,"position","absolute"),S(t,"top","2px"),S(t,"transform","translate(-50%, -50%)"),S(t,"background",e[42].background),S(t,"left",e[42].position)},m(e,i){y(e,t,i)},p(e,n){512&n[0]&&i!==(i=e[42].name)&&E(t,"title",i),512&n[0]&&S(t,"background",e[42].background),512&n[0]&&S(t,"left",e[42].position)},d(e){e&&v(t)}}}function ir(e){let t,i;return{c(){t=A("svg"),E(i=A("path"),"d","M170.65984 896l0-768 640 384zM644.66944\n 512l-388.66944-233.32864 0 466.65728z"),E(t,"class","icon"),E(t,"viewBox","0 0 1024 1024"),E(t,"version","1.1"),E(t,"xmlns","http://www.w3.org/2000/svg"),E(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),E(t,"width","16"),E(t,"height","16")},m(e,n){y(e,t,n),f(t,i)},d(e){e&&v(t)}}}function io(e){let t,i;return{c(){t=A("svg"),E(i=A("path"),"d","M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0\n 512q0 53.00224-37.49888 90.50112t-90.50112\n 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224\n 37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0\n 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888\n 90.50112t-90.50112\n 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224\n 37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424\n 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928\n 30.16704t30.16704 12.4928 30.16704-12.4928\n 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984\n 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0\n 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928\n 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"),E(t,"class","icon"),E(t,"viewBox","0 0 1024 1024"),E(t,"version","1.1"),E(t,"xmlns","http://www.w3.org/2000/svg"),E(t,"xmlns:xlink","http://www.w3.org/1999/xlink"),E(t,"width","16"),E(t,"height","16")},m(e,n){y(e,t,n),f(t,i)},d(e){e&&v(t)}}}function is(e){let t,i,n,r,o,s,a=e[39]+"";function l(){return e[29](e[39])}return{c(){t=I("button"),i=b(a),n=b("x"),t.disabled=r="skipping"===e[10],E(t,"class","svelte-19ke1iv"),D(t,"active",e[39]===e[1]&&"skipping"!==e[10])},m(e,r){y(e,t,r),f(t,i),f(t,n),o||(s=w(t,"click",l),o=!0)},p(n,o){e=n,8&o[0]&&a!==(a=e[39]+"")&&T(i,a),1024&o[0]&&r!==(r="skipping"===e[10])&&(t.disabled=r),1034&o[0]&&D(t,"active",e[39]===e[1]&&"skipping"!==e[10])},d(e){e&&v(t),o=!1,s()}}}function ia(e){let t,i,n=e[2]&&ie(e);return{c(){n&&n.c(),t=b("")},m(e,r){n&&n.m(e,r),y(e,t,r),i=!0},p(e,i){e[2]?n?(n.p(e,i),4&i[0]&&Y(n,1)):((n=ie(e)).c(),Y(n,1),n.m(t.parentNode,t)):n&&($(),P(n,1,1,()=>{n=null}),K())},i(e){i||(Y(n),i=!0)},o(e){P(n),i=!1},d(e){n&&n.d(e),e&&v(t)}}}function il(e,t,i){return(100-(t-i)/(t-e)*100).toFixed(2)}function ic(e,t,i){let n=function(){let e=M();return(t,i,{cancelable:n=!1}={})=>{let r=e.$$.callbacks[t];if(r){let o=function(e,t,{bubbles:i=!1,cancelable:n=!1}={}){let r=document.createEvent("CustomEvent");return r.initCustomEvent(e,i,n,t),r}(t,i,{cancelable:n});return r.slice().forEach(t=>{t.call(e,o)}),!o.defaultPrevented}return!0}}(),r,o,s,a,l,c,u,d,h,p,{replayer:g}=t,{showController:m}=t,{autoPlay:f}=t,{skipInactive:y}=t,{speedOption:v}=t,{speed:C=v.length?v[0]:1}=t,{tags:I={}}=t,{inactiveColor:A}=t,b=0,N=null,w=!1,E=null,T=()=>{N&&(cancelAnimationFrame(N),N=null)},S=()=>{"paused"===r&&(l?(g.play(),l=!1):g.play(b))},D=()=>{"playing"===r&&(g.pause(),w=!1)},k=(e,t)=>{i(6,b=e),w=!1,("boolean"==typeof t?t:"playing"===r)?g.play(e):g.pause(e)},O=(e,t,n=!1,r)=>{E=n?{start:e,end:t}:null,i(6,b=e),w=t,c=r,g.play(e)},B=e=>{let t="playing"===r;i(1,C=e),t&&g.pause(),g.setConfig({speed:C}),t&&g.play(b)};return x(()=>{i(7,r=g.service.state.value),i(10,o=g.speedService.state.value),g.on("state-change",e=>{let{player:t,speed:n}=e;if((null==t?void 0:t.value)&&r!==t.value)switch(i(7,r=t.value),r){case"playing":T(),N=requestAnimationFrame(function e(){i(6,b=g.getCurrentTime()),w&&b>=w&&(E?O(E.start,E.end,!0,void 0):(g.pause(),c&&(c(),c=null))),b<u.totalTime&&(N=requestAnimationFrame(e))});break;case"paused":T()}(null==n?void 0:n.value)&&o!==n.value&&i(10,o=n.value)}),g.on("finish",()=>{l=!0,c&&(c(),c=null)}),f&&g.play()}),M().$$.after_update.push(()=>{y!==g.config.skipInactive&&g.setConfig({skipInactive:y})}),R(()=>{g.pause(),T()}),e.$$set=e=>{"replayer"in e&&i(17,g=e.replayer),"showController"in e&&i(2,m=e.showController),"autoPlay"in e&&i(18,f=e.autoPlay),"skipInactive"in e&&i(0,y=e.skipInactive),"speedOption"in e&&i(3,v=e.speedOption),"speed"in e&&i(1,C=e.speed),"tags"in e&&i(19,I=e.tags),"inactiveColor"in e&&i(20,A=e.inactiveColor)},e.$$.update=()=>{if(64&e.$$.dirty[0]&&n("ui-update-current-time",{payload:b}
27),128&e.$$.dirty[0]&&n("ui-update-player-state",{payload:r}),131072&e.$$.dirty[0]&&i(8,u=g.getMetaData()),320&e.$$.dirty[0]){let e=Math.min(1,b/u.totalTime);i(13,d=100*e+"%"),n("ui-update-progress",{payload:e})}655360&e.$$.dirty[0]&&i(9,h=(()=>{let{context:e}=g.service.state,t=e.events.length,i=e.events[0].timestamp,n=e.events[t-1].timestamp,r=[];return e.events.forEach(e=>{if(e.type===ep.Custom){let t={name:e.data.tag,background:I[e.data.tag]||"rgb(73, 80, 246)",position:`${il(i,n,e.timestamp)}%`};r.push(t)}}),r})()),1179648&e.$$.dirty[0]&&i(14,p=(()=>{try{let{context:e}=g.service.state,t=e.events.length,i=e.events[0].timestamp,n=e.events[t-1].timestamp,r=function(e){let t=[],i=e[0].timestamp;for(let n of e)n.type===ep.IncrementalSnapshot&&n.data.source>eg.Mutation&&n.data.source<=eg.Input&&(n.timestamp-i>1e4&&t.push([i,n.timestamp]),i=n.timestamp);return t}(e.events),o=(e,t,i,n)=>((n-i)/(t-e)*100).toFixed(2);return r.map(e=>({name:"inactive period",background:A,position:`${il(i,n,e[0])}%`,width:`${o(i,n,e[0],e[1])}%`}))}catch(e){return[]}})())},[y,C,m,v,()=>{switch(r){case"playing":D();break;case"paused":S()}},B,b,r,u,h,o,s,a,d,p,n,e=>{if("skipping"===o)return;let t=s.getBoundingClientRect(),i=(e.clientX-t.left)/t.width;i<0?i=0:i>1&&(i=1);let n=u.totalTime*i;l=!1,k(n)},g,f,I,A,S,D,k,O,()=>{i(0,y=!y)},()=>Promise.resolve().then(()=>{i(8,u=g.getMetaData())}),function(e){F[e?"unshift":"push"](()=>{i(12,a=e)})},function(e){F[e?"unshift":"push"](()=>{i(11,s=e)})},e=>B(e),function(e){i(0,y=e)},()=>n("fullscreen")]}class iu extends X{constructor(e){super(),J(this,e,ic,ia,g,{replayer:17,showController:2,autoPlay:18,skipInactive:0,speedOption:3,speed:1,tags:19,inactiveColor:20,toggle:4,play:21,pause:22,goto:23,playRange:24,setSpeed:5,toggleSkipInactive:25,triggerUpdateMeta:26},null,[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[21]}get pause(){return this.$$.ctx[22]}get goto(){return this.$$.ctx[23]}get playRange(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[25]}get triggerUpdateMeta(){return this.$$.ctx[26]}}function id(e){let t,i;return t=new iu({props:{replayer:e[7],showController:e[3],autoPlay:e[1],speedOption:e[2],skipInactive:e[0],tags:e[4],inactiveColor:e[5]}}),e[32](t),t.$on("fullscreen",e[33]),{c(){var e;(e=t.$$.fragment)&&e.c()},m(e,n){Q(t,e,n),i=!0},p(e,i){let n={};128&i[0]&&(n.replayer=e[7]),8&i[0]&&(n.showController=e[3]),2&i[0]&&(n.autoPlay=e[1]),4&i[0]&&(n.speedOption=e[2]),1&i[0]&&(n.skipInactive=e[0]),16&i[0]&&(n.tags=e[4]),32&i[0]&&(n.inactiveColor=e[5]),t.$set(n)},i(e){i||(Y(t.$$.fragment,e),i=!0)},o(e){P(t.$$.fragment,e),i=!1},d(i){e[32](null),z(t,i)}}}function ih(e){let t,i,n,r,o=e[7]&&id(e);return{c(){t=I("div"),i=I("div"),n=N(),o&&o.c(),E(i,"class","rr-player__frame"),E(i,"style",e[11]),E(t,"class","rr-player"),E(t,"style",e[12])},m(s,a){y(s,t,a),f(t,i),e[31](i),f(t,n),o&&o.m(t,null),e[34](t),r=!0},p(e,n){(!r||2048&n[0])&&E(i,"style",e[11]),e[7]?o?(o.p(e,n),128&n[0]&&Y(o,1)):((o=id(e)).c(),Y(o,1),o.m(t,null)):o&&($(),P(o,1,1,()=>{o=null}),K()),(!r||4096&n[0])&&E(t,"style",e[12])},i(e){r||(Y(o),r=!0)},o(e){P(o),r=!1},d(i){i&&v(t),e[31](null),o&&o.d(),e[34](null)}}}function ip(e,t,i){let n,{width:r=1024}=t,{height:o=576}=t,{maxScale:s=1}=t,{events:a=[]}=t,{skipInactive:l=!0}=t,{autoPlay:u=!0}=t,{speedOption:d=[1,2,4,8]}=t,{speed:h=1}=t,{showController:p=!0}=t,{tags:g={}}=t,{inactiveColor:f="#D4D4D4"}=t,y,v,C,I,A,b,N=r,w=o,E=(e,t)=>{let i=[r/t.width,o/t.height];s&&i.push(s),e.style.transform=`scale(${Math.min(...i)})translate(-50%, -50%)`},T=()=>{var e;y&&(t2()?document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen():(e=y).requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen())};return x(()=>{var e;if(void 0!==d&&"array"!==t4(d))throw Error("speedOption must be array");
27if(d.forEach(e=>{if("number"!==t4(e))throw Error("item of speedOption must be number")}),0>d.indexOf(h))throw Error(`speed must be one of speedOption, 28 current config: 29 { 30 ... 31 speed: ${h}, 32 speedOption: [${d.toString()}] 33 ... 34 } 35 `);i(7,n=new tj(a,Object.assign({speed:h,root:v,unpackFn:tp},t))),n.on("resize",e=>{E(n.wrapper,e)}),e=()=>{t2()?setTimeout(()=>{N=r,w=o,i(13,r=y.offsetWidth),i(14,o=y.offsetHeight-(p?80:0)),E(n.wrapper,{width:n.iframe.offsetWidth,height:n.iframe.offsetHeight})},0):(i(13,r=N),i(14,o=w),E(n.wrapper,{width:n.iframe.offsetWidth,height:n.iframe.offsetHeight}))},document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),C=()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),R(()=>{C&&C()}),e.$$set=e=>{i(39,t=c(c({},t),m(e))),"width"in e&&i(13,r=e.width),"height"in e&&i(14,o=e.height),"maxScale"in e&&i(15,s=e.maxScale),"events"in e&&i(16,a=e.events),"skipInactive"in e&&i(0,l=e.skipInactive),"autoPlay"in e&&i(1,u=e.autoPlay),"speedOption"in e&&i(2,d=e.speedOption),"speed"in e&&i(17,h=e.speed),"showController"in e&&i(3,p=e.showController),"tags"in e&&i(4,g=e.tags),"inactiveColor"in e&&i(5,f=e.inactiveColor)},e.$$.update=()=>{24576&e.$$.dirty[0]&&i(11,A=tq({width:`${r}px`,height:`${o}px`})),24584&e.$$.dirty[0]&&i(12,b=tq({width:`${r}px`,height:`${o+(p?80:0)}px`}))},t=m(t),[l,u,d,p,g,f,T,n,y,v,I,A,b,r,o,s,a,h,()=>n.getMirror(),()=>{E(n.wrapper,{width:n.iframe.offsetWidth,height:n.iframe.offsetHeight})},(e,t)=>{switch(n.on(e,t),e){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":I.$on(e,({detail:e})=>t(e))}},e=>{n.addEvent(e),I.triggerUpdateMeta()},()=>n.getMetaData(),()=>n,()=>{I.toggle()},e=>{I.setSpeed(e)},()=>{I.toggleSkipInactive()},()=>{I.play()},()=>{I.pause()},(e,t)=>{I.goto(e,t)},(e,t,i=!1,n)=>{I.playRange(e,t,i,n)},function(e){F[e?"unshift":"push"](()=>{i(9,v=e)})},function(e){F[e?"unshift":"push"](()=>{i(10,I=e)})},()=>T(),function(e){F[e?"unshift":"push"](()=>{i(8,y=e)})}]}class ig extends X{constructor(e){super(),J(this,e,ip,ih,g,{width:13,height:14,maxScale:15,events:16,skipInactive:0,autoPlay:1,speedOption:2,speed:17,showController:3,tags:4,inactiveColor:5,getMirror:18,triggerResize:19,toggleFullscreen:6,addEventListener:20,addEvent:21,getMetaData:22,getReplayer:23,toggle:24,setSpeed:25,toggleSkipInactive:26,play:27,pause:28,goto:29,playRange:30},null,[-1,-1])}get getMirror(){return this.$$.ctx[18]}get triggerResize(){return this.$$.ctx[19]}get toggleFullscreen(){return this.$$.ctx[6]}get addEventListener(){return this.$$.ctx[20]}get addEvent(){return this.$$.ctx[21]}get getMetaData(){return this.$$.ctx[22]}get getReplayer(){return this.$$.ctx[23]}get toggle(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[25]}get toggleSkipInactive(){return this.$$.ctx[26]}get play(){return this.$$.ctx[27]}get pause(){return this.$$.ctx[28]}get goto(){return this.$$.ctx[29]}get playRange(){return this.$$.ctx[30]}}class im extends ig{constructor(e){super({target:e.target,props:e.data||e.props})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.