@highlight-run/rrweb 0.12.12 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/console/record/index.d.ts +1 -1
- package/dist/record/stringify.d.ts +2 -0
- package/dist/replay/index.d.ts +2 -0
- package/dist/snapshot/index.d.ts +2 -2
- package/dist/snapshot/rebuild.d.ts +5 -2
- package/dist/snapshot/types.d.ts +4 -0
- package/dist/stats.json +1 -0
- package/dist/types.d.ts +9 -4
- package/dist/utils.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.highlightLib=t():e.highlightLib=t()}(self,(function(){return(()=>{"use strict";var e={537:(e,t,n)=>{function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var o;n.r(t),n.d(t,{InterpreterStatus:()=>o,assign:()=>s,createMachine:()=>f,interpret:()=>m}),function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(o||(o={}));var i={type:"xstate.init"};function a(e){return void 0===e?[]:[].concat(e)}function s(e){return{type:"xstate.assign",assignment:e}}function l(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 u(e){return function(t){return e===t}}function c(e){return"string"==typeof e?{type:e}:e}function d(e,t){return{value:e,context:t,actions:[],changed:!1,matches:u(e)}}function p(e,t,n){var r=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](r,n):e.assignment[o]})),r=t,!1}return!0})),r,o]}function f(e,t){void 0===t&&(t={});var n=r(p(a(e.states[e.initial].entry).map((function(e){return l(e,t.actions)})),e.context,i),2),o=n[0],s=n[1],f={config:e,_options:t,initialState:{value:e.initial,actions:o,context:s,matches:u(e.initial)},transition:function(t,n){var o,i,s="string"==typeof t?{value:t,context:e.context}:t,h=s.value,m=s.context,v=c(n),y=e.states[h];if(y.on){var g=a(y.on[v.type]);try{for(var S=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(g),b=S.next();!b.done;b=S.next()){var T=b.value;if(void 0===T)return d(h,m);var I="string"==typeof T?{target:T}:T,x=I.target,E=I.actions,w=void 0===E?[]:E,k=I.cond,N=void 0===x;if((void 0===k?function(){return!0}:k)(m,v)){var C=e.states[null!=x?x:h],M=r(p((N?a(w):[].concat(y.exit,w,C.entry).filter((function(e){return e}))).map((function(e){return l(e,f._options.actions)})),m,v),3),O=M[0],_=M[1],R=M[2],D=null!=x?x:h;return{value:D,context:_,actions:O,changed:x!==h||O.length>0||R,matches:u(D)}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=S.return)&&i.call(S)}finally{if(o)throw o.error}}}return d(h,m)}};return f}var h=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function m(e){var t=e.initialState,n=o.NotStarted,r=new Set,a={_machine:e,send:function(i){n===o.Running&&(t=e.transition(t,i),h(t,c(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var s="object"==typeof r?r:{context:e.config.context,value:r};t={value:s.value,actions:[],context:s.context,matches:u(s.value)}}return n=o.Running,h(t,i),a},stop:function(){return n=o.Stopped,r.clear(),a},get state(){return t},get status(){return n}};return a}},380:(e,t,n)=>{n.r(t)},652:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}},463:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IframeManager=void 0;var n=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}();t.IframeManager=n},476:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i,a,s=n(348),l=n(584),u=n(593),c=n(699),d=n(463),p=n(783);function f(e){return r(r({},e),{timestamp:Date.now()})}var h=u.createMirror();function m(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,m=e.checkoutEveryNth,v=e.blockClass,y=void 0===v?"highlight-block":v,g=e.blockSelector,S=void 0===g?null:g,b=e.ignoreClass,T=void 0===b?"highlight-ignore":b,I=e.maskTextClass,x=void 0===I?"highlight-mask":I,E=e.maskTextSelector,w=void 0===E?null:E,k=e.inlineStylesheet,N=void 0===k||k,C=e.maskAllInputs,M=e.maskInputOptions,O=e.slimDOMOptions,_=e.maskInputFn,R=e.maskTextFn,D=e.hooks,P=e.packFn,A=e.sampling,F=void 0===A?{}:A,L=e.mousemoveWait,j=e.recordCanvas,B=void 0!==j&&j,W=e.userTriggeredOnInput,z=void 0!==W&&W,V=e.collectFonts,H=void 0!==V&&V,U=e.plugins,G=e.keepIframeSrcFn,Y=void 0===G?function(){return!1}:G,X=e.enableStrictPrivacy,q=void 0!==X&&X;if(!t)throw new Error("emit function is required");void 0!==L&&void 0===F.mousemove&&(F.mousemove=L);var Q,$=!0===C?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==M?M:{password:!0},K=!0===O||"all"===O?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===O,headMetaDescKeywords:"all"===O}:O||{};u.polyfill();var J=0;i=function(e,r){var o;if(!(null===(o=l.mutationBuffers[0])||void 0===o?void 0:o.isFrozen())||e.type===c.EventType.FullSnapshot||e.type===c.EventType.IncrementalSnapshot&&e.data.source===c.IncrementalSource.Mutation||l.mutationBuffers.forEach((function(e){return e.unfreeze()})),t(P?P(e):e,r),e.type===c.EventType.FullSnapshot)Q=e,J=0;else if(e.type===c.EventType.IncrementalSnapshot){if(e.data.source===c.IncrementalSource.Mutation&&e.data.isAttachIframe)return;J++;var i=m&&J>=m,s=n&&e.timestamp-Q.timestamp>n;(i||s)&&a(!0)}};var Z=function(e){i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.Mutation},e)}))},ee=function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.Scroll},e)}))},te=new d.IframeManager({mutationCb:Z}),ne=new p.ShadowDomManager({mutationCb:Z,scrollCb:ee,bypassOptions:{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:N,maskInputOptions:$,maskTextFn:R,maskInputFn:_,recordCanvas:B,sampling:F,slimDOMOptions:K,iframeManager:te,enableStrictPrivacy:q},mirror:h});a=function(e){var t,n,r,a;void 0===e&&(e=!1),i(f({type:c.EventType.Meta,data:{href:window.location.href,width:u.getWindowWidth(),height:u.getWindowHeight()}}),e),l.mutationBuffers.forEach((function(e){return e.lock()}));var d=o(s.snapshot(document,{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:N,maskAllInputs:$,maskTextFn:R,slimDOM:K,recordCanvas:B,enableStrictPrivacy:q,onSerialize:function(e){u.isIframeINode(e)&&te.addIframe(e),u.hasShadowRoot(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){te.attachIframe(e,t)},keepIframeSrcFn:Y}),2),p=d[0],m=d[1];if(!p)return console.warn("Failed to snapshot the document");h.map=m,i(f({type:c.EventType.FullSnapshot,data:{node:p,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),l.mutationBuffers.forEach((function(e){return e.unlock()}))};try{var re=[];re.push(u.on("DOMContentLoaded",(function(){i(f({type:c.EventType.DomContentLoaded,data:{}}))})));var oe=function(e){return l.initObservers({mutationCb:Z,mousemoveCb:function(e,t){return i(f({type:c.EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.MouseInteraction},e)}))},scrollCb:ee,viewportResizeCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.StyleDeclaration},e)}))},canvasMutationCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.CanvasMutation},e)}))},fontCb:function(e){return i(f({type:c.EventType.IncrementalSnapshot,data:r({source:c.IncrementalSource.Font},e)}))},blockClass:y,ignoreClass:T,maskTextClass:x,maskTextSelector:w,maskInputOptions:$,inlineStylesheet:N,sampling:F,recordCanvas:B,userTriggeredOnInput:z,collectFonts:H,doc:e,maskInputFn:_,maskTextFn:R,blockSelector:S,slimDOMOptions:K,mirror:h,iframeManager:te,shadowDomManager:ne,plugins:(null==U?void 0:U.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return i(f({type:c.EventType.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[],enableStrictPrivacy:q},D)};te.addLoadListener((function(e){re.push(oe(e.contentDocument))}));var ie=function(){a(),re.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():re.push(u.on("load",(function(){i(f({type:c.EventType.Load,data:{}})),ie()}),window)),function(){re.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}m.addCustomEvent=function(e,t){if(!i)throw new Error("please add custom event after start recording");i(f({type:c.EventType.Custom,data:{tag:e,payload:t}}))},m.freezePage=function(){l.mutationBuffers.forEach((function(e){return e.freeze()}))},m.takeFullSnapshot=function(e){if(!a)throw new Error("please take full snapshot after start recording");a(e)},m.mirror=h,t.default=m},899:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(348),i=n(593);function a(e){return"__ln"in e}var s=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&a(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else e.nextSibling&&a(e.nextSibling)&&e.nextSibling.__ln.previous?(n=e.nextSibling.__ln.previous,t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)):(this.head&&(this.head.previous=t),t.next=this.head,this.head=t);this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),l=function(e,t){return e+"@"+t};function u(e){return"__sn"in e}var c=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,a,l;if(!e.frozen&&!e.locked){for(var u=[],c=new s,d=function(t){for(var n=t,r=o.IGNORED_NODE;r===o.IGNORED_NODE;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},h=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,a=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!a){var s=o.isShadowRoot(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),l=d(t);if(-1===s||-1===l)return c.addNode(t);var p=o.serializeNodeWithId(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(n){i.isIframeINode(n)&&e.iframeManager.addIframe(n),i.hasShadowRoot(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});p&&u.push({parentId:s,nextId:l,node:p})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var m=r(e.movedSet),v=m.next();!v.done;v=m.next()){var y=v.value;p(e.removes,y,e.mirror)&&!e.movedSet.has(y.parentNode)||h(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var g=r(e.addedSet),S=g.next();!S.done;S=g.next())y=S.value,f(e.droppedSet,y)||p(e.removes,y,e.mirror)?f(e.movedSet,y)?h(y):e.droppedSet.add(y):h(y)}catch(e){a={error:e}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}for(var b=null;c.length;){var T=null;if(b){var I=e.mirror.getId(b.value.parentNode),x=d(b.value);-1!==I&&-1!==x&&(T=b)}if(!T)for(var E=c.length-1;E>=0;E--){var w=c.get(E);if(w&&(I=e.mirror.getId(w.value.parentNode),x=d(w.value),-1!==I&&-1!==x)){T=w;break}}if(!T){for(;c.head;)c.removeNode(c.head.value);break}b=T.previous,c.removeNode(T.value),h(T.value)}var k={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:u};(k.texts.length||k.attributes.length||k.removes.length||k.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(k))}},this.processMutation=function(t){if(!i.isIgnored(t.target))switch(t.type){case"characterData":var n=t.target.textContent;i.isBlocked(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:o.needMaskingText(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":if(n=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(n=o.maskInputValue({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),i.isBlocked(t.target,e.blockClass)||n===t.oldValue)return;var r=e.attributes.find((function(e){return e.node===t.target}));if(r||(r={node:t.target,attributes:{}},e.attributes.push(r)),"INPUT"===t.target.tagName){var a=t.target;if("password"===a.type){r.attributes.value="*".repeat(a.value.length);break}}r.attributes[t.attributeName]=o.transformAttribute(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),a=o.isShadowRoot(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);i.isBlocked(t.target,e.blockClass)||i.isIgnored(n)||(e.addedSet.has(n)?(d(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||i.isAncestorRemoved(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[l(r,a)]?d(e.movedSet,n):e.removes.push({parentId:a,id:r,isShadow:!!o.isShadowRoot(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!i.isBlocked(n,e.blockClass)){if(u(t)){if(i.isIgnored(t))return;e.movedSet.add(t);var r=null;n&&u(n)&&(r=n.__sn.id),r&&(e.movedMap[l(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);i.isBlocked(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,i,a,s,l,u,c,d,p,f,h,m){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=i,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=l,this.recordCanvas=u,this.slimDOMOptions=c,this.enableStrictPrivacy=m,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=f,this.shadowDomManager=h},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function d(e,t){e.delete(t),t.childNodes.forEach((function(t){return d(e,t)}))}function p(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||p(e,r,n)}function f(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||f(e,n))}t.default=c},584:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.initObservers=t.INPUT_TAGS=t.initScrollObserver=t.initMutationObserver=t.mutationBuffers=void 0;var s=n(348),l=n(593),u=n(699),c=n(899);t.mutationBuffers=[];var d="undefined"!=typeof CSSGroupingRule;function p(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function f(e,n,r,o,i,a,s,l,u,d,p,f,h,m,v,y,g){var S,b,T,I=new c.default;t.mutationBuffers.push(I),I.init(e,r,o,i,a,s,l,u,d,p,f,n,h,m,v,g);var x=window.MutationObserver||window.__rrMutationObserver,E=null===(T=null===(b=null===(S=window)||void 0===S?void 0:S.Zone)||void 0===b?void 0:b.__symbol__)||void 0===T?void 0:T.call(b,"MutationObserver");E&&window[E]&&(x=window[E]);var w=new x(I.processMutations.bind(I));return w.observe(y,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),w}function h(e,t,n,r,o){var i=l.throttle((function(o){var i=p(o);if(i&&!l.isBlocked(i,r)){var a=n.getId(i);if(i===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}}),o.scroll||100);return l.on("scroll",i,t)}function m(e,t){var n=r({},e);return t||delete n.userTriggered,n}t.initMutationObserver=f,t.initScrollObserver=h,t.INPUT_TAGS=["INPUT","TEXTAREA","SELECT"];var v=new WeakMap;function y(e){return function(e,t){if(d&&e.parentRule instanceof CSSGroupingRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n);return t}(e,[])}t.initObservers=function(e,n){var o,c;void 0===n&&(n={}),function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,l=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),l.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),u.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),c.apply(void 0,i(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,i(e)),d.apply(void 0,i(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,i(e)),p.apply(void 0,i(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,i(e)),f.apply(void 0,i(e))}}(e,n);var g,S,b,T,I,x,E,w,k,N=f(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc,e.enableStrictPrivacy),C=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,i="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],c=l.throttle((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),a);function d(e){var t=p(e),n=l.isTouchEvent(e)?e.changedTouches[0]:e,i=n.clientX,a=n.clientY;o||(o=Date.now()),s.push({x:i,y:a,id:r.getId(t),timeOffset:Date.now()-o})}var f=l.throttle((function(e){d(e),c(e instanceof MouseEvent?u.IncrementalSource.MouseMove:u.IncrementalSource.TouchMove)}),i,{trailing:!1}),h=l.throttle((function(e){d(e),c(e instanceof DragEvent?u.IncrementalSource.Drag:e instanceof MouseEvent?u.IncrementalSource.MouseMove:u.IncrementalSource.TouchMove)}),i,{trailing:!1}),m="undefined"!=typeof DragEvent,v=[l.on("mousemove",f,n),l.on("touchmove",f,n),l.on("drag",m?h:f,n)];return function(){v.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),M=function(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];return Object.keys(u.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]})).forEach((function(o){var i=o.toLowerCase(),s=function(t){return function(o){var i=p(o);if(!l.isBlocked(i,r)){var a=l.isTouchEvent(o)?o.changedTouches[0]:o;if(a){var s=n.getId(i),c=a.clientX,d=a.clientY;e({type:u.MouseInteractions[t],id:s,x:c,y:d})}}}}(o);a.push(l.on(i,s,t))})),function(){a.forEach((function(e){return e()}))}}(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),O=h(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),_=(g=e.viewportResizeCb,S=-1,b=-1,T=l.throttle((function(){var e=l.getWindowHeight(),t=l.getWindowWidth();S===e&&b===t||(g({width:Number(t),height:Number(e)}),S=e,b=t)}),200),l.on("resize",T,window)),R=function(e,n,o,a,u,c,d,f,h){function y(e){var r=p(e),o=e.isTrusted;if(r&&r.tagName&&!(t.INPUT_TAGS.indexOf(r.tagName)<0)&&!l.isBlocked(r,a)){var i=r.type;if(!r.classList.contains(u)){var f=r.value,v=!1;"radio"===i||"checkbox"===i?v=r.checked:(c[r.tagName.toLowerCase()]||c[i])&&(f=s.maskInputValue({maskInputOptions:c,tagName:r.tagName,type:i,value:f,maskInputFn:d})),g(r,m({text:f,isChecked:v,userTriggered:o},h));var y=r.name;"radio"===i&&y&&v&&n.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((function(e){e!==r&&g(e,m({text:e.value,isChecked:!v,userTriggered:!1},h))}))}}}function g(t,n){var i=v.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){v.set(t,n);var a=o.getId(t);e(r(r({},n),{id:a}))}}var S=("last"===f.input?["change"]:["input","change"]).map((function(e){return l.on(e,y,n)})),b=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),T=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return b&&b.set&&S.push.apply(S,i(T.map((function(e){return l.hookSetter(e[0],e[1],{set:function(){y({target:this})}})})))),function(){S.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),D=(I=e.mediaInteractionCb,x=e.blockClass,E=e.mirror,w=function(e){return function(t){var n=p(t);n&&!l.isBlocked(n,x)&&I({type:e,id:E.getId(n),currentTime:n.currentTime})}},k=[l.on("play",w(0)),l.on("pause",w(1)),l.on("seeked",w(2))],function(){k.forEach((function(e){return e()}))}),P=function(e,t){var n=CSSStyleSheet.prototype.insertRule;CSSStyleSheet.prototype.insertRule=function(r,o){var i=t.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:r,index:o}]}),n.apply(this,arguments)};var r=CSSStyleSheet.prototype.deleteRule;if(CSSStyleSheet.prototype.deleteRule=function(n){var o=t.getId(this.ownerNode);return-1!==o&&e({id:o,removes:[{index:n}]}),r.apply(this,arguments)},!d)return function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r};var o=CSSGroupingRule.prototype.insertRule;CSSGroupingRule.prototype.insertRule=function(n,r){var a=t.getId(this.parentStyleSheet.ownerNode);return-1!==a&&e({id:a,adds:[{rule:n,index:i(y(this),[r||0])}]}),o.apply(this,arguments)};var a=CSSGroupingRule.prototype.deleteRule;return CSSGroupingRule.prototype.deleteRule=function(n){var r=t.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:i(y(this),[n])}]}),a.apply(this,arguments)},function(){CSSStyleSheet.prototype.insertRule=n,CSSStyleSheet.prototype.deleteRule=r,CSSGroupingRule.prototype.insertRule=o,CSSGroupingRule.prototype.deleteRule=a}}(e.styleSheetRuleCb,e.mirror),A=function(e,t){var n=CSSStyleDeclaration.prototype.setProperty;CSSStyleDeclaration.prototype.setProperty=function(r,o,i){var a,s,l=t.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&e({id:l,set:{property:r,value:o,priority:i},index:y(this.parentRule)}),n.apply(this,arguments)};var r=CSSStyleDeclaration.prototype.removeProperty;return CSSStyleDeclaration.prototype.removeProperty=function(n){var o,i,a=t.getId(null===(i=null===(o=this.parentRule)||void 0===o?void 0:o.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==a&&e({id:a,remove:{property:n},index:y(this.parentRule)}),r.apply(this,arguments)},function(){CSSStyleDeclaration.prototype.setProperty=n,CSSStyleDeclaration.prototype.removeProperty=r}}(e.styleDeclarationCb,e.mirror),F=e.recordCanvas?function(e,t,n){var r,o,s=Object.getOwnPropertyNames(CanvasRenderingContext2D.prototype),u=[],c=function(r){try{if("function"!=typeof CanvasRenderingContext2D.prototype[r])return"continue";var o=l.patch(CanvasRenderingContext2D.prototype,r,(function(o){return function(){for(var a=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];return l.isBlocked(this.canvas,t)||setTimeout((function(){var t=i(s);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var o=t[0],l=o.getContext("2d"),u=null==l?void 0:l.getImageData(0,0,o.width,o.height),c=null==u?void 0:u.data;t[0]=JSON.stringify(c)}e({id:n.getId(a.canvas),property:r,args:t})}),0),o.apply(this,s)}}));u.push(o)}catch(t){var a=l.hookSetter(CanvasRenderingContext2D.prototype,r,{set:function(t){e({id:n.getId(this.canvas),property:r,args:[t],setter:!0})}});u.push(a)}};try{for(var d=a(s),p=d.next();!p.done;p=d.next())c(p.value)}catch(e){r={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,e.blockClass,e.mirror):function(){},L=e.collectFonts?function(e){var t=[],n=new WeakMap,r=FontFace;window.FontFace=function(e,t,o){var i=new r(e,t,o);return n.set(i,{family:e,buffer:"string"!=typeof t,descriptors:o,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),i};var o=l.patch(document.fonts,"add",(function(t){return function(r){return setTimeout((function(){var t=n.get(r);t&&(e(t),n.delete(r))}),0),t.apply(this,[r])}}));return t.push((function(){window.FonFace=r})),t.push(o),function(){t.forEach((function(e){return e()}))}}(e.fontCb):function(){},j=[];try{for(var B=a(e.plugins),W=B.next();!W.done;W=B.next()){var z=W.value;j.push(z.observer(z.callback,z.options))}}catch(e){o={error:e}}finally{try{W&&!W.done&&(c=B.return)&&c.call(B)}finally{if(o)throw o.error}}return function(){N.disconnect(),C(),M(),O(),_(),R(),D(),P(),A(),F(),L(),j.forEach((function(e){return e()}))}}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowDomManager=void 0;var r=n(584),o=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){r.initMutationObserver(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e,this.bypassOptions.enableStrictPrivacy),r.initScrollObserver(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();t.ShadowDomManager=o},943:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Replayer=void 0;var s=n(348),l=n(652),u=n(669),c=n(104),d=n(129),p=n(699),f=n(593),h=n(277);n(380);var m=n(401),v=36e5,y=l.default||l,g="[replayer]",S={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function b(e){return e.type==p.EventType.IncrementalSnapshot&&(e.data.source==p.IncrementalSource.TouchMove||e.data.source==p.IncrementalSource.MouseInteraction&&e.data.type==p.MouseInteractions.TouchStart)}var T=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=y(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.imageMap=new Map,this.mirror=f.createMirror(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,userTriggeredOnInput:!0,mouseTail:S,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(p.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new f.TreeIndex,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(p.ReplayerEvents.Flush,(function(){var e,t,r,i,a,s,l=n.treeIndex.flush(),u=l.scrollMap,c=l.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)}));try{for(var d=o(n.virtualStyleRulesMap.keys()),p=d.next();!p.done;p=d.next()){var f=p.value;n.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear(),n.virtualStyleRulesMap.clear();try{for(var h=o(u.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.applyScroll(v)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var y=o(c.values()),g=y.next();!g.done;g=y.next())v=g.value,n.applyInput(v)}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(p.ReplayerEvents.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var i=new c.Timer([],(null==t?void 0:t.speed)||r.speed);this.service=d.createPlayerService({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{player:e})})),this.speedService=d.createSpeedService({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===p.EventType.Meta})),s=this.service.state.context.events.find((function(e){return e.type===p.EventType.FullSnapshot}));if(a){var l=a.data,u=l.width,h=l.height;setTimeout((function(){n.emitter.emit(p.ReplayerEvents.Resize,{width:u,height:h})}),0)}s&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=s,n.rebuildFullSnapshot(s),n.iframe.contentWindow.scrollTo(s.data.initialOffset))}),1),this.service.state.context.events.find(b)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),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"))},e.prototype.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],n=this.getMetaData(),r=a([{timestamp:n.startTime}],this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)})),[{timestamp:n.endTime}]),o=1;o<r.length;o++){var i=r[o-1],s=r[o];s.timestamp-i.timestamp>1e4?t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!1}):t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!0})}var l=[],u=t[0];for(o=1;o<t.length;o++)t[o].active!=t[o-1].active&&(l.push({startTime:u.startTime,endTime:t[o-1].endTime,duration:t[o-1].endTime-u.startTime,active:t[o-1].active}),u=t[o]);for(u&&t.length>0&&l.push({startTime:u.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-u.startTime,active:t[t.length-1].active}),u=l[0],o=1;o<l.length;o++)(!l[o].active&&l[o].duration>this.config.inactiveThreshold*n.totalTime||!l[o-1].active&&l[o-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:u.startTime,endTime:l[o-1].endTime,duration:l[o-1].endTime-u.startTime,active:l[o-1].active}),u=l[o]);u&&l.length>0&&this.activityIntervals.push({startTime:u.startTime,endTime:l[l.length-1].endTime,duration:l[l.length-1].endTime-u.startTime,active:l[l.length-1].active})}return this.activityIntervals},e.prototype.getMetaData=function(){var 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}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+e,!0)},e.prototype.pause=function(e){var t;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===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(p.ReplayerEvents.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;b(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!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");var 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&&(u.polyfill(this.iframe.contentWindow,this.iframe.contentDocument),f.polyfill(this.iframe.contentWindow))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var r=o([this.mouseTail,this.iframe]),i=r.next();!i.done;i=r.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,n;try{for(var r=o(e),i=r.next();!i.done;i=r.next()){var a=i.value;switch(a.type){case p.EventType.DomContentLoaded:case p.EventType.Load:case p.EventType.Custom:continue;case p.EventType.FullSnapshot:case p.EventType.Meta:case p.EventType.Plugin:break;case p.EventType.IncrementalSnapshot:switch(a.data.source){case p.IncrementalSource.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case p.EventType.DomContentLoaded:case p.EventType.Load:break;case p.EventType.Custom:n=function(){r.emitter.emit(p.ReplayerEvents.CustomEvent,e)};break;case p.EventType.Meta:n=function(){r.emitter.emit(p.ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case p.EventType.FullSnapshot:n=function(){if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,t),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case p.EventType.IncrementalSnapshot:n=function(){var n,i;if(r.applyIncremental(e,t),!t&&(r.handleInactivity(e.timestamp),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){try{for(var a=o(r.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&r.isUserInteraction(l)){l.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=l);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}if(r.nextUserInteractionEvent){var u=r.nextUserInteractionEvent.delay-e.delay,c={speed:Math.min(Math.round(u/2e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:c}),r.emitter.emit(p.ReplayerEvents.SkipStart,c)}}}}return function(){var i,a;n&&n();try{for(var s=o(r.config.plugins||[]),l=s.next();!l.done;l=s.next())l.value.handler(e,t,{replayer:r})}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}r.service.send({type:"CAST_EVENT",payload:{event:e}});var u=r.service.state.context.events.length-1;if(e===r.service.state.context.events[u]){var c=function(){u<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(p.ReplayerEvents.Finish))};e.type===p.EventType.IncrementalSnapshot&&e.data.source===p.IncrementalSource.MouseMove&&e.data.positions.length?setTimeout((function(){c()}),Math.max(0,50-e.data.positions[0].timeOffset)):c()}}},e.prototype.handleInactivity=function(e,t){var n,r;if((e===this.inactiveEndTimestamp||t)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var i=o(this.getActivityIntervals()),a=i.next();!a.done;a=i.next()){var s=a.value;if(e>=s.startTime&&e<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}if(this.inactiveEndTimestamp){var l=this.inactiveEndTimestamp-e,u={speed:l/v*this.config.inactiveSkipTime<1e3?l/1e3:Math.round(Math.max(l,v)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(p.ReplayerEvents.SkipStart,u)}}},e.prototype.rebuildFullSnapshot=function(e,t){var n,r,i=this;if(void 0===t&&(t=!1),!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={};var a=[];this.mirror.map=s.rebuild(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}})[1];var l=function(e,t){if(u.attachDocumentToIframe(e,t),u.newDocumentQueue=u.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;u.insertStyleRules(r,o)}},u=this;try{for(var c=o(a),d=c.next();!d.done;d=c.next()){var f=d.value;l(f.mutationInQueue,f.builtNode)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}var h=this.iframe.contentDocument,m=h.documentElement,v=h.head;this.insertStyleRules(m,v),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r=h.default(this.config.blockClass).concat(this.config.insertStyleRules);this.config.pauseAnimation&&r.push("html.rrweb-paused * { animation-play-state: paused !important; }");for(var o=0;o<r.length;o++)n.sheet.insertRule(r[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var n,r,i=this,a=[];if(!t.contentDocument)for(var l=t.parentNode;l;){if(this.fragmentParentMap.has(l)){var u=l,c=this.fragmentParentMap.get(u);this.restoreRealParent(u,c);break}l=l.parentNode}s.buildNodeWithSN(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)}});var d=function(e,t){if(p.attachDocumentToIframe(e,t),p.newDocumentQueue=p.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;p.insertStyleRules(r,o)}},p=this;try{for(var f=o(a),h=f.next();!h.done;h=f.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(f.isIframeINode(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,o=new Set,i=this.service.state,a=function(){i=t.service.state};this.emitter.on(p.ReplayerEvents.Start,a),this.emitter.on(p.ReplayerEvents.Pause,a);var s=function(){t.emitter.off(p.ReplayerEvents.Start,a),t.emitter.off(p.ReplayerEvents.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(o.add(e),e.addEventListener("load",(function(){o.delete(e),0===o.size&&-1!==r&&(i.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(p.ReplayerEvents.LoadStylesheetEnd),r&&window.clearTimeout(r),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(p.ReplayerEvents.LoadStylesheetStart),r=window.setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,r=(this.service.state,function(){n.service.state});this.emitter.on(p.ReplayerEvents.Start,r),this.emitter.on(p.ReplayerEvents.Pause,r);var i=0;try{for(var a=o(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===p.EventType.IncrementalSnapshot&&l.data.source===p.IncrementalSource.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){i++;var u=document.createElement("canvas"),c=u.getContext("2d"),d=null==c?void 0:c.createImageData(u.width,u.height);null==d||d.data,JSON.parse(l.data.args[0]),null==c||c.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==i&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,o,i=this,a=e.data;switch(a.source){case p.IncrementalSource.Mutation:t&&(a.adds.forEach((function(e){return i.treeIndex.add(e)})),a.texts.forEach((function(e){return i.treeIndex.text(e)})),a.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),a.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)}))),this.applyMutation(a,t);break;case p.IncrementalSource.Drag:case p.IncrementalSource.TouchMove:case p.IncrementalSource.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){i.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case p.IncrementalSource.MouseInteraction:if(-1===a.id)break;var l=new Event(p.MouseInteractions[a.type].toLowerCase());if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(p.ReplayerEvents.MouseInteraction,{type:a.type,target:T});var u=this.config.triggerFocus;switch(a.type){case p.MouseInteractions.Blur:"blur"in T&&T.blur();break;case p.MouseInteractions.Focus:u&&T.focus&&T.focus({preventScroll:!0});break;case p.MouseInteractions.Click:case p.MouseInteractions.TouchStart:case p.MouseInteractions.TouchEnd:t?(a.type===p.MouseInteractions.TouchStart?this.touchActive=!0:a.type===p.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(console.log(a.type),a.type===p.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===p.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===p.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===p.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case p.MouseInteractions.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:T.dispatchEvent(l)}break;case p.IncrementalSource.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case p.IncrementalSource.ViewportResize:this.emitter.emit(p.ReplayerEvents.Resize,{width:a.width,height:a.height});break;case p.IncrementalSource.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case p.IncrementalSource.MediaInteraction:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var c=T;try{a.currentTime&&(c.currentTime=a.currentTime),1===a.type&&c.pause(),0===a.type&&c.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case p.IncrementalSource.StyleSheetRule:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=T,h=T.parentNode,v=this.fragmentParentMap.has(h),y=v?null:f.sheet;y||(this.virtualStyleRulesMap.has(T)?d=this.virtualStyleRulesMap.get(T):(d=[],this.virtualStyleRulesMap.set(T,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,n=e.index;if(y)try{if(Array.isArray(n)){var r=m.getPositionsAndIndex(n),o=r.positions,i=r.index;m.getNestedRule(y.cssRules,o).insertRule(t,i)}else i=void 0===n?void 0:Math.min(n,y.cssRules.length),y.insertRule(t,i)}catch(e){}else null==d||d.push({cssText:t,index:n,type:m.StyleRuleType.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(v)null==d||d.push({index:t,type:m.StyleRuleType.Remove});else try{if(Array.isArray(t)){var n=m.getPositionsAndIndex(t),r=n.positions,o=n.index;m.getNestedRule(y.cssRules,r).deleteRule(o||0)}else null==y||y.deleteRule(t)}catch(e){}}));break;case p.IncrementalSource.StyleDeclaration:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=T;var g=T.parentNode,S=this.fragmentParentMap.has(g)?null:f.sheet,b=[];S||(this.virtualStyleRulesMap.has(T)?b=this.virtualStyleRulesMap.get(T):(b=[],this.virtualStyleRulesMap.set(T,b))),a.set&&(S?m.getNestedRule(S.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority):b.push(r({type:m.StyleRuleType.SetProperty,index:a.index},a.set))),a.remove&&(S?m.getNestedRule(S.rules,a.index).style.removeProperty(a.remove.property):b.push(r({type:m.StyleRuleType.RemoveProperty,index:a.index},a.remove)));break;case p.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var T;if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{var I=T.getContext("2d");if(a.setter)return void(I[a.property]=a.args[0]);var x=I[a.property];if("drawImage"===a.property&&"string"==typeof a.args[0]){var E=this.imageMap.get(e);a.args[0]=E,x.apply(I,a.args)}else x.apply(I,a.args)}catch(e){this.warnCanvasMutationFailed(a,a.id,e)}break;case p.IncrementalSource.Font:try{var w=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(o=this.iframe.contentDocument)||void 0===o||o.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,t){var n,i,a=this;e.removes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n)return a.warnNodeNotFound(e,t.id);var r=a.mirror.getNode(t.parentId);if(!r)return a.warnNodeNotFound(e,t.parentId);if(t.isShadow&&f.hasShadowRoot(r)&&(r=r.shadowRoot),a.mirror.removeNodeFromMap(n),r){var o="__sn"in r?a.fragmentParentMap.get(r):void 0;if(o&&o.contains(n))o.removeChild(n);else if(a.fragmentParentMap.has(n)){var i=a.fragmentParentMap.get(n);r.removeChild(i),a.fragmentParentMap.delete(n)}else r.removeChild(n)}}));var l=r({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var n,r;if(!a.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=a.mirror.getNode(e.parentId);if(!o)return e.node.type===s.NodeType.Document?a.newDocumentQueue.push(e):u.push(e);var i=null;a.iframe.contentDocument.contains?i=a.iframe.contentDocument.contains(o):a.iframe.contentDocument.body.contains&&(i=a.iframe.contentDocument.body.contains(o));var c=(null===(r=(n=o).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(t&&i&&!f.isIframeINode(o)&&!c){var d=document.createDocumentFragment();for(a.mirror.map[e.parentId]=d,a.fragmentParentMap.set(d,o),a.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&f.hasShadowRoot(o)&&(o=o.shadowRoot);var p=null,h=null;if(e.previousId&&(p=a.mirror.getNode(e.previousId)),e.nextId&&(h=a.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.mirror.getNode(e.node.rootId)){var m=e.node.rootId?a.mirror.getNode(e.node.rootId):a.iframe.contentDocument;if(f.isIframeINode(o))a.attachDocumentToIframe(e,o);else{var v=s.buildNodeWithSN(e.node,{doc:m,map:a.mirror.map,skipChild:!0,hackCss:!0});if(-1!==e.previousId&&-1!==e.nextId){if(p&&p.nextSibling&&p.nextSibling.parentNode)o.insertBefore(v,p.nextSibling);else if(h&&h.parentNode)o.contains(h)?o.insertBefore(v,h):o.insertBefore(v,null);else{if(o===m)for(;m.firstChild;)m.removeChild(m.firstChild);o.appendChild(v)}if(f.isIframeINode(v)){var y=a.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(a.attachDocumentToIframe(y,v),a.newDocumentQueue=a.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,S=g.documentElement,b=g.head;a.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&a.legacy_resolveMissingNode(l,o,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var d=Date.now();u.length;){var p=f.queueToResolveTrees(u);if(u.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}try{for(var h=(n=void 0,o(p)),m=h.next();!m.done;m=h.next()){var v=m.value;this.mirror.getNode(v.value.parentId)?f.iterateResolveTree(v,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n)return a.warnNodeNotFound(e,t.id);a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n)return a.warnNodeNotFound(e,t.id);for(var r in a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];try{null!==o?n.setAttribute(r,o):n.removeAttribute(r)}catch(e){a.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var 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){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,u=l.node,c=l.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var d=s;u=d.node,c=d.mutation,t.insertBefore(u,n.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}},e.prototype.moveAndHover=function(e,t,n,r,o){var i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(o,n);var a=f.getBaseDimension(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",r||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?S:Object.assign({},S,this.config.mouseTail),r=n.lineCap,o=n.lineWidth,i=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=o,e.lineCap=r,e.strokeStyle=i,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===p.EventType.IncrementalSnapshot&&e.data.source>p.IncrementalSource.Mutation&&e.data.source<=p.IncrementalSource.Input},e.prototype.backToNormal=function(){this.inactiveEndTimestamp=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(p.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,t){this.mirror.map[t.__sn.id]=t,t.__sn.type===s.NodeType.Element&&"textarea"===t.__sn.tagName&&e.textContent&&(t.value=e.textContent),t.appendChild(e),this.restoreState(t)},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var r=e;(r.scrollLeft||r.scrollTop)&&this.elementStateMap.set(e,{scroll:[r.scrollLeft,r.scrollTop]}),"STYLE"===r.tagName&&m.storeCSSRules(r,this.virtualStyleRulesMap);var i=r.children;try{for(var a=o(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var r=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(r.scrollLeft=i.scroll[0],r.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=r.children;try{for(var s=o(Array.from(a)),l=s.next();!l.done;l=s.next()){var u=l.value;this.restoreState(u)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);if("STYLE"===e.nodeName&&t){var n=e;m.applyVirtualStyleRulesToNode(t,n)}},e.prototype.warnNodeNotFound=function(e,t){this.warn("Node with id '"+t+"' not found in",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.debug(g,"Node with id '"+t+"' not found in",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,a([g],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,a([g],e))},e}();t.Replayer=T},129:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.createSpeedService=t.createPlayerService=t.discardPriorSnapshots=void 0;var i=n(537),a=n(699),s=n(104);function l(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===a.EventType.Meta&&r.timestamp<=t)return e.slice(n)}return e}t.discardPriorSnapshots=l,t.createPlayerService=function(e,t){var n=t.getCastFn,u=t.applyEventsSynchronously,c=t.emitter,d=i.createMachine({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:i.assign({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:i.assign((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,i,d,p,f=e.timer,h=e.events,m=e.baselineTime,v=e.lastPlayedEvent;f.clear();try{for(var y=o(h),g=y.next();!g.done;g=y.next()){var S=g.value;s.addDelay(S,m)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}var b=l(h,m),T=null==v?void 0:v.timestamp;(null==v?void 0:v.type)===a.EventType.IncrementalSnapshot&&v.data.source===a.IncrementalSource.MouseMove&&(T=v.timestamp+(null===(p=v.data.positions[0])||void 0===p?void 0:p.timeOffset)),m<(T||0)&&c.emit(a.ReplayerEvents.PlayBack);var I=new Array,x=new Array,E=function(e){if(T&&T<m&&(e.timestamp<=T||e===v))return"continue";if(e.timestamp<m)I.push(e);else{var t=n(e,!1);x.push({doAction:function(){t(),c.emit(a.ReplayerEvents.EventCast,e)},delay:e.delay})}};try{for(var w=o(b),k=w.next();!k.done;k=w.next())E(k.value)}catch(e){i={error:e}}finally{try{k&&!k.done&&(d=w.return)&&d.call(w)}finally{if(i)throw i.error}}u(I),c.emit(a.ReplayerEvents.Flush),f.addActions(x),f.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:i.assign((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:i.assign({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:i.assign((function(e,t){var o=e.baselineTime,i=e.timer,l=e.events;if("ADD_EVENT"===t.type){var u=t.payload.event;s.addDelay(u,o);var d=l.length-1;if(!l[d]||l[d].timestamp<=u.timestamp)l.push(u);else{for(var p=-1,f=0;f<=d;){var h=Math.floor((f+d)/2);l[h].timestamp<=u.timestamp?f=h+1:d=h-1}-1===p&&(p=f),l.splice(p,0,u)}var m=u.timestamp<o,v=n(u,m);m?v():i.isActive()&&i.addAction({doAction:function(){v(),c.emit(a.ReplayerEvents.EventCast,u)},delay:u.delay})}return r(r({},e),{events:l})}))}});return i.interpret(d)},t.createSpeedService=function(e){var t=i.createMachine({id:"speed",context:e,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:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:i.assign({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}});return i.interpret(t)}},669:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.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])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=p(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function c(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&c(e,"Y"),n=u(e,"X")&&c(e,"X");return t||n}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function h(n,r,a){var l,u,c,d,p=i();n===t.body?(l=e,u=e.scrollX||e.pageXOffset,c=e.scrollY||e.pageYOffset,d=o.scroll):(l=n,u=n.scrollLeft,c=n.scrollTop,d=s),f({scrollable:l,method:d,startTime:p,startX:u,startY:c,x:r,y:a})}}},277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return["noscript { display: none !important; }","."+e+" { background: currentColor; border-radius: 5px; }","."+e+":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}"]}},104:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDelay=t.Timer=void 0;var r=n(699),o=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var o=performance.now();for(n.timeOffset+=(o-e)*n.speed,e=o;t.length;){var i=t[0];if(!(n.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r;n=r-1}}return t},e}();t.Timer=o,t.addDelay=function(e,t){if(e.type===r.EventType.IncrementalSnapshot&&e.data.source===r.IncrementalSource.MouseMove){var n=e.data.positions[0].timeOffset,o=e.timestamp+n;return e.delay=o-t,o-t}return e.delay=e.timestamp-t,e.delay}},401:function(e,t){var n,r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e};function i(e,t){var n=e[t[0]];return 1===t.length?n:i(n.cssRules[t[1]].cssRules,t.slice(2))}function a(e){var t=o(e),n=t.pop();return{positions:t,index:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.storeCSSRules=t.applyVirtualStyleRulesToNode=t.getPositionsAndIndex=t.getNestedRule=t.StyleRuleType=void 0,function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(n=t.StyleRuleType||(t.StyleRuleType={})),t.getNestedRule=i,t.getPositionsAndIndex=a,t.applyVirtualStyleRulesToNode=function(e,t){e.forEach((function(e){var o,s;if(e.type===n.Insert)try{if(Array.isArray(e.index)){var l=a(e.index),u=l.positions,c=l.index;i(t.sheet.cssRules,u).insertRule(e.cssText,c)}else null===(o=t.sheet)||void 0===o||o.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===n.Remove)try{if(Array.isArray(e.index)){var d=a(e.index);u=d.positions,c=d.index,i(t.sheet.cssRules,u).deleteRule(c||0)}else null===(s=t.sheet)||void 0===s||s.deleteRule(e.index)}catch(e){}else e.type===n.Snapshot?function(e,t){var n;try{var o=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(o).reverse(),a=o.length;i.forEach((function(n){var o,i=r(n,2),s=i[0],l=i[1],u=e.indexOf(l);if(-1===u||u>a)try{null===(o=t.sheet)||void 0===o||o.deleteRule(Number(s))}catch(e){}a=u})),e.forEach((function(e,n){var r,o,i;try{(null===(o=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t):e.type===n.SetProperty?i(t.sheet.cssRules,e.index).style.setProperty(e.property,e.value,e.priority):e.type===n.RemoveProperty&&i(t.sheet.cssRules,e.index).style.removeProperty(e.property)}))},t.storeCSSRules=function(e,t){var r;try{var o=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:n.Snapshot,cssTexts:o}])}catch(e){}}},490:function(e,t){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(e){return e?e.replace(/^\s+|\s+$/g,""):""}function i(e,t){var r,o,a=e&&"string"==typeof e.type,s=a?e:t;try{for(var l=n(Object.keys(e)),u=l.next();!u.done;u=l.next()){var c=e[u.value];Array.isArray(c)?c.forEach((function(e){i(e,s)})):c&&"object"==typeof c&&i(c,s)}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}t.parse=function(e,t){void 0===t&&(t={});var n=1,a=1;function s(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");a=-1===r?a+e.length:e.length-r}function l(){var e={line:n,column:a};return function(t){return t.position=new u(e),v(),t}}var u=function(e){this.start=e,this.end={line:n,column:a},this.source=t.source};u.prototype.content=e;var c=[];function d(r){var o=new Error(t.source+":"+n+":"+a+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=a,o.source=e,!t.silent)throw o;c.push(o)}function p(){return m(/^{\s*/)}function f(){return m(/^}/)}function h(){var t,n,r,o=[];for(v(),y(o);e.length&&"}"!==e.charAt(0)&&(t=C()||(n=void 0,r=void 0,n=l(),(r=S())?(y(),n({type:"rule",selectors:r,declarations:T()})):d("selector missing")));)!1!==t&&(o.push(t),y(o));return o}function m(t){var n=t.exec(e);if(n){var r=n[0];return s(r),e=e.slice(r.length),n}}function v(){m(/^\s*/)}function y(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=l();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var r=e.slice(2,n-2);return a+=2,s(r),e=e.slice(n),a+=2,t({type:"comment",comment:r})}}function S(){var e=m(/^([^{]+)/);if(e)return o(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 b(){var e=l(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=o(t[0]);if(!m(/^:\s*/))return d("property missing ':'");var i=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:n.replace(r,""),value:i?o(i[0]).replace(r,""):""});return m(/^[;\s]*/),a}}function T(){var e,t=[];if(!p())return d("missing '{'");for(y(t);e=b();)!1!==e&&(t.push(e),y(t)),e=b();return f()?t:d("missing '}'")}function I(){for(var e,t=[],n=l();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:T()})}var x,E=N("import"),w=N("charset"),k=N("namespace");function N(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=l(),r=m(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function C(){if("@"===e[0])return function(){var e=l(),t=m(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=m(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=y();r=I();)i.push(r),i=i.concat(y());return f()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=l(),t=m(/^@media *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@media missing '{'");var r=y().concat(h());return f()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=l(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:o(t[1]),media:o(t[2])})}()||function(){var e=l(),t=m(/^@supports *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@supports missing '{'");var r=y().concat(h());return f()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||E()||w()||k()||function(){var e=l(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var n=o(t[1]),r=o(t[2]);if(!p())return d("@document missing '{'");var i=y().concat(h());return f()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=l();if(m(/^@page */)){var t=S()||[];if(!p())return d("@page missing '{'");for(var n,r=y();n=b();)r.push(n),r=r.concat(y());return f()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=l();if(m(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=y().concat(h());return f()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=l();if(m(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,n=y();t=b();)n.push(t),n=n.concat(y());return f()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}return i((x=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:c}}))}},348:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.IGNORED_NODE=t.needMaskingText=t.cleanupSnapshot=t.visitSnapshot=t.transformAttribute=t.addHoverClass=t.buildNodeWithSN=t.rebuild=t.serializeNodeWithId=t.snapshot=void 0;var i=n(858);t.snapshot=i.default,Object.defineProperty(t,"serializeNodeWithId",{enumerable:!0,get:function(){return i.serializeNodeWithId}}),Object.defineProperty(t,"transformAttribute",{enumerable:!0,get:function(){return i.transformAttribute}}),Object.defineProperty(t,"visitSnapshot",{enumerable:!0,get:function(){return i.visitSnapshot}}),Object.defineProperty(t,"cleanupSnapshot",{enumerable:!0,get:function(){return i.cleanupSnapshot}}),Object.defineProperty(t,"needMaskingText",{enumerable:!0,get:function(){return i.needMaskingText}}),Object.defineProperty(t,"IGNORED_NODE",{enumerable:!0,get:function(){return i.IGNORED_NODE}});var a=n(189);t.rebuild=a.default,Object.defineProperty(t,"buildNodeWithSN",{enumerable:!0,get:function(){return a.buildNodeWithSN}}),Object.defineProperty(t,"addHoverClass",{enumerable:!0,get:function(){return a.addHoverClass}}),o(n(397),t),o(n(606),t)},189:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.buildNodeWithSN=t.addHoverClass=void 0;var o=n(490),i=n(397),a=n(606),s={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"},l=/([^\\]):hover/,u=new RegExp(l,"g");function c(e){var t;if(!(null===(t=window.HIG_CONFIGURATION)||void 0===t?void 0:t.enableOnHoverClass))return e;var n=o.parse(e,{silent:!0});if(!n.stylesheet)return e;var r=[];if(n.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){l.test(e)&&r.push(e)}))})),0===r.length)return e;var i=new 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");return e.replace(i,(function(e){var t=e.replace(u,"$1.\\:hover");return e+", "+t}))}function d(e,t){var n,o,l=t.doc,u=t.map,p=t.skipChild,f=void 0!==p&&p,h=t.hackCss,m=void 0===h||h,v=t.afterAppend,y=function(e,t){var n=t.doc,o=t.hackCss;switch(e.type){case i.NodeType.Document:return n.implementation.createDocument(null,"",null);case i.NodeType.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case i.NodeType.Element:var a,l=function(e){var t=s[e.tagName]?s[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);a=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",l):n.createElement(l);var u=function(t){var i,s;if(!e.attributes.hasOwnProperty(t))return"continue";var u=e.attributes[t];if(u="boolean"==typeof u||"number"==typeof u?"":u,t.startsWith("rr_")){if("canvas"===l&&"rr_dataURL"===t){var d=document.createElement("img");d.src=u,d.onload=function(){var e=a.getContext("2d");e&&e.drawImage(d,0,0,d.width,d.height)}}if("rr_width"===t&&(a.style.width=u),"rr_height"===t&&(a.style.height=u),"rr_mediaCurrentTime"===t&&(a.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(u){case"played":a.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":a.pause()}}else{var p="textarea"===l&&"value"===t,f="style"===l&&"_cssText"===t;if(f&&o&&(u=c(u)),p||f){var h=n.createTextNode(u);try{for(var m=(i=void 0,r(Array.from(a.childNodes))),v=m.next();!v.done;v=m.next()){var y=v.value;y.nodeType===a.TEXT_NODE&&a.removeChild(y)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(s=m.return)&&s.call(m)}finally{if(i)throw i.error}}return a.appendChild(h),"continue"}try{if(e.isSVG&&"xlink:href"===t)a.setAttributeNS("http://www.w3.org/1999/xlink",t,u);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))a.setAttribute("_"+t,u);else{if("meta"===l&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return a.setAttribute("csp-content",u),"continue";a.setAttribute(t,u)}}catch(e){}}};for(var d in e.attributes)u(d);if(e.isShadowHost)if(a.shadowRoot)for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);else a.attachShadow({mode:"open"});return a;case i.NodeType.Text:return n.createTextNode(e.isStyle&&o?c(e.textContent):e.textContent);case i.NodeType.CDATA:return n.createCDATASection(e.textContent);case i.NodeType.Comment:return n.createComment(e.textContent);default:return null}}(e,{doc:l,hackCss:m});if(!y)return null;if(e.rootId&&console.assert(u[e.rootId]===l,"Target document should has the same root id."),e.type===i.NodeType.Document&&(l.close(),l.open(),y=l),y.__sn=e,u[e.id]=y,(e.type===i.NodeType.Document||e.type===i.NodeType.Element)&&!f)try{for(var g=r(e.childNodes),S=g.next();!S.done;S=g.next()){var b=S.value,T=d(b,{doc:l,map:u,skipChild:!1,hackCss:m,afterAppend:v});T?(b.isShadow&&a.isElement(y)&&y.shadowRoot?y.shadowRoot.appendChild(T):y.appendChild(T),v&&v(T)):console.warn("Failed to rebuild",b)}}catch(e){n={error:e}}finally{try{S&&!S.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}return y}t.addHoverClass=c,t.buildNodeWithSN=d,t.default=function(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,a={},s=d(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:t.afterAppend});return function(e,t){for(var n in e)e[n]&&t(e[n])}(a,(function(e){r&&r(e),function(e){var t=e.__sn;if(t.type===i.NodeType.Element){var n=e;for(var r in t.attributes)if(t.attributes.hasOwnProperty(r)&&r.startsWith("rr_")){var o=t.attributes[r];"rr_scrollLeft"===r&&(n.scrollLeft=o),"rr_scrollTop"===r&&(n.scrollTop=o)}}}(e)})),[s,a]}},858:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupSnapshot=t.visitSnapshot=t.serializeNodeWithId=t.needMaskingText=t._isBlockedElement=t.transformAttribute=t.absoluteToDoc=t.absoluteToStylesheet=t.IGNORED_NODE=void 0;var o=n(397),i=n(606),a=1,s=RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(u).join(""):null}catch(e){return null}}function u(e){return function(e){return"styleSheet"in e}(e)?l(e.styleSheet)||"":e.cssText}t.IGNORED_NODE=-2;var c=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,d=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,p=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(c,(function(e,n,o,i,a,s){var l,u,c,f=o||a||s,h=n||i||"";if(!f)return e;if(!d.test(f))return"url("+h+f+h+")";if(p.test(f))return"url("+h+f+h+")";if("/"===f[0])return"url("+h+(((c=t).indexOf("//")>-1?c.split("/").slice(0,3).join("/"):c.split("/")[0]).split("?")[0]+f)+h+")";var m=t.split("/"),v=f.split("/");m.pop();try{for(var y=r(v),g=y.next();!g.done;g=y.next()){var S=g.value;"."!==S&&(".."===S?m.pop():m.push(S))}}catch(e){l={error:e}}finally{try{g&&!g.done&&(u=y.return)&&u.call(y)}finally{if(l)throw l.error}}return"url("+h+m.join("/")+h+")"}))}t.absoluteToStylesheet=f;var h=/^[^ \t\n\r\u000c]+/,m=/^[, \t\n\r\u000c]+/;function v(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function y(){var e=document.createElement("a");return e.href="",e.href}function g(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?v(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(m),!(n>=t.length);){var i=r(h);if(","===i.slice(-1))i=v(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=v(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,y()):r:v(e,r)}function S(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}function b(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||b(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,b(e.parentNode,t,n)}function T(e){return void 0===e?"":e.toLowerCase()}function I(e,n){var u,c,d,p,h,m=n.doc,v=n.map,x=n.blockClass,E=n.blockSelector,w=n.maskTextClass,k=n.maskTextSelector,N=n.skipChild,C=void 0!==N&&N,M=n.inlineStylesheet,O=void 0===M||M,_=n.maskInputOptions,R=void 0===_?{}:_,D=n.maskTextFn,P=n.maskInputFn,A=n.slimDOMOptions,F=n.recordCanvas,L=void 0!==F&&F,j=n.onSerialize,B=n.onIframeLoad,W=n.iframeLoadTimeout,z=void 0===W?5e3:W,V=n.keepIframeSrcFn,H=void 0===V?function(){return!1}:V,U=n.enableStrictPrivacy,G=n.preserveWhiteSpace,Y=void 0===G||G,X=function(e,t){var n,a,u,c,d=t.doc,p=t.blockClass,h=t.blockSelector,m=t.maskTextClass,v=t.maskTextSelector,T=t.inlineStylesheet,I=t.maskInputOptions,x=void 0===I?{}:I,E=t.maskTextFn,w=t.maskInputFn,k=t.recordCanvas,N=t.keepIframeSrcFn,C=t.enableStrictPrivacy;if(d.__sn){var M=d.__sn.id;u=1===M?void 0:M}switch(e.nodeType){case e.DOCUMENT_NODE:return{type:o.NodeType.Document,childNodes:[],rootId:u};case e.DOCUMENT_TYPE_NODE:return{type:o.NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:u};case e.ELEMENT_NODE:var O=S(e,p,h),_=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return s.test(t)?"div":t}(e),R={};try{for(var D=r(Array.from(e.attributes)),P=D.next();!P.done;P=D.next()){var A=P.value,F=A.name,L=A.value;R[F]=g(d,_,F,L)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(a=D.return)&&a.call(D)}finally{if(n)throw n.error}}if("link"===_&&T){var j,B=Array.from(d.styleSheets).find((function(t){return t.href===e.href}));(j=l(B))&&(delete R.rel,delete R.href,R._cssText=f(j,B.href))}if("style"===_&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(j=l(e.sheet))&&(R._cssText=f(j,y())),"input"!==_&&"textarea"!==_&&"select"!==_||(L=e.value,"radio"!==R.type&&"checkbox"!==R.type&&"submit"!==R.type&&"button"!==R.type&&L?"password"===R.type?R.value="*".repeat(L.length):R.value=i.maskInputValue({type:R.type,tagName:_,value:L,maskInputOptions:x,maskInputFn:w}):e.checked&&(R.checked=e.checked)),"option"===_){var W=e.parentElement;R.value===W.value&&(R.selected=e.selected)}if("canvas"===_&&k&&(R.rr_dataURL=e.toDataURL()),"audio"!==_&&"video"!==_||(R.rr_mediaState=e.paused?"paused":"played",R.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(R.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(R.rr_scrollTop=e.scrollTop),O||"img"===_&&C){var z=e.getBoundingClientRect(),V=z.width,H=z.height;R={class:R.class,rr_width:V+"px",rr_height:H+"px"},O=!0}return"iframe"!==_||N(R.src)||delete R.src,{type:o.NodeType.Element,tagName:_,attributes:R,childNodes:[],isSVG:(c=e,"svg"===c.tagName||c instanceof SVGElement||void 0),needBlock:O,rootId:u};case e.TEXT_NODE:var U=e.parentNode&&e.parentNode.tagName,G=e.textContent,Y="STYLE"===U||void 0,X="SCRIPT"===U||void 0,q=!1;return Y&&G&&(G=f(G,y()),q=!0),X?(G="SCRIPT_PLACEHOLDER",q=!0):"NOSCRIPT"===U&&(G="",q=!0),!Y&&!X&&b(e,m,v)&&G&&(G=E?E(G):G.replace(/[\S]/g,"*")),C&&!q&&U&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(U)&&G&&(G=(null==(G=G.replace(/[^ -~]+/g,""))?void 0:G.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""),{type:o.NodeType.Text,textContent:G||"",isStyle:Y,rootId:u};case e.CDATA_SECTION_NODE:return{type:o.NodeType.CDATA,textContent:"",rootId:u};case e.COMMENT_NODE:return{type:o.NodeType.Comment,textContent:e.textContent||"",rootId:u};default:return!1}}(e,{doc:m,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:k,inlineStylesheet:O,maskInputOptions:R,maskTextFn:D,maskInputFn:P,recordCanvas:L,keepIframeSrcFn:H,enableStrictPrivacy:U});if(!X)return console.warn(e,"not serialized"),null;h="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===o.NodeType.Comment)return!0;if(e.type===o.NodeType.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(T(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(e.attributes.name)||"icon"===T(e.attributes.rel)||"apple-touch-icon"===T(e.attributes.rel)||"shortcut icon"===T(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&T(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(T(e.attributes.property).match(/^(og|twitter|fb):/)||T(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===T(e.attributes.name)||"googlebot"===T(e.attributes.name)||"bingbot"===T(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===T(e.attributes.name)||"generator"===T(e.attributes.name)||"framework"===T(e.attributes.name)||"publisher"===T(e.attributes.name)||"progid"===T(e.attributes.name)||T(e.attributes.property).match(/^article:/)||T(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===T(e.attributes.name)||"yandex-verification"===T(e.attributes.name)||"csrf-token"===T(e.attributes.name)||"p:domain_verify"===T(e.attributes.name)||"verify-v1"===T(e.attributes.name)||"verification"===T(e.attributes.name)||"shopify-checkout-api-token"===T(e.attributes.name)))return!0}}return!1}(X,A)&&(Y||X.type!==o.NodeType.Text||X.isStyle||X.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:t.IGNORED_NODE;var q=Object.assign(X,{id:h});if(e.__sn=q,h===t.IGNORED_NODE)return null;v[h]=e,j&&j(e);var Q=!C;if(q.type===o.NodeType.Element){if(Q=Q&&!q.needBlock,q.needBlock&&"img"===q.tagName){var $=e.cloneNode();$.src="",v[h]=$}delete q.needBlock}if((q.type===o.NodeType.Document||q.type===o.NodeType.Element)&&Q){A.headWhitespace&&X.type===o.NodeType.Element&&"head"===X.tagName&&(Y=!1);var K={doc:m,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:k,skipChild:C,inlineStylesheet:O,maskInputOptions:R,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U};try{for(var J=r(Array.from(e.childNodes)),Z=J.next();!Z.done;Z=J.next())(ne=I(Z.value,K))&&q.childNodes.push(ne)}catch(e){u={error:e}}finally{try{Z&&!Z.done&&(c=J.return)&&c.call(J)}finally{if(u)throw u.error}}if(i.isElement(e)&&e.shadowRoot){q.isShadowHost=!0;try{for(var ee=r(Array.from(e.shadowRoot.childNodes)),te=ee.next();!te.done;te=ee.next()){var ne;(ne=I(te.value,K))&&(ne.isShadow=!0,q.childNodes.push(ne))}}catch(e){d={error:e}}finally{try{te&&!te.done&&(p=ee.return)&&p.call(ee)}finally{if(d)throw d.error}}}}return e.parentNode&&i.isShadowRoot(e.parentNode)&&(q.isShadow=!0),q.type===o.NodeType.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&B){var n=I(t,{doc:t,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:k,skipChild:!1,inlineStylesheet:O,maskInputOptions:R,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U});n&&B(e,n)}}),z),q}t.absoluteToDoc=v,t.transformAttribute=g,t._isBlockedElement=S,t.needMaskingText=b,t.serializeNodeWithId=I,t.visitSnapshot=function(e,t){!function e(n){t(n),n.type!==o.NodeType.Document&&n.type!==o.NodeType.Element||n.childNodes.forEach(e)}(e)},t.cleanupSnapshot=function(){a=1},t.default=function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"highlight-block":r,i=n.blockSelector,a=void 0===i?null:i,s=n.maskTextClass,l=void 0===s?"highlight-mask":s,u=n.maskTextSelector,c=void 0===u?null:u,d=n.inlineStylesheet,p=void 0===d||d,f=n.recordCanvas,h=void 0!==f&&f,m=n.maskAllInputs,v=void 0!==m&&m,y=n.maskTextFn,g=n.maskInputFn,S=n.slimDOM,b=void 0!==S&&S,T=n.preserveWhiteSpace,x=n.onSerialize,E=n.onIframeLoad,w=n.iframeLoadTimeout,k=n.keepIframeSrcFn,N=void 0===k?function(){return!1}:k,C=n.enableStrictPrivacy,M={};return[I(e,{doc:e,map:M,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===v?{password:!0}:v,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,recordCanvas:h,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:w,keepIframeSrcFn:N,enableStrictPrivacy:void 0!==C&&C}),M]}},397:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(n=t.NodeType||(t.NodeType={}))[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment"},606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.maskInputValue=t.isShadowRoot=t.isElement=void 0,t.isElement=function(e){return e.nodeType===e.ELEMENT_NODE},t.isShadowRoot=function(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)},t.maskInputValue=function(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}},699:(e,t)=>{var n,r,o,i,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayerEvents=t.MediaInteractions=t.MouseInteractions=t.IncrementalSource=t.EventType=void 0,(a=t.EventType||(t.EventType={}))[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",(i=t.IncrementalSource||(t.IncrementalSource={}))[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",(o=t.MouseInteractions||(t.MouseInteractions={}))[o.MouseUp=0]="MouseUp",o[o.MouseDown=1]="MouseDown",o[o.Click=2]="Click",o[o.ContextMenu=3]="ContextMenu",o[o.DblClick=4]="DblClick",o[o.Focus=5]="Focus",o[o.Blur=6]="Blur",o[o.TouchStart=7]="TouchStart",o[o.TouchMove_Departed=8]="TouchMove_Departed",o[o.TouchEnd=9]="TouchEnd",o[o.TouchCancel=10]="TouchCancel",(r=t.MediaInteractions||(t.MediaInteractions={}))[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",(n=t.ReplayerEvents||(t.ReplayerEvents={})).Start="start",n.Pause="pause",n.Resume="resume",n.Resize="resize",n.Finish="finish",n.FullsnapshotRebuilded="fullsnapshot-rebuilded",n.LoadStylesheetStart="load-stylesheet-start",n.LoadStylesheetEnd="load-stylesheet-end",n.SkipStart="skip-start",n.SkipEnd="skip-end",n.MouseInteraction="mouse-interaction",n.EventCast="event-cast",n.CustomEvent="custom-event",n.Flush="flush",n.StateChange="state-change",n.PlayBack="play-back"},593:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.hasShadowRoot=t.getBaseDimension=t.isIframeINode=t.iterateResolveTree=t.queueToResolveTrees=t.TreeIndex=t.polyfill=t.isTouchEvent=t.isAncestorRemoved=t.isIgnored=t.isBlocked=t.getWindowWidth=t.getWindowHeight=t.patch=t.hookSetter=t.throttle=t._mirror=t.createMirror=t.on=void 0;var o=n(699),i=n(348);t.on=function(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},t.createMirror=function(){return{map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}};var a="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.";t._mirror={map:{},getId:function(){return console.error(a),-1},getNode:function(){return console.error(a),null},removeNodeFromMap:function(){console.error(a)},has:function(){return console.error(a),!1},reset:function(){console.error(a)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(t._mirror=new Proxy(t._mirror,{get:function(e,t,n){return"map"===t&&console.error(a),Reflect.get(e,t,n)}})),t.throttle=function(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),l=this,u=arguments;s<=0||s>t?(r&&(window.clearTimeout(r),r=null),o=a,e.apply(l,u)):r||!1===n.trailing||(r=window.setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,u)}),s))}},t.hookSetter=function e(t,n,r,o,i){void 0===i&&(i=window);var a=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}},t.patch=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}},t.getWindowHeight=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},t.getWindowWidth=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},t.isBlocked=function e(t,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){var r=!1;return"string"==typeof n?r=t.classList.contains(n):t.classList.forEach((function(e){n.test(e)&&(r=!0)})),r||e(t.parentNode,n)}return t.nodeType,t.TEXT_NODE,e(t.parentNode,n)},t.isIgnored=function(e){return"__sn"in e&&e.__sn.id===i.IGNORED_NODE},t.isAncestorRemoved=function e(t,n){if(i.isShadowRoot(t))return!1;var r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))},t.isTouchEvent=function(e){return Boolean(e.changedTouches)},t.polyfill=function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})};var s=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],n.indexes.delete(e.id))}};o?r?(delete o.parent,delete r.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,a=this,s=this,l=s.tree,u=s.removeNodeMutations,c=s.textMutations,d=s.attributeMutations,p={source:o.IncrementalSource.Mutation,removes:u,texts:c,attributes:d,adds:[]},f=function(e,t){t&&a.removeIdSet.add(e.id),p.texts=p.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),p.attributes=p.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(p.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(l).forEach((function(e){return f(e,!1)}));try{for(var h=r(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=r(this.inputMap.keys()),g=y.next();!g.done;g=y.next())v=g.value,this.removeIdSet.has(v)&&this.inputMap.delete(v)}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}var S=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:p,scrollMap:S,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e}();t.TreeIndex=s,t.queueToResolveTrees=function(e){var t,n,o={},i=function(e,t){var n={value:e,parent:t,children:[]};return o[e.node.id]=n,n},a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.nextId,d=u.parentId;if(c&&c in o){var p=o[c];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,i(u,p.parent))}else f=a.indexOf(p),a.splice(f,0,i(u,null))}else if(d in o){var h=o[d];h.children.push(i(u,h))}else a.push(i(u,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},t.iterateResolveTree=function e(t,n){n(t.value);for(var r=t.children.length-1;r>=0;r--)e(t.children[r],n)},t.isIframeINode=function(e){return"__sn"in e&&e.__sn.type===i.NodeType.Element&&"iframe"===e.__sn.tagName},t.getBaseDimension=function e(t,n){var r,o,i=null===(o=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===o?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,n),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},t.hasShadowRoot=function(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.mirror=e.Replayer=e.freezePage=e.addCustomEvent=e.record=void 0;var t=n(476);e.record=t.default;var o=n(943);Object.defineProperty(e,"Replayer",{enumerable:!0,get:function(){return o.Replayer}});var i=n(593);Object.defineProperty(e,"mirror",{enumerable:!0,get:function(){return i._mirror}});var a=n(593);e.utils=a;var s=n(699);Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return s.EventType}}),Object.defineProperty(e,"IncrementalSource",{enumerable:!0,get:function(){return s.IncrementalSource}}),Object.defineProperty(e,"MouseInteractions",{enumerable:!0,get:function(){return s.MouseInteractions}}),Object.defineProperty(e,"ReplayerEvents",{enumerable:!0,get:function(){return s.ReplayerEvents}});var l=t.default.addCustomEvent;e.addCustomEvent=l;var u=t.default.freezePage;e.freezePage=u})(),r})()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.highlightLib=t():e.highlightLib=t()}(self,(function(){return(()=>{"use strict";var e={537:(e,t,n)=>{function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var o;n.r(t),n.d(t,{InterpreterStatus:()=>o,assign:()=>s,createMachine:()=>f,interpret:()=>m}),function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(o||(o={}));var i={type:"xstate.init"};function a(e){return void 0===e?[]:[].concat(e)}function s(e){return{type:"xstate.assign",assignment:e}}function l(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 c(e){return function(t){return e===t}}function u(e){return"string"==typeof e?{type:e}:e}function d(e,t){return{value:e,context:t,actions:[],changed:!1,matches:c(e)}}function p(e,t,n){var r=t,o=!1;return[e.filter((function(e){if("xstate.assign"===e.type){o=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(o){t[o]="function"==typeof e.assignment[o]?e.assignment[o](r,n):e.assignment[o]})),r=t,!1}return!0})),r,o]}function f(e,t){void 0===t&&(t={});var n=r(p(a(e.states[e.initial].entry).map((function(e){return l(e,t.actions)})),e.context,i),2),o=n[0],s=n[1],f={config:e,_options:t,initialState:{value:e.initial,actions:o,context:s,matches:c(e.initial)},transition:function(t,n){var o,i,s="string"==typeof t?{value:t,context:e.context}:t,h=s.value,m=s.context,v=u(n),y=e.states[h];if(y.on){var g=a(y.on[v.type]);try{for(var S=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(g),b=S.next();!b.done;b=S.next()){var T=b.value;if(void 0===T)return d(h,m);var I="string"==typeof T?{target:T}:T,x=I.target,E=I.actions,w=void 0===E?[]:E,C=I.cond,k=void 0===x;if((void 0===C?function(){return!0}:C)(m,v)){var N=e.states[null!=x?x:h],M=r(p((k?a(w):[].concat(y.exit,w,N.entry).filter((function(e){return e}))).map((function(e){return l(e,f._options.actions)})),m,v),3),R=M[0],O=M[1],_=M[2],D=null!=x?x:h;return{value:D,context:O,actions:R,changed:x!==h||R.length>0||_,matches:c(D)}}}}catch(e){o={error:e}}finally{try{b&&!b.done&&(i=S.return)&&i.call(S)}finally{if(o)throw o.error}}}return d(h,m)}};return f}var h=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function m(e){var t=e.initialState,n=o.NotStarted,r=new Set,a={_machine:e,send:function(i){n===o.Running&&(t=e.transition(t,i),h(t,u(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var s="object"==typeof r?r:{context:e.config.context,value:r};t={value:s.value,actions:[],context:s.context,matches:c(s.value)}}return n=o.Running,h(t,i),a},stop:function(){return n=o.Stopped,r.clear(),a},get state(){return t},get status(){return n}};return a}},380:(e,t,n)=>{n.r(t)},652:(e,t,n)=>{n.r(t),n.d(t,{default:()=>r});const r=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}}},463:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IframeManager=void 0;var n=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}();t.IframeManager=n},476:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};Object.defineProperty(t,"__esModule",{value:!0});var i,a,s=n(348),l=n(584),c=n(593),u=n(699),d=n(463),p=n(783);function f(e){return r(r({},e),{timestamp:Date.now()})}var h=c.createMirror();function m(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,m=e.checkoutEveryNth,v=e.blockClass,y=void 0===v?"highlight-block":v,g=e.blockSelector,S=void 0===g?null:g,b=e.ignoreClass,T=void 0===b?"highlight-ignore":b,I=e.maskTextClass,x=void 0===I?"highlight-mask":I,E=e.maskTextSelector,w=void 0===E?null:E,C=e.inlineStylesheet,k=void 0===C||C,N=e.maskAllInputs,M=e.maskInputOptions,R=e.slimDOMOptions,O=e.maskInputFn,_=e.maskTextFn,D=e.hooks,P=e.packFn,A=e.sampling,F=void 0===A?{}:A,L=e.mousemoveWait,j=e.recordCanvas,B=void 0!==j&&j,W=e.userTriggeredOnInput,z=void 0!==W&&W,V=e.collectFonts,H=void 0!==V&&V,U=e.plugins,G=e.keepIframeSrcFn,Y=void 0===G?function(){return!1}:G,X=e.enableStrictPrivacy,q=void 0!==X&&X;if(!t)throw new Error("emit function is required");void 0!==L&&void 0===F.mousemove&&(F.mousemove=L);var Q,$=!0===N?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==M?M:{password:!0},K=!0===R||"all"===R?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===R,headMetaDescKeywords:"all"===R}:R||{};c.polyfill();var J=0;i=function(e,r){var o;if(!(null===(o=l.mutationBuffers[0])||void 0===o?void 0:o.isFrozen())||e.type===u.EventType.FullSnapshot||e.type===u.EventType.IncrementalSnapshot&&e.data.source===u.IncrementalSource.Mutation||l.mutationBuffers.forEach((function(e){return e.unfreeze()})),t(P?P(e):e,r),e.type===u.EventType.FullSnapshot)Q=e,J=0;else if(e.type===u.EventType.IncrementalSnapshot){if(e.data.source===u.IncrementalSource.Mutation&&e.data.isAttachIframe)return;J++;var i=m&&J>=m,s=n&&e.timestamp-Q.timestamp>n;(i||s)&&a(!0)}};var Z=function(e){i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Mutation},e)}))},ee=function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Scroll},e)}))},te=new d.IframeManager({mutationCb:Z}),ne=new p.ShadowDomManager({mutationCb:Z,scrollCb:ee,bypassOptions:{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:k,maskInputOptions:$,maskTextFn:_,maskInputFn:O,recordCanvas:B,sampling:F,slimDOMOptions:K,iframeManager:te,enableStrictPrivacy:q},mirror:h});a=function(e){var t,n,r,a;void 0===e&&(e=!1),i(f({type:u.EventType.Meta,data:{href:window.location.href,width:c.getWindowWidth(),height:c.getWindowHeight()}}),e),l.mutationBuffers.forEach((function(e){return e.lock()}));var d=o(s.snapshot(document,{blockClass:y,blockSelector:S,maskTextClass:x,maskTextSelector:w,inlineStylesheet:k,maskAllInputs:$,maskTextFn:_,slimDOM:K,recordCanvas:B,enableStrictPrivacy:q,onSerialize:function(e){c.isIframeINode(e)&&te.addIframe(e),c.hasShadowRoot(e)&&ne.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){te.attachIframe(e,t)},keepIframeSrcFn:Y}),2),p=d[0],m=d[1];if(!p)return console.warn("Failed to snapshot the document");h.map=m,i(f({type:u.EventType.FullSnapshot,data:{node:p,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===a?void 0:a.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),l.mutationBuffers.forEach((function(e){return e.unlock()}))};try{var re=[];re.push(c.on("DOMContentLoaded",(function(){i(f({type:u.EventType.DomContentLoaded,data:{}}))})));var oe=function(e){return l.initObservers({mutationCb:Z,mousemoveCb:function(e,t){return i(f({type:u.EventType.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.MouseInteraction},e)}))},scrollCb:ee,viewportResizeCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.ViewportResize},e)}))},inputCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Input},e)}))},mediaInteractionCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.StyleDeclaration},e)}))},canvasMutationCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.CanvasMutation},e)}))},fontCb:function(e){return i(f({type:u.EventType.IncrementalSnapshot,data:r({source:u.IncrementalSource.Font},e)}))},blockClass:y,ignoreClass:T,maskTextClass:x,maskTextSelector:w,maskInputOptions:$,inlineStylesheet:k,sampling:F,recordCanvas:B,userTriggeredOnInput:z,collectFonts:H,doc:e,maskInputFn:O,maskTextFn:_,blockSelector:S,slimDOMOptions:K,mirror:h,iframeManager:te,shadowDomManager:ne,plugins:(null==U?void 0:U.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return i(f({type:u.EventType.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[],enableStrictPrivacy:q},D)};te.addLoadListener((function(e){re.push(oe(e.contentDocument))}));var ie=function(){a(),re.push(oe(document))};return"interactive"===document.readyState||"complete"===document.readyState?ie():re.push(c.on("load",(function(){i(f({type:u.EventType.Load,data:{}})),ie()}),window)),function(){re.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}m.addCustomEvent=function(e,t){if(!i)throw new Error("please add custom event after start recording");i(f({type:u.EventType.Custom,data:{tag:e,payload:t}}))},m.freezePage=function(){l.mutationBuffers.forEach((function(e){return e.freeze()}))},m.takeFullSnapshot=function(e){if(!a)throw new Error("please take full snapshot after start recording");a(e)},m.mirror=h,t.default=m},899:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0});var o=n(348),i=n(593);function a(e){return"__ln"in e}var s=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&a(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else e.nextSibling&&a(e.nextSibling)&&e.nextSibling.__ln.previous?(n=e.nextSibling.__ln.previous,t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)):(this.head&&(this.head.previous=t),t.next=this.head,this.head=t);this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),l=function(e,t){return e+"@"+t};function c(e){return"__sn"in e}var u=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,a,l;if(!e.frozen&&!e.locked){for(var c=[],u=new s,d=function(t){for(var n=t,r=o.IGNORED_NODE;r===o.IGNORED_NODE;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},h=function(t){var n,r=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,a=!(e.doc.contains(t)||r instanceof Node&&e.doc.contains(r));if(t.parentNode&&!a){var s=o.isShadowRoot(t.parentNode)?e.mirror.getId(r):e.mirror.getId(t.parentNode),l=d(t);if(-1===s||-1===l)return u.addNode(t);var p=o.serializeNodeWithId(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,enableStrictPrivacy:e.enableStrictPrivacy,onSerialize:function(n){i.isIframeINode(n)&&e.iframeManager.addIframe(n),i.hasShadowRoot(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n)}});p&&c.push({parentId:s,nextId:l,node:p})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var m=r(e.movedSet),v=m.next();!v.done;v=m.next()){var y=v.value;p(e.removes,y,e.mirror)&&!e.movedSet.has(y.parentNode)||h(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{for(var g=r(e.addedSet),S=g.next();!S.done;S=g.next())y=S.value,f(e.droppedSet,y)||p(e.removes,y,e.mirror)?f(e.movedSet,y)?h(y):e.droppedSet.add(y):h(y)}catch(e){a={error:e}}finally{try{S&&!S.done&&(l=g.return)&&l.call(g)}finally{if(a)throw a.error}}for(var b=null;u.length;){var T=null;if(b){var I=e.mirror.getId(b.value.parentNode),x=d(b.value);-1!==I&&-1!==x&&(T=b)}if(!T)for(var E=u.length-1;E>=0;E--){var w=u.get(E);if(w&&(I=e.mirror.getId(w.value.parentNode),x=d(w.value),-1!==I&&-1!==x)){T=w;break}}if(!T){for(;u.head;)u.removeNode(u.head.value);break}b=T.previous,u.removeNode(T.value),h(T.value)}var C={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:c};(C.texts.length||C.attributes.length||C.removes.length||C.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.emissionCallback(C))}},this.processMutation=function(t){if(!i.isIgnored(t.target))switch(t.type){case"characterData":var n=t.target.textContent;i.isBlocked(t.target,e.blockClass)||n===t.oldValue||e.texts.push({value:o.needMaskingText(t.target,e.maskTextClass,e.maskTextSelector)&&n?e.maskTextFn?e.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":if(t.target,n=t.target.getAttribute(t.attributeName),"value"===t.attributeName&&(n=o.maskInputValue({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:n,maskInputFn:e.maskInputFn})),i.isBlocked(t.target,e.blockClass)||n===t.oldValue)return;var r=e.attributes.find((function(e){return e.node===t.target}));if(r||(r={node:t.target,attributes:{}},e.attributes.push(r)),"INPUT"===t.target.tagName){var a=t.target;if("password"===a.type){r.attributes.value="*".repeat(a.value.length);break}}r.attributes[t.attributeName]=o.transformAttribute(e.doc,t.target.tagName,t.attributeName,n);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),a=o.isShadowRoot(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);i.isBlocked(t.target,e.blockClass)||i.isIgnored(n)||(e.addedSet.has(n)?(d(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||i.isAncestorRemoved(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[l(r,a)]?d(e.movedSet,n):e.removes.push({parentId:a,id:r,isShadow:!!o.isShadowRoot(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!i.isBlocked(n,e.blockClass)){if(c(t)){if(i.isIgnored(t))return;e.movedSet.add(t);var r=null;n&&c(n)&&(r=n.__sn.id),r&&(e.movedMap[l(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);i.isBlocked(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e,t,n,r,o,i,a,s,l,c,u,d,p,f,h,m){this.blockClass=t,this.blockSelector=n,this.maskTextClass=r,this.maskTextSelector=o,this.inlineStylesheet=i,this.maskInputOptions=a,this.maskTextFn=s,this.maskInputFn=l,this.recordCanvas=c,this.slimDOMOptions=u,this.enableStrictPrivacy=m,this.emissionCallback=e,this.doc=d,this.mirror=p,this.iframeManager=f,this.shadowDomManager=h},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1,this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1,this.emit()},e}();function d(e,t){e.delete(t),t.childNodes.forEach((function(t){return d(e,t)}))}function p(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||p(e,r,n)}function f(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||f(e,n))}t.default=u},584:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},i=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e},a=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.initObservers=t.INPUT_TAGS=t.initScrollObserver=t.initMutationObserver=t.mutationBuffers=void 0;var s=n(348),l=n(593),c=n(699),u=n(899);t.mutationBuffers=[];var d="undefined"!=typeof CSSGroupingRule,p="undefined"!=typeof CSSMediaRule,f="undefined"!=typeof CSSSupportsRule,h="undefined"!=typeof CSSConditionRule;function m(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function v(e,n,r,o,i,a,s,l,c,d,p,f,h,m,v,y,g){var S,b,T,I=new u.default;t.mutationBuffers.push(I),I.init(e,r,o,i,a,s,l,c,d,p,f,n,h,m,v,g);var x=window.MutationObserver||window.__rrMutationObserver,E=null===(T=null===(b=null===(S=window)||void 0===S?void 0:S.Zone)||void 0===b?void 0:b.__symbol__)||void 0===T?void 0:T.call(b,"MutationObserver");E&&window[E]&&(x=window[E]);var w=new x(I.processMutations.bind(I));return w.observe(y,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),w}function y(e,t,n,r,o){var i=l.throttle((function(o){var i=m(o);if(i&&!l.isBlocked(i,r)){var a=n.getId(i);if(i===t){var s=t.scrollingElement||t.documentElement;e({id:a,x:s.scrollLeft,y:s.scrollTop})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}}),o.scroll||100);return l.on("scroll",i,t)}function g(e,t){var n=r({},e);return t||delete n.userTriggered,n}t.initMutationObserver=v,t.initScrollObserver=y,t.INPUT_TAGS=["INPUT","TEXTAREA","SELECT"];var S=new WeakMap;function b(e){return function(e,t){if(d&&e.parentRule instanceof CSSGroupingRule||p&&e.parentRule instanceof CSSMediaRule||f&&e.parentRule instanceof CSSSupportsRule||h&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n);return t}(e,[])}t.initObservers=function(e,n){var u,T;void 0===n&&(n={});var I=e.doc.defaultView;if(!I)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,a=e.scrollCb,s=e.viewportResizeCb,l=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,d=e.styleDeclarationCb,p=e.canvasMutationCb,f=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,i(e)),n.apply(void 0,i(e))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,i(e)),r.apply(void 0,i(e))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,i(e)),o.apply(void 0,i(e))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,i(e)),a.apply(void 0,i(e))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,i(e)),s.apply(void 0,i(e))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,i(e)),l.apply(void 0,i(e))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,i(e)),c.apply(void 0,i(e))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,i(e)),u.apply(void 0,i(e))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,i(e)),d.apply(void 0,i(e))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,i(e)),p.apply(void 0,i(e))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,i(e)),f.apply(void 0,i(e))}}(e,n);var x,E,w,C,k,N,M,R,O,_=v(e.mutationCb,e.doc,e.blockClass,e.blockSelector,e.maskTextClass,e.maskTextSelector,e.inlineStylesheet,e.maskInputOptions,e.maskTextFn,e.maskInputFn,e.recordCanvas,e.slimDOMOptions,e.mirror,e.iframeManager,e.shadowDomManager,e.doc,e.enableStrictPrivacy),D=function(e,t,n,r){if(!1===t.mousemove)return function(){};var o,i="number"==typeof t.mousemove?t.mousemove:50,a="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,s=[],u=l.throttle((function(t){var n=Date.now()-o;e(s.map((function(e){return e.timeOffset-=n,e})),t),s=[],o=null}),a),d=l.throttle((function(e){var t=m(e),n=l.isTouchEvent(e)?e.changedTouches[0]:e,i=n.clientX,a=n.clientY;o||(o=Date.now()),s.push({x:i,y:a,id:r.getId(t),timeOffset:Date.now()-o}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?c.IncrementalSource.Drag:e instanceof MouseEvent?c.IncrementalSource.MouseMove:c.IncrementalSource.TouchMove)}),i,{trailing:!1}),p=[l.on("mousemove",d,n),l.on("touchmove",d,n),l.on("drag",d,n)];return function(){p.forEach((function(e){return e()}))}}(e.mousemoveCb,e.sampling,e.doc,e.mirror),P=function(e,t,n,r,o){if(!1===o.mouseInteraction)return function(){};var i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];return Object.keys(c.MouseInteractions).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]})).forEach((function(o){var i=o.toLowerCase(),s=function(t){return function(o){var i=m(o);if(!l.isBlocked(i,r)){var a=l.isTouchEvent(o)?o.changedTouches[0]:o;if(a){var s=n.getId(i),u=a.clientX,d=a.clientY;e({type:c.MouseInteractions[t],id:s,x:u,y:d})}}}}(o);a.push(l.on(i,s,t))})),function(){a.forEach((function(e){return e()}))}}(e.mouseInteractionCb,e.doc,e.mirror,e.blockClass,e.sampling),A=y(e.scrollCb,e.doc,e.mirror,e.blockClass,e.sampling),F=(x=e.viewportResizeCb,E=-1,w=-1,C=l.throttle((function(){var e=l.getWindowHeight(),t=l.getWindowWidth();E===e&&w===t||(x({width:Number(t),height:Number(e)}),E=e,w=t)}),200),l.on("resize",C,window)),L=function(e,n,o,a,c,u,d,p,f){function h(e){var r=m(e),o=e.isTrusted;if(r&&r.tagName&&!(t.INPUT_TAGS.indexOf(r.tagName)<0)&&!l.isBlocked(r,a)){var i=r.type;if(!r.classList.contains(c)){var p=r.value,h=!1;"radio"===i||"checkbox"===i?h=r.checked:(u[r.tagName.toLowerCase()]||u[i])&&(p=s.maskInputValue({maskInputOptions:u,tagName:r.tagName,type:i,value:p,maskInputFn:d})),v(r,g({text:p,isChecked:h,userTriggered:o},f));var y=r.name;"radio"===i&&y&&h&&n.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach((function(e){e!==r&&v(e,g({text:e.value,isChecked:!h,userTriggered:!1},f))}))}}}function v(t,n){var i=S.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){S.set(t,n);var a=o.getId(t);e(r(r({},n),{id:a}))}}var y=("last"===p.input?["change"]:["input","change"]).map((function(e){return l.on(e,h,n)})),b=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),T=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"]];return b&&b.set&&y.push.apply(y,i(T.map((function(e){return l.hookSetter(e[0],e[1],{set:function(){h({target:this})}})})))),function(){y.forEach((function(e){return e()}))}}(e.inputCb,e.doc,e.mirror,e.blockClass,e.ignoreClass,e.maskInputOptions,e.maskInputFn,e.sampling,e.userTriggeredOnInput),j=(k=e.mediaInteractionCb,N=e.blockClass,M=e.mirror,R=function(e){return function(t){var n=m(t);n&&!l.isBlocked(n,N)&&k({type:e,id:M.getId(n),currentTime:n.currentTime})}},O=[l.on("play",R(0)),l.on("pause",R(1)),l.on("seeked",R(2))],function(){O.forEach((function(e){return e()}))}),B=function(e,t,n){var r=t.CSSStyleSheet.prototype.insertRule;t.CSSStyleSheet.prototype.insertRule=function(t,o){var i=n.getId(this.ownerNode);return-1!==i&&e({id:i,adds:[{rule:t,index:o}]}),r.apply(this,arguments)};var a=t.CSSStyleSheet.prototype.deleteRule;t.CSSStyleSheet.prototype.deleteRule=function(t){var r=n.getId(this.ownerNode);return-1!==r&&e({id:r,removes:[{index:t}]}),a.apply(this,arguments)};var s={};d?s.CSSGroupingRule=t.CSSGroupingRule:(p&&(s.CSSMediaRule=t.CSSMediaRule),h&&(s.CSSConditionRule=t.CSSConditionRule),f&&(s.CSSSupportsRule=t.CSSSupportsRule));var l={};return Object.entries(s).forEach((function(t){var r=o(t,2),a=r[0],s=r[1];l[a]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=function(t,r){var o=n.getId(this.parentStyleSheet.ownerNode);return-1!==o&&e({id:o,adds:[{rule:t,index:i(b(this),[r||0])}]}),l[a].insertRule.apply(this,arguments)},s.prototype.deleteRule=function(t){var r=n.getId(this.parentStyleSheet.ownerNode);return-1!==r&&e({id:r,removes:[{index:i(b(this),[t])}]}),l[a].deleteRule.apply(this,arguments)}})),function(){t.CSSStyleSheet.prototype.insertRule=r,t.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=o(e,2),n=t[0],r=t[1];r.prototype.insertRule=l[n].insertRule,r.prototype.deleteRule=l[n].deleteRule}))}}(e.styleSheetRuleCb,I,e.mirror),W=function(e,t,n){var r=t.CSSStyleDeclaration.prototype.setProperty;t.CSSStyleDeclaration.prototype.setProperty=function(t,o,i){var a,s,l=n.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==l&&e({id:l,set:{property:t,value:o,priority:i},index:b(this.parentRule)}),r.apply(this,arguments)};var o=t.CSSStyleDeclaration.prototype.removeProperty;return t.CSSStyleDeclaration.prototype.removeProperty=function(t){var r,i,a=n.getId(null===(i=null===(r=this.parentRule)||void 0===r?void 0:r.parentStyleSheet)||void 0===i?void 0:i.ownerNode);return-1!==a&&e({id:a,remove:{property:t},index:b(this.parentRule)}),o.apply(this,arguments)},function(){t.CSSStyleDeclaration.prototype.setProperty=r,t.CSSStyleDeclaration.prototype.removeProperty=o}}(e.styleDeclarationCb,I,e.mirror),z=e.recordCanvas?function(e,t,n,r){var o,s,c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),u=[],d=function(o){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var a=l.patch(t.CanvasRenderingContext2D.prototype,o,(function(t){return function(){for(var a=this,s=[],c=0;c<arguments.length;c++)s[c]=arguments[c];return l.isBlocked(this.canvas,n)||setTimeout((function(){var t=i(s);if("drawImage"===o&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],l=n.getContext("2d"),c=null==l?void 0:l.getImageData(0,0,n.width,n.height),u=null==c?void 0:c.data;t[0]=JSON.stringify(u)}e({id:r.getId(a.canvas),property:o,args:t})}),0),t.apply(this,s)}}));u.push(a)}catch(n){var s=l.hookSetter(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e({id:r.getId(this.canvas),property:o,args:[t],setter:!0})}});u.push(s)}};try{for(var p=a(c),f=p.next();!f.done;f=p.next())d(f.value)}catch(e){o={error:e}}finally{try{f&&!f.done&&(s=p.return)&&s.call(p)}finally{if(o)throw o.error}}return function(){u.forEach((function(e){return e()}))}}(e.canvasMutationCb,I,e.blockClass,e.mirror):function(){},V=e.collectFonts?function(e,t){var n=t.defaultView;if(!n)return function(){};var r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(e,t,n){var r=new i(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var a=l.patch(t.fonts,"add",(function(t){return function(n){return setTimeout((function(){var t=o.get(n);t&&(e(t),o.delete(n))}),0),t.apply(this,[n])}}));return r.push((function(){n.FontFace=i})),r.push(a),function(){r.forEach((function(e){return e()}))}}(e.fontCb,e.doc):function(){},H=[];try{for(var U=a(e.plugins),G=U.next();!G.done;G=U.next()){var Y=G.value;H.push(Y.observer(Y.callback,I,Y.options))}}catch(e){u={error:e}}finally{try{G&&!G.done&&(T=U.return)&&T.call(U)}finally{if(u)throw u.error}}return function(){_.disconnect(),D(),P(),A(),F(),L(),j(),B(),W(),z(),V(),H.forEach((function(e){return e()}))}}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShadowDomManager=void 0;var r=n(584),o=function(){function e(e){this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror}return e.prototype.addShadowRoot=function(e,t){r.initMutationObserver(this.mutationCb,t,this.bypassOptions.blockClass,this.bypassOptions.blockSelector,this.bypassOptions.maskTextClass,this.bypassOptions.maskTextSelector,this.bypassOptions.inlineStylesheet,this.bypassOptions.maskInputOptions,this.bypassOptions.maskTextFn,this.bypassOptions.maskInputFn,this.bypassOptions.recordCanvas,this.bypassOptions.slimDOMOptions,this.mirror,this.bypassOptions.iframeManager,this,e,this.bypassOptions.enableStrictPrivacy),r.initScrollObserver(this.scrollCb,e,this.mirror,this.bypassOptions.blockClass,this.bypassOptions.sampling)},e}();t.ShadowDomManager=o},943:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},a=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e};Object.defineProperty(t,"__esModule",{value:!0}),t.Replayer=void 0;var s=n(348),l=n(652),c=n(669),u=n(104),d=n(129),p=n(699),f=n(593),h=n(277);n(380);var m=n(401),v=36e5,y=l.default||l,g="[replayer]",S={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function b(e){return e.type==p.EventType.IncrementalSnapshot&&(e.data.source==p.IncrementalSource.TouchMove||e.data.source==p.IncrementalSource.MouseInteraction&&e.data.type==p.MouseInteractions.TouchStart)}var T=function(){function e(e,t){var n=this;if(this.mouseTail=null,this.tailPositions=[],this.emitter=y(),this.activityIntervals=[],this.legacy_missingNodeRetryMap={},this.cache=s.createCache(),this.imageMap=new Map,this.mirror=f.createMirror(),this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,!(null==t?void 0:t.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");var r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,showWarning:!0,showDebug:!1,blockClass:"highlight-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:S,inactiveThreshold:.02,inactiveSkipTime:2e3};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(p.ReplayerEvents.Resize,this.handleResize),this.setupDom(),this.treeIndex=new f.TreeIndex,this.fragmentParentMap=new Map,this.elementStateMap=new Map,this.virtualStyleRulesMap=new Map,this.emitter.on(p.ReplayerEvents.Flush,(function(){var e,t,r,i,a,s,l=n.treeIndex.flush(),c=l.scrollMap,u=l.inputMap;n.fragmentParentMap.forEach((function(e,t){return n.restoreRealParent(t,e)}));try{for(var d=o(n.virtualStyleRulesMap.keys()),p=d.next();!p.done;p=d.next()){var f=p.value;n.restoreNodeSheet(f)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=d.return)&&t.call(d)}finally{if(e)throw e.error}}n.fragmentParentMap.clear(),n.elementStateMap.clear(),n.virtualStyleRulesMap.clear();try{for(var h=o(c.values()),m=h.next();!m.done;m=h.next()){var v=m.value;n.applyScroll(v)}}catch(e){r={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}try{for(var y=o(u.values()),g=y.next();!g.done;g=y.next())v=g.value,n.applyInput(v)}catch(e){a={error:e}}finally{try{g&&!g.done&&(s=y.return)&&s.call(y)}finally{if(a)throw a.error}}})),this.emitter.on(p.ReplayerEvents.PlayBack,(function(){n.firstFullSnapshot=null,n.mirror.reset()}));var i=new u.Timer([],(null==t?void 0:t.speed)||r.speed);this.service=d.createPlayerService({events:e.map((function(e){return t&&t.unpackFn?t.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{player:e})})),this.speedService=d.createSpeedService({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe((function(e){n.emitter.emit(p.ReplayerEvents.StateChange,{speed:e})}));var a=this.service.state.context.events.find((function(e){return e.type===p.EventType.Meta})),l=this.service.state.context.events.find((function(e){return e.type===p.EventType.FullSnapshot}));if(a){var c=a.data,h=c.width,m=c.height;setTimeout((function(){n.emitter.emit(p.ReplayerEvents.Resize,{width:h,height:m})}),0)}l&&setTimeout((function(){n.firstFullSnapshot||(n.firstFullSnapshot=l,n.rebuildFullSnapshot(l),n.iframe.contentWindow.scrollTo(l.data.initialOffset))}),1),this.service.state.context.events.find(b)&&this.mouse.classList.add("touch-device")}return Object.defineProperty(e.prototype,"timer",{get:function(){return this.service.state.context.timer},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){return this.emitter.on(e,t),this},e.prototype.off=function(e,t){return this.emitter.off(e,t),this},e.prototype.setConfig=function(e){var t=this;Object.keys(e).forEach((function(n){t.config[n]=e[n]})),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"))},e.prototype.getActivityIntervals=function(){var e=this;if(0==this.activityIntervals.length){for(var t=[],n=this.getMetaData(),r=a([{timestamp:n.startTime}],this.service.state.context.events.filter((function(t){return e.isUserInteraction(t)})),[{timestamp:n.endTime}]),o=1;o<r.length;o++){var i=r[o-1],s=r[o];s.timestamp-i.timestamp>1e4?t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!1}):t.push({startTime:i.timestamp,endTime:s.timestamp,duration:s.timestamp-i.timestamp,active:!0})}var l=[],c=t[0];for(o=1;o<t.length;o++)t[o].active!=t[o-1].active&&(l.push({startTime:c.startTime,endTime:t[o-1].endTime,duration:t[o-1].endTime-c.startTime,active:t[o-1].active}),c=t[o]);for(c&&t.length>0&&l.push({startTime:c.startTime,endTime:t[t.length-1].endTime,duration:t[t.length-1].endTime-c.startTime,active:t[t.length-1].active}),c=l[0],o=1;o<l.length;o++)(!l[o].active&&l[o].duration>this.config.inactiveThreshold*n.totalTime||!l[o-1].active&&l[o-1].duration>this.config.inactiveThreshold*n.totalTime)&&(this.activityIntervals.push({startTime:c.startTime,endTime:l[o-1].endTime,duration:l[o-1].endTime-c.startTime,active:l[o-1].active}),c=l[o]);c&&l.length>0&&this.activityIntervals.push({startTime:c.startTime,endTime:l[l.length-1].endTime,duration:l[l.length-1].endTime-c.startTime,active:l[l.length-1].active})}return this.activityIntervals},e.prototype.getMetaData=function(){var 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}},e.prototype.getCurrentTime=function(){return this.timer.timeOffset+this.getTimeOffset()},e.prototype.getTimeOffset=function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp},e.prototype.getMirror=function(){return this.mirror},e.prototype.play=function(e){var t;void 0===e&&(e=0),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}}),null===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.remove("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.Start),this.handleInactivity(this.getMetaData().startTime+e,!0)},e.prototype.pause=function(e){var t;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===(t=this.iframe.contentDocument)||void 0===t||t.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.Pause)},e.prototype.resume=function(e){void 0===e&&(e=0),console.warn("The 'resume' will be departed in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(p.ReplayerEvents.Resume)},e.prototype.startLive=function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})},e.prototype.addEvent=function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;b(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))},e.prototype.enableInteract=function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"},e.prototype.disableInteract=function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"},e.prototype.resetCache=function(){this.cache=s.createCache()},e.prototype.setupDom=function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!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");var 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&&(c.polyfill(this.iframe.contentWindow,this.iframe.contentDocument),f.polyfill(this.iframe.contentWindow))},e.prototype.handleResize=function(e){var t,n;this.iframe.style.display="inherit";try{for(var r=o([this.mouseTail,this.iframe]),i=r.next();!i.done;i=r.next()){var a=i.value;a&&(a.setAttribute("width",String(e.width)),a.setAttribute("height",String(e.height)))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.applyEventsSynchronously=function(e){var t,n;try{for(var r=o(e),i=r.next();!i.done;i=r.next()){var a=i.value;switch(a.type){case p.EventType.DomContentLoaded:case p.EventType.Load:case p.EventType.Custom:continue;case p.EventType.FullSnapshot:case p.EventType.Meta:case p.EventType.Plugin:break;case p.EventType.IncrementalSnapshot:switch(a.data.source){case p.IncrementalSource.MediaInteraction:continue}}this.getCastFn(a,!0)()}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.mousePos&&this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null,!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null},e.prototype.getCastFn=function(e,t){var n,r=this;switch(void 0===t&&(t=!1),e.type){case p.EventType.DomContentLoaded:case p.EventType.Load:break;case p.EventType.Custom:n=function(){r.emitter.emit(p.ReplayerEvents.CustomEvent,e)};break;case p.EventType.Meta:n=function(){r.emitter.emit(p.ReplayerEvents.Resize,{width:e.data.width,height:e.data.height})};break;case p.EventType.FullSnapshot:n=function(){if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.rebuildFullSnapshot(e,t),r.iframe.contentWindow.scrollTo(e.data.initialOffset)};break;case p.EventType.IncrementalSnapshot:n=function(){var n,i;if(r.applyIncremental(e,t),!t&&(r.handleInactivity(e.timestamp),e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){try{for(var a=o(r.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(!(l.timestamp<=e.timestamp)&&r.isUserInteraction(l)){l.delay-e.delay>1e4*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=l);break}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}if(r.nextUserInteractionEvent){var c=r.nextUserInteractionEvent.delay-e.delay,u={speed:Math.min(Math.round(c/2e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:u}),r.emitter.emit(p.ReplayerEvents.SkipStart,u)}}}}return function(){var i,a;n&&n();try{for(var s=o(r.config.plugins||[]),l=s.next();!l.done;l=s.next())l.value.handler(e,t,{replayer:r})}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(i)throw i.error}}r.service.send({type:"CAST_EVENT",payload:{event:e}});var c=r.service.state.context.events.length-1;if(e===r.service.state.context.events[c]){var u=function(){c<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(p.ReplayerEvents.Finish))};e.type===p.EventType.IncrementalSnapshot&&e.data.source===p.IncrementalSource.MouseMove&&e.data.positions.length?setTimeout((function(){u()}),Math.max(0,50-e.data.positions[0].timeOffset)):u()}}},e.prototype.handleInactivity=function(e,t){var n,r;if((e===this.inactiveEndTimestamp||t)&&(this.inactiveEndTimestamp=null,this.backToNormal()),this.config.skipInactive&&!this.inactiveEndTimestamp){try{for(var i=o(this.getActivityIntervals()),a=i.next();!a.done;a=i.next()){var s=a.value;if(e>=s.startTime&&e<s.endTime&&!s.active){this.inactiveEndTimestamp=s.endTime;break}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}if(this.inactiveEndTimestamp){var l=this.inactiveEndTimestamp-e,c={speed:l/v*this.config.inactiveSkipTime<1e3?l/1e3:Math.round(Math.max(l,v)/this.config.inactiveSkipTime)};this.speedService.send({type:"FAST_FORWARD",payload:c}),this.emitter.emit(p.ReplayerEvents.SkipStart,c)}}},e.prototype.rebuildFullSnapshot=function(e,t){var n,r,i=this;if(void 0===t&&(t=!1),!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={};var a=[];this.mirror.map=s.rebuild(e.data.node,{doc:this.iframe.contentDocument,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache})[1];var l=function(e,t){if(c.attachDocumentToIframe(e,t),c.newDocumentQueue=c.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;c.insertStyleRules(r,o)}},c=this;try{for(var u=o(a),d=u.next();!d.done;d=u.next()){var f=d.value;l(f.mutationInQueue,f.builtNode)}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}var h=this.iframe.contentDocument,m=h.documentElement,v=h.head;this.insertStyleRules(m,v),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(p.ReplayerEvents.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()},e.prototype.insertStyleRules=function(e,t){var n=document.createElement("style");e.insertBefore(n,t);var r=h.default(this.config.blockClass).concat(this.config.insertStyleRules);this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }");for(var o=0;o<r.length;o++)n.sheet.insertRule(r[o],o)},e.prototype.attachDocumentToIframe=function(e,t){var n,r,i=this,a=[];if(!t.contentDocument)for(var l=t.parentNode;l;){if(this.fragmentParentMap.has(l)){var c=l,u=this.fragmentParentMap.get(c);this.restoreRealParent(c,u);break}l=l.parentNode}s.buildNodeWithSN(e.node,{doc:t.contentDocument,map:this.mirror.map,hackCss:!0,skipChild:!1,afterAppend:function(e){i.collectIframeAndAttachDocument(a,e)},cache:this.cache});var d=function(e,t){if(p.attachDocumentToIframe(e,t),p.newDocumentQueue=p.newDocumentQueue.filter((function(t){return t!==e})),t.contentDocument){var n=t.contentDocument,r=n.documentElement,o=n.head;p.insertStyleRules(r,o)}},p=this;try{for(var f=o(a),h=f.next();!h.done;h=f.next()){var m=h.value;d(m.mutationInQueue,m.builtNode)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}},e.prototype.collectIframeAndAttachDocument=function(e,t){if(f.isIframeINode(t)){var n=this.newDocumentQueue.find((function(e){return e.parentId===t.__sn.id}));n&&e.push({mutationInQueue:n,builtNode:t})}},e.prototype.waitForStylesheetLoad=function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,o=new Set,i=this.service.state,a=function(){i=t.service.state};this.emitter.on(p.ReplayerEvents.Start,a),this.emitter.on(p.ReplayerEvents.Pause,a);var s=function(){t.emitter.off(p.ReplayerEvents.Start,a),t.emitter.off(p.ReplayerEvents.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(o.add(e),e.addEventListener("load",(function(){o.delete(e),0===o.size&&-1!==r&&(i.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(p.ReplayerEvents.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(p.ReplayerEvents.LoadStylesheetStart),r=setTimeout((function(){i.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}},e.prototype.preloadAllImages=function(){var e,t,n=this,r=(this.service.state,function(){n.service.state});this.emitter.on(p.ReplayerEvents.Start,r),this.emitter.on(p.ReplayerEvents.Pause,r);var i=0;try{for(var a=o(this.service.state.context.events),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.type===p.EventType.IncrementalSnapshot&&l.data.source===p.IncrementalSource.CanvasMutation&&"drawImage"===l.data.property&&"string"==typeof l.data.args[0]&&!this.imageMap.has(l)){i++;var c=document.createElement("canvas"),u=c.getContext("2d"),d=null==u?void 0:u.createImageData(c.width,c.height);null==d||d.data,JSON.parse(l.data.args[0]),null==u||u.putImageData(d,0,0)}}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}0!==i&&this.service.send({type:"PAUSE"})},e.prototype.applyIncremental=function(e,t){var n,o,i=this,a=e.data;switch(a.source){case p.IncrementalSource.Mutation:t&&(a.adds.forEach((function(e){return i.treeIndex.add(e)})),a.texts.forEach((function(e){return i.treeIndex.text(e)})),a.attributes.forEach((function(e){return i.treeIndex.attribute(e)})),a.removes.forEach((function(e){return i.treeIndex.remove(e,i.mirror)})));try{this.applyMutation(a,t)}catch(e){this.warn("Exception in mutation "+(e.message||e),a)}break;case p.IncrementalSource.Drag:case p.IncrementalSource.TouchMove:case p.IncrementalSource.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){i.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-i.service.state.context.baselineTime};i.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case p.IncrementalSource.MouseInteraction:if(-1===a.id)break;var l=new Event(p.MouseInteractions[a.type].toLowerCase());if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);this.emitter.emit(p.ReplayerEvents.MouseInteraction,{type:a.type,target:T});var c=this.config.triggerFocus;switch(a.type){case p.MouseInteractions.Blur:"blur"in T&&T.blur();break;case p.MouseInteractions.Focus:c&&T.focus&&T.focus({preventScroll:!0});break;case p.MouseInteractions.Click:case p.MouseInteractions.TouchStart:case p.MouseInteractions.TouchEnd:t?(a.type===p.MouseInteractions.TouchStart?this.touchActive=!0:a.type===p.MouseInteractions.TouchEnd&&(this.touchActive=!1),this.mousePos={x:a.x,y:a.y,id:a.id,debugData:a}):(a.type===p.MouseInteractions.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x,a.y,a.id,t,a),a.type===p.MouseInteractions.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===p.MouseInteractions.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===p.MouseInteractions.TouchEnd&&this.mouse.classList.remove("touch-active"));break;case p.MouseInteractions.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:T.dispatchEvent(l)}break;case p.IncrementalSource.Scroll:if(-1===a.id)break;if(t){this.treeIndex.scroll(a);break}this.applyScroll(a);break;case p.IncrementalSource.ViewportResize:this.emitter.emit(p.ReplayerEvents.Resize,{width:a.width,height:a.height});break;case p.IncrementalSource.Input:if(-1===a.id)break;if(t){this.treeIndex.input(a);break}this.applyInput(a);break;case p.IncrementalSource.MediaInteraction:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var u=T;try{a.currentTime&&(u.currentTime=a.currentTime),1===a.type&&u.pause(),0===a.type&&u.play()}catch(e){this.config.showWarning&&console.warn("Failed to replay media interactions: "+(e.message||e))}break;case p.IncrementalSource.StyleSheetRule:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);var d,f=T,h=T.parentNode,v=this.fragmentParentMap.has(h),y=v?null:f.sheet;y||(this.virtualStyleRulesMap.has(T)?d=this.virtualStyleRulesMap.get(T):(d=[],this.virtualStyleRulesMap.set(T,d))),a.adds&&a.adds.forEach((function(e){var t=e.rule,n=e.index;if(y)try{if(Array.isArray(n)){var r=m.getPositionsAndIndex(n),o=r.positions,i=r.index;m.getNestedRule(y.cssRules,o).insertRule(t,i)}else i=void 0===n?void 0:Math.min(n,y.cssRules.length),y.insertRule(t,i)}catch(e){}else null==d||d.push({cssText:t,index:n,type:m.StyleRuleType.Insert})})),a.removes&&a.removes.forEach((function(e){var t=e.index;if(v)null==d||d.push({index:t,type:m.StyleRuleType.Remove});else try{if(Array.isArray(t)){var n=m.getPositionsAndIndex(t),r=n.positions,o=n.index;m.getNestedRule(y.cssRules,r).deleteRule(o||0)}else null==y||y.deleteRule(t)}catch(e){}}));break;case p.IncrementalSource.StyleDeclaration:if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);f=T;var g=T.parentNode,S=this.fragmentParentMap.has(g)?null:f.sheet,b=[];S||(this.virtualStyleRulesMap.has(T)?b=this.virtualStyleRulesMap.get(T):(b=[],this.virtualStyleRulesMap.set(T,b))),a.set&&(S?m.getNestedRule(S.rules,a.index).style.setProperty(a.set.property,a.set.value,a.set.priority):b.push(r({type:m.StyleRuleType.SetProperty,index:a.index},a.set))),a.remove&&(S?m.getNestedRule(S.rules,a.index).style.removeProperty(a.remove.property):b.push(r({type:m.StyleRuleType.RemoveProperty,index:a.index},a.remove)));break;case p.IncrementalSource.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;var T;if(!(T=this.mirror.getNode(a.id)))return this.debugNodeNotFound(a,a.id);try{var I=T.getContext("2d");if(a.setter)return void(I[a.property]=a.args[0]);var x=I[a.property];if("drawImage"===a.property&&"string"==typeof a.args[0]){var E=this.imageMap.get(e);a.args[0]=E,x.apply(I,a.args)}else x.apply(I,a.args)}catch(e){this.warnCanvasMutationFailed(a,a.id,e)}break;case p.IncrementalSource.Font:try{var w=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(o=this.iframe.contentDocument)||void 0===o||o.fonts.add(w)}catch(e){this.config.showWarning&&console.warn(e)}}},e.prototype.applyMutation=function(e,t){var n,i,a=this;e.removes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.parentId})))return;return a.warnNodeNotFound(e,t.id)}a.virtualStyleRulesMap.has(n)&&a.virtualStyleRulesMap.delete(n);var r=a.mirror.getNode(t.parentId);if(!r)return a.warnNodeNotFound(e,t.parentId);if(t.isShadow&&f.hasShadowRoot(r)&&(r=r.shadowRoot),a.mirror.removeNodeFromMap(n),r){var o=null,i="__sn"in r?a.fragmentParentMap.get(r):void 0;i&&i.contains(n)?r=i:a.fragmentParentMap.has(n)&&(o=a.fragmentParentMap.get(n),a.fragmentParentMap.delete(n),n=o);try{r.removeChild(n)}catch(t){if(!(t instanceof DOMException))throw t;a.warn("parent could not remove child in mutation",r,i,n,o,e)}}}));var l=r({},this.legacy_missingNodeRetryMap),c=[],u=function(e){var n,r;if(!a.iframe.contentDocument)return console.warn("Looks like your replayer has been destroyed.");var o=a.mirror.getNode(e.parentId);if(!o)return e.node.type===s.NodeType.Document?a.newDocumentQueue.push(e):c.push(e);var i=null;a.iframe.contentDocument.contains?i=a.iframe.contentDocument.contains(o):a.iframe.contentDocument.body.contains&&(i=a.iframe.contentDocument.body.contains(o));var u=(null===(r=(n=o).getElementsByTagName)||void 0===r?void 0:r.call(n,"iframe").length)>0;if(t&&i&&!f.isIframeINode(o)&&!u){var d=document.createDocumentFragment();for(a.mirror.map[e.parentId]=d,a.fragmentParentMap.set(d,o),a.storeState(o);o.firstChild;)d.appendChild(o.firstChild);o=d}e.node.isShadow&&f.hasShadowRoot(o)&&(o=o.shadowRoot);var p=null,h=null;if(e.previousId&&(p=a.mirror.getNode(e.previousId)),e.nextId&&(h=a.mirror.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.mirror.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return c.push(e);if(!e.node.rootId||a.mirror.getNode(e.node.rootId)){var m=e.node.rootId?a.mirror.getNode(e.node.rootId):a.iframe.contentDocument;if(f.isIframeINode(o))a.attachDocumentToIframe(e,o);else{var v=s.buildNodeWithSN(e.node,{doc:m,map:a.mirror.map,skipChild:!0,hackCss:!0,cache:a.cache});if(-1!==e.previousId&&-1!==e.nextId){if(p&&p.nextSibling&&p.nextSibling.parentNode)o.insertBefore(v,p.nextSibling);else if(h&&h.parentNode)o.contains(h)?o.insertBefore(v,h):o.insertBefore(v,null);else{if(o===m)for(;m.firstChild;)m.removeChild(m.firstChild);o.appendChild(v)}if(f.isIframeINode(v)){var y=a.newDocumentQueue.find((function(e){return e.parentId===v.__sn.id}));if(y&&(a.attachDocumentToIframe(y,v),a.newDocumentQueue=a.newDocumentQueue.filter((function(e){return e!==y}))),v.contentDocument){var g=v.contentDocument,S=g.documentElement,b=g.head;a.insertStyleRules(S,b)}}(e.previousId||e.nextId)&&a.legacy_resolveMissingNode(l,o,v,e)}else l[e.node.id]={node:v,mutation:e}}}};e.adds.forEach((function(e){u(e)}));for(var d=Date.now();c.length;){var p=f.queueToResolveTrees(c);if(c.length=0,Date.now()-d>500){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}try{for(var h=(n=void 0,o(p)),m=h.next();!m.done;m=h.next()){var v=m.value;this.mirror.getNode(v.value.parentId)?f.iterateResolveTree(v,(function(e){u(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",v)}}catch(e){n={error:e}}finally{try{m&&!m.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}}Object.keys(l).length&&Object.assign(this.legacy_missingNodeRetryMap,l),e.texts.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),n.textContent=t.value})),e.attributes.forEach((function(t){var n=a.mirror.getNode(t.id);if(!n){if(e.removes.find((function(e){return e.id===t.id})))return;return a.warnNodeNotFound(e,t.id)}for(var r in a.fragmentParentMap.has(n)&&(n=a.fragmentParentMap.get(n)),t.attributes)if("string"==typeof r){var o=t.attributes[r];if(null===o)n.removeAttribute(r);else if("string"==typeof o)try{n.setAttribute(r,o)}catch(e){a.config.showWarning&&console.warn("An error occurred may due to the checkout feature.",e)}else if("style"===r){var i=o,s=n;for(var l in i)if(!1===i[l])s.style.removeProperty(l);else if(i[l]instanceof Array){var c=i[l];s.style.setProperty(l,c[0],c[1])}else{var u=i[l];s.style.setProperty(l,u)}}}}))},e.prototype.applyScroll=function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);if(t===this.iframe.contentDocument)this.iframe.contentWindow.scrollTo({top:e.y,left:e.x,behavior:"smooth"});else try{t.scrollTop=e.y,t.scrollLeft=e.x}catch(e){}},e.prototype.applyInput=function(e){var 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){}},e.prototype.legacy_resolveMissingNode=function(e,t,n,r){var o=r.previousId,i=r.nextId,a=o&&e[o],s=i&&e[i];if(a){var l=a,c=l.node,u=l.mutation;t.insertBefore(c,n),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}if(s){var d=s;c=d.node,u=d.mutation,t.insertBefore(c,n.nextSibling),delete e[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(e,t,c,u)}},e.prototype.moveAndHover=function(e,t,n,r,o){var i=this.mirror.getNode(n);if(!i)return this.debugNodeNotFound(o,n);var a=f.getBaseDimension(i,this.iframe),s=e*a.absoluteScale+a.x,l=t*a.absoluteScale+a.y;this.mouse.style.left=s+"px",this.mouse.style.top=l+"px",r||this.drawMouseTail({x:s,y:l}),this.hoverElements(i)},e.prototype.drawMouseTail=function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?S:Object.assign({},S,this.config.mouseTail),r=n.lineCap,o=n.lineWidth,i=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=o,e.lineCap=r,e.strokeStyle=i,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}},e.prototype.hoverElements=function(e){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")}));for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement},e.prototype.isUserInteraction=function(e){return e.type===p.EventType.IncrementalSnapshot&&e.data.source>p.IncrementalSource.Mutation&&e.data.source<=p.IncrementalSource.Input},e.prototype.backToNormal=function(){this.inactiveEndTimestamp=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(p.ReplayerEvents.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))},e.prototype.restoreRealParent=function(e,t){this.mirror.map[t.__sn.id]=t,t.__sn.type===s.NodeType.Element&&"textarea"===t.__sn.tagName&&e.textContent&&(t.value=e.textContent),t.appendChild(e),this.restoreState(t)},e.prototype.storeState=function(e){var t,n;if(e&&e.nodeType===e.ELEMENT_NODE){var r=e;(r.scrollLeft||r.scrollTop)&&this.elementStateMap.set(e,{scroll:[r.scrollLeft,r.scrollTop]}),"STYLE"===r.tagName&&m.storeCSSRules(r,this.virtualStyleRulesMap);var i=r.children;try{for(var a=o(Array.from(i)),s=a.next();!s.done;s=a.next()){var l=s.value;this.storeState(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}}},e.prototype.restoreState=function(e){var t,n;if(e.nodeType===e.ELEMENT_NODE){var r=e;if(this.elementStateMap.has(e)){var i=this.elementStateMap.get(e);i.scroll&&(r.scrollLeft=i.scroll[0],r.scrollTop=i.scroll[1]),this.elementStateMap.delete(e)}var a=r.children;try{for(var s=o(Array.from(a)),l=s.next();!l.done;l=s.next()){var c=l.value;this.restoreState(c)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}},e.prototype.restoreNodeSheet=function(e){var t=this.virtualStyleRulesMap.get(e);if("STYLE"===e.nodeName&&t){var n=e;m.applyVirtualStyleRulesToNode(t,n)}},e.prototype.warnNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.warn("Node with id '"+t+"' was previously removed. ",e):this.warn("Node with id '"+t+"' not found. ",e)},e.prototype.warnCanvasMutationFailed=function(e,t,n){this.warn("Has error on update canvas '"+t+"'",e,n)},e.prototype.debugNodeNotFound=function(e,t){this.treeIndex.idRemoved(t)?this.debug(g,"Node with id '"+t+"' was previously removed. ",e):this.debug(g,"Node with id '"+t+"' not found. ",e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showWarning&&console.warn.apply(console,a([g],e))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.config.showDebug&&console.log.apply(console,a([g],e))},e}();t.Replayer=T},129:function(e,t,n){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.createSpeedService=t.createPlayerService=t.discardPriorSnapshots=void 0;var i=n(537),a=n(699),s=n(104);function l(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===a.EventType.Meta&&r.timestamp<=t)return e.slice(n)}return e}t.discardPriorSnapshots=l,t.createPlayerService=function(e,t){var n=t.getCastFn,c=t.applyEventsSynchronously,u=t.emitter,d=i.createMachine({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:i.assign({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:i.assign((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),r(r({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,r,i,d,p,f=e.timer,h=e.events,m=e.baselineTime,v=e.lastPlayedEvent;f.clear();try{for(var y=o(h),g=y.next();!g.done;g=y.next()){var S=g.value;s.addDelay(S,m)}}catch(e){t={error:e}}finally{try{g&&!g.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}var b=l(h,m),T=null==v?void 0:v.timestamp;(null==v?void 0:v.type)===a.EventType.IncrementalSnapshot&&v.data.source===a.IncrementalSource.MouseMove&&(T=v.timestamp+(null===(p=v.data.positions[0])||void 0===p?void 0:p.timeOffset)),m<(T||0)&&u.emit(a.ReplayerEvents.PlayBack);var I=new Array,x=new Array,E=function(e){if(T&&T<m&&(e.timestamp<=T||e===v))return"continue";if(e.timestamp<m)I.push(e);else{var t=n(e,!1);x.push({doAction:function(){t(),u.emit(a.ReplayerEvents.EventCast,e)},delay:e.delay})}};try{for(var w=o(b),C=w.next();!C.done;C=w.next())E(C.value)}catch(e){i={error:e}}finally{try{C&&!C.done&&(d=w.return)&&d.call(w)}finally{if(i)throw i.error}}c(I),u.emit(a.ReplayerEvents.Flush),f.addActions(x),f.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:i.assign((function(e){return r(r({},e),{lastPlayedEvent:null})})),startLive:i.assign({baselineTime:function(e,t){return e.timer.toggleLiveMode(!0),e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:i.assign((function(e,t){var o=e.baselineTime,i=e.timer,l=e.events;if("ADD_EVENT"===t.type){var c=t.payload.event;s.addDelay(c,o);var d=l.length-1;if(!l[d]||l[d].timestamp<=c.timestamp)l.push(c);else{for(var p=-1,f=0;f<=d;){var h=Math.floor((f+d)/2);l[h].timestamp<=c.timestamp?f=h+1:d=h-1}-1===p&&(p=f),l.splice(p,0,c)}var m=c.timestamp<o,v=n(c,m);m?v():i.isActive()&&i.addAction({doAction:function(){v(),u.emit(a.ReplayerEvents.EventCast,c)},delay:c.delay})}return r(r({},e),{events:l})}))}});return i.interpret(d)},t.createSpeedService=function(e){var t=i.createMachine({id:"speed",context:e,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:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:i.assign({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}});return i.interpret(t)}},669:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.polyfill=void 0,t.polyfill=function(e,t){if(void 0===e&&(e=window),void 0===t&&(t=document),!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.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])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,void 0===e?this.scrollLeft:~~e,void 0===t?this.scrollTop:~~t)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=p(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!=typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"==typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function c(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function u(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=c(e,"Y")&&u(e,"Y"),n=c(e,"X")&&u(e,"X");return t||n}function p(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function f(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(f.bind(e,t))}function h(n,r,a){var l,c,u,d,p=i();n===t.body?(l=e,c=e.scrollX||e.pageXOffset,u=e.scrollY||e.pageYOffset,d=o.scroll):(l=n,c=n.scrollLeft,u=n.scrollTop,d=s),f({scrollable:l,method:d,startTime:p,startX:c,startY:u,x:r,y:a})}}},277:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return["noscript { display: none !important; }","."+e+" { background: currentColor; border-radius: 5px; }","."+e+":hover::after {content: 'Redacted'; color: white; background: black; text-align: center; width: 100%; display: block;}"]}},104:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDelay=t.Timer=void 0;var r=n(699),o=function(){function e(e,t){void 0===e&&(e=[]),this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t}return e.prototype.addAction=function(e){var t=this.findActionIndex(e);this.actions.splice(t,0,e)},e.prototype.addActions=function(e){this.actions=this.actions.concat(e)},e.prototype.start=function(){this.timeOffset=0;var e=performance.now(),t=this.actions,n=this;this.raf=requestAnimationFrame((function r(){var o=performance.now();for(n.timeOffset+=(o-e)*n.speed,e=o;t.length;){var i=t[0];if(!(n.timeOffset>=i.delay))break;t.shift(),i.doAction()}(t.length>0||n.liveMode)&&(n.raf=requestAnimationFrame(r))}))},e.prototype.clear=function(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0},e.prototype.setSpeed=function(e){this.speed=e},e.prototype.toggleLiveMode=function(e){this.liveMode=e},e.prototype.isActive=function(){return null!==this.raf},e.prototype.findActionIndex=function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t},e}();t.Timer=o,t.addDelay=function(e,t){if(e.type===r.EventType.IncrementalSnapshot&&e.data.source===r.IncrementalSource.MouseMove){var n=e.data.positions[0].timeOffset,o=e.timestamp+n;return e.delay=o-t,o-t}return e.delay=e.timestamp-t,e.delay}},401:function(e,t){var n,r=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},o=this&&this.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(r(arguments[t]));return e};function i(e,t){var n=e[t[0]];return 1===t.length?n:i(n.cssRules[t[1]].cssRules,t.slice(2))}function a(e){var t=o(e),n=t.pop();return{positions:t,index:n}}Object.defineProperty(t,"__esModule",{value:!0}),t.storeCSSRules=t.applyVirtualStyleRulesToNode=t.getPositionsAndIndex=t.getNestedRule=t.StyleRuleType=void 0,function(e){e[e.Insert=0]="Insert",e[e.Remove=1]="Remove",e[e.Snapshot=2]="Snapshot",e[e.SetProperty=3]="SetProperty",e[e.RemoveProperty=4]="RemoveProperty"}(n=t.StyleRuleType||(t.StyleRuleType={})),t.getNestedRule=i,t.getPositionsAndIndex=a,t.applyVirtualStyleRulesToNode=function(e,t){var o=t.sheet;o&&e.forEach((function(e){if(e.type===n.Insert)try{if(Array.isArray(e.index)){var s=a(e.index),l=s.positions,c=s.index;i(o.cssRules,l).insertRule(e.cssText,c)}else o.insertRule(e.cssText,e.index)}catch(e){}else if(e.type===n.Remove)try{if(Array.isArray(e.index)){var u=a(e.index);l=u.positions,c=u.index,i(o.cssRules,l).deleteRule(c||0)}else o.deleteRule(e.index)}catch(e){}else e.type===n.Snapshot?function(e,t){var n;try{var o=Array.from((null===(n=t.sheet)||void 0===n?void 0:n.cssRules)||[]).map((function(e){return e.cssText})),i=Object.entries(o).reverse(),a=o.length;i.forEach((function(n){var o,i=r(n,2),s=i[0],l=i[1],c=e.indexOf(l);if(-1===c||c>a)try{null===(o=t.sheet)||void 0===o||o.deleteRule(Number(s))}catch(e){}a=c})),e.forEach((function(e,n){var r,o,i;try{(null===(o=null===(r=t.sheet)||void 0===r?void 0:r.cssRules[n])||void 0===o?void 0:o.cssText)!==e&&(null===(i=t.sheet)||void 0===i||i.insertRule(e,n))}catch(e){}}))}catch(e){}}(e.cssTexts,t):e.type===n.SetProperty?i(o.cssRules,e.index).style.setProperty(e.property,e.value,e.priority):e.type===n.RemoveProperty&&i(o.cssRules,e.index).style.removeProperty(e.property)}))},t.storeCSSRules=function(e,t){var r;try{var o=Array.from((null===(r=e.sheet)||void 0===r?void 0:r.cssRules)||[]).map((function(e){return e.cssText}));t.set(e,[{type:n.Snapshot,cssTexts:o}])}catch(e){}}},490:function(e,t){var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.parse=void 0;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function o(e){return e?e.replace(/^\s+|\s+$/g,""):""}function i(e,t){var r,o,a=e&&"string"==typeof e.type,s=a?e:t;try{for(var l=n(Object.keys(e)),c=l.next();!c.done;c=l.next()){var u=e[c.value];Array.isArray(u)?u.forEach((function(e){i(e,s)})):u&&"object"==typeof u&&i(u,s)}}catch(e){r={error:e}}finally{try{c&&!c.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}return a&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}t.parse=function(e,t){void 0===t&&(t={});var n=1,a=1;function s(e){var t=e.match(/\n/g);t&&(n+=t.length);var r=e.lastIndexOf("\n");a=-1===r?a+e.length:e.length-r}function l(){var e={line:n,column:a};return function(t){return t.position=new c(e),v(),t}}var c=function(e){this.start=e,this.end={line:n,column:a},this.source=t.source};c.prototype.content=e;var u=[];function d(r){var o=new Error(t.source+":"+n+":"+a+": "+r);if(o.reason=r,o.filename=t.source,o.line=n,o.column=a,o.source=e,!t.silent)throw o;u.push(o)}function p(){return m(/^{\s*/)}function f(){return m(/^}/)}function h(){var t,n,r,o=[];for(v(),y(o);e.length&&"}"!==e.charAt(0)&&(t=N()||(n=void 0,r=void 0,n=l(),(r=S())?(y(),n({type:"rule",selectors:r,declarations:T()})):d("selector missing")));)!1!==t&&(o.push(t),y(o));return o}function m(t){var n=t.exec(e);if(n){var r=n[0];return s(r),e=e.slice(r.length),n}}function v(){m(/^\s*/)}function y(e){var t;for(void 0===e&&(e=[]);t=g();)!1!==t&&e.push(t),t=g();return e}function g(){var t=l();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return d("End of comment missing");var r=e.slice(2,n-2);return a+=2,s(r),e=e.slice(n),a+=2,t({type:"comment",comment:r})}}function S(){var e=m(/^([^{]+)/);if(e)return o(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 b(){var e=l(),t=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=o(t[0]);if(!m(/^:\s*/))return d("property missing ':'");var i=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),a=e({type:"declaration",property:n.replace(r,""),value:i?o(i[0]).replace(r,""):""});return m(/^[;\s]*/),a}}function T(){var e,t=[];if(!p())return d("missing '{'");for(y(t);e=b();)!1!==e&&(t.push(e),y(t)),e=b();return f()?t:d("missing '}'")}function I(){for(var e,t=[],n=l();e=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),m(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:T()})}var x,E=k("import"),w=k("charset"),C=k("namespace");function k(e){var t=new RegExp("^@"+e+"\\s*([^;]+);");return function(){var n=l(),r=m(t);if(r){var o={type:e};return o[e]=r[1].trim(),n(o)}}}function N(){if("@"===e[0])return function(){var e=l(),t=m(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=m(/^([-\w]+)\s*/)))return d("@keyframes missing name");var r,o=t[1];if(!p())return d("@keyframes missing '{'");for(var i=y();r=I();)i.push(r),i=i.concat(y());return f()?e({type:"keyframes",name:o,vendor:n,keyframes:i}):d("@keyframes missing '}'")}}()||function(){var e=l(),t=m(/^@media *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@media missing '{'");var r=y().concat(h());return f()?e({type:"media",media:n,rules:r}):d("@media missing '}'")}}()||function(){var e=l(),t=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:o(t[1]),media:o(t[2])})}()||function(){var e=l(),t=m(/^@supports *([^{]+)/);if(t){var n=o(t[1]);if(!p())return d("@supports missing '{'");var r=y().concat(h());return f()?e({type:"supports",supports:n,rules:r}):d("@supports missing '}'")}}()||E()||w()||C()||function(){var e=l(),t=m(/^@([-\w]+)?document *([^{]+)/);if(t){var n=o(t[1]),r=o(t[2]);if(!p())return d("@document missing '{'");var i=y().concat(h());return f()?e({type:"document",document:r,vendor:n,rules:i}):d("@document missing '}'")}}()||function(){var e=l();if(m(/^@page */)){var t=S()||[];if(!p())return d("@page missing '{'");for(var n,r=y();n=b();)r.push(n),r=r.concat(y());return f()?e({type:"page",selectors:t,declarations:r}):d("@page missing '}'")}}()||function(){var e=l();if(m(/^@host\s*/)){if(!p())return d("@host missing '{'");var t=y().concat(h());return f()?e({type:"host",rules:t}):d("@host missing '}'")}}()||function(){var e=l();if(m(/^@font-face\s*/)){if(!p())return d("@font-face missing '{'");for(var t,n=y();t=b();)n.push(t),n=n.concat(y());return f()?e({type:"font-face",declarations:n}):d("@font-face missing '}'")}}()}return i((x=h(),{type:"stylesheet",stylesheet:{source:t.source,rules:x,parsingErrors:u}}))}},348:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.IGNORED_NODE=t.needMaskingText=t.cleanupSnapshot=t.visitSnapshot=t.transformAttribute=t.createCache=t.addHoverClass=t.buildNodeWithSN=t.rebuild=t.serializeNodeWithId=t.snapshot=void 0;var i=n(858);t.snapshot=i.default,Object.defineProperty(t,"serializeNodeWithId",{enumerable:!0,get:function(){return i.serializeNodeWithId}}),Object.defineProperty(t,"transformAttribute",{enumerable:!0,get:function(){return i.transformAttribute}}),Object.defineProperty(t,"visitSnapshot",{enumerable:!0,get:function(){return i.visitSnapshot}}),Object.defineProperty(t,"cleanupSnapshot",{enumerable:!0,get:function(){return i.cleanupSnapshot}}),Object.defineProperty(t,"needMaskingText",{enumerable:!0,get:function(){return i.needMaskingText}}),Object.defineProperty(t,"IGNORED_NODE",{enumerable:!0,get:function(){return i.IGNORED_NODE}});var a=n(189);t.rebuild=a.default,Object.defineProperty(t,"buildNodeWithSN",{enumerable:!0,get:function(){return a.buildNodeWithSN}}),Object.defineProperty(t,"addHoverClass",{enumerable:!0,get:function(){return a.addHoverClass}}),Object.defineProperty(t,"createCache",{enumerable:!0,get:function(){return a.createCache}}),o(n(397),t),o(n(606),t)},189:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.buildNodeWithSN=t.createCache=t.addHoverClass=void 0;var o=n(490),i=n(397),a=n(606),s={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"},l=/([^\\]):hover/,c=new RegExp(l.source,"g");function u(e,t){var n;if(!(null===(n=window.HIG_CONFIGURATION)||void 0===n?void 0:n.enableOnHoverClass))return e;var r=null==t?void 0:t.stylesWithHoverClass.get(e);if(r)return r;var i=o.parse(e,{silent:!0});if(!i.stylesheet)return e;var a=[];if(i.stylesheet.rules.forEach((function(e){"selectors"in e&&(e.selectors||[]).forEach((function(e){l.test(e)&&a.push(e)}))})),0===a.length)return e;var s=new RegExp(a.filter((function(e,t){return a.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")})).join("|"),"g"),u=e.replace(s,(function(e){var t=e.replace(c,"$1.\\:hover");return e+", "+t}));return null==t||t.stylesWithHoverClass.set(e,u),u}function d(e,t){var n,o,l=t.doc,c=t.map,p=t.skipChild,f=void 0!==p&&p,h=t.hackCss,m=void 0===h||h,v=t.afterAppend,y=t.cache,g=function(e,t){var n=t.doc,o=t.hackCss,a=t.cache;switch(e.type){case i.NodeType.Document:return n.implementation.createDocument(null,"",null);case i.NodeType.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case i.NodeType.Element:var l,c=function(e){var t=s[e.tagName]?s[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);l=e.isSVG?n.createElementNS("http://www.w3.org/2000/svg",c):n.createElement(c);var d=function(t){var i,s;if(!e.attributes.hasOwnProperty(t))return"continue";var d=e.attributes[t];if("option"===c&&"selected"===t&&!1===d)return"continue";if(d="boolean"==typeof d||"number"==typeof d?"":d,t.startsWith("rr_")){if("canvas"===c&&"rr_dataURL"===t){var p=document.createElement("img");p.src=d,p.onload=function(){var e=l.getContext("2d");e&&e.drawImage(p,0,0,p.width,p.height)}}if("rr_width"===t&&(l.style.width=d),"rr_height"===t&&(l.style.height=d),"rr_mediaCurrentTime"===t&&(l.currentTime=e.attributes.rr_mediaCurrentTime),"rr_mediaState"===t)switch(d){case"played":l.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":l.pause()}}else{var f="textarea"===c&&"value"===t,h="style"===c&&"_cssText"===t;if(h&&o&&(d=u(d,a)),f||h){var m=n.createTextNode(d);try{for(var v=(i=void 0,r(Array.from(l.childNodes))),y=v.next();!y.done;y=v.next()){var g=y.value;g.nodeType===l.TEXT_NODE&&l.removeChild(g)}}catch(e){i={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}return l.appendChild(m),"continue"}try{if(e.isSVG&&"xlink:href"===t)l.setAttributeNS("http://www.w3.org/1999/xlink",t,d);else if("onload"===t||"onclick"===t||"onmouse"===t.substring(0,7))l.setAttribute("_"+t,d);else{if("meta"===c&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"==t)return l.setAttribute("csp-content",d),"continue";l.setAttribute(t,d)}}catch(e){}}};for(var p in e.attributes)d(p);if(e.isShadowHost)if(l.shadowRoot)for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);else l.attachShadow({mode:"open"});return l;case i.NodeType.Text:return n.createTextNode(e.isStyle&&o?u(e.textContent,a):e.textContent);case i.NodeType.CDATA:return n.createCDATASection(e.textContent);case i.NodeType.Comment:return n.createComment(e.textContent);default:return null}}(e,{doc:l,hackCss:m,cache:y});if(!g)return null;if(e.rootId&&console.assert(c[e.rootId]===l,"Target document should has the same root id."),e.type===i.NodeType.Document&&(l.close(),l.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==i.NodeType.DocumentType&&(e.childNodes[0].type===i.NodeType.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):l.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),g=l),g.__sn=e,c[e.id]=g,(e.type===i.NodeType.Document||e.type===i.NodeType.Element)&&!f)try{for(var S=r(e.childNodes),b=S.next();!b.done;b=S.next()){var T=b.value,I=d(T,{doc:l,map:c,skipChild:!1,hackCss:m,afterAppend:v,cache:y});I?(T.isShadow&&a.isElement(g)&&g.shadowRoot?g.shadowRoot.appendChild(I):g.appendChild(I),v&&v(I)):console.warn("Failed to rebuild",T)}}catch(e){n={error:e}}finally{try{b&&!b.done&&(o=S.return)&&o.call(S)}finally{if(n)throw n.error}}return g}t.addHoverClass=u,t.createCache=function(){return{stylesWithHoverClass:new Map}},t.buildNodeWithSN=d,t.default=function(e,t){var n=t.doc,r=t.onVisit,o=t.hackCss,a={},s=d(e,{doc:n,map:a,skipChild:!1,hackCss:void 0===o||o,afterAppend:t.afterAppend,cache:t.cache});return function(e,t){for(var n in e)e[n]&&t(e[n])}(a,(function(e){r&&r(e),function(e){var t=e.__sn;if(t.type===i.NodeType.Element){var n=e;for(var r in t.attributes)if(t.attributes.hasOwnProperty(r)&&r.startsWith("rr_")){var o=t.attributes[r];"rr_scrollLeft"===r&&(n.scrollLeft=o),"rr_scrollTop"===r&&(n.scrollTop=o)}}}(e)})),[s,a]}},858:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupSnapshot=t.visitSnapshot=t.serializeNodeWithId=t.needMaskingText=t._isBlockedElement=t.transformAttribute=t.absoluteToDoc=t.absoluteToStylesheet=t.IGNORED_NODE=void 0;var o=n(397),i=n(606),a=1,s=new RegExp("[^a-z0-9-_:]");function l(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(c).join(""):null}catch(e){return null}}function c(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=l(e.styleSheet)||t}catch(e){}return t}t.IGNORED_NODE=-2;var u=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,d=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,p=/^(data:)([^,]*),(.*)/i;function f(e,t){return(e||"").replace(u,(function(e,n,o,i,a,s){var l,c,u,f=o||a||s,h=n||i||"";if(!f)return e;if(!d.test(f))return"url("+h+f+h+")";if(p.test(f))return"url("+h+f+h+")";if("/"===f[0])return"url("+h+(((u=t).indexOf("//")>-1?u.split("/").slice(0,3).join("/"):u.split("/")[0]).split("?")[0]+f)+h+")";var m=t.split("/"),v=f.split("/");m.pop();try{for(var y=r(v),g=y.next();!g.done;g=y.next()){var S=g.value;"."!==S&&(".."===S?m.pop():m.push(S))}}catch(e){l={error:e}}finally{try{g&&!g.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}return"url("+h+m.join("/")+h+")"}))}t.absoluteToStylesheet=f;var h=/^[^ \t\n\r\u000c]+/,m=/^[, \t\n\r\u000c]+/;function v(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function y(){var e=document.createElement("a");return e.href="",e.href}function g(e,t,n,r){return"src"===n||("href"===n||"xlink:href"===n)&&r?v(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(m),!(n>=t.length);){var i=r(h);if(","===i.slice(-1))i=v(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=v(e,i);for(var s=!1;;){var l=t.charAt(n);if(""===l){o.push((i+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,o.push((i+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?f(r,y()):r:v(e,r)}function S(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}function b(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else e.classList.forEach((function(e){if(t.test(e))return!0}));return!(!n||!e.matches(n))||b(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,b(e.parentNode,t,n)}function T(e){return void 0===e?"":e.toLowerCase()}function I(e,n){var c,u,d,p,h,m=n.doc,v=n.map,x=n.blockClass,E=n.blockSelector,w=n.maskTextClass,C=n.maskTextSelector,k=n.skipChild,N=void 0!==k&&k,M=n.inlineStylesheet,R=void 0===M||M,O=n.maskInputOptions,_=void 0===O?{}:O,D=n.maskTextFn,P=n.maskInputFn,A=n.slimDOMOptions,F=n.recordCanvas,L=void 0!==F&&F,j=n.onSerialize,B=n.onIframeLoad,W=n.iframeLoadTimeout,z=void 0===W?5e3:W,V=n.keepIframeSrcFn,H=void 0===V?function(){return!1}:V,U=n.enableStrictPrivacy,G=n.preserveWhiteSpace,Y=void 0===G||G,X=function(e,t){var n,a,c,u,d=t.doc,p=t.blockClass,h=t.blockSelector,m=t.maskTextClass,v=t.maskTextSelector,T=t.inlineStylesheet,I=t.maskInputOptions,x=void 0===I?{}:I,E=t.maskTextFn,w=t.maskInputFn,C=t.recordCanvas,k=t.keepIframeSrcFn,N=t.enableStrictPrivacy;if(d.__sn){var M=d.__sn.id;c=1===M?void 0:M}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:o.NodeType.Document,childNodes:[],compatMode:e.compatMode,rootId:c}:{type:o.NodeType.Document,childNodes:[],rootId:c};case e.DOCUMENT_TYPE_NODE:return{type:o.NodeType.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:c};case e.ELEMENT_NODE:var R=S(e,p,h),O=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return s.test(t)?"div":t}(e),_={};try{for(var D=r(Array.from(e.attributes)),P=D.next();!P.done;P=D.next()){var A=P.value,F=A.name,L=A.value;_[F]=g(d,O,F,L)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(a=D.return)&&a.call(D)}finally{if(n)throw n.error}}if("link"===O&&T){var j,B=Array.from(d.styleSheets).find((function(t){return t.href===e.href}));(j=l(B))&&(delete _.rel,delete _.href,_._cssText=f(j,B.href))}if("style"===O&&e.sheet&&!(e.innerText||e.textContent||"").trim().length&&(j=l(e.sheet))&&(_._cssText=f(j,y())),"input"!==O&&"textarea"!==O&&"select"!==O||(L=e.value,"radio"!==_.type&&"checkbox"!==_.type&&"submit"!==_.type&&"button"!==_.type&&L?"password"===_.type?_.value="*".repeat(L.length):_.value=i.maskInputValue({type:_.type,tagName:O,value:L,maskInputOptions:x,maskInputFn:w}):e.checked&&(_.checked=e.checked)),"option"===O&&(e.selected?_.selected=!0:delete _.selected),"canvas"===O&&C&&(_.rr_dataURL=e.toDataURL()),"audio"!==O&&"video"!==O||(_.rr_mediaState=e.paused?"paused":"played",_.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop),R||"img"===O&&N){var W=e.getBoundingClientRect(),z=W.width,V=W.height;_={class:_.class,rr_width:z+"px",rr_height:V+"px"},R=!0}return"iframe"!==O||k(_.src)||(e.contentDocument||(_.rr_src=_.src),delete _.src),{type:o.NodeType.Element,tagName:O,attributes:_,childNodes:[],isSVG:(u=e,"svg"===u.tagName||u instanceof SVGElement||void 0),needBlock:R,rootId:c};case e.TEXT_NODE:var H=e.parentNode&&e.parentNode.tagName,U=e.textContent,G="STYLE"===H||void 0,Y="SCRIPT"===H||void 0,X=!1;return G&&U&&(U=f(U,y()),X=!0),Y?(U="SCRIPT_PLACEHOLDER",X=!0):"NOSCRIPT"===H&&(U="",X=!0),!G&&!Y&&b(e,m,v)&&U&&(U=E?E(U):U.replace(/[\S]/g,"*")),N&&!X&&H&&!new Set(["HEAD","TITLE","STYLE","SCRIPT","HTML","BODY","NOSCRIPT"]).has(H)&&U&&(U=(null==(U=U.replace(/[^ -~]+/g,""))?void 0:U.split(" ").map((function(e){return Math.random().toString(20).substr(2,e.length)})).join(" "))||""),{type:o.NodeType.Text,textContent:U||"",isStyle:G,rootId:c};case e.CDATA_SECTION_NODE:return{type:o.NodeType.CDATA,textContent:"",rootId:c};case e.COMMENT_NODE:return{type:o.NodeType.Comment,textContent:e.textContent||"",rootId:c};default:return!1}}(e,{doc:m,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,recordCanvas:L,keepIframeSrcFn:H,enableStrictPrivacy:U});if(!X)return console.warn(e,"not serialized"),null;h="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===o.NodeType.Comment)return!0;if(e.type===o.NodeType.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(T(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===T(e.attributes.name)||"icon"===T(e.attributes.rel)||"apple-touch-icon"===T(e.attributes.rel)||"shortcut icon"===T(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&T(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(T(e.attributes.property).match(/^(og|twitter|fb):/)||T(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===T(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===T(e.attributes.name)||"googlebot"===T(e.attributes.name)||"bingbot"===T(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===T(e.attributes.name)||"generator"===T(e.attributes.name)||"framework"===T(e.attributes.name)||"publisher"===T(e.attributes.name)||"progid"===T(e.attributes.name)||T(e.attributes.property).match(/^article:/)||T(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===T(e.attributes.name)||"yandex-verification"===T(e.attributes.name)||"csrf-token"===T(e.attributes.name)||"p:domain_verify"===T(e.attributes.name)||"verify-v1"===T(e.attributes.name)||"verification"===T(e.attributes.name)||"shopify-checkout-api-token"===T(e.attributes.name)))return!0}}return!1}(X,A)&&(Y||X.type!==o.NodeType.Text||X.isStyle||X.textContent.replace(/^\s+|\s+$/gm,"").length)?a++:t.IGNORED_NODE;var q=Object.assign(X,{id:h});if(e.__sn=q,h===t.IGNORED_NODE)return null;v[h]=e,j&&j(e);var Q=!N;if(q.type===o.NodeType.Element){if(Q=Q&&!q.needBlock,q.needBlock&&"img"===q.tagName){var $=e.cloneNode();$.src="",v[h]=$}delete q.needBlock}if((q.type===o.NodeType.Document||q.type===o.NodeType.Element)&&Q){A.headWhitespace&&X.type===o.NodeType.Element&&"head"===X.tagName&&(Y=!1);var K={doc:m,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,skipChild:N,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U};try{for(var J=r(Array.from(e.childNodes)),Z=J.next();!Z.done;Z=J.next())(ne=I(Z.value,K))&&q.childNodes.push(ne)}catch(e){c={error:e}}finally{try{Z&&!Z.done&&(u=J.return)&&u.call(J)}finally{if(c)throw c.error}}if(i.isElement(e)&&e.shadowRoot){q.isShadowHost=!0;try{for(var ee=r(Array.from(e.shadowRoot.childNodes)),te=ee.next();!te.done;te=ee.next()){var ne;(ne=I(te.value,K))&&(ne.isShadow=!0,q.childNodes.push(ne))}}catch(e){d={error:e}}finally{try{te&&!te.done&&(p=ee.return)&&p.call(ee)}finally{if(d)throw d.error}}}}return e.parentNode&&i.isShadowRoot(e.parentNode)&&(q.isShadow=!0),q.type===o.NodeType.Element&&"iframe"===q.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&B){var n=I(t,{doc:t,map:v,blockClass:x,blockSelector:E,maskTextClass:w,maskTextSelector:C,skipChild:!1,inlineStylesheet:R,maskInputOptions:_,maskTextFn:D,maskInputFn:P,slimDOMOptions:A,recordCanvas:L,preserveWhiteSpace:Y,onSerialize:j,onIframeLoad:B,iframeLoadTimeout:z,keepIframeSrcFn:H,enableStrictPrivacy:U});n&&B(e,n)}}),z),q}t.absoluteToDoc=v,t.transformAttribute=g,t._isBlockedElement=S,t.needMaskingText=b,t.serializeNodeWithId=I,t.visitSnapshot=function(e,t){!function e(n){t(n),n.type!==o.NodeType.Document&&n.type!==o.NodeType.Element||n.childNodes.forEach(e)}(e)},t.cleanupSnapshot=function(){a=1},t.default=function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"highlight-block":r,i=n.blockSelector,a=void 0===i?null:i,s=n.maskTextClass,l=void 0===s?"highlight-mask":s,c=n.maskTextSelector,u=void 0===c?null:c,d=n.inlineStylesheet,p=void 0===d||d,f=n.recordCanvas,h=void 0!==f&&f,m=n.maskAllInputs,v=void 0!==m&&m,y=n.maskTextFn,g=n.maskInputFn,S=n.slimDOM,b=void 0!==S&&S,T=n.preserveWhiteSpace,x=n.onSerialize,E=n.onIframeLoad,w=n.iframeLoadTimeout,C=n.keepIframeSrcFn,k=void 0===C?function(){return!1}:C,N=n.enableStrictPrivacy,M={};return[I(e,{doc:e,map:M,blockClass:o,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===v?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===v?{password:!0}:v,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===b||"all"===b?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===b,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===b?{}:b,recordCanvas:h,preserveWhiteSpace:T,onSerialize:x,onIframeLoad:E,iframeLoadTimeout:w,keepIframeSrcFn:k,enableStrictPrivacy:void 0!==N&&N}),M]}},397:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=void 0,(n=t.NodeType||(t.NodeType={}))[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment"},606:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.maskInputValue=t.isShadowRoot=t.isElement=void 0,t.isElement=function(e){return e.nodeType===e.ELEMENT_NODE},t.isShadowRoot=function(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)},t.maskInputValue=function(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}},699:(e,t)=>{var n,r,o,i,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayerEvents=t.MediaInteractions=t.MouseInteractions=t.IncrementalSource=t.EventType=void 0,(a=t.EventType||(t.EventType={}))[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",(i=t.IncrementalSource||(t.IncrementalSource={}))[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",(o=t.MouseInteractions||(t.MouseInteractions={}))[o.MouseUp=0]="MouseUp",o[o.MouseDown=1]="MouseDown",o[o.Click=2]="Click",o[o.ContextMenu=3]="ContextMenu",o[o.DblClick=4]="DblClick",o[o.Focus=5]="Focus",o[o.Blur=6]="Blur",o[o.TouchStart=7]="TouchStart",o[o.TouchMove_Departed=8]="TouchMove_Departed",o[o.TouchEnd=9]="TouchEnd",o[o.TouchCancel=10]="TouchCancel",(r=t.MediaInteractions||(t.MediaInteractions={}))[r.Play=0]="Play",r[r.Pause=1]="Pause",r[r.Seeked=2]="Seeked",(n=t.ReplayerEvents||(t.ReplayerEvents={})).Start="start",n.Pause="pause",n.Resume="resume",n.Resize="resize",n.Finish="finish",n.FullsnapshotRebuilded="fullsnapshot-rebuilded",n.LoadStylesheetStart="load-stylesheet-start",n.LoadStylesheetEnd="load-stylesheet-end",n.SkipStart="skip-start",n.SkipEnd="skip-end",n.MouseInteraction="mouse-interaction",n.EventCast="event-cast",n.CustomEvent="custom-event",n.Flush="flush",n.StateChange="state-change",n.PlayBack="play-back"},593:function(e,t,n){var r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.hasShadowRoot=t.getBaseDimension=t.isIframeINode=t.iterateResolveTree=t.queueToResolveTrees=t.TreeIndex=t.polyfill=t.isTouchEvent=t.isAncestorRemoved=t.isIgnored=t.isBlocked=t.getWindowWidth=t.getWindowHeight=t.patch=t.hookSetter=t.throttle=t._mirror=t.createMirror=t.on=void 0;var o=n(699),i=n(348);t.on=function(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}},t.createMirror=function(){return{map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}}};var a="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.";t._mirror={map:{},getId:function(){return console.error(a),-1},getNode:function(){return console.error(a),null},removeNodeFromMap:function(){console.error(a)},has:function(){return console.error(a),!1},reset:function(){console.error(a)}},"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(t._mirror=new Proxy(t._mirror,{get:function(e,t,n){return"map"===t&&console.error(a),Reflect.get(e,t,n)}})),t.throttle=function(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),l=this,c=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,c)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(l,c)}),s))}},t.hookSetter=function e(t,n,r,o,i){void 0===i&&(i=window);var a=i.Object.getOwnPropertyDescriptor(t,n);return i.Object.defineProperty(t,n,o?r:{set:function(e){var t=this;setTimeout((function(){r.set.call(t,e)}),0),a&&a.set&&a.set.call(this,e)}}),function(){return e(t,n,a||{},!0)}},t.patch=function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}},t.getWindowHeight=function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},t.getWindowWidth=function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},t.isBlocked=function e(t,n){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){var r=!1;return"string"==typeof n?r=t.classList.contains(n):t.classList.forEach((function(e){n.test(e)&&(r=!0)})),r||e(t.parentNode,n)}return t.nodeType,t.TEXT_NODE,e(t.parentNode,n)},t.isIgnored=function(e){return"__sn"in e&&e.__sn.id===i.IGNORED_NODE},t.isAncestorRemoved=function e(t,n){if(i.isShadowRoot(t))return!1;var r=n.getId(t);return!n.has(r)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||e(t.parentNode,n))},t.isTouchEvent=function(e){return Boolean(e.changedTouches)},t.polyfill=function(e){void 0===e&&(e=window),"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1})};var s=function(){function e(){this.reset()}return e.prototype.add=function(e){var t=this.indexes.get(e.parentId),n={id:e.node.id,mutation:e,children:[],texts:[],attributes:[]};t?(n.parent=t,t.children[n.id]=n):this.tree[n.id]=n,this.indexes.set(n.id,n)},e.prototype.remove=function(e,t){var n=this,r=this.indexes.get(e.parentId),o=this.indexes.get(e.id),i=function(e){n.removeIdSet.add(e);var r=t.getNode(e);null==r||r.childNodes.forEach((function(e){"__sn"in e&&i(e.__sn.id)}))},a=function(t){n.removeIdSet.add(t.id),Object.values(t.children).forEach((function(e){return a(e)}));var r=n.indexes.get(t.id);if(r){var o=r.parent;o&&(delete r.parent,delete o.children[r.id],n.indexes.delete(e.id))}};o?r?(delete o.parent,delete r.children[o.id],this.indexes.delete(e.id),a(o)):(delete this.tree[o.id],this.indexes.delete(o.id),a(o)):(this.removeNodeMutations.push(e),i(e.id))},e.prototype.text=function(e){var t=this.indexes.get(e.id);t?t.texts.push(e):this.textMutations.push(e)},e.prototype.attribute=function(e){var t=this.indexes.get(e.id);t?t.attributes.push(e):this.attributeMutations.push(e)},e.prototype.scroll=function(e){this.scrollMap.set(e.id,e)},e.prototype.input=function(e){this.inputMap.set(e.id,e)},e.prototype.flush=function(){var e,t,n,i,a=this,s=this,l=s.tree,c=s.removeNodeMutations,u=s.textMutations,d=s.attributeMutations,p={source:o.IncrementalSource.Mutation,removes:c,texts:u,attributes:d,adds:[]},f=function(e,t){t&&a.removeIdSet.add(e.id),p.texts=p.texts.concat(t?[]:e.texts).filter((function(e){return!a.removeIdSet.has(e.id)})),p.attributes=p.attributes.concat(t?[]:e.attributes).filter((function(e){return!a.removeIdSet.has(e.id)})),a.removeIdSet.has(e.id)||a.removeIdSet.has(e.mutation.parentId)||t?Object.values(e.children).forEach((function(e){return f(e,!0)})):(p.adds.push(e.mutation),e.children&&Object.values(e.children).forEach((function(e){return f(e,!1)})))};Object.values(l).forEach((function(e){return f(e,!1)}));try{for(var h=r(this.scrollMap.keys()),m=h.next();!m.done;m=h.next()){var v=m.value;this.removeIdSet.has(v)&&this.scrollMap.delete(v)}}catch(t){e={error:t}}finally{try{m&&!m.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var y=r(this.inputMap.keys()),g=y.next();!g.done;g=y.next())v=g.value,this.removeIdSet.has(v)&&this.inputMap.delete(v)}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=y.return)&&i.call(y)}finally{if(n)throw n.error}}var S=new Map(this.scrollMap),b=new Map(this.inputMap);return this.reset(),{mutationData:p,scrollMap:S,inputMap:b}},e.prototype.reset=function(){this.tree=[],this.indexes=new Map,this.removeNodeMutations=[],this.textMutations=[],this.attributeMutations=[],this.removeIdSet=new Set,this.scrollMap=new Map,this.inputMap=new Map},e.prototype.idRemoved=function(e){return this.removeIdSet.has(e)},e}();t.TreeIndex=s,t.queueToResolveTrees=function(e){var t,n,o={},i=function(e,t){var n={value:e,parent:t,children:[]};return o[e.node.id]=n,n},a=[];try{for(var s=r(e),l=s.next();!l.done;l=s.next()){var c=l.value,u=c.nextId,d=c.parentId;if(u&&u in o){var p=o[u];if(p.parent){var f=p.parent.children.indexOf(p);p.parent.children.splice(f,0,i(c,p.parent))}else f=a.indexOf(p),a.splice(f,0,i(c,null))}else if(d in o){var h=o[d];h.children.push(i(c,h))}else a.push(i(c,null))}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return a},t.iterateResolveTree=function e(t,n){n(t.value);for(var r=t.children.length-1;r>=0;r--)e(t.children[r],n)},t.isIframeINode=function(e){return"__sn"in e&&e.__sn.type===i.NodeType.Element&&"iframe"===e.__sn.tagName},t.getBaseDimension=function e(t,n){var r,o,i=null===(o=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===o?void 0:o.frameElement;if(!i||i===n)return{x:0,y:0,relativeScale:1,absoluteScale:1};var a=i.getBoundingClientRect(),s=e(i,n),l=a.height/i.clientHeight;return{x:a.x*s.relativeScale+s.x,y:a.y*s.relativeScale+s.y,relativeScale:l,absoluteScale:s.absoluteScale*l}},t.hasShadowRoot=function(e){var t;return Boolean(null===(t=e)||void 0===t?void 0:t.shadowRoot)}}},t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.utils=e.mirror=e.Replayer=e.freezePage=e.addCustomEvent=e.record=void 0;var t=n(476);e.record=t.default;var o=n(943);Object.defineProperty(e,"Replayer",{enumerable:!0,get:function(){return o.Replayer}});var i=n(593);Object.defineProperty(e,"mirror",{enumerable:!0,get:function(){return i._mirror}});var a=n(593);e.utils=a;var s=n(699);Object.defineProperty(e,"EventType",{enumerable:!0,get:function(){return s.EventType}}),Object.defineProperty(e,"IncrementalSource",{enumerable:!0,get:function(){return s.IncrementalSource}}),Object.defineProperty(e,"MouseInteractions",{enumerable:!0,get:function(){return s.MouseInteractions}}),Object.defineProperty(e,"ReplayerEvents",{enumerable:!0,get:function(){return s.ReplayerEvents}});var l=t.default.addCustomEvent;e.addCustomEvent=l;var c=t.default.freezePage;e.freezePage=c})(),r})()}));
|
|
3
3
|
//# sourceMappingURL=index.js.map
|