@sentry/rrweb-player 2.43.2

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.
@@ -0,0 +1,70 @@
1
+ (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("rrwebPlayer", [], f);} else if ("object" == typeof exports) {exports["rrwebPlayer"] = f();} else {g["rrwebPlayer"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
+ "use strict";var Na=Object.defineProperty,zs=e=>{throw TypeError(e)},Ma=(e,t,n)=>t in e?Na(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t,n)=>Ma(e,typeof t!="symbol"?t+"":t,n),Oi=(e,t,n)=>t.has(e)||zs("Cannot "+n),p=(e,t,n)=>(Oi(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?zs("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),k=(e,t,n,r)=>(Oi(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Oi(e,t,"access private method"),n),jn,An,Mt,dt,Un,Oe,hr,jt,Rt,mt,Bn,On,un,we,dr,Gs,pr,Ii,mr,Da,Ie,sr,vt,hn,Me,yt,Fe,tt,kt,Lt,At,In,vr,gr,St,Qr,he,Ys,Hs,js,Jr,Ar,yr,Zr,Nt,Ye,ns,et,ut,Re,tn,or,ar,$r;Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var le=2,En=4,Or=8,qs=1<<24,rt=16,Qe=32,Zt=64,ei=128,Le=512,ie=1024,ue=2048,st=4096,be=8192,Te=16384,Pt=32768,ti=1<<25,dn=65536,ni=1<<17,Ta=1<<18,Sn=1<<19,Ca=1<<20,_t=1<<25,qt=65536,ri=1<<21,qn=1<<22,Ot=1<<23,Vn=Symbol("$state"),Xs=Symbol("legacy props"),xa=Symbol(""),pt=new class extends Error{constructor(){super(...arguments),nt(this,"name","StaleReactionError"),nt(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Ra=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),Ir=3,Qn=8,ka=!1,Ks=Array.isArray,Aa=Array.prototype.indexOf,pn=Array.prototype.includes,Fr=Array.from,Qs=Object.defineProperty,fn=Object.getOwnPropertyDescriptor,Oa=Object.getOwnPropertyDescriptors,Ia=Object.prototype,Fa=Array.prototype,Js=Object.getPrototypeOf,rs=Object.isExtensible,Pa=()=>{};function La(e){for(var t=0;t<e.length;t++)e[t]()}function Zs(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}function $s(e){return e===this.v}function Wa(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function eo(e){return!Wa(e,this.v)}function to(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Ua(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ba(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Va(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function za(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ga(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Ya(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ha(){throw new Error("https://svelte.dev/e/hydration_failed")}function ja(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function qa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Xa(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ka(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Qa(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}var Ja=!1,Za=1,$a=2,el=16,tl=1,nl=4,rl=8,il=16,sl=2,no="[",Fi="[!",is="[?",Pi="]",mn={},ae=Symbol(),ro="http://www.w3.org/1999/xhtml",pe=null;function vn(e){pe=e}function Pr(e,t=!1,n){pe={p:pe,i:!1,c:null,e:null,s:e,x:null,r:F,l:null}}function Lr(e){var t=pe,n=t.e;if(n!==null){t.e=null;for(var r of n)Lo(r)}return e!==void 0&&(t.x=e),t.i=!0,pe=t.p,e??{}}function io(){return!0}var Bt=[];function so(){var e=Bt;Bt=[],La(e)}function Xt(e){if(Bt.length===0&&!zn){var t=Bt;queueMicrotask(()=>{t===Bt&&so()})}Bt.push(e)}function ol(){for(;Bt.length>0;)so()}function Wr(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function al(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}var W=!1;function wt(e){W=e}var L;function Ce(e){if(e===null)throw Wr(),mn;return L=e}function Ur(){return Ce(ot(L))}function He(e){if(W){if(ot(L)!==null)throw Wr(),mn;L=e}}function ll(e=1){if(W){for(var t=e,n=L;t--;)n=ot(n);L=n}}function _r(e=!0){for(var t=0,n=L;;){if(n.nodeType===Qn){var r=n.data;if(r===Pi){if(t===0)return n;t-=1}else(r===no||r===Fi||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=ot(n);e&&n.remove(),n=i}}function oo(e){if(!e||e.nodeType!==Qn)throw Wr(),mn;return e.data}function Dt(e){if(typeof e!="object"||e===null||Vn in e)return e;let t=Js(e);if(t!==Ia&&t!==Fa)return e;var n=new Map,r=Ks(e),i=de(0),s=Ht,o=a=>{if(Ht===s)return a();var l=I,c=Ht;Ue(null),cs(s);var u=a();return Ue(l),cs(c),u};return r&&n.set("length",de(e.length)),new Proxy(e,{defineProperty(a,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&qa();var u=n.get(l);return u===void 0?o(()=>{var f=de(c.value);return n.set(l,f),f}):te(u,c.value,!0),!0},deleteProperty(a,l){var c=n.get(l);if(c===void 0){if(l in a){let u=o(()=>de(ae));n.set(l,u),Gn(i)}}else te(c,ae),Gn(i);return!0},get(a,l,c){if(l===Vn)return e;var u=n.get(l),f=l in a;if(u===void 0&&(!f||fn(a,l)?.writable)&&(u=o(()=>{var d=Dt(f?a[l]:ae),m=de(d);return m}),n.set(l,u)),u!==void 0){var h=b(u);return h===ae?void 0:h}return Reflect.get(a,l,c)},getOwnPropertyDescriptor(a,l){var c=Reflect.getOwnPropertyDescriptor(a,l);if(c&&"value"in c){var u=n.get(l);u&&(c.value=b(u))}else if(c===void 0){var f=n.get(l),h=f?.v;if(f!==void 0&&h!==ae)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(a,l){if(l===Vn)return!0;var c=n.get(l),u=c!==void 0&&c.v!==ae||Reflect.has(a,l);if(c!==void 0||F!==null&&(!u||fn(a,l)?.writable)){c===void 0&&(c=o(()=>{var h=u?Dt(a[l]):ae,d=de(h);return d}),n.set(l,c));var f=b(c);if(f===ae)return!1}return u},set(a,l,c,u){var f=n.get(l),h=l in a;if(r&&l==="length")for(var d=c;d<f.v;d+=1){var m=n.get(d+"");m!==void 0?te(m,ae):d in a&&(m=o(()=>de(ae)),n.set(d+"",m))}if(f===void 0)(!h||fn(a,l)?.writable)&&(f=o(()=>de(void 0)),te(f,Dt(c)),n.set(l,f));else{h=f.v!==ae;var E=o(()=>Dt(c));te(f,E)}var y=Reflect.getOwnPropertyDescriptor(a,l);if(y?.set&&y.set.call(u,c),!h){if(r&&typeof l=="string"){var v=n.get("length"),w=Number(l);Number.isInteger(w)&&w>=v.v&&te(v,w+1)}Gn(i)}return!0},ownKeys(a){b(i);var l=Reflect.ownKeys(a).filter(f=>{var h=n.get(f);return h===void 0||h.v!==ae});for(var[c,u]of n)u.v!==ae&&!(c in a)&&l.push(c);return l},setPrototypeOf(){Xa()}})}var ss,ao,lo,co;function ii(){if(ss===void 0){ss=window,ao=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;lo=fn(t,"firstChild").get,co=fn(t,"nextSibling").get,rs(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),rs(n)&&(n.__t=void 0)}}function Ke(e=""){return document.createTextNode(e)}function Kt(e){return lo.call(e)}function ot(e){return co.call(e)}function je(e,t){if(!W)return Kt(e);var n=Kt(L);if(n===null)n=L.appendChild(Ke());else if(t&&n.nodeType!==Ir){var r=Ke();return n?.before(r),Ce(r),r}return t&&Li(n),Ce(n),n}function cl(e,t=!1){if(!W){var n=Kt(e);return n instanceof Comment&&n.data===""?ot(n):n}if(t){if(L?.nodeType!==Ir){var r=Ke();return L?.before(r),Ce(r),r}Li(L)}return L}function ke(e,t=1,n=!1){let r=W?L:e;for(var i;t--;)i=r,r=ot(r);if(!W)return r;if(n){if(r?.nodeType!==Ir){var s=Ke();return r===null?i?.after(s):r.before(s),Ce(s),s}Li(r)}return Ce(r),r}function uo(e){e.textContent=""}function fo(){return!1}function ul(e,t,n){return document.createElementNS(ro,e,void 0)}function Li(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===Ir;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ho(e){var t=F;if(t===null)return I.f|=Ot,e;if((t.f&Pt)===0&&(t.f&En)===0)throw e;Tt(e,t)}function Tt(e,t){for(;t!==null;){if((t.f&ei)!==0){if((t.f&Pt)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}var fl=-7169;function $(e,t){e.f=e.f&fl|t}function Wi(e){(e.f&Le)!==0||e.deps===null?$(e,ie):$(e,st)}function po(e){if(e!==null)for(let t of e)(t.f&le)===0||(t.f&qt)===0||(t.f^=qt,po(t.deps))}function mo(e,t,n){(e.f&ue)!==0?t.add(e):(e.f&st)!==0&&n.add(e),po(e.deps),$(e,ie)}var tr=!1;function hl(e){var t=tr;try{return tr=!1,[e(),tr]}finally{tr=t}}var Gt=new Set,H=null,qe=null,si=null,zn=!1,Vr=!1,gn=null,wr=null,vo=0,dl=1,go=class yo{constructor(){x(this,we),nt(this,"id",dl++),nt(this,"current",new Map),nt(this,"previous",new Map),x(this,jn,new Set),x(this,An,new Set),x(this,Mt,new Map),x(this,dt,new Map),x(this,Un,null),x(this,Oe,[]),x(this,hr,[]),x(this,jt,new Set),x(this,Rt,new Set),x(this,mt,new Map),x(this,Bn,new Set),nt(this,"is_fork",!1),x(this,On,!1),x(this,un,new Set)}skip_effect(t){p(this,mt).has(t)||p(this,mt).set(t,{d:[],m:[]}),p(this,Bn).delete(t)}unskip_effect(t,n=r=>this.schedule(r)){var r=p(this,mt).get(t);if(r){p(this,mt).delete(t);for(var i of r.d)$(i,ue),n(i);for(i of r.m)$(i,st),n(i)}p(this,Bn).add(t)}capture(t,n,r=!1){t.v!==ae&&!this.previous.has(t)&&this.previous.set(t,t.v),(t.f&Ot)===0&&(this.current.set(t,[n,r]),qe?.set(t,n)),this.is_fork||(t.v=n)}activate(){H=this}deactivate(){H=null,qe=null}flush(){try{Vr=!0,H=this,Q(this,we,pr).call(this)}finally{vo=0,si=null,gn=null,wr=null,Vr=!1,H=null,qe=null,Yt.clear()}}discard(){for(let t of p(this,An))t(this);p(this,An).clear(),Gt.delete(this)}register_created_effect(t){p(this,hr).push(t)}increment(t,n){let r=p(this,Mt).get(n)??0;if(p(this,Mt).set(n,r+1),t){let i=p(this,dt).get(n)??0;p(this,dt).set(n,i+1)}}decrement(t,n,r){let i=p(this,Mt).get(n)??0;if(i===1?p(this,Mt).delete(n):p(this,Mt).set(n,i-1),t){let s=p(this,dt).get(n)??0;s===1?p(this,dt).delete(n):p(this,dt).set(n,s-1)}p(this,On)||r||(k(this,On,!0),Xt(()=>{k(this,On,!1),this.flush()}))}transfer_effects(t,n){for(let r of t)p(this,jt).add(r);for(let r of n)p(this,Rt).add(r);t.clear(),n.clear()}oncommit(t){p(this,jn).add(t)}ondiscard(t){p(this,An).add(t)}settled(){return(p(this,Un)??k(this,Un,Zs())).promise}static ensure(){if(H===null){let t=H=new yo;Vr||(Gt.add(H),zn||Xt(()=>{H===t&&t.flush()}))}return H}apply(){{qe=null;return}}schedule(t){if(si=t,t.b?.is_pending&&(t.f&(En|Or|qs))!==0&&(t.f&Pt)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(gn!==null&&n===F&&(I===null||(I.f&le)===0))return;if((r&(Zt|Qe))!==0){if((r&ie)===0)return;n.f^=ie}}p(this,Oe).push(n)}};jn=new WeakMap;An=new WeakMap;Mt=new WeakMap;dt=new WeakMap;Un=new WeakMap;Oe=new WeakMap;hr=new WeakMap;jt=new WeakMap;Rt=new WeakMap;mt=new WeakMap;Bn=new WeakMap;On=new WeakMap;un=new WeakMap;we=new WeakSet;dr=function(){return this.is_fork||p(this,dt).size>0};Gs=function(){for(let n of p(this,un))for(let r of p(n,dt).keys()){for(var e=!1,t=r;t.parent!==null;){if(p(this,mt).has(t)){e=!0;break}t=t.parent}if(!e)return!0}return!1};pr=function(){var e;if(vo++>1e3&&(Gt.delete(this),ml()),!Q(this,we,dr).call(this)){for(let a of p(this,jt))p(this,Rt).delete(a),$(a,ue),this.schedule(a);for(let a of p(this,Rt))$(a,st),this.schedule(a)}let t=p(this,Oe);k(this,Oe,[]),this.apply();var n=gn=[],r=[],i=wr=[];for(let a of t)try{Q(this,we,Ii).call(this,a,n,r)}catch(l){throw bo(a),l}if(H=null,i.length>0){var s=go.ensure();for(let a of i)s.schedule(a)}if(gn=null,wr=null,Q(this,we,dr).call(this)||Q(this,we,Gs).call(this)){Q(this,we,mr).call(this,r),Q(this,we,mr).call(this,n);for(let[a,l]of p(this,mt))wo(a,l)}else{p(this,Mt).size===0&&Gt.delete(this),p(this,jt).clear(),p(this,Rt).clear();for(let a of p(this,jn))a(this);p(this,jn).clear(),os(r),os(n),p(this,Un)?.resolve()}var o=H;if(p(this,Oe).length>0){let a=o??(o=this);p(a,Oe).push(...p(this,Oe).filter(l=>!p(a,Oe).includes(l)))}o!==null&&(Gt.add(o),Q(e=o,we,pr).call(e))};Ii=function(e,t,n){e.f^=ie;for(var r=e.first;r!==null;){var i=r.f,s=(i&(Qe|Zt))!==0,o=s&&(i&ie)!==0,a=o||(i&be)!==0||p(this,mt).has(r);if(!a&&r.fn!==null){s?r.f^=ie:(i&En)!==0?t.push(r):Zn(r)&&((i&rt)!==0&&p(this,Rt).add(r),_n(r));var l=r.first;if(l!==null){r=l;continue}}for(;r!==null;){var c=r.next;if(c!==null){r=c;break}r=r.parent}}};mr=function(e){for(var t=0;t<e.length;t+=1)mo(e[t],p(this,jt),p(this,Rt))};Da=function(){var e,t,n;for(let h of Gt){var r=h.id<this.id,i=[];for(let[d,[m,E]]of this.current){if(h.current.has(d)){var s=h.current.get(d)[0];if(r&&m!==s)h.current.set(d,[m,E]);else continue}i.push(d)}var o=[...h.current.keys()].filter(d=>!this.current.has(d));if(o.length===0)r&&h.discard();else if(i.length>0){if(r)for(let d of p(this,Bn))h.unskip_effect(d,m=>{var E;(m.f&(rt|qn))!==0?h.schedule(m):Q(E=h,we,mr).call(E,[m])});h.activate();var a=new Set,l=new Map;for(var c of i)_o(c,o,a,l);l=new Map;var u=[...h.current.keys()].filter(d=>this.current.has(d)?this.current.get(d)[0]!==d:!0);for(let d of p(this,hr))(d.f&(Te|be|ni))===0&&Ui(d,u,l)&&((d.f&(qn|rt))!==0?($(d,ue),h.schedule(d)):p(h,jt).add(d));if(p(h,Oe).length>0){h.apply();for(var f of p(h,Oe))Q(e=h,we,Ii).call(e,f,[],[]);k(h,Oe,[])}h.deactivate()}}for(let h of Gt)p(h,un).has(this)&&(p(h,un).delete(this),p(h,un).size===0&&!Q(t=h,we,dr).call(t)&&(h.activate(),Q(n=h,we,pr).call(n)))};var Jn=go;function pl(e){var t=zn;zn=!0;try{for(var n;;){if(ol(),H===null)return n;H.flush()}}finally{zn=t}}function ml(){try{Ya()}catch(e){Tt(e,si)}}var ft=null;function os(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Te|be))===0&&Zn(r)&&(ft=new Set,_n(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Uo(r),ft?.size>0)){Yt.clear();for(let i of ft){if((i.f&(Te|be))!==0)continue;let s=[i],o=i.parent;for(;o!==null;)ft.has(o)&&(ft.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){let l=s[a];(l.f&(Te|be))===0&&_n(l)}}ft.clear()}}ft=null}}function _o(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let s=i.f;(s&le)!==0?_o(i,t,n,r):(s&(qn|rt))!==0&&(s&ue)===0&&Ui(i,t,r)&&($(i,ue),Bi(i))}}function Ui(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let i of e.deps){if(pn.call(t,i))return!0;if((i.f&le)!==0&&Ui(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Bi(e){H.schedule(e)}function wo(e,t){if(!((e.f&Qe)!==0&&(e.f&ie)!==0)){(e.f&ue)!==0?t.d.push(e):(e.f&st)!==0&&t.m.push(e),$(e,ie);for(var n=e.first;n!==null;)wo(n,t),n=n.next}}function bo(e){$(e,ie);for(var t=e.first;t!==null;)bo(t),t=t.next}function vl(e){let t=0,n=Qt(0),r;return()=>{Gi()&&(b(n),Yi(()=>(t===0&&(r=Nn(()=>e(()=>Gn(n)))),t+=1,()=>{Xt(()=>{t-=1,t===0&&(r?.(),r=void 0,Gn(n))})})))}}var gl=dn|Sn;function yl(e,t,n,r){new oi(e,t,n,r)}var oi=class{constructor(t,n,r,i){x(this,he),nt(this,"parent"),nt(this,"is_pending",!1),nt(this,"transform_error"),x(this,Ie),x(this,sr,W?L:null),x(this,vt),x(this,hn),x(this,Me),x(this,yt,null),x(this,Fe,null),x(this,tt,null),x(this,kt,null),x(this,Lt,0),x(this,At,0),x(this,In,!1),x(this,vr,new Set),x(this,gr,new Set),x(this,St,null),x(this,Qr,vl(()=>(k(this,St,Qt(p(this,Lt))),()=>{k(this,St,null)}))),k(this,Ie,t),k(this,vt,n),k(this,hn,s=>{var o=F;o.b=this,o.f|=ei,r(s)}),this.parent=F.b,this.transform_error=i??this.parent?.transform_error??(s=>s),k(this,Me,Hi(()=>{if(W){let s=p(this,sr);Ur();let o=s.data===Fi;if(s.data.startsWith(is)){let l=JSON.parse(s.data.slice(is.length));Q(this,he,Hs).call(this,l)}else o?Q(this,he,js).call(this):Q(this,he,Ys).call(this)}else Q(this,he,Jr).call(this)},gl)),W&&k(this,Ie,L)}defer_effect(t){mo(t,p(this,vr),p(this,gr))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!p(this,vt).pending}update_pending_count(t,n){Q(this,he,Zr).call(this,t,n),k(this,Lt,p(this,Lt)+t),!(!p(this,St)||p(this,In))&&(k(this,In,!0),Xt(()=>{k(this,In,!1),p(this,St)&&yn(p(this,St),p(this,Lt))}))}get_effect_pending(){return p(this,Qr).call(this),b(p(this,St))}error(t){var n=p(this,vt).onerror;let r=p(this,vt).failed;if(!n&&!r)throw t;p(this,yt)&&(Ee(p(this,yt)),k(this,yt,null)),p(this,Fe)&&(Ee(p(this,Fe)),k(this,Fe,null)),p(this,tt)&&(Ee(p(this,tt)),k(this,tt,null)),W&&(Ce(p(this,sr)),ll(),Ce(_r()));var i=!1,s=!1;let o=()=>{if(i){al();return}i=!0,s&&Qa(),p(this,tt)!==null&&$t(p(this,tt),()=>{k(this,tt,null)}),Q(this,he,yr).call(this,()=>{Q(this,he,Jr).call(this)})},a=l=>{try{s=!0,n?.(l,o),s=!1}catch(c){Tt(c,p(this,Me)&&p(this,Me).parent)}r&&k(this,tt,Q(this,he,yr).call(this,()=>{try{return Be(()=>{var c=F;c.b=this,c.f|=ei,r(p(this,Ie),()=>l,()=>o)})}catch(c){return Tt(c,p(this,Me).parent),null}}))};Xt(()=>{var l;try{l=this.transform_error(t)}catch(c){Tt(c,p(this,Me)&&p(this,Me).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,c=>Tt(c,p(this,Me)&&p(this,Me).parent)):a(l)})}};Ie=new WeakMap;sr=new WeakMap;vt=new WeakMap;hn=new WeakMap;Me=new WeakMap;yt=new WeakMap;Fe=new WeakMap;tt=new WeakMap;kt=new WeakMap;Lt=new WeakMap;At=new WeakMap;In=new WeakMap;vr=new WeakMap;gr=new WeakMap;St=new WeakMap;Qr=new WeakMap;he=new WeakSet;Ys=function(){try{k(this,yt,Be(()=>p(this,hn).call(this,p(this,Ie))))}catch(e){this.error(e)}};Hs=function(e){let t=p(this,vt).failed;t&&k(this,tt,Be(()=>{t(p(this,Ie),()=>e,()=>()=>{})}))};js=function(){let e=p(this,vt).pending;e&&(this.is_pending=!0,k(this,Fe,Be(()=>e(p(this,Ie)))),Xt(()=>{var t=k(this,kt,document.createDocumentFragment()),n=Ke();t.append(n),k(this,yt,Q(this,he,yr).call(this,()=>Be(()=>p(this,hn).call(this,n)))),p(this,At)===0&&(p(this,Ie).before(t),k(this,kt,null),$t(p(this,Fe),()=>{k(this,Fe,null)}),Q(this,he,Ar).call(this,H))}))};Jr=function(){try{if(this.is_pending=this.has_pending_snippet(),k(this,At,0),k(this,Lt,0),k(this,yt,Be(()=>{p(this,hn).call(this,p(this,Ie))})),p(this,At)>0){var e=k(this,kt,document.createDocumentFragment());Xi(p(this,yt),e);let t=p(this,vt).pending;k(this,Fe,Be(()=>t(p(this,Ie))))}else Q(this,he,Ar).call(this,H)}catch(t){this.error(t)}};Ar=function(e){this.is_pending=!1,e.transfer_effects(p(this,vr),p(this,gr))};yr=function(e){var t=F,n=I,r=pe;it(p(this,Me)),Ue(p(this,Me)),vn(p(this,Me).ctx);try{return Jn.ensure(),e()}catch(i){return ho(i),null}finally{it(t),Ue(n),vn(r)}};Zr=function(e,t){var n;if(!this.has_pending_snippet()){this.parent&&Q(n=this.parent,he,Zr).call(n,e,t);return}k(this,At,p(this,At)+e),p(this,At)===0&&(Q(this,he,Ar).call(this,t),p(this,Fe)&&$t(p(this,Fe),()=>{k(this,Fe,null)}),p(this,kt)&&(p(this,Ie).before(p(this,kt)),k(this,kt,null)))};function _l(e,t,n,r){let i=Br;var s=e.filter(h=>!h.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var o=F,a=wl(),l=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(h=>h.promise)):null;function c(h){a();try{r(h)}catch(d){(o.f&Te)===0&&Tt(d,o)}br()}if(n.length===0){l.then(()=>c(t.map(i)));return}var u=Eo();function f(){Promise.all(n.map(h=>bl(h))).then(h=>c([...t.map(i),...h])).catch(h=>Tt(h,o)).finally(()=>u())}l?l.then(()=>{a(),f(),br()}):f()}function wl(){var e=F,t=I,n=pe,r=H;return function(s=!0){it(e),Ue(t),vn(n),s&&(e.f&Te)===0&&(r?.activate(),r?.apply())}}function br(e=!0){it(null),Ue(null),vn(null),e&&H?.deactivate()}function Eo(){var e=F,t=e.b,n=H,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function Br(e){var t=le|ue,n=I!==null&&(I.f&le)!==0?I:null;return F!==null&&(F.f|=Sn),{ctx:pe,deps:null,effects:null,equals:$s,f:t,fn:e,reactions:null,rv:0,v:ae,wv:0,parent:n??F,ac:null}}function bl(e,t,n){let r=F;r===null&&Ua();var i=void 0,s=Qt(ae),o=!I,a=new Map;return Il(()=>{var l=F,c=Zs();i=c.promise;try{Promise.resolve(e()).then(c.resolve,c.reject).finally(br)}catch(d){c.reject(d),br()}var u=H;if(o){if((l.f&Pt)!==0)var f=Eo();if(r.b.is_rendered())a.get(u)?.reject(pt),a.delete(u);else{for(let d of a.values())d.reject(pt);a.clear()}a.set(u,c)}let h=(d,m=void 0)=>{if(f){var E=m===pt;f(E)}if(!(m===pt||(l.f&Te)!==0)){if(u.activate(),m)s.f|=Ot,yn(s,m);else{(s.f&Ot)!==0&&(s.f^=Ot),yn(s,d);for(let[y,v]of a){if(a.delete(y),y===u)break;v.reject(pt)}}u.deactivate()}};c.promise.then(h,d=>h(null,d||"unknown"))}),kl(()=>{for(let l of a.values())l.reject(pt)}),new Promise(l=>{function c(u){function f(){u===i?l(s):c(i)}u.then(f,f)}c(i)})}function Wt(e){let t=Br(e);return Ro(t),t}function So(e){let t=Br(e);return t.equals=eo,t}function El(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)Ee(t[n])}}function Sl(e){for(var t=e.parent;t!==null;){if((t.f&le)===0)return(t.f&Te)===0?t:null;t=t.parent}return null}function Vi(e){var t,n=F;it(Sl(e));try{e.f&=~qt,El(e),t=Io(e)}finally{it(n)}return t}function No(e){var t=Vi(e);if(!e.equals(t)&&(e.wv=Ao(),(!H?.is_fork||e.deps===null)&&(H!==null?H.capture(e,t,!0):e.v=t,e.deps===null))){$(e,ie);return}It||(qe!==null?(Gi()||H?.is_fork)&&qe.set(e,t):Wi(e))}function Nl(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(pt),t.teardown=Pa,t.ac=null,Xn(t,0),ji(t))}function Mo(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&_n(t)}var ai=new Set,Yt=new Map,Do=!1;function Qt(e,t){var n={f:0,v:e,reactions:null,equals:$s,rv:0,wv:0};return n}function de(e,t){let n=Qt(e);return Ro(n),n}function To(e,t=!1,n=!0){let r=Qt(e);return t||(r.equals=eo),r}function te(e,t,n=!1){I!==null&&(!Xe||(I.f&ni)!==0)&&io()&&(I.f&(le|rt|qn|ni))!==0&&(We===null||!pn.call(We,e))&&Ka();let r=n?Dt(t):t;return yn(e,r,wr)}function yn(e,t,n=null){if(!e.equals(t)){Yt.set(e,It?t:e.v);var r=Jn.ensure();if(r.capture(e,t),(e.f&le)!==0){let i=e;(e.f&ue)!==0&&Vi(i),qe===null&&Wi(i)}e.wv=Ao(),Co(e,ue,n),F!==null&&(F.f&ie)!==0&&(F.f&(Qe|Zt))===0&&(Ae===null?Tl([e]):Ae.push(e)),!r.is_fork&&ai.size>0&&!Do&&Ml()}return t}function Ml(){Do=!1;for(let e of ai)(e.f&ie)!==0&&$(e,st),Zn(e)&&_n(e);ai.clear()}function Gn(e){te(e,e.v+1)}function Co(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],a=o.f,l=(a&ue)===0;if(l&&$(o,t),(a&le)!==0){var c=o;qe?.delete(c),(a&qt)===0&&(a&Le&&(o.f|=qt),Co(c,st,n))}else if(l){var u=o;(a&rt)!==0&&ft!==null&&ft.add(u),n!==null?n.push(u):Bi(u)}}}var as=!1;function xo(){as||(as=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function zi(e){var t=I,n=F;Ue(null),it(null);try{return e()}finally{Ue(t),it(n)}}function Dl(e,t,n,r=n){e.addEventListener(t,()=>zi(n));let i=e.__on_r;i?e.__on_r=()=>{i(),r(!0)}:e.__on_r=()=>r(!0),xo()}var lr=!1,It=!1;function ls(e){It=e}var I=null,Xe=!1;function Ue(e){I=e}var F=null;function it(e){F=e}var We=null;function Ro(e){I!==null&&(We===null?We=[e]:We.push(e))}var _e=null,Ne=0,Ae=null;function Tl(e){Ae=e}var ko=1,Vt=0,Ht=Vt;function cs(e){Ht=e}function Ao(){return++ko}function Zn(e){var t=e.f;if((t&ue)!==0)return!0;if(t&le&&(e.f&=~qt),(t&st)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Zn(s)&&No(s),s.wv>e.wv)return!0}(t&Le)!==0&&qe===null&&$(e,ie)}return!1}function Oo(e,t,n=!0){var r=e.reactions;if(r!==null&&!(We!==null&&pn.call(We,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&le)!==0?Oo(s,t,!1):t===s&&(n?$(s,ue):(s.f&ie)!==0&&$(s,st),Bi(s))}}function Io(e){var t,n=_e,r=Ne,i=Ae,s=I,o=We,a=pe,l=Xe,c=Ht,u=e.f;_e=null,Ne=0,Ae=null,I=(u&(Qe|Zt))===0?e:null,We=null,vn(e.ctx),Xe=!1,Ht=++Vt,e.ac!==null&&(zi(()=>{e.ac.abort(pt)}),e.ac=null);try{e.f|=ri;var f=e.fn,h=f();e.f|=Pt;var d=e.deps,m=H?.is_fork;if(_e!==null){var E;if(m||Xn(e,Ne),d!==null&&Ne>0)for(d.length=Ne+_e.length,E=0;E<_e.length;E++)d[Ne+E]=_e[E];else e.deps=d=_e;if(Gi()&&(e.f&Le)!==0)for(E=Ne;E<d.length;E++)((t=d[E]).reactions??(t.reactions=[])).push(e)}else!m&&d!==null&&Ne<d.length&&(Xn(e,Ne),d.length=Ne);if(io()&&Ae!==null&&!Xe&&d!==null&&(e.f&(le|st|ue))===0)for(E=0;E<Ae.length;E++)Oo(Ae[E],e);if(s!==null&&s!==e){if(Vt++,s.deps!==null)for(let y=0;y<r;y+=1)s.deps[y].rv=Vt;if(n!==null)for(let y of n)y.rv=Vt;Ae!==null&&(i===null?i=Ae:i.push(...Ae))}return(e.f&Ot)!==0&&(e.f^=Ot),h}catch(y){return ho(y)}finally{e.f^=ri,_e=n,Ne=r,Ae=i,I=s,We=o,vn(a),Xe=l,Ht=c}}function Cl(e,t){let n=t.reactions;if(n!==null){var r=Aa.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&le)!==0&&(_e===null||!pn.call(_e,t))){var s=t;(s.f&Le)!==0&&(s.f^=Le,s.f&=~qt),s.v!==ae&&Wi(s),Nl(s),Xn(s,0)}}function Xn(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)Cl(e,n[r])}function _n(e){var t=e.f;if((t&Te)===0){$(e,ie);var n=F,r=lr;F=e,lr=!0;try{(t&(rt|qs))!==0?Fl(e):ji(e),Wo(e);var i=Io(e);e.teardown=typeof i=="function"?i:null,e.wv=ko;var s;ka&&Ja&&(e.f&ue)!==0&&e.deps}finally{lr=r,F=n}}}function b(e){var t=e.f,n=(t&le)!==0;if(I!==null&&!Xe){var r=F!==null&&(F.f&Te)!==0;if(!r&&(We===null||!pn.call(We,e))){var i=I.deps;if((I.f&ri)!==0)e.rv<Vt&&(e.rv=Vt,_e===null&&i!==null&&i[Ne]===e?Ne++:_e===null?_e=[e]:_e.push(e));else{(I.deps??(I.deps=[])).push(e);var s=e.reactions;s===null?e.reactions=[I]:pn.call(s,I)||s.push(I)}}}if(It&&Yt.has(e))return Yt.get(e);if(n){var o=e;if(It){var a=o.v;return((o.f&ie)===0&&o.reactions!==null||Po(o))&&(a=Vi(o)),Yt.set(o,a),a}var l=(o.f&Le)===0&&!Xe&&I!==null&&(lr||(I.f&Le)!==0),c=(o.f&Pt)===0;Zn(o)&&(l&&(o.f|=Le),No(o)),l&&!c&&(Mo(o),Fo(o))}if(qe?.has(e))return qe.get(e);if((e.f&Ot)!==0)throw e.v;return e.v}function Fo(e){if(e.f|=Le,e.deps!==null)for(let t of e.deps)(t.reactions??(t.reactions=[])).push(e),(t.f&le)!==0&&(t.f&Le)===0&&(Mo(t),Fo(t))}function Po(e){if(e.v===ae)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Yt.has(t)||(t.f&le)!==0&&Po(t))return!0;return!1}function Nn(e){var t=Xe;try{return Xe=!0,e()}finally{Xe=t}}function xl(e){F===null&&(I===null&&Ga(),za()),It&&Va()}function Rl(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function bt(e,t){var n=F;n!==null&&(n.f&be)!==0&&(e|=be);var r={ctx:pe,deps:null,nodes:null,f:e|ue|Le,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};H?.register_created_effect(r);var i=r;if((e&En)!==0)gn!==null?gn.push(r):Jn.ensure().schedule(r);else if(t!==null){try{_n(r)}catch(o){throw Ee(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Sn)===0&&(i=i.first,(e&rt)!==0&&(e&dn)!==0&&i!==null&&(i.f|=dn))}if(i!==null&&(i.parent=n,n!==null&&Rl(i,n),I!==null&&(I.f&le)!==0&&(e&Zt)===0)){var s=I;(s.effects??(s.effects=[])).push(i)}return r}function Gi(){return I!==null&&!Xe}function kl(e){let t=bt(Or,null);return $(t,ie),t.teardown=e,t}function Fn(e){xl();var t=F.f,n=!I&&(t&Qe)!==0&&(t&Pt)===0;if(n){var r=pe;(r.e??(r.e=[])).push(e)}else return Lo(e)}function Lo(e){return bt(En|Ca,e)}function Al(e){Jn.ensure();let t=bt(Zt|Sn,e);return(n={})=>new Promise(r=>{n.outro?$t(t,()=>{Ee(t),r(void 0)}):(Ee(t),r(void 0))})}function Ol(e){return bt(En,e)}function Il(e){return bt(qn|Sn,e)}function Yi(e,t=0){return bt(Or|t,e)}function on(e,t=[],n=[],r=[]){_l(r,t,n,i=>{bt(Or,()=>e(...i.map(b)))})}function Hi(e,t=0){var n=bt(rt|t,e);return n}function Be(e){return bt(Qe|Sn,e)}function Wo(e){var t=e.teardown;if(t!==null){let n=It,r=I;ls(!0),Ue(null);try{t.call(null)}finally{ls(n),Ue(r)}}}function ji(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let i=n.ac;i!==null&&zi(()=>{i.abort(pt)});var r=n.next;(n.f&Zt)!==0?n.parent=null:Ee(n,t),n=r}}function Fl(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&Qe)===0&&Ee(t),t=n}}function Ee(e,t=!0){var n=!1;(t||(e.f&Ta)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Pl(e.nodes.start,e.nodes.end),n=!0),$(e,ti),ji(e,t&&!n),Xn(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let s of r)s.stop();Wo(e),e.f^=ti,e.f|=Te;var i=e.parent;i!==null&&i.first!==null&&Uo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function Pl(e,t){for(;e!==null;){var n=e===t?null:ot(e);e.remove(),e=n}}function Uo(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function $t(e,t,n=!0){var r=[];Bo(e,r,!0);var i=()=>{n&&Ee(e),t&&t()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function Bo(e,t,n){if((e.f&be)===0){e.f^=be;var r=e.nodes&&e.nodes.t;if(r!==null)for(let a of r)(a.is_global||n)&&t.push(a);for(var i=e.first;i!==null;){var s=i.next,o=(i.f&dn)!==0||(i.f&Qe)!==0&&(e.f&rt)!==0;Bo(i,t,o?n:!1),i=s}}}function qi(e){Vo(e,!0)}function Vo(e,t){if((e.f&be)!==0){e.f^=be,(e.f&ie)===0&&($(e,ue),Jn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&dn)!==0||(n.f&Qe)!==0;Vo(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(let o of s)(o.is_global||t)&&o.in()}}function Xi(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:ot(n);t.append(n),n=i}}var an=Symbol("events"),zo=new Set,li=new Set;function Tn(e,t,n){(t[an]??(t[an]={}))[e]=n}function Ll(e){for(var t=0;t<e.length;t++)zo.add(e[t]);for(var n of li)n(e)}var us=null;function fs(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;us=e;var o=0,a=us===e&&e[an];if(a){var l=i.indexOf(a);if(l!==-1&&(t===document||t===window)){e[an]=t;return}var c=i.indexOf(t);if(c===-1)return;l<=c&&(o=l)}if(s=i[o]||e.target,s!==t){Qs(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=I,f=F;Ue(null),it(null);try{for(var h,d=[];s!==null;){var m=s.assignedSlot||s.parentNode||s.host||null;try{var E=s[an]?.[r];E!=null&&(!s.disabled||e.target===s)&&E.call(s,e)}catch(y){h?d.push(y):h=y}if(e.cancelBubble||m===t||m===null)break;s=m}if(h){for(let y of d)queueMicrotask(()=>{throw y});throw h}}finally{e[an]=t,delete e.currentTarget,Ue(u),it(f)}}}var Wl=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ul(e){return Wl?.createHTML(e)??e}function Go(e){var t=ul("template");return t.innerHTML=Ul(e.replaceAll("<!>","<!---->")),t.content}function Jt(e,t){var n=F;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Mn(e,t){var n=(t&sl)!==0,r,i=!e.startsWith("<!>");return()=>{if(W)return Jt(L,null),L;r===void 0&&(r=Go(i?e:"<!>"+e),r=Kt(r));var s=n||ao?document.importNode(r,!0):r.cloneNode(!0);return Jt(s,s),s}}function Bl(e,t,n="svg"){var r=!e.startsWith("<!>"),i=`<${n}>${r?e:"<!>"+e}</${n}>`,s;return()=>{if(W)return Jt(L,null),L;if(!s){var o=Go(i),a=Kt(o);s=Kt(a)}var l=s.cloneNode(!0);return Jt(l,l),l}}function Yo(e,t){return Bl(e,t,"svg")}function Vl(){if(W)return Jt(L,null),L;var e=document.createDocumentFragment(),t=document.createComment(""),n=Ke();return e.append(t,n),Jt(t,n),e}function ht(e,t){if(W){var n=F;((n.f&Pt)===0||n.nodes.end===null)&&(n.nodes.end=L),Ur();return}e!==null&&e.before(t)}var zl=["touchstart","touchmove"];function Gl(e){return zl.includes(e)}function cr(e,t){var n=t==null?"":typeof t=="object"?`${t}`:t;n!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=n,e.nodeValue=`${n}`)}function Ho(e,t){return jo(e,t)}function Yl(e,t){ii(),t.intro=t.intro??!1;let n=t.target,r=W,i=L;try{for(var s=Kt(n);s&&(s.nodeType!==Qn||s.data!==no);)s=ot(s);if(!s)throw mn;wt(!0),Ce(s);let o=jo(e,{...t,anchor:s});return wt(!1),o}catch(o){if(o instanceof Error&&o.message.split(`
3
+ `).some(a=>a.startsWith("https://svelte.dev/e/")))throw o;return o!==mn&&console.warn("Failed to hydrate: ",o),t.recover===!1&&Ha(),ii(),uo(n),wt(!1),Ho(e,t)}finally{wt(r),Ce(i)}}var nr=new Map;function jo(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){ii();var l=void 0,c=Al(()=>{var u=n??t.appendChild(Ke());yl(u,{pending:()=>{}},d=>{Pr({});var m=pe;if(s&&(m.c=s),i&&(r.$$events=i),W&&Jt(d,null),l=e(d,r)||{},W&&(F.nodes.end=L,L===null||L.nodeType!==Qn||L.data!==Pi))throw Wr(),mn;Lr()},a);var f=new Set,h=d=>{for(var m=0;m<d.length;m++){var E=d[m];if(!f.has(E)){f.add(E);var y=Gl(E);for(let S of[t,document]){var v=nr.get(S);v===void 0&&(v=new Map,nr.set(S,v));var w=v.get(E);w===void 0?(S.addEventListener(E,fs,{passive:y}),v.set(E,1)):v.set(E,w+1)}}}};return h(Fr(zo)),li.add(h),()=>{for(var d of f)for(let y of[t,document]){var m=nr.get(y),E=m.get(d);--E==0?(y.removeEventListener(d,fs),m.delete(d),m.size===0&&nr.delete(y)):m.set(d,E)}li.delete(h),u!==n&&u.parentNode?.removeChild(u)}});return ci.set(l,c),l}var ci=new WeakMap;function Hl(e,t){let n=ci.get(e);return n?(ci.delete(e),n(t)):Promise.resolve()}function jl(e){return class extends ui{constructor(t){super({component:e,...t})}}}var ui=class{constructor(t){x(this,Nt),x(this,Ye);var n=new Map,r=(s,o)=>{var a=To(o,!1,!1);return n.set(s,a),a};let i=new Proxy({...t.props||{},$$events:{}},{get(s,o){return b(n.get(o)??r(o,Reflect.get(s,o)))},has(s,o){return o===Xs?!0:(b(n.get(o)??r(o,Reflect.get(s,o))),Reflect.has(s,o))},set(s,o,a){return te(n.get(o)??r(o,a),a),Reflect.set(s,o,a)}});k(this,Ye,(t.hydrate?Yl:Ho)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError})),(!t?.props?.$$host||t.sync===!1)&&pl(),k(this,Nt,i.$$events);for(let s of Object.keys(p(this,Ye)))s==="$set"||s==="$destroy"||s==="$on"||Qs(this,s,{get(){return p(this,Ye)[s]},set(o){p(this,Ye)[s]=o},enumerable:!0});p(this,Ye).$set=s=>{Object.assign(i,s)},p(this,Ye).$destroy=()=>{Hl(p(this,Ye))}}$set(t){p(this,Ye).$set(t)}$on(t,n){p(this,Nt)[t]=p(this,Nt)[t]||[];let r=(...i)=>n.call(this,...i);return p(this,Nt)[t].push(r),()=>{p(this,Nt)[t]=p(this,Nt)[t].filter(i=>i!==r)}}$destroy(){p(this,Ye).$destroy()}};Nt=new WeakMap;Ye=new WeakMap;var ql="5";typeof window<"u"&&((ns=window.__svelte??(window.__svelte={})).v??(ns.v=new Set)).add(ql);var fi=class{constructor(t,n=!0){nt(this,"anchor"),x(this,et,new Map),x(this,ut,new Map),x(this,Re,new Map),x(this,tn,new Set),x(this,or,!0),x(this,ar,r=>{if(p(this,et).has(r)){var i=p(this,et).get(r),s=p(this,ut).get(i);if(s)qi(s),p(this,tn).delete(i);else{var o=p(this,Re).get(i);o&&(p(this,ut).set(i,o.effect),p(this,Re).delete(i),o.fragment.lastChild.remove(),this.anchor.before(o.fragment),s=o.effect)}for(let[a,l]of p(this,et)){if(p(this,et).delete(a),a===r)break;let c=p(this,Re).get(l);c&&(Ee(c.effect),p(this,Re).delete(l))}for(let[a,l]of p(this,ut)){if(a===i||p(this,tn).has(a))continue;let c=()=>{if(Array.from(p(this,et).values()).includes(a)){var f=document.createDocumentFragment();Xi(l,f),f.append(Ke()),p(this,Re).set(a,{effect:l,fragment:f})}else Ee(l);p(this,tn).delete(a),p(this,ut).delete(a)};p(this,or)||!s?(p(this,tn).add(a),$t(l,c,!1)):c()}}}),x(this,$r,r=>{p(this,et).delete(r);let i=Array.from(p(this,et).values());for(let[s,o]of p(this,Re))i.includes(s)||(Ee(o.effect),p(this,Re).delete(s))}),this.anchor=t,k(this,or,n)}ensure(t,n){var r=H,i=fo();if(n&&!p(this,ut).has(t)&&!p(this,Re).has(t))if(i){var s=document.createDocumentFragment(),o=Ke();s.append(o),p(this,Re).set(t,{effect:Be(()=>n(o)),fragment:s})}else p(this,ut).set(t,Be(()=>n(this.anchor)));if(p(this,et).set(r,t),i){for(let[a,l]of p(this,ut))a===t?r.unskip_effect(l):r.skip_effect(l);for(let[a,l]of p(this,Re))a===t?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(p(this,ar)),r.ondiscard(p(this,$r))}else W&&(this.anchor=L),p(this,ar).call(this,r)}};et=new WeakMap;ut=new WeakMap;Re=new WeakMap;tn=new WeakMap;or=new WeakMap;ar=new WeakMap;$r=new WeakMap;function Ki(e){pe===null&&to(),Fn(()=>{let t=Nn(e);if(typeof t=="function")return t})}function qo(e){pe===null&&to(),Ki(()=>()=>Nn(e))}function hi(e,t,n=!1){var r;W&&(r=L,Ur());var i=new fi(e),s=n?dn:0;function o(a,l){if(W){var c=oo(r);if(a!==parseInt(c.substring(1))){var u=_r();Ce(u),i.anchor=u,wt(!1),i.ensure(a,l),wt(!0);return}}i.ensure(a,l)}Hi(()=>{var a=!1;t((l,c=0)=>{a=!0,o(c,l)}),a||o(-1,null)},s)}function zr(e,t){return t}function Xl(e,t,n){for(var r=[],i=t.length,s,o=t.length,a=0;a<i;a++){let f=t[a];$t(f,()=>{if(s){if(s.pending.delete(f),s.done.add(f),s.pending.size===0){var h=e.outrogroups;di(e,Fr(s.done)),h.delete(s),h.size===0&&(e.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var c=n,u=c.parentNode;uo(u),u.append(c),e.items.clear()}di(e,t,!l)}else s={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(s)}function di(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let o of e.pending.values())for(let a of o)r.add(e.items.get(a).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=_t;let o=document.createDocumentFragment();Xi(s,o)}else Ee(t[i],n)}}var rr;function Gr(e,t,n,r,i,s=null){var o=e,a=new Map;W&&Ur();var l=null,c=So(()=>{var v=n();return Ks(v)?v:v==null?[]:Fr(v)}),u,f=new Map,h=!0;function d(v){(y.effect.f&Te)===0&&(y.pending.delete(v),y.fallback=l,Kl(y,u,o,t,r),l!==null&&(u.length===0?(l.f&_t)===0?qi(l):(l.f^=_t,Pn(l,null,o)):$t(l,()=>{l=null})))}function m(v){y.pending.delete(v)}var E=Hi(()=>{u=b(c);var v=u.length;let w=!1;if(W){var S=oo(o)===Fi;S!==(v===0)&&(o=_r(),Ce(o),wt(!1),w=!0)}for(var T=new Set,C=H,G=fo(),X=0;X<v;X+=1){W&&L.nodeType===Qn&&L.data===Pi&&(o=L,w=!0,wt(!1));var A=u[X],ne=r(A,X),Z=h?null:a.get(ne);Z?(Z.v&&yn(Z.v,A),Z.i&&yn(Z.i,X),G&&C.unskip_effect(Z.e)):(Z=Ql(a,h?o:rr??(rr=Ke()),A,ne,X,i,t,n),h||(Z.e.f|=_t),a.set(ne,Z)),T.add(ne)}if(v===0&&s&&!l&&(h?l=Be(()=>s(o)):(l=Be(()=>s(rr??(rr=Ke()))),l.f|=_t)),v>T.size&&Ba(),W&&v>0&&Ce(_r()),!h)if(f.set(C,T),G){for(let[fe,me]of a)T.has(fe)||C.skip_effect(me.e);C.oncommit(d),C.ondiscard(m)}else d(C);w&&wt(!0),b(c)}),y={effect:E,items:a,pending:f,outrogroups:null,fallback:l};h=!1,W&&(o=L)}function Cn(e){for(;e!==null&&(e.f&Qe)===0;)e=e.next;return e}function Kl(e,t,n,r,i){var s=t.length,o=e.items,a=Cn(e.effect.first),l,c=null,u=[],f=[],h,d,m,E;for(E=0;E<s;E+=1){if(h=t[E],d=i(h,E),m=o.get(d).e,e.outrogroups!==null)for(let A of e.outrogroups)A.pending.delete(m),A.done.delete(m);if((m.f&be)!==0&&qi(m),(m.f&_t)!==0)if(m.f^=_t,m===a)Pn(m,null,n);else{var y=c?c.next:a;m===e.effect.last&&(e.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Et(e,c,m),Et(e,m,y),Pn(m,y,n),c=m,u=[],f=[],a=Cn(c.next);continue}if(m!==a){if(l!==void 0&&l.has(m)){if(u.length<f.length){var v=f[0],w;c=v.prev;var S=u[0],T=u[u.length-1];for(w=0;w<u.length;w+=1)Pn(u[w],v,n);for(w=0;w<f.length;w+=1)l.delete(f[w]);Et(e,S.prev,T.next),Et(e,c,S),Et(e,T,v),a=v,c=T,E-=1,u=[],f=[]}else l.delete(m),Pn(m,a,n),Et(e,m.prev,m.next),Et(e,m,c===null?e.effect.first:c.next),Et(e,c,m),c=m;continue}for(u=[],f=[];a!==null&&a!==m;)(l??(l=new Set)).add(a),f.push(a),a=Cn(a.next);if(a===null)continue}(m.f&_t)===0&&u.push(m),c=m,a=Cn(m.next)}if(e.outrogroups!==null){for(let A of e.outrogroups)A.pending.size===0&&(di(e,Fr(A.done)),e.outrogroups?.delete(A));e.outrogroups.size===0&&(e.outrogroups=null)}if(a!==null||l!==void 0){var C=[];if(l!==void 0)for(m of l)(m.f&be)===0&&C.push(m);for(;a!==null;)(a.f&be)===0&&a!==e.fallback&&C.push(a),a=Cn(a.next);var G=C.length;if(G>0){var X=null;Xl(e,C,X)}}}function Ql(e,t,n,r,i,s,o,a){var l=(o&Za)!==0?(o&el)===0?To(n,!1,!1):Qt(n):null,c=(o&$a)!==0?Qt(i):null;return{v:l,i:c,e:Be(()=>(s(t,l??n,c??i,a),()=>{e.delete(r)}))}}function Pn(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&_t)===0?t.nodes.start:n;r!==null;){var o=ot(r);if(s.before(r),r===i)return;r=o}}function Et(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}var hs=[...`
4
+ \r\f\xA0\v\uFEFF`];function Jl(e,t,n){var r=e==null?"":""+e;if(n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||hs.includes(r[o-1]))&&(a===r.length||hs.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function Zl(e,t){return e==null?null:String(e)}function pi(e,t,n,r,i,s){var o=e.__className;if(W||o!==n||o===void 0){var a=Jl(n,r,s);(!W||a!==e.getAttribute("class"))&&(a==null?e.removeAttribute("class"):e.className=a),e.__className=n}else if(s&&i!==s)for(var l in s){var c=!!s[l];(i==null||c!==!!i[l])&&e.classList.toggle(l,c)}return s}function ln(e,t,n,r){var i=e.__style;if(W||i!==t){var s=Zl(t);(!W||s!==e.getAttribute("style"))&&(s==null?e.removeAttribute("style"):e.style.cssText=s),e.__style=t}return r}var $l=Symbol("is custom element"),ec=Symbol("is html"),tc=Ra?"link":"LINK";function nc(e){if(W){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var r=e.value;gt(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var i=e.checked;gt(e,"checked",null),e.checked=i}}};e.__on_r=n,Xt(n),xo()}}function gt(e,t,n,r){var i=rc(e);W&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===tc)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[xa]=n),n==null?e.removeAttribute(t):typeof n!="string"&&ic(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function rc(e){return e.__attributes??(e.__attributes={[$l]:e.nodeName.includes("-"),[ec]:e.namespaceURI===ro})}var ds=new Map;function ic(e){var t=e.getAttribute("is")||e.nodeName,n=ds.get(t);if(n)return n;ds.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=Oa(i);for(var o in r)r[o].set&&n.push(o);i=Js(i)}return n}function sc(e,t,n=t){Dl(e,"change",r=>{var i=r?e.defaultChecked:e.checked;n(i)}),(W&&e.defaultChecked!==e.checked||Nn(t)==null)&&n(e.checked),Yi(()=>{var r=t();e.checked=!!r})}function ps(e,t){return e===t||e?.[Vn]===t}function ur(e={},t,n,r){var i=pe.r,s=F;return Ol(()=>{var o,a;return Yi(()=>{o=a,a=[],Nn(()=>{e!==n(...a)&&(t(e,...a),o&&ps(n(...o),e)&&t(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.f&ti;)l=l.parent;let c=()=>{a&&ps(n(...a),e)&&t(null,...a)},u=l.teardown;l.teardown=()=>{c(),u?.()}}}),e}var oc={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return e.exclude.includes(t)?!1:t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))}};function ac(e,t,n){return new Proxy({props:e,exclude:t},oc)}function ye(e,t,n,r){var i=(n&rl)!==0,s=(n&il)!==0,o=r,a=!0,l=()=>(a&&(a=!1,o=s?Nn(r):r),o);let c;if(i){var u=Vn in e||Xs in e;c=fn(e,t)?.set??(u&&t in e?w=>e[t]=w:void 0)}var f,h=!1;i?[f,h]=hl(()=>e[t]):f=e[t],f===void 0&&r!==void 0&&(f=l(),c&&(ja(),c(f)));var d;if(d=()=>{var w=e[t];return w===void 0?l():(a=!0,w)},(n&nl)===0)return d;if(c){var m=e.$$legacy;return(function(w,S){return arguments.length>0?((!S||m||h)&&c(S?d():w),w):d()})}var E=!1,y=((n&tl)!==0?Br:So)(()=>(E=!1,d()));i&&b(y);var v=F;return(function(w,S){if(arguments.length>0){let T=S?b(y):i?Dt(w):w;return te(y,T),E=!0,o!==void 0&&(o=T),w}return It&&E||(v.f&Te)!==0?y.v:b(y)})}var lc=Object.defineProperty,cc=(e,t,n)=>t in e?lc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ut=(e,t,n)=>cc(e,typeof t!="symbol"?t+"":t,n),j=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(j||{});function uc(e){return e.nodeType===e.ELEMENT_NODE}var Er=class{constructor(){Ut(this,"idNodeMap",new Map),Ut(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Xo(){return new Er}function fc(e){return e.toLowerCase()}function hc(e,t){return!e||!t||e.type!==t.type?!1:e.type===j.Document?e.compatMode===t.compatMode:e.type===j.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===j.Comment||e.type===j.Text||e.type===j.CDATA?e.textContent===t.textContent:e.type===j.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function dc(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}var ms=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function pc(e,t={}){let n=1,r=1;function i(_){let g=_.match(/\n/g);g&&(n+=g.length);let N=_.lastIndexOf(`
5
+ `);r=N===-1?r+_.length:_.length-N}function s(){let _={line:n,column:r};return g=>(g.position=new a(_),E(),g)}let o=class Ko{constructor(g){Ut(this,"content"),Ut(this,"start"),Ut(this,"end"),Ut(this,"source"),this.start=g,this.end={line:n,column:r},this.source=t.source,this.content=Ko.content}};Ut(o,"content");let a=o;a.content=e;let l=[];function c(_){let g=new Error(`${t.source||""}:${n}:${r}: ${_}`);if(g.reason=_,g.filename=t.source,g.line=n,g.column=r,g.source=e,t.silent)l.push(g);else throw g}function u(){let _=d();return{type:"stylesheet",stylesheet:{source:t.source,rules:_,parsingErrors:l}}}function f(){return m(/^{\s*/)}function h(){return m(/^}/)}function d(){let _,g=[];for(E(),y(g);e.length&&e.charAt(0)!=="}"&&(_=Ve()||Ze());)_&&(g.push(_),y(g));return g}function m(_){let g=_.exec(e);if(!g)return;let N=g[0];return i(N),e=e.slice(N.length),g}function E(){m(/^\s*/)}function y(_=[]){let g;for(;g=v();)g&&_.push(g),g=v();return _}function v(){let _=s();if(e.charAt(0)!=="/"||e.charAt(1)!=="*")return;let g=2;for(;e.charAt(g)!==""&&(e.charAt(g)!=="*"||e.charAt(g+1)!=="/");)++g;if(g+=2,e.charAt(g-1)==="")return c("End of comment missing");let N=e.slice(2,g-2);return r+=2,i(N),e=e.slice(g),r+=2,_({type:"comment",comment:N})}function w(){let _=m(/^([^{]+)/);if(!_)return;let g=lt(_[0]).replace(/\/\*[\s\S]*?\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,K=>K.replace(/,/g,"\u200C")).split(/\s*(?![^(]*\)),\s*/);if(g.length<=1)return g.map(K=>K.replace(/\u200C/g,","));let N=0,D=0,U=g.length,O=[];for(;N<U;){let K=(g[N].match(/\(/g)||[]).length,ze=(g[N].match(/\)/g)||[]).length,Se=K-ze;if(Se>=1){let R=!1;for(D=N+1;D<U;){let V=(g[D].match(/\(/g)||[]).length,at=(g[D].match(/\)/g)||[]).length-V;if(at===Se){O.push(g.slice(N,D+1).join(",")),N=D+1,R=!0;break}D++,Se-=at}if(R)continue;g.slice(N,U).forEach(V=>V&&O.push(V));break}g[N]&&O.push(g[N]),N++}return O.map(K=>K.replace(/\u200C/g,","))}function S(){let _=s(),g=m(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!g)return;let N=lt(g[0]);if(!m(/^:\s*/))return c("property missing ':'");let D=m(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),U=_({type:"declaration",property:N.replace(ms,""),value:D?lt(D[0]).replace(ms,""):""});return m(/^[;\s]*/),U}function T(){let _=[];if(!f())return c("missing '{'");y(_);let g;for(;g=S();)g!==!1&&(_.push(g),y(_)),g=S();return h()?_:c("missing '}'")}function C(){let _,g=[],N=s();for(;_=m(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)g.push(_[1]),m(/^,\s*/);if(g.length)return N({type:"keyframe",values:g,declarations:T()})}function G(){let _=s(),g=m(/^@([-\w]+)?keyframes\s*/);if(!g)return;let N=g[1];if(g=m(/^([-\w]+)\s*/),!g)return c("@keyframes missing name");let D=g[1];if(!f())return c("@keyframes missing '{'");let U,O=y();for(;U=C();)O.push(U),O=O.concat(y());return h()?_({type:"keyframes",name:D,vendor:N,keyframes:O}):c("@keyframes missing '}'")}function X(){let _=s(),g=m(/^@supports *([^{]+)/);if(!g)return;let N=lt(g[1]);if(!f())return c("@supports missing '{'");let D=y().concat(d());return h()?_({type:"supports",supports:N,rules:D}):c("@supports missing '}'")}function A(){let _=s();if(!m(/^@host\s*/))return;if(!f())return c("@host missing '{'");let N=y().concat(d());return h()?_({type:"host",rules:N}):c("@host missing '}'")}function ne(){let _=s(),g=m(/^@media *([^{]+)/);if(!g)return;let N=lt(g[1]);if(!f())return c("@media missing '{'");let D=y().concat(d());return h()?_({type:"media",media:N,rules:D}):c("@media missing '}'")}function Z(){let _=s(),g=m(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(g)return _({type:"custom-media",name:lt(g[1]),media:lt(g[2])})}function fe(){let _=s();if(!m(/^@page */))return;let N=w()||[];if(!f())return c("@page missing '{'");let D=y(),U;for(;U=S();)D.push(U),D=D.concat(y());return h()?_({type:"page",selectors:N,declarations:D}):c("@page missing '}'")}function me(){let _=s(),g=m(/^@([-\w]+)?document *([^{]+)/);if(!g)return;let N=lt(g[1]),D=lt(g[2]);if(!f())return c("@document missing '{'");let U=y().concat(d());return h()?_({type:"document",document:D,vendor:N,rules:U}):c("@document missing '}'")}function se(){let _=s();if(!m(/^@font-face\s*/))return;if(!f())return c("@font-face missing '{'");let N=y(),D;for(;D=S();)N.push(D),N=N.concat(y());return h()?_({type:"font-face",declarations:N}):c("@font-face missing '}'")}let xe=q("import"),Je=q("charset"),ce=q("namespace");function q(_){let g=new RegExp("^@"+_+"\\s*((?:"+[/[^\\]"(?:\\"|[^"])*"/.source,/[^\\]'(?:\\'|[^'])*'/.source,"[^;]"].join("|")+")+);");return()=>{let N=s(),D=m(g);if(!D)return;let U={type:_};return U[_]=D[1].trim(),N(U)}}function Ve(){if(e[0]==="@")return G()||ne()||Z()||X()||xe()||Je()||ce()||me()||fe()||A()||se()}function Ze(){let _=s(),g=w();return g?(y(),_({type:"rule",selectors:g,declarations:T()})):c("selector missing")}return mi(u())}function lt(e){return e?e.replace(/^\s+|\s+$/g,""):""}function mi(e,t){let n=e&&typeof e.type=="string",r=n?e:t;for(let i of Object.keys(e)){let s=e[i];Array.isArray(s)?s.forEach(o=>{mi(o,r)}):s&&typeof s=="object"&&mi(s,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var vs={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function mc(e){let t=vs[e.tagName]?vs[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function vc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Qo=/([^\\]):hover/,gc=new RegExp(Qo.source,"g");function gs(e,t){let n=t?.stylesWithHoverClass.get(e);if(n)return n;if(e.length>=1e6)return e;let r=pc(e,{silent:!0});if(!r.stylesheet)return e;let i=[];if(r.stylesheet.rules.forEach(a=>{"selectors"in a&&(a.selectors||[]).forEach(l=>{Qo.test(l)&&i.push(l)})}),i.length===0)return e;let s=new RegExp(i.filter((a,l)=>i.indexOf(a)===l).sort((a,l)=>l.length-a.length).map(a=>vc(a)).join("|"),"g"),o=e.replace(s,a=>{let l=a.replace(gc,"$1.\\:hover");return`${a}, ${l}`});return t?.stylesWithHoverClass.set(e,o),o}function ys(){return{stylesWithHoverClass:new Map}}function yc(e,t){let{doc:n,hackCss:r,cache:i}=t;switch(e.type){case j.Document:return n.implementation.createDocument(null,"",null);case j.DocumentType:return n.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case j.Element:{let s=mc(e),o;if(e.isSVG)o=n.createElementNS("http://www.w3.org/2000/svg",s);else{if(e.isCustom&&n.defaultView?.customElements&&!n.defaultView.customElements.get(e.tagName))try{n.defaultView.customElements.define(e.tagName,class extends n.defaultView.HTMLElement{})}catch(l){console.warn("Cannot define custom element",l)}o=n.createElement(s)}let a={};for(let l in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,l))continue;let c=e.attributes[l];if(s==="option"&&l==="selected"&&c===!1||c===null)continue;if(c===!0&&(c=""),l.startsWith("rr_")){a[l]=c;continue}let u=s==="textarea"&&l==="value",f=s==="style"&&l==="_cssText";if(f&&r&&typeof c=="string"&&(c=gs(c,i)),(u||f)&&typeof c=="string"){let h=n.createTextNode(c);for(let d of Array.from(o.childNodes))d.nodeType===o.TEXT_NODE&&o.removeChild(d);o.appendChild(h);continue}try{if(e.isSVG&&l==="xlink:href")o.setAttributeNS("http://www.w3.org/1999/xlink",l,c.toString());else if(l==="onload"||l==="onclick"||l.substring(0,7)==="onmouse")o.setAttribute("_"+l,c.toString());else if(s==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&l==="content"){o.setAttribute("csp-content",c.toString());continue}else s==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")||s==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&dc(e.attributes.href)==="js"||(s==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?o.setAttribute("rrweb-original-srcset",e.attributes.srcset):o.setAttribute(l,c.toString()))}catch{}}for(let l in a){let c=a[l];if(s==="canvas"&&l==="rr_dataURL"){let u=n.createElement("img");u.onload=()=>{let f=o.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=c.toString(),o.RRNodeType&&(o.rr_dataURL=c.toString())}else if(s==="img"&&l==="rr_dataURL"){let u=o;u.currentSrc.startsWith("data:")||(u.setAttribute("rrweb-original-src",e.attributes.src),u.src=c.toString())}if(l==="rr_width")o.style.setProperty("width",c.toString());else if(l==="rr_height")o.style.setProperty("height",c.toString());else if(l==="rr_mediaCurrentTime"&&typeof c=="number")o.currentTime=c;else if(l==="rr_mediaState")switch(c){case"played":o.play().catch(u=>console.warn("media playback error",u));break;case"paused":o.pause();break}}if(e.isShadowHost)if(!o.shadowRoot)o.attachShadow({mode:"open"});else for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);return o}case j.Text:return n.createTextNode(e.isStyle&&r?gs(e.textContent,i):e.textContent);case j.CDATA:return n instanceof XMLDocument?n.createCDATASection(e.textContent):null;case j.Comment:return n.createComment(e.textContent);default:return null}}function Yn(e,t){let{doc:n,mirror:r,skipChild:i=!1,hackCss:s=!0,afterAppend:o,cache:a}=t;if(r.has(e.id)){let c=r.getNode(e.id),u=r.getMeta(c);if(hc(u,e))return r.getNode(e.id)}let l=yc(e,{doc:n,hackCss:s,cache:a});if(!l)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===j.Document&&(n.close(),n.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==j.DocumentType&&(e.childNodes[0].type===j.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=n),r.add(l,e),(e.type===j.Document||e.type===j.Element)&&!i)for(let c of e.childNodes){let u=Yn(c,{doc:n,mirror:r,skipChild:!1,hackCss:s,afterAppend:o,cache:a});if(!u){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&uc(l)&&l.shadowRoot)l.shadowRoot.appendChild(u);else if(e.type===j.Document&&c.type==j.Element){let f=u,h=null;f.childNodes.forEach(d=>{d.nodeName==="BODY"&&(h=d)}),h?(f.removeChild(h),l.appendChild(u),f.appendChild(h)):l.appendChild(u)}else l.appendChild(u);o&&o(u,c.id)}return l}function _c(e,t){function n(r){t(r)}for(let r of e.getIds())e.has(r)&&n(e.getNode(r))}function wc(e,t){let n=t.getMeta(e);if(n?.type!==j.Element)return;let r=e;for(let i in n.attributes){if(!(Object.prototype.hasOwnProperty.call(n.attributes,i)&&i.startsWith("rr_")))continue;let s=n.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=s),i==="rr_scrollTop"&&(r.scrollTop=s)}}function bc(e,t){let{doc:n,onVisit:r,hackCss:i=!0,afterAppend:s,cache:o,mirror:a=new Er}=t,l=Yn(e,{doc:n,mirror:a,skipChild:!1,hackCss:i,afterAppend:s,cache:o});return _c(a,c=>{r&&r(c),wc(c,a)}),l}var nn=`Please stop import mirror directly. Instead of that,\r
6
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
7
+ or you can use record.mirror to access the mirror instance during recording.`,_s={map:{},getId(){return console.error(nn),-1},getNode(){return console.error(nn),null},removeNodeFromMap(){console.error(nn)},has(){return console.error(nn),!1},reset(){console.error(nn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(_s=new Proxy(_s,{get(e,t,n){return t==="map"&&console.error(nn),Reflect.get(e,t,n)}}));Date.now().toString();function Ec(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function Sc(e){let t={},n=(i,s)=>{let o={value:i,parent:s,children:[]};return t[i.node.id]=o,o},r=[];for(let i of e){let{nextId:s,parentId:o}=i;if(s&&s in t){let a=t[s];if(a.parent){let l=a.parent.children.indexOf(a);a.parent.children.splice(l,0,n(i,a.parent))}else{let l=r.indexOf(a);r.splice(l,0,n(i,null))}continue}if(o in t){let a=t[o];a.children.push(n(i,a));continue}r.push(n(i,null))}return r}function Jo(e,t){t(e.value);for(let n=e.children.length-1;n>=0;n--)Jo(e.children[n],t)}function Yr(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zo(e,t){let n=e.ownerDocument?.defaultView?.frameElement;if(!n||n===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let r=n.getBoundingClientRect(),i=Zo(n,t),s=r.height/n.clientHeight;return{x:r.x*i.relativeScale+i.x,y:r.y*i.relativeScale+i.y,relativeScale:s,absoluteScale:i.absoluteScale*s}}function ir(e){return!!e?.shadowRoot}function Ln(e,t){let n=e[t[0]];return t.length===1?n:Ln(n.cssRules[t[1]].cssRules,t.slice(2))}function ws(e){let t=[...e],n=t.pop();return{positions:t,index:n}}function Nc(e){let t=new Set,n=[];for(let r=e.length;r--;){let i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}var vi=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},bs={};function Qi(e){let t=bs[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement=="function")try{let i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);let s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return bs[e]=r.bind(window)}function Hr(...e){return Qi("requestAnimationFrame")(...e)}function en(...e){return Qi("setTimeout")(...e)}function Mc(...e){return Qi("clearTimeout")(...e)}var J=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(J||{}),z=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(z||{}),re=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(re||{}),Sr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Sr||{}),fr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(fr||{}),Y=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(Y||{}),Es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Wn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(xn=0;xn<Es.length;xn++)Wn[Es.charCodeAt(xn)]=xn;var xn,Dc=function(e){var t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)s=Wn[e.charCodeAt(r)],o=Wn[e.charCodeAt(r+1)],a=Wn[e.charCodeAt(r+2)],l=Wn[e.charCodeAt(r+3)],u[i++]=s<<2|o>>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},Tc=Object.defineProperty,Cc=(e,t,n)=>t in e?Tc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t,n)=>Cc(e,typeof t!="symbol"?t+"":t,n),xc=Object.defineProperty,Rc=(e,t,n)=>t in e?xc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ss=(e,t,n)=>Rc(e,typeof t!="symbol"?t+"":t,n),P=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(P||{}),kc=class{constructor(){Ss(this,"idNodeMap",new Map),Ss(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ac(){return new kc}function Oc(e){let t={},n=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(n).forEach(function(s){if(s){let o=s.split(r);o.length>1&&(t[gi(o[0].trim())]=o[1].trim())}}),t}function Ns(e){let t=[];for(let n in e){let r=e[n];if(typeof r!="string")continue;let i=Lc(n);t.push(`${i}: ${r};`)}return t.join(" ")}var Ic=/-([a-z])/g,Fc=/^--[a-zA-Z0-9-]+$/,gi=e=>Fc.test(e)?e:e.replace(Ic,(t,n)=>n?n.toUpperCase():""),Pc=/\B([A-Z])/g,Lc=e=>e.replace(Pc,"-$1").toLowerCase(),Ft=class e{constructor(...t){M(this,"parentElement",null),M(this,"parentNode",null),M(this,"ownerDocument"),M(this,"firstChild",null),M(this,"lastChild",null),M(this,"previousSibling",null),M(this,"nextSibling",null),M(this,"ELEMENT_NODE",1),M(this,"TEXT_NODE",3),M(this,"nodeType"),M(this,"nodeName"),M(this,"RRNodeType")}get childNodes(){let t=[],n=this.firstChild;for(;n;)t.push(n),n=n.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,n){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},yi=class e extends Ft{constructor(...t){super(t),M(this,"nodeType",9),M(this,"nodeName","#document"),M(this,"compatMode","CSS1Compat"),M(this,"RRNodeType",P.Document),M(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HTML")||null}get body(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="BODY")||null}get head(){return this.documentElement?.childNodes.find(t=>t.RRNodeType===P.Element&&t.tagName==="HEAD")||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let n=t.RRNodeType;if((n===P.Element||n===P.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${n===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=Ji(this,t);return r.parentElement=null,r}insertBefore(t,n){let r=t.RRNodeType;if((r===P.Element||r===P.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===P.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=$o(this,t,n);return i.parentElement=null,i}removeChild(t){return ea(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let n;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?n="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(n="-//W3C//DTD HTML 4.0 Transitional//EN"),n){let r=this.createDocumentType("html",n,"");this.open(),this.appendChild(r)}}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new Nr(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=new Kn(t);return n.ownerDocument=this,n}createElementNS(t,n){return this.createElement(n)}createTextNode(t){let n=new Mr(t);return n.ownerDocument=this,n}createComment(t){let n=new Dr(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new Tr(t);return n.ownerDocument=this,n}toString(){return"RRDocument"}},Nr=class extends Ft{constructor(t,n,r){super(),M(this,"nodeType",10),M(this,"RRNodeType",P.DocumentType),M(this,"name"),M(this,"publicId"),M(this,"systemId"),M(this,"textContent",null),this.name=t,this.publicId=n,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}},Kn=class extends Ft{constructor(t){super(),M(this,"nodeType",1),M(this,"RRNodeType",P.Element),M(this,"tagName"),M(this,"attributes",{}),M(this,"shadowRoot",null),M(this,"scrollLeft"),M(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(n=>t+=n.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new wi(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let t=this.attributes.style?Oc(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=(r,i,s)=>{if(n.test(r))return;let o=gi(r);i?t[o]=i:delete t[o],s==="important"&&(t[o]+=" !important"),this.attributes.style=Ns(t)},t.removeProperty=r=>{if(n.test(r))return"";let i=gi(r),s=t[i]||"";return delete t[i],this.attributes.style=Ns(t),s},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,n){this.attributes[t]=n}setAttributeNS(t,n,r){this.setAttribute(n,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Ji(this,t)}insertBefore(t,n){return $o(this,t,n)}removeChild(t){return ea(this,t)}attachShadow(t){let n=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=n,n}dispatchEvent(t){return!0}toString(){let t="";for(let n in this.attributes)t+=`${n}="${this.attributes[n]}" `;return`${this.tagName} ${t}`}},_i=class extends Kn{constructor(){super(...arguments),M(this,"currentTime"),M(this,"volume"),M(this,"paused"),M(this,"muted"),M(this,"playbackRate"),M(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},Mr=class extends Ft{constructor(t){super(),M(this,"nodeType",3),M(this,"nodeName","#text"),M(this,"RRNodeType",P.Text),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Dr=class extends Ft{constructor(t){super(),M(this,"nodeType",8),M(this,"nodeName","#comment"),M(this,"RRNodeType",P.Comment),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Tr=class extends Ft{constructor(t){super(),M(this,"nodeName","#cdata-section"),M(this,"nodeType",4),M(this,"RRNodeType",P.CDATA),M(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},wi=class{constructor(t,n){if(M(this,"onChange"),M(this,"classes",[]),M(this,"add",(...r)=>{for(let i of r){let s=String(i);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))}),M(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){let r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=n}};function Ji(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function $o(e,t,n){if(!n)return Ji(e,t);if(n.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===n||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=n.previousSibling,n.previousSibling=t,t.nextSibling=n,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function ea(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var De=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(De||{});function ge(e){try{return e.contentDocument}catch{}}function Wc(e){try{return e.contentWindow}catch{}}var bi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Uc={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"},zt=null;function Cr(e,t,n,r=t.mirror||t.ownerDocument.mirror){e=Bc(e,t,n,r),ta(e,t,n,r),Vc(e,t,n)}function Bc(e,t,n,r){if(n.afterAppend&&!zt&&(zt=new WeakSet,setTimeout(()=>{zt=null},0)),!Zi(e,t)){let i=xr(t,n.mirror,r);e.parentNode?.replaceChild(i,e),e=i}switch(t.RRNodeType){case P.Document:{if(!rn(e,t,n.mirror,r)){let i=r.getMeta(t);i&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,i),zt?.add(e))}break}case P.Element:{let i=e,s=t;switch(s.tagName){case"IFRAME":{let o=ge(e);if(!o)break;Cr(o,t.contentDocument,n,r);break}}s.shadowRoot&&(i.shadowRoot||i.attachShadow({mode:"open"}),ta(i.shadowRoot,s.shadowRoot,n,r)),zc(i,s,r);break}}return e}function Vc(e,t,n){switch(t.RRNodeType){case P.Document:{let r=t.scrollData;r&&n.applyScroll(r,!0);break}case P.Element:{let r=e,i=t;switch(i.scrollData&&n.applyScroll(i.scrollData,!0),i.inputData&&n.applyInput(i.inputData),i.tagName){case"AUDIO":case"VIDEO":{let s=e,o=i;if(o.paused!==void 0){let a=o.paused?s.pause():s.play();typeof a?.catch=="function"&&a.catch(l=>{console.warn(l)})}o.muted!==void 0&&(s.muted=o.muted),o.volume!==void 0&&(s.volume=o.volume),o.currentTime!==void 0&&(s.currentTime=o.currentTime),o.playbackRate!==void 0&&(s.playbackRate=o.playbackRate);break}case"CANVAS":{let s=t;if(s.rr_dataURL!==null){let o=document.createElement("img");o.onload=()=>{let a=r.getContext("2d");a&&a.drawImage(o,0,0,o.width,o.height)},o.src=s.rr_dataURL}s.canvasMutations.forEach(o=>n.applyCanvas(o.event,o.mutation,e));break}case"STYLE":{let s=r.sheet;s&&t.rules.forEach(o=>n.applyStyleSheetMutation(o,s));break}}break}case P.Text:case P.Comment:case P.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}zt?.has(e)&&(zt.delete(e),n.afterAppend?.(e,n.mirror.getId(e)))}function zc(e,t,n){let r=e.attributes,i=t.attributes;for(let s in i){let o=i[s];if(n.getMeta(t)?.isSVG&&bi[s])e.setAttributeNS(bi[s],s,o);else if(t.tagName==="CANVAS"&&s==="rr_dataURL"){let l=document.createElement("img");l.src=o,l.onload=()=>{let c=e.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(t.tagName==="IFRAME"&&s==="srcdoc")continue;try{e.setAttribute(s,o)}catch(l){console.warn(l)}}}for(let{name:s}of Array.from(r))s in i||e.removeAttribute(s);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function ta(e,t,n,r){let i=Array.from(e.childNodes),s=t.childNodes;if(i.length===0&&s.length===0)return;let o=0,a=i.length-1,l=0,c=s.length-1,u=i[o],f=i[a],h=s[l],d=s[c],m,E;for(;o<=a&&l<=c;)if(u===void 0)u=i[++o];else if(f===void 0)f=i[--a];else if(rn(u,h,n.mirror,r))u=i[++o],h=s[++l];else if(rn(f,d,n.mirror,r))f=i[--a],d=s[--c];else if(rn(u,d,n.mirror,r)){try{Rn(e,u,f.nextSibling)}catch(w){console.warn(w)}u=i[++o],d=s[--c]}else if(rn(f,h,n.mirror,r)){try{Rn(e,f,u)}catch(w){console.warn(w)}f=i[--a],h=s[++l]}else{if(!m){m={};for(let S=o;S<=a;S++){let T=i[S];T&&n.mirror.hasNode(T)&&(m[n.mirror.getId(T)]=S)}}E=m[r.getId(h)];let w=i[E];if(E!==void 0&&w&&rn(w,h,n.mirror,r)){try{Rn(e,w,u)}catch(S){console.warn(S)}i[E]=void 0}else{let S=xr(h,n.mirror,r);e.nodeName==="#document"&&u&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&u.nodeType===u.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&u.nodeType===u.ELEMENT_NODE)&&(e.removeChild(u),n.mirror.removeNodeFromMap(u),u=i[++o]);try{Rn(e,S,u||null)}catch(T){console.warn(T)}}h=s[++l]}if(o>a){let w=s[c+1],S=null;for(w&&(S=n.mirror.getNode(r.getId(w)));l<=c;++l){let T=xr(s[l],n.mirror,r);try{Rn(e,T,S)}catch(C){console.warn(C)}}}else if(l>c)for(;o<=a;o++){let w=i[o];if(!(!w||w.parentNode!==e))try{e.removeChild(w),n.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let y=e.firstChild,v=t.firstChild;for(;y!==null&&v!==null;)Cr(y,v,n,r),y=y.nextSibling,v=v.nextSibling}function xr(e,t,n){let r=n.getId(e),i=n.getMeta(e),s=null;if(r>-1&&(s=t.getNode(r)),s!==null&&Zi(s,e))return s;switch(e.RRNodeType){case P.Document:s=new Document;break;case P.DocumentType:s=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case P.Element:{let o=e.tagName.toLowerCase();o=Uc[o]||o,i&&"isSVG"in i&&i?.isSVG?s=document.createElementNS(bi.svg,o):s=document.createElement(e.tagName);break}case P.Text:s=document.createTextNode(e.data);break;case P.Comment:s=document.createComment(e.data);break;case P.CDATA:s=document.createCDATASection(e.data);break}i&&t.add(s,{...i});try{zt?.add(s)}catch{}return s}function Zi(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function rn(e,t,n,r){let i=n.getId(e),s=r.getId(t);return i===-1||i!==s?!1:Zi(e,t)}function Gc(e){let t=e.sheet?.cssRules;if(!t||!t.length)return;let n=new CSSStyleSheet;n.replaceSync(e.innerText);let r={};for(let s=0;s<n.cssRules.length;s++)r[n.cssRules[s].cssText]=n.cssRules[s];let i=[];for(let s=0;s<t?.length;s++){let o=t[s].cssText;r[o]||i.push({index:s,cssRuleText:o})}return i}function Rn(e,t,n){let r;t.nodeName==="STYLE"&&(r=Gc(t)),e.insertBefore(t,n),r&&r.length&&r.forEach(({cssRuleText:i,index:s})=>{t.sheet?.insertRule(i,s)})}var wn=class e extends yi{constructor(t){super(),M(this,"UNSERIALIZED_STARTING_ID",-2),M(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),M(this,"mirror",Qc()),M(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,n,r){return new e}createDocumentType(t,n,r){let i=new Yc(t,n,r);return i.ownerDocument=this,i}createElement(t){let n=t.toUpperCase(),r;switch(n){case"AUDIO":case"VIDEO":r=new Ei(n);break;case"IFRAME":r=new Mi(n,this.mirror);break;case"CANVAS":r=new Si(n);break;case"STYLE":r=new Ni(n);break;default:r=new bn(n);break}return r.ownerDocument=this,r}createComment(t){let n=new jc(t);return n.ownerDocument=this,n}createCDATASection(t){let n=new qc(t);return n.ownerDocument=this,n}createTextNode(t){let n=new Hc(t);return n.ownerDocument=this,n}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Yc=Nr,bn=class extends Kn{constructor(){super(...arguments),M(this,"inputData",null),M(this,"scrollData",null)}},Ei=class extends _i{},Si=class extends bn{constructor(){super(...arguments),M(this,"rr_dataURL",null),M(this,"canvasMutations",[])}getContext(){return null}},Ni=class extends bn{constructor(){super(...arguments),M(this,"rules",[])}},Mi=class extends bn{constructor(t,n){super(t),M(this,"contentDocument",new wn),this.contentDocument.mirror=n}},Hc=Mr,jc=Dr,qc=Tr;function Xc(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function na(e,t,n,r){let i;switch(e.nodeType){case De.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case De.DOCUMENT_TYPE_NODE:{let o=e;i=t.createDocumentType(o.name,o.publicId,o.systemId);break}case De.ELEMENT_NODE:{let o=e,a=Xc(o);i=t.createElement(a);let l=i;for(let{name:c,value:u}of Array.from(o.attributes))l.attributes[c]=u;o.scrollLeft&&(l.scrollLeft=o.scrollLeft),o.scrollTop&&(l.scrollTop=o.scrollTop);break}case De.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case De.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case De.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case De.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let s=n.getMeta(e);return t instanceof wn&&(s||(s=ra(i,t.unserializedId),n.add(e,s)),t.mirror.add(i,{...s})),i}function Kc(e,t=Ac(),n=new wn){function r(i,s){let o=na(i,n,t,s);if(o!==null)if(s?.nodeName!=="IFRAME"&&i.nodeType!==De.DOCUMENT_FRAGMENT_NODE&&(s?.appendChild(o),o.parentNode=s,o.parentElement=s),i.nodeName==="IFRAME"){let a=ge(i);a&&r(a,o)}else(i.nodeType===De.DOCUMENT_NODE||i.nodeType===De.ELEMENT_NODE||i.nodeType===De.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===De.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,o),i.childNodes.forEach(a=>r(a,o)))}return r(e,null),n}function Qc(){return new Di}var Di=class{constructor(){M(this,"idNodeMap",new Map),M(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){let r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){let r=this.getNode(t);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(n,i)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ra(e,t){switch(e.RRNodeType){case P.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case P.DocumentType:{let n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId}}case P.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case P.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case P.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Xo();function ia(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(i){i(n)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,n)})}}}var Jc=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"}));function Zc(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let n=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:n.prototype.scroll||l,scrollIntoView:n.prototype.scrollIntoView},s=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function o(v){let w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(v)}let a=o(e.navigator.userAgent)?1:0;function l(v,w){this.scrollLeft=v,this.scrollTop=w}function c(v){return .5*(1-Math.cos(Math.PI*v))}function u(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function f(v,w){if(w==="Y")return v.clientHeight+a<v.scrollHeight;if(w==="X")return v.clientWidth+a<v.scrollWidth}function h(v,w){let S=e.getComputedStyle(v,null)["overflow"+w];return S==="auto"||S==="scroll"}function d(v){let w=f(v,"Y")&&h(v,"Y"),S=f(v,"X")&&h(v,"X");return w||S}function m(v){for(;v!==t.body&&d(v)===!1;)v=v.parentNode||v.host;return v}function E(v){let w=s(),S,T,C,G=(w-v.startTime)/r;G=G>1?1:G,S=c(G),T=v.startX+(v.x-v.startX)*S,C=v.startY+(v.y-v.startY)*S,v.method.call(v.scrollable,T,C),(T!==v.x||C!==v.y)&&e.requestAnimationFrame(E.bind(e,v))}function y(v,w,S){let T,C,G,X,A=s();v===t.body?(T=e,C=e.scrollX||e.pageXOffset,G=e.scrollY||e.pageYOffset,X=i.scroll):(T=v,C=v.scrollLeft,G=v.scrollTop,X=l),E({scrollable:T,method:X,startTime:A,startX:C,startY:G,x:w,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}y.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])){i.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}y.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},n.prototype.scroll=n.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(u(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let v=arguments[0].left,w=arguments[0].top;y.call(this,this,typeof v>"u"?this.scrollLeft:~~v,typeof w>"u"?this.scrollTop:~~w)},n.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(u(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},n.prototype.scrollIntoView=function(){if(u(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let v=m(this),w=v.getBoundingClientRect(),S=this.getBoundingClientRect();v!==t.body?(y.call(this,v,v.scrollLeft+S.left-w.left,v.scrollTop+S.top-w.top),e.getComputedStyle(v).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}var Ti=class{constructor(t=[],n){this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}addAction(t){let n=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{let r=this.findActionIndex(t);this.actions.splice(r,0,t)}n&&(this.raf=Hr(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=Hr(this.rafCheck.bind(this))}rafCheck(){let t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){let n=this.actions[0];if(this.timeOffset>=n.delay)this.actions.shift(),n.doAction();else break}this.actions.length>0?this.raf=Hr(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let n=0,r=this.actions.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);if(this.actions[i].delay<t.delay)n=i+1;else if(this.actions[i].delay>t.delay)r=i-1;else return i+1}return n}};function Ms(e,t){if(e.type===J.IncrementalSnapshot&&e.data.source===z.MouseMove&&e.data.positions&&e.data.positions.length){let n=e.data.positions[0].timeOffset,r=e.timestamp+n;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function Ds(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,s=n.call(e),o=[];try{for(;(t===void 0||t-- >0)&&!(r=s.next()).done;)o.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=s.return)&&n.call(s)}finally{if(i)throw i.error}}return o}var cn;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(cn||(cn={}));var sa={type:"xstate.init"};function jr(e){return e===void 0?[]:[].concat(e)}function sn(e){return{type:"xstate.assign",assignment:e}}function Ts(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Rr(e){return function(t){return e===t}}function oa(e){return typeof e=="string"?{type:e}:e}function Cs(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Rr(e)}}function xs(e,t,n){var r=t,i=!1;return[e.filter((function(s){if(s.type==="xstate.assign"){i=!0;var o=Object.assign({},r);return typeof s.assignment=="function"?o=s.assignment(r,n):Object.keys(s.assignment).forEach((function(a){o[a]=typeof s.assignment[a]=="function"?s.assignment[a](r,n):s.assignment[a]})),r=o,!1}return!0})),r,i]}function aa(e,t){t===void 0&&(t={});var n=Ds(xs(jr(e.states[e.initial].entry).map((function(o){return Ts(o,t.actions)})),e.context,sa),2),r=n[0],i=n[1],s={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Rr(e.initial)},transition:function(o,a){var l,c,u=typeof o=="string"?{value:o,context:e.context}:o,f=u.value,h=u.context,d=oa(a),m=e.states[f];if(m.on){var E=jr(m.on[d.type]);try{for(var y=(function(q){var Ve=typeof Symbol=="function"&&Symbol.iterator,Ze=Ve&&q[Ve],_=0;if(Ze)return Ze.call(q);if(q&&typeof q.length=="number")return{next:function(){return q&&_>=q.length&&(q=void 0),{value:q&&q[_++],done:!q}}};throw new TypeError(Ve?"Object is not iterable.":"Symbol.iterator is not defined.")})(E),v=y.next();!v.done;v=y.next()){var w=v.value;if(w===void 0)return Cs(f,h);var S=typeof w=="string"?{target:w}:w,T=S.target,C=S.actions,G=C===void 0?[]:C,X=S.cond,A=X===void 0?function(){return!0}:X,ne=T===void 0,Z=T??f,fe=e.states[Z];if(A(h,d)){var me=Ds(xs((ne?jr(G):[].concat(m.exit,G,fe.entry).filter((function(q){return q}))).map((function(q){return Ts(q,s._options.actions)})),h,d),3),se=me[0],xe=me[1],Je=me[2],ce=T??f;return{value:ce,context:xe,actions:se,changed:T!==f||se.length>0||Je,matches:Rr(ce)}}}}catch(q){l={error:q}}finally{try{v&&!v.done&&(c=y.return)&&c.call(y)}finally{if(l)throw l.error}}}return Cs(f,h)}};return s}var Rs=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function la(e){var t=e.initialState,n=cn.NotStarted,r=new Set,i={_machine:e,send:function(s){n===cn.Running&&(t=e.transition(t,s),Rs(t,oa(s)),r.forEach((function(o){return o(t)})))},subscribe:function(s){return r.add(s),s(t),{unsubscribe:function(){return r.delete(s)}}},start:function(s){if(s){var o=typeof s=="object"?s:{context:e.config.context,value:s};t={value:o.value,actions:[],context:o.context,matches:Rr(o.value)}}return n=cn.Running,Rs(t,sa),i},stop:function(){return n=cn.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function $c(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r.type===J.Meta&&r.timestamp<=t)return e.slice(n)}return e}function eu(e,{getCastFn:t,applyEventsSynchronously:n,emitter:r}){let i=aa({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:sn({lastPlayedEvent:(s,o)=>o.type==="CAST_EVENT"?o.payload.event:s.lastPlayedEvent}),recordTimeOffset:sn((s,o)=>{let a=s.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(a=o.payload.timeOffset),{...s,timeOffset:a,baselineTime:s.events[0].timestamp+a}}),play(s){let{timer:o,events:a,baselineTime:l,lastPlayedEvent:c}=s;o.clear();for(let d of a)Ms(d,l);let u=$c(a,l),f=c?.timestamp;c?.type===J.IncrementalSnapshot&&c.data.source===z.MouseMove&&(f=c.timestamp+c.data.positions[0]?.timeOffset),l<(f||0)&&r.emit(Y.PlayBack);let h=new Array;for(let d of u)if(!(f&&f<l&&(d.timestamp<=f||d===c)))if(d.timestamp<l)h.push(d);else{let m=t(d,!1);o.addAction({doAction:()=>{m()},delay:d.delay})}n(h),r.emit(Y.Flush),o.start()},pause(s){s.timer.clear()},resetLastPlayedEvent:sn(s=>({...s,lastPlayedEvent:null})),startLive:sn({baselineTime:(s,o)=>(s.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:sn((s,o)=>{let{baselineTime:a,timer:l,events:c}=s;if(o.type==="ADD_EVENT"){let{event:u}=o.payload;Ms(u,a);let f=c.length-1;if(!c[f]||c[f].timestamp<=u.timestamp)c.push(u);else{let m=-1,E=0;for(;E<=f;){let y=Math.floor((E+f)/2);c[y].timestamp<=u.timestamp?E=y+1:f=y-1}m===-1&&(m=E),c.splice(m,0,u)}let h=u.timestamp<a,d=t(u,h);h?d():l.isActive()&&l.addAction({doAction:()=>{d()},delay:u.delay})}return{...s,events:c}})}});return la(i)}function tu(e){let t=aa({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:(n,r)=>{"payload"in r&&n.timer.setSpeed(r.payload.speed)},recordSpeed:sn({normalSpeed:n=>n.timer.speed}),restoreSpeed:n=>{n.timer.setSpeed(n.normalSpeed)}}});return la(t)}var nu=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],ks=new Map;function ca(e,t){let n=ks.get(e);return n||(n=new Map,ks.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Ct(e,t,n){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(n&&(n.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await Ct(e,t,n)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(n||t===null)return r;let{rr_type:i,index:s}=r;return ca(t,i)[s]}else if("args"in r){let{rr_type:i,args:s}=r,o=window[i];return new o(...await Promise.all(s.map(Ct(e,t,n))))}else{if("base64"in r)return Dc(r.base64);if("src"in r){let i=e.get(r.src);if(i)return i;{let s=new Image;return s.src=r.src,e.set(r.src,s),s}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(Ct(e,t,n)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(Ct(e,t,n)));return r}}function ru(e,t){try{return t===Sr.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}var iu=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function su(e,t){if(!t?.constructor)return;let{name:n}=t.constructor;if(!iu.includes(n))return;let r=ca(e,n);r.includes(t)||r.push(t)}async function ou({mutation:e,target:t,type:n,imageMap:r,errorHandler:i}){try{let s=ru(t,n);if(!s)return;if(e.setter){s[e.property]=e.args[0];return}let o=s[e.property],a=await Promise.all(e.args.map(Ct(r,s))),l=o.apply(s,a);su(s,l);let c=!1}catch(s){i(e,s)}}async function au({event:e,mutations:t,target:n,imageMap:r,errorHandler:i}){let s=n.getContext("2d");if(!s){i(t[0],new Error("Canvas context is null"));return}let o=t.map(async l=>Promise.all(l.args.map(Ct(r,s))));(await Promise.all(o)).forEach((l,c)=>{let u=t[c];try{if(u.setter){s[u.property]=u.args[0];return}let f=s[u.property];u.property==="drawImage"&&typeof u.args[0]=="string"?(r.get(e),f.apply(s,u.args)):f.apply(s,l)}catch(f){i(u,f)}})}async function As({event:e,mutation:t,target:n,imageMap:r,canvasEventMap:i,errorHandler:s}){try{let o=i.get(e)||t,a="commands"in o?o.commands:[o];if([Sr.WebGL,Sr.WebGL2].includes(t.type)){for(let l=0;l<a.length;l++){let c=a[l];await ou({mutation:c,type:t.type,target:n,imageMap:r,errorHandler:s})}return}await au({event:e,mutations:a,target:n,imageMap:r,errorHandler:s})}catch(o){s(t,o)}}var Os=5*1e3,lu=ia||Jc,Is="[replayer]";function cu(e,t){let n=-1;if(e.length===0)return n;let r=0,i=e.length-1;for(;r<=i;){let s=Math.floor((r+i)/2);e[s].timestamp<=t?(n=s,r=s+1):i=s-1}return n}var qr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function uu(e){return e.type==J.IncrementalSnapshot&&(e.data.source==z.TouchMove||e.data.source==z.MouseInteraction&&e.data.type==re.TouchStart)}function Fs(e){return"pointerId"in e&&typeof e.pointerId=="number"?e.pointerId:-1}var Ci=class{constructor(t,n){if(this.usingVirtualDom=!1,this.virtualDom=new wn,this.emitter=lu(),this.legacy_missingNodeRetryMap={},this.cache=ys(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=Xo(),this.styleMirror=new vi,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.pointers={},this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=a=>{this.iframe.style.display="inherit";for(let l of[...Object.values(this.pointers).flatMap(c=>c.mouseTail),this.iframe])l&&(l.setAttribute("width",String(a.width)),l.setAttribute("height",String(a.height)))},this.applyEventsSynchronously=a=>{for(let l of a){switch(l.type){case J.DomContentLoaded:case J.Load:case J.Custom:continue;case J.FullSnapshot:case J.Meta:case J.Plugin:case J.IncrementalSnapshot:break}this.getCastFn(l,!0)()}},this.getCastFn=(a,l=!1)=>{let c;switch(a.type){case J.DomContentLoaded:case J.Load:break;case J.Custom:c=()=>{this.emitter.emit(Y.CustomEvent,a)};break;case J.Meta:c=()=>this.emitter.emit(Y.Resize,{width:a.data.width,height:a.data.height});break;case J.FullSnapshot:c=()=>{if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.rebuildFullSnapshot(a,l),this.iframe.contentWindow?.scrollTo(a.data.initialOffset),this.styleMirror.reset()};break;case J.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,l),!l&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let f of this.service.state.context.events)if(!(f.timestamp<=a.timestamp)&&this.isUserInteraction(f)){f.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=f);break}if(this.nextUserInteractionEvent){let f=this.nextUserInteractionEvent.delay-a.delay,h={speed:Math.min(Math.round(f/Os),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:h}),this.emitter.emit(Y.SkipStart,h)}}};break}return()=>{c&&c();for(let h of this.config.plugins||[])h.handler&&h.handler(a,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let f=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[f]){let h=()=>{f<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Y.Finish))},d=50;a.type===J.IncrementalSnapshot&&a.data.source===z.MouseMove&&a.data.positions.length&&(d+=Math.max(0,-a.data.positions[0].timeOffset)),en(h,d)}this.emitter.emit(Y.EventCast,a)}},!n?.liveMode&&t.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:qr,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Y.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(Y.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(c,u,f)=>{As({event:c,mutation:u,target:f,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,u)=>{c.source===z.StyleSheetRule?this.applyStyleSheetRule(c,u):c.source===z.StyleDeclaration&&this.applyStyleDeclaration(c,u)},afterAppend:(c,u)=>{for(let f of this.config.plugins||[])f.onBuild&&f.onBuild(c,{id:u,replayer:this})}},l=ge(this.iframe);if(l)try{Cr(l,this.virtualDom,a,this.virtualDom.mirror)}catch(c){console.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let c in this.legacy_missingNodeRetryMap)try{let u=this.legacy_missingNodeRetryMap[c],f=xr(u.node,this.mirror,this.virtualDom.mirror);Cr(f,u.node,a,this.virtualDom.mirror),u.node=f}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}for(let[a,{pointerPosition:l,touchActive:c}]of Object.entries(this.pointers)){let u=parseInt(a),f=this.pointers[u];l&&(this.moveAndHover(l.x,l.y,l.id,!0,l.debugData,u),f.pointerPosition=null),c===!0?f.pointerEl.classList.add("touch-active"):c===!1&&f.pointerEl.classList.remove("touch-active"),f.touchActive=null}if(this.lastMouseDownEvent){let[a,l]=this.lastMouseDownEvent;a.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Y.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset()});let i=new Ti([],{speed:this.config.speed});this.service=eu({events:t.map(a=>n&&n.unpackFn?n.unpackFn(a):a).sort((a,l)=>a.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(Y.StateChange,{player:a})}),this.speedService=tu({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(Y.StateChange,{speed:a})});let s=this.service.state.context.events.find(a=>a.type===J.Meta),o=this.service.state.context.events.find(a=>a.type===J.FullSnapshot);if(s){let{width:a,height:l}=s.data;en(()=>{this.emitter.emit(Y.Resize,{width:a,height:l})},0)}o&&en(()=>{this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),this.iframe.contentWindow?.scrollTo(o.data.initialOffset))},1)}get timer(){return this.service.state.context.timer}createPointer(t,n){let r=document.createElement("canvas");r.classList.add("replayer-mouse-tail"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),this.wrapper.insertBefore(r,this.iframe),r.style.display=this.config.mouseTail===!1?"none":"inherit";let i=document.createElement("div");i.classList.add("replayer-mouse"),this.pointers[t]={touchActive:null,pointerEl:i,tailPositions:[],pointerPosition:null,mouseTail:r},uu(n)&&i.classList.add("touch-device"),this.wrapper.appendChild(i)}on(t,n){return this.emitter.on(t,n),this}off(t,n){return this.emitter.off(t,n),this}setConfig(t){let n=this.config.skipInactive;if(Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive?n===!1&&this.config.skipInactive===!0&&this.reevaluateFastForward():this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u")if(t.mouseTail===!1)for(let{mouseTail:r}of Object.values(this.pointers))r&&(r.style.display="none");else for(let{mouseTail:r}of Object.values(this.pointers))r||(r=document.createElement("canvas"),r.width=Number.parseFloat(this.iframe.width),r.height=Number.parseFloat(this.iframe.height),r.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(r,this.iframe)),r.style.display="inherit"}getMetaData(){let t=this.service.state.context.events[0],n=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:n.timestamp,totalTime:n.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:t,events:n}=this.service.state.context;return t-n[0].timestamp}getMirror(){return this.mirror}play(t=0){this.config.skipInactive&&this.speedService.state.matches("skipping")&&this.backToNormal(),this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),ge(this.iframe)?.getElementsByTagName("html")[0]?.classList.remove("rrweb-paused"),this.emitter.emit(Y.Start),this.config.skipInactive&&this.reevaluateFastForward()}pause(t){t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),ge(this.iframe)?.getElementsByTagName("html")[0]?.classList.add("rrweb-paused"),this.emitter.emit(Y.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Y.Resume)}destroy(){this.pause(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Y.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){let n=this.config.unpackFn?this.config.unpackFn(t):t;Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:n}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=ys()}reevaluateFastForward(){if(!this.config.skipInactive)return;this.nextUserInteractionEvent=null;let t=this.service.state.context.events,n=t[0];if(!n)return;let r=n.timestamp+this.getCurrentTime(),i=cu(t,r);if(i===-1)return;let s=t[i],o=this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed;for(let a=i+1;a<t.length;a++){let l=t[a];if(this.isUserInteraction(l)){let c=l.timestamp-s.timestamp;if(c>o){this.nextUserInteractionEvent=l;let u={speed:Math.min(Math.round(c/Os),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:u}),this.emitter.emit(Y.SkipStart,u)}break}}}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.iframe=document.createElement("iframe");let t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe);let n=ge(this.iframe),r=Wc(this.iframe);r&&n&&(Zc(r,n),Ec(r))}rebuildFullSnapshot(t,n=!1){let r=ge(this.iframe);if(!r)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let i=[],s=(l,c)=>{this.collectIframeAndAttachDocument(i,l);for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(l,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),bc(t.data.node,{doc:r,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(r,t.data.node.id);for(let{mutationInQueue:l,builtNode:c}of i)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);let{documentElement:o,head:a}=r;if(this.insertStyleRules(o,a),!this.service.state.matches("playing")){let l=r.getElementsByTagName("html")[0];l&&l.classList.add("rrweb-paused")}this.emitter.emit(Y.FullsnapshotRebuilded,t),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,n){let r=nu(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){let i=this.virtualDom.createElement("style");this.virtualDom.mirror.add(i,ra(i,this.virtualDom.unserializedId)),t.insertBefore(i,n),i.rules.push({source:z.StyleSheetRule,adds:r.map((s,o)=>({rule:s,index:o}))})}else{let i=document.createElement("style");t.insertBefore(i,n);for(let s=0;s<r.length;s++)i.sheet?.insertRule(r[s],s)}}attachDocumentToIframe(t,n){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=ge(n),s=[],o=(a,l)=>{this.collectIframeAndAttachDocument(s,a);let c=r.getMeta(a);if(c?.type===j.Element&&c?.tagName.toUpperCase()==="HTML"&&i){let{documentElement:u,head:f}=i;this.insertStyleRules(u,f)}if(!this.usingVirtualDom)for(let u of this.config.plugins||[])u.onBuild&&u.onBuild(a,{id:l,replayer:this})};Yn(t.node,{doc:i,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(i,t.node.id);for(let{mutationInQueue:a,builtNode:l}of s)this.attachDocumentToIframe(a,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a)}collectIframeAndAttachDocument(t,n){if(Yr(n,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(n));r&&t.push({mutationInQueue:r,builtNode:n})}}waitForStylesheetLoad(){let n=ge(this.iframe)?.head;if(n){let r=new Set,i,s=this.service.state,o=()=>{s=this.service.state};this.emitter.on(Y.Start,o),this.emitter.on(Y.Pause,o);let a=()=>{this.emitter.off(Y.Start,o),this.emitter.off(Y.Pause,o)};n.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(s.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Y.LoadStylesheetEnd),i&&Mc(i),a())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Y.LoadStylesheetStart),i=en(()=>{s.matches("playing")&&this.play(this.getCurrentTime()),i=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let t=[];for(let n of this.service.state.context.events)n.type===J.IncrementalSnapshot&&n.data.source===z.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach(i=>{this.preloadImages(i,n)}));return Promise.all(t)}preloadImages(t,n){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(n)){let r=document.createElement("canvas"),i=r.getContext("2d"),s=i?.createImageData(r.width,r.height);i?.putImageData(s,0,0)}}async deserializeAndPreloadCanvasEvents(t,n){if(!this.canvasEventMap.has(n)){let r={isUnchanged:!0};if("commands"in t){let i=await Promise.all(t.commands.map(async s=>{let o=await Promise.all(s.args.map(Ct(this.imageMap,null,r)));return{...s,args:o}}));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,commands:i})}else{let i=await Promise.all(t.args.map(Ct(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(n,{...t,args:i})}}}applyIncremental(t,n){let{data:r}=t;switch(r.source){case z.Mutation:{try{this.applyMutation(r,n)}catch(i){this.warn(`Exception in mutation ${i.message||i}`,r)}break}case z.Drag:case z.TouchMove:case z.MouseMove:{let i=Fs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(n){let o=r.positions[r.positions.length-1];s.pointerPosition={x:o.x,y:o.y,id:o.id,debugData:r}}else r.positions.forEach(o=>{let a={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,n,r,i)},delay:o.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:t.delay-r.positions[0]?.timeOffset});break}case z.MouseInteraction:{let i=Fs(r);this.pointers[i]||this.createPointer(i,t);let s=this.pointers[i];if(r.id===-1)break;let o=new Event(fc(re[r.type])),a=this.mirror.getNode(r.id);if(!a)return this.debugNodeNotFound(r,r.id);this.emitter.emit(Y.MouseInteraction,{type:r.type,target:a});let{triggerFocus:l}=this.config;switch(r.type){case re.Blur:"blur"in a&&a.blur();break;case re.Focus:l&&a.focus&&a.focus({preventScroll:!0});break;case re.Click:case re.TouchStart:case re.TouchEnd:case re.MouseDown:case re.MouseUp:n?(r.type===re.TouchStart?(s.touchActive=!0,Object.values(this.pointers).forEach(c=>{c!==s&&!c.touchActive&&(c.touchActive=!1)})):r.type===re.TouchEnd&&(s.touchActive=!1,s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]),r.type===re.MouseDown?this.lastMouseDownEvent=[a,o]:r.type===re.MouseUp&&(this.lastMouseDownEvent=null),s.pointerPosition={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===re.TouchStart&&(s.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,n,r,i),r.type===re.Click?(s.pointerEl.classList.remove("active"),s.pointerEl.offsetWidth,s.pointerEl.classList.add("active")):r.type===re.TouchStart?(s.pointerEl.offsetWidth,s.pointerEl.classList.add("touch-active")):r.type===re.TouchEnd?(s.pointerEl.remove(),s.mouseTail&&s.mouseTail.remove(),delete this.pointers[i]):a.dispatchEvent(o));break;case re.TouchCancel:n?s.touchActive=!1:s.pointerEl.classList.remove("touch-active");break;default:a.dispatchEvent(o)}break}case z.Scroll:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.scrollData=r;break}this.applyScroll(r,n);break}case z.ViewportResize:this.emitter.emit(Y.Resize,{width:r.width,height:r.height});break;case z.Input:{if(r.id===-1)break;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.inputData=r;break}this.applyInput(r);break}case z.MediaInteraction:{let i=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);let s=i;try{if(r.currentTime!==void 0&&(s.currentTime=r.currentTime),r.volume!==void 0&&(s.volume=r.volume),r.muted!==void 0&&(s.muted=r.muted),r.type===fr.Pause&&s.pause(),r.type===fr.Play){let o=s.play();typeof o?.catch=="function"&&o.catch(a=>{console.warn(a)})}r.type===fr.RateChange&&(s.playbackRate=r.playbackRate)}catch(o){this.warn(`Failed to replay media interactions: ${o.message||o}`)}break}case z.StyleSheetRule:case z.StyleDeclaration:{this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&this.virtualDom.mirror.getNode(r.id)?.rules?.push(r):this.applyStyleSheetMutation(r);break}case z.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let i=this.virtualDom.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);i.canvasMutations.push({event:t,mutation:r})}else{let i=this.mirror.getNode(r.id);if(!i)return this.debugNodeNotFound(r,r.id);As({event:t,mutation:r,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case z.Font:{try{let i=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);ge(this.iframe)?.fonts.add(i)}catch(i){this.warn(i)}break}case z.Selection:{if(n){this.lastSelectionData=r;break}this.applySelection(r);break}case z.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r);break}}}applyMutation(t,n){if(this.config.useVirtualDom&&!this.usingVirtualDom&&n){this.usingVirtualDom=!0;let c=ge(this.iframe);if(c&&Kc(c,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length)for(let u in this.legacy_missingNodeRetryMap)try{let f=this.legacy_missingNodeRetryMap[u],h=na(f.node,this.virtualDom,this.mirror);h&&(f.node=h)}catch(f){this.warn(f)}}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{let u=r.getNode(c.id);if(!u)return;let f=r.getNode(c.parentId);if(!f)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&ir(f)&&(f=f.shadowRoot),r.removeNodeFromMap(u),f)try{f.removeChild(u),this.usingVirtualDom&&u.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.length>0&&(f.rules=[])}catch(h){if(h instanceof DOMException)this.warn("parent could not remove child in mutation",f,u,t);else throw h}});let i={...this.legacy_missingNodeRetryMap},s=[],o=c=>{let u=null;return c.nextId&&(u=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!u},a=c=>{let u=ge(this.iframe);if(!u)return this.warn("Looks like your replayer has been destroyed.");let f=r.getNode(c.parentId);if(!f)return c.node.type===j.Document?this.newDocumentQueue.push(c):s.push(c);c.node.isShadow&&(ir(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let h=null,d=null;if(c.previousId&&(h=r.getNode(c.previousId)),c.nextId&&(d=r.getNode(c.nextId)),o(c))return s.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;let m=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:u;if(Yr(f,r)){this.attachDocumentToIframe(c,f);return}let E=(w,S)=>{if(!this.usingVirtualDom)for(let T of this.config.plugins||[])T.onBuild&&T.onBuild(w,{id:S,replayer:this})},y=Yn(c.node,{doc:m,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:E});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:y,mutation:c};return}let v=r.getMeta(f);if(v&&v.type===j.Element&&v.tagName==="textarea"&&c.node.type===j.Text){let w=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);for(let S of w)S.nodeType===f.TEXT_NODE&&f.removeChild(S)}else if(v?.type===j.Document){let w=f;c.node.type===j.DocumentType&&w.childNodes[0]?.nodeType===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),y.nodeName==="HTML"&&w.documentElement&&w.removeChild(w.documentElement)}if(h&&h.nextSibling&&h.nextSibling.parentNode?f.insertBefore(y,h.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(y,d):f.insertBefore(y,null):f.appendChild(y),E(y,c.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&f.nodeName==="STYLE"&&f.rules?.length>0&&(f.rules=[]),Yr(y,this.mirror)){let w=this.mirror.getId(y),S=this.newDocumentQueue.find(T=>T.parentId===w);S&&(this.attachDocumentToIframe(S,y),this.newDocumentQueue=this.newDocumentQueue.filter(T=>T!==S))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,f,y,c)};t.adds.forEach(c=>{a(c)});let l=Date.now();for(;s.length;){let c=Sc(s);if(s.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(let u of c)r.getNode(u.value.parentId)?Jo(u,h=>{a(h)}):this.debug("Drop resolve tree since there is no parent for the root node.",u)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Nc(t.texts).forEach(c=>{let u=r.getNode(c.id);if(!u)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);if(u.textContent=c.value,this.usingVirtualDom){let f=u.parentNode;f?.rules?.length>0&&(f.rules=[])}}),t.attributes.forEach(c=>{let u=r.getNode(c.id);if(!u)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(let f in c.attributes)if(typeof f=="string"){let h=c.attributes[f];if(h===null)u.removeAttribute(f);else if(typeof h=="string")try{if(f==="_cssText"&&(u.nodeName==="LINK"||u.nodeName==="STYLE"))try{let d=r.getMeta(u),m=Yn({...d,attributes:{...d.attributes,...c.attributes}},{doc:u.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),E=u.nextSibling,y=u.parentNode;if(m&&y){y.removeChild(u),y.insertBefore(m,E),r.replace(c.id,m);break}}catch{}u.nodeType!==3&&u.setAttribute(f,h)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){let d=h,m=u;for(let E in d)if(d[E]===!1)m.style.removeProperty(E);else if(d[E]instanceof Array){let y=d[E];m.style.setProperty(E,y[0],y[1])}else{let y=d[E];m.style.setProperty(E,y)}}}})}applyScroll(t,n){let r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);let i=this.mirror.getMeta(r),s=ge(this.iframe);if(r===s)this.iframe.contentWindow?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else if(i?.type===j.Document)r.defaultView?.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"});else try{r.scrollTo({top:t.y,left:t.x,behavior:n?"auto":"smooth"})}catch{}}applyInput(t){let n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);try{n.checked=t.isChecked,n.value=t.text}catch{}}applySelection(t){try{let n=new Set,r=t.ranges.map(({start:i,startOffset:s,end:o,endOffset:a})=>{let l=this.mirror.getNode(i),c=this.mirror.getNode(o);if(!l||!c)return;let u=new Range;u.setStart(l,s),u.setEnd(c,a);let h=l.ownerDocument?.getSelection();return h&&n.add(h),{range:u,selection:h}});n.forEach(i=>i.removeAllRanges()),r.forEach(i=>i&&i.selection?.addRange(i.range))}catch{}}applyStyleSheetMutation(t){let n=null;t.styleId?n=this.styleMirror.getStyle(t.styleId):t.id&&(n=this.mirror.getNode(t.id)?.sheet||null),n&&(t.source===z.StyleSheetRule?this.applyStyleSheetRule(t,n):t.source===z.StyleDeclaration&&this.applyStyleDeclaration(t,n))}applyStyleSheetRule(t,n){if(t.adds?.forEach(({rule:r,index:i})=>{try{if(Array.isArray(i)){let{positions:s,index:o}=ws(i);Ln(n.cssRules,s).insertRule(r,o)}else{let s=i===void 0?void 0:Math.min(i,n.cssRules.length);n?.insertRule(r,s)}}catch{}}),t.removes?.forEach(({index:r})=>{try{if(Array.isArray(r)){let{positions:i,index:s}=ws(r);Ln(n.cssRules,i).deleteRule(s||0)}else n?.deleteRule(r)}catch{}}),t.replace)try{n.replace?.(t.replace)}catch{}if(t.replaceSync)try{n.replaceSync?.(t.replaceSync)}catch{}}applyStyleDeclaration(t,n){if(t.set){let r=Ln(n.rules,t.index);r&&r.style&&r.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){let r=Ln(n.rules,t.index);r&&r.style&&r.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){let n=this.mirror.getNode(t.id);if(!n)return;t.styles?.forEach(o=>{let a=null,l=null;if(ir(n)?l=n.ownerDocument?.defaultView||null:n.nodeName==="#document"&&(l=n.defaultView),!!l)try{a=new l.CSSStyleSheet,this.styleMirror.add(a,o.styleId),this.applyStyleSheetRule({source:z.StyleSheetRule,adds:o.rules},a)}catch{}});let r=10,i=0,s=(o,a)=>{let l=a.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);ir(o)?o.shadowRoot.adoptedStyleSheets=l:o.nodeName==="#document"&&(o.adoptedStyleSheets=l),l.length!==a.length&&i<r&&(en(()=>s(o,a),0+100*i),i++)};s(n,t.styleIds)}legacy_resolveMissingNode(t,n,r,i){let{previousId:s,nextId:o}=i,a=s&&t[s],l=o&&t[o];if(a){let{node:c,mutation:u}=a;n.insertBefore(c,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}if(l){let{node:c,mutation:u}=l;n.insertBefore(c,r.nextSibling),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,n,c,u)}}moveAndHover(t,n,r,i,s,o){let a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(s,r);let l=Zo(a,this.iframe),c=t*l.absoluteScale+l.x,u=n*l.absoluteScale+l.y,f=this.pointers[o];f&&f.pointerEl&&(f.pointerEl.style.left=`${c}px`,f.pointerEl.style.top=`${u}px`),i||this.drawMouseTail({x:c,y:u},o),this.hoverElements(a)}drawMouseTail(t,n){let r=this.pointers[n];if(!r||!r.mouseTail)return;let{lineCap:i,lineWidth:s,strokeStyle:o,duration:a}=this.config.mouseTail===!0?qr:Object.assign({},qr,this.config.mouseTail),l=()=>{if(!r||!r.mouseTail)return;let c=r.mouseTail,u=c.getContext("2d");!u||!r.tailPositions.length||(u.clearRect(0,0,c.width,c.height),u.beginPath(),u.lineWidth=s,u.lineCap=i,u.strokeStyle=o,u.moveTo(r.tailPositions[0].x,r.tailPositions[0].y),r.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())};r.tailPositions.push(t),l(),en(()=>{n in this.pointers&&(r.tailPositions=r.tailPositions.filter(c=>c!==t),l())},a/this.speedService.state.context.timer.speed)}hoverElements(t){let n=ge(this.iframe),r=this.lastHoveredRootNode||n;r&&typeof r.querySelectorAll=="function"&&r.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let i=t;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type!==J.IncrementalSnapshot?!1:t.data.source>z.Mutation&&t.data.source<=z.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Y.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,n){this.warn(`Node with id '${n}' not found. `,t)}warnCanvasMutationFailed(t,n){this.warn("Has error on canvas update",n,"canvas mutation:",t)}debugNodeNotFound(t,n){this.debug(`Node with id '${n}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(Is,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(Is,...t)}},Pe=Uint8Array,xt=Uint16Array,xi=Uint32Array,ua=new Pe([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fa=new Pe([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),fu=new Pe([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ha=function(e,t){for(var n=new xt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new xi(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return[n,i]},da=ha(ua,2),pa=da[0],hu=da[1];pa[28]=258,hu[258]=28;var du=ha(fa,0),pu=du[0],Ri=new xt(32768);for(B=0;B<32768;++B)ct=(B&43690)>>>1|(B&21845)<<1,ct=(ct&52428)>>>2|(ct&13107)<<2,ct=(ct&61680)>>>4|(ct&3855)<<4,Ri[B]=((ct&65280)>>>8|(ct&255)<<8)>>>1;var ct,B,Hn=(function(e,t,n){for(var r=e.length,i=0,s=new xt(t);i<r;++i)++s[e[i]-1];var o=new xt(t);for(i=0;i<t;++i)o[i]=o[i-1]+s[i-1]<<1;var a;if(n){a=new xt(1<<t);var l=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],u=t-e[i],f=o[e[i]-1]++<<u,h=f|(1<<u)-1;f<=h;++f)a[Ri[f]>>>l]=c}else for(a=new xt(r),i=0;i<r;++i)a[i]=Ri[o[e[i]-1]++]>>>15-e[i];return a}),$n=new Pe(288);for(B=0;B<144;++B)$n[B]=8;var B;for(B=144;B<256;++B)$n[B]=9;var B;for(B=256;B<280;++B)$n[B]=7;var B;for(B=280;B<288;++B)$n[B]=8;var B,ma=new Pe(32);for(B=0;B<32;++B)ma[B]=5;var B,mu=Hn($n,9,1),vu=Hn(ma,5,1),Xr=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},Ge=function(e,t,n){var r=t/8>>0;return(e[r]|e[r+1]<<8)>>>(t&7)&n},Kr=function(e,t){var n=t/8>>0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>>(t&7)},gu=function(e){return(e/8>>0)+(e&7&&1)},va=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof xt?xt:e instanceof xi?xi:Pe)(n-t);return r.set(e.subarray(t,n)),r},yu=function(e,t,n){var r=e.length,i=!t||n,s=!n||n.i;n||(n={}),t||(t=new Pe(r*3));var o=function(K){var ze=t.length;if(K>ze){var Se=new Pe(Math.max(ze*2,K));Se.set(t),t=Se}},a=n.f||0,l=n.p||0,c=n.b||0,u=n.l,f=n.d,h=n.m,d=n.n,m=r*8;do{if(!u){n.f=a=Ge(e,l,1);var E=Ge(e,l+1,3);if(l+=3,E)if(E==1)u=mu,f=vu,h=9,d=5;else if(E==2){var S=Ge(e,l,31)+257,T=Ge(e,l+10,15)+4,C=S+Ge(e,l+5,31)+1;l+=14;for(var G=new Pe(C),X=new Pe(19),A=0;A<T;++A)X[fu[A]]=Ge(e,l+A*3,7);l+=T*3;var ne=Xr(X),Z=(1<<ne)-1;if(!s&&l+C*(ne+7)>m)break;for(var fe=Hn(X,ne,1),A=0;A<C;){var me=fe[Ge(e,l,Z)];l+=me&15;var y=me>>>4;if(y<16)G[A++]=y;else{var se=0,xe=0;for(y==16?(xe=3+Ge(e,l,3),l+=2,se=G[A-1]):y==17?(xe=3+Ge(e,l,7),l+=3):y==18&&(xe=11+Ge(e,l,127),l+=7);xe--;)G[A++]=se}}var Je=G.subarray(0,S),ce=G.subarray(S);h=Xr(Je),d=Xr(ce),u=Hn(Je,h,1),f=Hn(ce,d,1)}else throw"invalid block type";else{var y=gu(l)+4,v=e[y-4]|e[y-3]<<8,w=y+v;if(w>r){if(s)throw"unexpected EOF";break}i&&o(c+v),t.set(e.subarray(y,w),c),n.b=c+=v,n.p=l=w*8;continue}if(l>m)throw"unexpected EOF"}i&&o(c+131072);for(var q=(1<<h)-1,Ve=(1<<d)-1,Ze=h+d+18;s||l+Ze<m;){var se=u[Kr(e,l)&q],_=se>>>4;if(l+=se&15,l>m)throw"unexpected EOF";if(!se)throw"invalid length/literal";if(_<256)t[c++]=_;else if(_==256){u=null;break}else{var g=_-254;if(_>264){var A=_-257,N=ua[A];g=Ge(e,l,(1<<N)-1)+pa[A],l+=N}var D=f[Kr(e,l)&Ve],U=D>>>4;if(!D)throw"invalid distance";l+=D&15;var ce=pu[U];if(U>3){var N=fa[U];ce+=Kr(e,l)&(1<<N)-1,l+=N}if(l>m)throw"unexpected EOF";i&&o(c+131072);for(var O=c+g;c<O;c+=4)t[c]=t[c-ce],t[c+1]=t[c+1-ce],t[c+2]=t[c+2-ce],t[c+3]=t[c+3-ce];c=O}}n.l=u,n.p=l,n.b=c,u&&(a=1,n.m=h,n.d=f,n.n=d)}while(!a);return c==t.length?t:va(t,0,c)},_u=function(e){if((e[0]&15)!=8||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(e[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function wu(e,t){return yu((_u(e),e.subarray(2,-4)),t)}function bu(e,t){for(var n=e.length,r=new Pe(e.length+(e.length>>>1)),i=0,s=function(c){r[i++]=c},o=0;o<n;++o){if(i+5>r.length){var a=new Pe(i+8+(n-o<<1));a.set(r),r=a}var l=e.charCodeAt(o);s(l)}return va(r,0,i)}function Eu(e,t){var n="";if(typeof TextDecoder<"u")return new TextDecoder().decode(e);for(var r=0;r<e.length;){var i=e[r++];i<128||t?n+=String.fromCharCode(i):i<224?n+=String.fromCharCode((i&31)<<6|e[r++]&63):i<240?n+=String.fromCharCode((i&15)<<12|(e[r++]&63)<<6|e[r++]&63):(i=((i&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,n+=String.fromCharCode(55296|i>>10,56320|i&1023))}return n}var Ps="v1",Su=e=>{if(typeof e!="string")return e;try{let t=JSON.parse(e);if(t.timestamp)return t}catch{}try{let t=JSON.parse(Eu(wu(bu(e,!0))));if(t.v===Ps)return t;throw new Error(`These events were packed with packer ${t.v} which is incompatible with current packer ${Ps}.`)}catch(t){throw console.error(t),new Error("Unknown data format.")}},ga=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(ga||{}),ki=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ki||{});function Ls(e){let t="";return Object.keys(e).forEach(n=>{t+=`${n}: ${e[n]};`}),t}function kn(e,t=2){let n=String(e),r=Math.pow(10,t-1);if(e<r)for(;String(r).length>n.length;)n=`0${e}`;return n}var ya=1e3,Ai=60*ya,Ws=60*Ai;function Us(e){if(e<=0)return"00:00";let t=Math.floor(e/Ws);e=e%Ws;let n=Math.floor(e/Ai);e=e%Ai;let r=Math.floor(e/ya);return t?`${kn(t)}:${kn(n)}:${kn(r)}`:`${kn(n)}:${kn(r)}`}function Nu(e){return e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():Promise.resolve()}function Mu(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function Bs(){let e=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(t=>{t in document&&(e=e||!!document[t])}),e}function Du(e){return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}function Vs(e){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(e)]}function Tu(e){return e.type!==ga.IncrementalSnapshot?!1:e.data.source>ki.Mutation&&e.data.source<=ki.Input}function Cu(e,t){let n=[],r=e[0].timestamp;for(let i of e)Tu(i)&&(i.timestamp-r>t&&n.push([r,i.timestamp]),r=i.timestamp);return n}var xu=Mn('<div><input type="checkbox" class="svelte-184lr04"/> <label class="svelte-184lr04"></label> <span class="label svelte-184lr04"> </span></div>');function Ru(e,t){Pr(t,!0);let n=ye(t,"checked",15);var r=xu();let i;var s=je(r);nc(s);var o=ke(s,2),a=ke(o,2),l=je(a,!0);He(a),He(r),on(()=>{i=pi(r,1,"switch svelte-184lr04",null,i,{disabled:t.disabled}),gt(s,"id",t.id),s.disabled=t.disabled,gt(o,"for",t.id),cr(l,t.label)}),sc(s,n),ht(e,r),Lr()}var ku=Mn("<div></div>"),Au=Mn("<div></div>"),Ou=Yo(`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
8
+ 512q0 53.00224-37.49888 90.50112t-90.50112
9
+ 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
10
+ 37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0
11
+ 90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888
12
+ 90.50112t-90.50112
13
+ 37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
14
+ 37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424
15
+ 0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928
16
+ 30.16704t30.16704 12.4928 30.16704-12.4928
17
+ 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
18
+ 213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
19
+ 17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
20
+ 12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z"></path></svg>`),Iu=Yo(`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><path d="M170.65984 896l0-768 640 384zM644.66944
21
+ 512l-388.66944-233.32864 0 466.65728z"></path></svg>`),Fu=Mn("<button> </button>"),Pu=Mn(`<div class="rr-controller svelte-14v7dbr"><div class="rr-timeline svelte-14v7dbr"><span class="rr-timeline__time svelte-14v7dbr"> </span> <div role="slider" tabindex="0"><div class="rr-progress__step svelte-14v7dbr"></div> <!> <!> <div class="rr-progress__handler svelte-14v7dbr"></div></div> <span class="rr-timeline__time svelte-14v7dbr"> </span></div> <div class="rr-controller__btns svelte-14v7dbr"><button class="svelte-14v7dbr"><!></button> <!> <!> <button aria-label="fullscreen" class="svelte-14v7dbr"><svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
22
+ 18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
23
+ 0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
24
+ 224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
25
+ 48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
26
+ 48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
27
+ 68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg></button></div></div>`);function Lu(e,t){Pr(t,!0);let n=ye(t,"skipInactive",15),r=ye(t,"speed",31,()=>Dt(t.speedOption.length?t.speedOption[0]:1)),i=ye(t,"tags",19,()=>({})),s=de(0);Fn(()=>{t.onuiupdatecurrenttime?.({payload:b(s)})});let o=null,a=de("paused");Fn(()=>{t.onuiupdateplayerstate?.({payload:b(a)})});let l=de("normal"),c=de(void 0),u,f=!1,h=null,d=null,m=de(Dt(t.replayer.getMetaData())),E=Wt(()=>Math.min(1,b(s)/b(m).totalTime)),y=Wt(()=>`${100*b(E)}%`);Fn(()=>{t.onuiupdateprogress?.({payload:b(E)})});function v(_,g,N){let D=g-_;return(100-(g-N)/D*100).toFixed(2)}let w=Wt(()=>{let{context:_}=t.replayer.service.state,g=_.events.length,N=_.events[0].timestamp,D=_.events[g-1].timestamp,U=[];return _.events.forEach(O=>{if(O.type===J.Custom){let K={name:O.data.tag,background:i()[O.data.tag]||"rgb(73, 80, 246)",position:`${v(N,D,O.timestamp)}%`};U.push(K)}}),U}),S=Wt(()=>{try{let{context:_}=t.replayer.service.state,g=_.events.length,N=_.events[0].timestamp,D=_.events[g-1].timestamp,U=Cu(_.events,t.replayer.config.inactivePeriodThreshold),O=(K,ze,Se,R)=>{let V=ze-K;return((R-Se)/V*100).toFixed(2)};return U.map(K=>({name:"inactive period",background:t.inactiveColor,position:`${v(N,D,K[0])}%`,width:`${O(N,D,K[0],K[1])}%`}))}catch{return[]}}),T=()=>{C();function _(){te(s,t.replayer.getCurrentTime(),!0),f&&b(s)>=f&&(d?Z(d.start,d.end,!0,void 0):(t.replayer.pause(),h&&(h(),h=null))),b(s)<b(m).totalTime&&(o=requestAnimationFrame(_))}o=requestAnimationFrame(_)},C=()=>{o&&(cancelAnimationFrame(o),o=null)},G=()=>{switch(b(a)){case"playing":A();break;case"paused":X();break}},X=()=>{b(a)==="paused"&&(u?(t.replayer.play(),u=!1):t.replayer.play(b(s)))},A=()=>{b(a)==="playing"&&(t.replayer.pause(),f=!1)},ne=(_,g)=>{te(s,_,!0),f=!1,u=!1,(typeof g=="boolean"?g:b(a)==="playing")?t.replayer.play(_):t.replayer.pause(_)},Z=(_,g,N=!1,D=void 0)=>{N?d={start:_,end:g}:d=null,te(s,_,!0),f=g,h=D||null,t.replayer.play(_)},fe=_=>{if(b(l)==="skipping")return;let g=b(c).getBoundingClientRect(),D=(_.clientX-g.left)/g.width;D<0?D=0:D>1&&(D=1);let U=b(m).totalTime*D;ne(U)},me=_=>{b(l)!=="skipping"&&(_.key==="ArrowLeft"?ne(b(s)-5):_.key==="ArrowRight"&&ne(b(s)+5))},se=_=>{let g=b(a)==="playing";r(_),g&&t.replayer.pause(),t.replayer.setConfig({speed:r()}),g&&t.replayer.play(b(s))},xe=()=>{n(!n())},Je=()=>Promise.resolve().then(()=>{te(m,t.replayer.getMetaData(),!0)});Ki(()=>{te(a,t.replayer.service.state.value,!0),te(l,t.replayer.speedService.state.value,!0),t.replayer.on("state-change",_=>{let{player:g,speed:N}=_;if(g?.value&&b(a)!==g.value)switch(te(a,g.value,!0),b(a)){case"playing":T();break;case"paused":C();break}N?.value&&b(l)!==N.value&&te(l,N.value,!0)}),t.replayer.on("finish",()=>{u=!0,h&&(h(),h=null)}),t.autoPlay&&t.replayer.play()}),Fn(()=>{n()!==t.replayer.config.skipInactive&&t.replayer.setConfig({skipInactive:n()})}),qo(()=>{t.replayer.pause(),C()});var ce={toggle:G,play:X,pause:A,goto:ne,playRange:Z,setSpeed:se,toggleSkipInactive:xe,triggerUpdateMeta:Je},q=Vl(),Ve=cl(q);{var Ze=_=>{var g=Pu(),N=je(g),D=je(N),U=je(D,!0);He(D);var O=ke(D,2);let K;gt(O,"aria-valuemin",0);var ze=je(O),Se=ke(ze,2);Gr(Se,17,()=>b(S),zr,(oe,ee)=>{var ve=ku();on(()=>{gt(ve,"title",b(ee).name),ln(ve,`width: ${b(ee).width??""};height: 4px;position: absolute;background: ${b(ee).background??""};left:
28
+ ${b(ee).position??""};`)}),ht(oe,ve)});var R=ke(Se,2);Gr(R,17,()=>b(w),zr,(oe,ee)=>{var ve=Au();on(()=>{gt(ve,"title",b(ee).name),ln(ve,`width: 10px;height: 5px;position: absolute;top:
29
+ 2px;transform: translate(-50%, -50%);background: ${b(ee).background??""};left:
30
+ ${b(ee).position??""};`)}),ht(oe,ve)});var V=ke(R,2);He(O),ur(O,oe=>te(c,oe),()=>b(c));var $e=ke(O,2),at=je($e,!0);He($e),He(N);var Dn=ke(N,2),er=je(Dn),_a=je(er);{var wa=oe=>{var ee=Ou();ht(oe,ee)},ba=oe=>{var ee=Iu();ht(oe,ee)};hi(_a,oe=>{b(a)==="playing"?oe(wa):oe(ba,-1)})}He(er);var $i=ke(er,2);Gr($i,17,()=>t.speedOption,zr,(oe,ee)=>{var ve=Fu();let ts;var Sa=je(ve);He(ve),on(()=>{ve.disabled=b(l)==="skipping",ts=pi(ve,1,"svelte-14v7dbr",null,ts,{active:b(ee)===r()&&b(l)!=="skipping"}),cr(Sa,`${b(ee)??""}x`)}),Tn("click",ve,()=>se(b(ee))),ht(oe,ve)});var es=ke($i,2);{let oe=Wt(()=>b(l)==="skipping");Ru(es,{id:"skip",get disabled(){return b(oe)},label:"skip inactive",get checked(){return n()},set checked(ee){n(ee)}})}var Ea=ke(es,2);He(Dn),He(g),on((oe,ee)=>{cr(U,oe),K=pi(O,1,"rr-progress svelte-14v7dbr",null,K,{disabled:b(l)==="skipping"}),gt(O,"aria-valuenow",b(s)),gt(O,"aria-valuemax",b(m).totalTime),ln(ze,`width: ${b(y)??""}`),ln(V,`left: ${b(y)??""}`),cr(at,ee)},[()=>Us(b(s)),()=>Us(b(m).totalTime)]),Tn("click",O,fe),Tn("keydown",O,me),Tn("click",er,G),Tn("click",Ea,()=>t.onfullscreen?.()),ht(_,g)};hi(Ve,_=>{t.showController&&_(Ze)})}return ht(e,q),Lr(ce)}Ll(["click","keydown"]);var Wu=Mn('<div class="rr-player"><div class="rr-player__frame"></div> <!></div>');function Uu(e,t){Pr(t,!0);let n=ye(t,"width",15,1024),r=ye(t,"height",15,576),i=ye(t,"maxScale",3,1),s=ye(t,"skipInactive",7,!0),o=ye(t,"autoPlay",3,!0),a=ye(t,"speedOption",19,()=>[1,2,4,8]),l=ye(t,"speed",3,1),c=ye(t,"showController",3,!0),u=ye(t,"tags",19,()=>({})),f=ye(t,"inactiveColor",3,"#D4D4D4"),h=ac(t,["$$slots","$$events","$$legacy","width","height","maxScale","events","skipInactive","autoPlay","speedOption","speed","showController","tags","inactiveColor"]),d=de(void 0),m=()=>b(d).getMirror(),E=80,y,v,w,S=n(),T=r(),C=de(void 0),G=Wt(()=>Ls({width:`${n()}px`,height:`${r()}px`})),X=Wt(()=>Ls({width:`${n()}px`,height:`${r()+(c()?E:0)}px`})),A=(R,V)=>{let $e=n()/V.width,at=r()/V.height,Dn=[$e,at];i()&&Dn.push(i()),R.style.transform=`scale(${Math.min(...Dn)})translate(-50%, -50%)`},ne=()=>{A(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight})},Z=()=>{y&&(Bs()?Mu():Nu(y))},fe={},me=(R,V)=>{switch(b(d).on(R,V),R){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":fe[R]||(fe[R]=[]),fe[R].push(V)}};function se(R,V){if(fe[R])for(let $e of fe[R])$e(V)}let xe=R=>{b(d).addEvent(R),b(C).triggerUpdateMeta()},Je=()=>b(d).getMetaData(),ce=()=>b(d),q=()=>{b(C).toggle()},Ve=R=>{b(C).setSpeed(R)},Ze=()=>{b(C).toggleSkipInactive()},_=()=>{b(C).play()},g=()=>{b(C).pause()},N=(R,V)=>{b(C).goto(R,V)},D=(R,V,$e=!1,at=void 0)=>{b(C).playRange(R,V,$e,at)};Ki(()=>{if(a()!==void 0&&Vs(a())!=="array")throw new Error("speedOption must be array");if(a().forEach(R=>{if(Vs(R)!=="number")throw new Error("item of speedOption must be number")}),a().indexOf(l())<0)throw new Error(`speed must be one of speedOption,
31
+ current config:
32
+ {
33
+ ...
34
+ speed: ${l()},
35
+ speedOption: [${a().toString()}]
36
+ ...
37
+ }
38
+ `);te(d,new Ci(t.events,{speed:l(),skipInactive:s(),root:v,unpackFn:Su,...h}),!0),b(d).on("resize",R=>{A(b(d).wrapper,R)}),w=Du(()=>{Bs()?setTimeout(()=>{S=n(),T=r(),n(y.offsetWidth),r(y.offsetHeight-(c()?E:0)),A(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight})},0):(n(S),r(T),A(b(d).wrapper,{width:b(d).iframe.offsetWidth,height:b(d).iframe.offsetHeight}))})}),qo(()=>{w&&w()});var U={getMirror:m,triggerResize:ne,toggleFullscreen:Z,addEventListener:me,addEvent:xe,getMetaData:Je,getReplayer:ce,toggle:q,setSpeed:Ve,toggleSkipInactive:Ze,play:_,pause:g,goto:N,playRange:D},O=Wu(),K=je(O);ur(K,R=>v=R,()=>v);var ze=ke(K,2);{var Se=R=>{ur(Lu(R,{get replayer(){return b(d)},get showController(){return c()},get autoPlay(){return o()},get speedOption(){return a()},get tags(){return u()},get inactiveColor(){return f()},onfullscreen:()=>Z(),onuiupdatecurrenttime:V=>se("ui-update-current-time",V),onuiupdateprogress:V=>se("ui-update-progress",V),onuiupdateplayerstate:V=>se("ui-update-player-state",V),get skipInactive(){return s()},set skipInactive(V){s(V)}}),V=>te(C,V,!0),()=>b(C))};hi(ze,R=>{b(d)&&R(Se)})}return He(O),ur(O,R=>y=R,()=>y),on(()=>{ln(O,b(X)),ln(K,b(G))}),ht(e,O),Lr(U)}var Bu=jl(Uu),kr=class extends Bu{constructor(t){super({target:t.target,props:t.data||t.props})}};exports.Player=kr;exports.default=kr;
39
+ /*! *****************************************************************************
40
+ Copyright (c) Microsoft Corporation.
41
+
42
+ Permission to use, copy, modify, and/or distribute this software for any
43
+ purpose with or without fee is hereby granted.
44
+
45
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
46
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
47
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
48
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
49
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
50
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
51
+ PERFORMANCE OF THIS SOFTWARE.
52
+ ***************************************************************************** */
53
+ ;if (typeof module.exports == "object" && typeof exports == "object") {
54
+ var __cp = (to, from, except, desc) => {
55
+ if ((from && typeof from === "object") || typeof from === "function") {
56
+ for (let key of Object.getOwnPropertyNames(from)) {
57
+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
58
+ Object.defineProperty(to, key, {
59
+ get: () => from[key],
60
+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
61
+ });
62
+ }
63
+ }
64
+ return to;
65
+ };
66
+ module.exports = __cp(module.exports, exports);
67
+ }
68
+ return module.exports;
69
+ }))
70
+ //# sourceMappingURL=rrweb-player.umd.min.cjs.map