@checksum-ai/runtime 1.1.9 → 1.1.12-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/checksumlib.js CHANGED
@@ -1,3 +1,104 @@
1
- /*! For license information please see main.6e41703c.js.LICENSE.txt */
2
- !function(){var e={603:function(e,t,n){"use strict";n.d(t,{v:function(){return i}});var r={queryParams:void 0},i=function(){return r.queryParams||(r.queryParams=Object.fromEntries(new URLSearchParams(window.location.search).entries())),r.queryParams}},9498:function(e,t,n){"use strict";n.d(t,{EI:function(){return r},i7:function(){return i}});var r=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),i=function(e){return e.Element="element",e.Parent="parent",e.Child="child",e.LeftSibling="left-sibling",e.RightSibling="right-sibling",e}({})},5829:function(e,t,n){"use strict";n.d(t,{$:function(){return r}});var r=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.GetMoreItems="get_more_items",e.Wait="wait",e.SwitchTab="switch_tab",e.CustomCode="custom_code",e}({})},9478:function(e,t,n){"use strict";n.d(t,{De:function(){return o},hj:function(){return i},pR:function(){return r}});var r=function(e){return e.Script="script",e.App="app",e}({}),i=function(e){return e.TodoListApp="todo",e.ReplayerApp="replayer",e.SessionGraphApp="sessiongraph",e}({}),o={appType:"script",testAppName:"sessiongraph"}},6301:function(e){e.exports=function(e){return new Promise((function(t){return setTimeout(t,e)}))}},763:function(e,t,n){var r;e=n.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,c=32,l=64,d=128,f=256,h=1/0,p=9007199254740991,v=NaN,m=4294967295,g=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",c],["partialRight",l],["rearg",f]],y="[object Arguments]",b="[object Array]",w="[object Boolean]",k="[object Date]",S="[object Error]",E="[object Function]",x="[object GeneratorFunction]",I="[object Map]",C="[object Number]",M="[object Object]",T="[object Promise]",_="[object RegExp]",A="[object Set]",N="[object String]",R="[object Symbol]",D="[object WeakMap]",O="[object ArrayBuffer]",L="[object DataView]",Z="[object Float32Array]",F="[object Float64Array]",P="[object Int8Array]",j="[object Int16Array]",V="[object Int32Array]",B="[object Uint8Array]",H="[object Uint8ClampedArray]",W="[object Uint16Array]",U="[object Uint32Array]",z=/\b__p \+= '';/g,q=/\b(__p \+=) '' \+/g,G=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Q=/[&<>"']/g,Y=RegExp($.source),X=RegExp(Q.source),K=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ne=/^\w*$/,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ue=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ce=/\{\n\/\* \[wrapped with (.+)\] \*/,le=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fe=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ve=/\w*$/,me=/^[-+]0x[0-9a-f]+$/i,ge=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,be=/^0o[0-7]+$/i,we=/^(?:0|[1-9]\d*)$/,ke=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Se=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,xe="\\ud800-\\udfff",Ie="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",_e="\\ufe0e\\ufe0f",Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ne="['\u2019]",Re="["+xe+"]",De="["+Ae+"]",Oe="["+Ie+"]",Le="\\d+",Ze="["+Ce+"]",Fe="["+Me+"]",Pe="[^"+xe+Ae+Le+Ce+Me+Te+"]",je="\\ud83c[\\udffb-\\udfff]",Ve="[^"+xe+"]",Be="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",We="["+Te+"]",Ue="\\u200d",ze="(?:"+Fe+"|"+Pe+")",qe="(?:"+We+"|"+Pe+")",Ge="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",$e="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Oe+"|"+je+")"+"?",Ye="["+_e+"]?",Xe=Ye+Qe+("(?:"+Ue+"(?:"+[Ve,Be,He].join("|")+")"+Ye+Qe+")*"),Ke="(?:"+[Ze,Be,He].join("|")+")"+Xe,Je="(?:"+[Ve+Oe+"?",Oe,Be,He,Re].join("|")+")",et=RegExp(Ne,"g"),tt=RegExp(Oe,"g"),nt=RegExp(je+"(?="+je+")|"+Je+Xe,"g"),rt=RegExp([We+"?"+Fe+"+"+Ge+"(?="+[De,We,"$"].join("|")+")",qe+"+"+$e+"(?="+[De,We+ze,"$"].join("|")+")",We+"?"+ze+"+"+Ge,We+"+"+$e,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Le,Ke].join("|"),"g"),it=RegExp("["+Ue+xe+Ie+_e+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ut={};ut[Z]=ut[F]=ut[P]=ut[j]=ut[V]=ut[B]=ut[H]=ut[W]=ut[U]=!0,ut[y]=ut[b]=ut[O]=ut[w]=ut[L]=ut[k]=ut[S]=ut[E]=ut[I]=ut[C]=ut[M]=ut[_]=ut[A]=ut[N]=ut[D]=!1;var ct={};ct[y]=ct[b]=ct[O]=ct[L]=ct[w]=ct[k]=ct[Z]=ct[F]=ct[P]=ct[j]=ct[V]=ct[I]=ct[C]=ct[M]=ct[_]=ct[A]=ct[N]=ct[R]=ct[B]=ct[H]=ct[W]=ct[U]=!0,ct[S]=ct[E]=ct[D]=!1;var lt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,ft=parseInt,ht="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,pt="object"==typeof self&&self&&self.Object===Object&&self,vt=ht||pt||Function("return this")(),mt=t&&!t.nodeType&&t,gt=mt&&e&&!e.nodeType&&e,yt=gt&&gt.exports===mt,bt=yt&&ht.process,wt=function(){try{var e=gt&&gt.require&&gt.require("util").types;return e||bt&&bt.binding&&bt.binding("util")}catch(t){}}(),kt=wt&&wt.isArrayBuffer,St=wt&&wt.isDate,Et=wt&&wt.isMap,xt=wt&&wt.isRegExp,It=wt&&wt.isSet,Ct=wt&&wt.isTypedArray;function Mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Tt(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function _t(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function At(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Nt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Rt(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Dt(e,t){return!!(null==e?0:e.length)&&Wt(e,t,0)>-1}function Ot(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Lt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Zt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Ft(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function Pt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function jt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Vt=Gt("length");function Bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function Ht(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function Wt(e,t,n){return t===t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Ht(e,zt,n)}function Ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function zt(e){return e!==e}function qt(e,t){var n=null==e?0:e.length;return n?Yt(e,t)/n:v}function Gt(e){return function(t){return null==t?i:t[e]}}function $t(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Yt(e,t){for(var n,r=-1,o=e.length;++r<o;){var a=t(e[r]);a!==i&&(n=n===i?a:n+a)}return n}function Xt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Kt(e){return e?e.slice(0,mn(e)+1).replace(ae,""):e}function Jt(e){return function(t){return e(t)}}function en(e,t){return Lt(t,(function(t){return e[t]}))}function tn(e,t){return e.has(t)}function nn(e,t){for(var n=-1,r=e.length;++n<r&&Wt(t,e[n],0)>-1;);return n}function rn(e,t){for(var n=e.length;n--&&Wt(t,e[n],0)>-1;);return n}var on=$t({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),an=$t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function sn(e){return"\\"+lt[e]}function un(e){return it.test(e)}function cn(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function ln(e,t){return function(n){return e(t(n))}}function dn(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function fn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function hn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function pn(e){return un(e)?function(e){var t=nt.lastIndex=0;for(;nt.test(e);)++t;return t}(e):Vt(e)}function vn(e){return un(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.split("")}(e)}function mn(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var gn=$t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yn=function e(t){var n=(t=null==t?vt:yn.defaults(vt.Object(),t,yn.pick(vt,at))).Array,r=t.Date,se=t.Error,xe=t.Function,Ie=t.Math,Ce=t.Object,Me=t.RegExp,Te=t.String,_e=t.TypeError,Ae=n.prototype,Ne=xe.prototype,Re=Ce.prototype,De=t["__core-js_shared__"],Oe=Ne.toString,Le=Re.hasOwnProperty,Ze=0,Fe=function(){var e=/[^.]+$/.exec(De&&De.keys&&De.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Pe=Re.toString,je=Oe.call(Ce),Ve=vt._,Be=Me("^"+Oe.call(Le).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=yt?t.Buffer:i,We=t.Symbol,Ue=t.Uint8Array,ze=He?He.allocUnsafe:i,qe=ln(Ce.getPrototypeOf,Ce),Ge=Ce.create,$e=Re.propertyIsEnumerable,Qe=Ae.splice,Ye=We?We.isConcatSpreadable:i,Xe=We?We.iterator:i,Ke=We?We.toStringTag:i,Je=function(){try{var e=fo(Ce,"defineProperty");return e({},"",{}),e}catch(t){}}(),nt=t.clearTimeout!==vt.clearTimeout&&t.clearTimeout,it=r&&r.now!==vt.Date.now&&r.now,lt=t.setTimeout!==vt.setTimeout&&t.setTimeout,ht=Ie.ceil,pt=Ie.floor,mt=Ce.getOwnPropertySymbols,gt=He?He.isBuffer:i,bt=t.isFinite,wt=Ae.join,Vt=ln(Ce.keys,Ce),$t=Ie.max,bn=Ie.min,wn=r.now,kn=t.parseInt,Sn=Ie.random,En=Ae.reverse,xn=fo(t,"DataView"),In=fo(t,"Map"),Cn=fo(t,"Promise"),Mn=fo(t,"Set"),Tn=fo(t,"WeakMap"),_n=fo(Ce,"create"),An=Tn&&new Tn,Nn={},Rn=Po(xn),Dn=Po(In),On=Po(Cn),Ln=Po(Mn),Zn=Po(Tn),Fn=We?We.prototype:i,Pn=Fn?Fn.valueOf:i,jn=Fn?Fn.toString:i;function Vn(e){if(ts(e)&&!Ua(e)&&!(e instanceof Un)){if(e instanceof Wn)return e;if(Le.call(e,"__wrapped__"))return jo(e)}return new Wn(e)}var Bn=function(){function e(){}return function(t){if(!es(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function Hn(){}function Wn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Un(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=m,this.__views__=[]}function zn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Gn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $n(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Gn;++t<n;)this.add(e[t])}function Qn(e){var t=this.__data__=new qn(e);this.size=t.size}function Yn(e,t){var n=Ua(e),r=!n&&Wa(e),i=!n&&!r&&$a(e),o=!n&&!r&&!i&&cs(e),a=n||r||i||o,s=a?Xt(e.length,Te):[],u=s.length;for(var c in e)!t&&!Le.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||s.push(c);return s}function Xn(e){var t=e.length;return t?e[$r(0,t-1)]:i}function Kn(e,t){return Lo(_i(e),sr(t,0,e.length))}function Jn(e){return Lo(_i(e))}function er(e,t,n){(n!==i&&!Va(e[t],n)||n===i&&!(t in e))&&or(e,t,n)}function tr(e,t,n){var r=e[t];Le.call(e,t)&&Va(r,n)&&(n!==i||t in e)||or(e,t,n)}function nr(e,t){for(var n=e.length;n--;)if(Va(e[n][0],t))return n;return-1}function rr(e,t,n,r){return fr(e,(function(e,i,o){t(r,e,n(e),o)})),r}function ir(e,t){return e&&Ai(t,Ns(t),e)}function or(e,t,n){"__proto__"==t&&Je?Je(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ar(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:Cs(e,t[r]);return a}function sr(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ur(e,t,n,r,o,a){var s,u=1&t,c=2&t,l=4&t;if(n&&(s=o?n(e,r,o,a):n(e)),s!==i)return s;if(!es(e))return e;var d=Ua(e);if(d){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Le.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!u)return _i(e,s)}else{var f=vo(e),h=f==E||f==x;if($a(e))return Ei(e,u);if(f==M||f==y||h&&!o){if(s=c||h?{}:go(e),!u)return c?function(e,t){return Ai(e,po(e),t)}(e,function(e,t){return e&&Ai(t,Rs(t),e)}(s,e)):function(e,t){return Ai(e,ho(e),t)}(e,ir(s,e))}else{if(!ct[f])return o?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case O:return xi(e);case w:case k:return new r(+e);case L:return function(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case Z:case F:case P:case j:case V:case B:case H:case W:case U:return Ii(e,n);case I:return new r;case C:case N:return new r(e);case _:return function(e){var t=new e.constructor(e.source,ve.exec(e));return t.lastIndex=e.lastIndex,t}(e);case A:return new r;case R:return i=e,Pn?Ce(Pn.call(i)):{}}var i}(e,f,u)}}a||(a=new Qn);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(r){s.add(ur(r,t,n,r,e,a))})):ns(e)&&e.forEach((function(r,i){s.set(i,ur(r,t,n,i,e,a))}));var v=d?i:(l?c?io:ro:c?Rs:Ns)(e);return _t(v||e,(function(r,i){v&&(r=e[i=r]),tr(s,i,ur(r,t,n,i,e,a))})),s}function cr(e,t,n){var r=n.length;if(null==e)return!r;for(e=Ce(e);r--;){var o=n[r],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function lr(e,t,n){if("function"!=typeof e)throw new _e(o);return No((function(){e.apply(i,n)}),t)}function dr(e,t,n,r){var i=-1,o=Dt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;n&&(t=Lt(t,Jt(n))),r?(o=Ot,a=!1):t.length>=200&&(o=tn,a=!1,t=new $n(t));e:for(;++i<s;){var l=e[i],d=null==n?l:n(l);if(l=r||0!==l?l:0,a&&d===d){for(var f=c;f--;)if(t[f]===d)continue e;u.push(l)}else o(t,d,r)||u.push(l)}return u}Vn.templateSettings={escape:K,evaluate:J,interpolate:ee,variable:"",imports:{_:Vn}},Vn.prototype=Hn.prototype,Vn.prototype.constructor=Vn,Wn.prototype=Bn(Hn.prototype),Wn.prototype.constructor=Wn,Un.prototype=Bn(Hn.prototype),Un.prototype.constructor=Un,zn.prototype.clear=function(){this.__data__=_n?_n(null):{},this.size=0},zn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},zn.prototype.get=function(e){var t=this.__data__;if(_n){var n=t[e];return n===a?i:n}return Le.call(t,e)?t[e]:i},zn.prototype.has=function(e){var t=this.__data__;return _n?t[e]!==i:Le.call(t,e)},zn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_n&&t===i?a:t,this},qn.prototype.clear=function(){this.__data__=[],this.size=0},qn.prototype.delete=function(e){var t=this.__data__,n=nr(t,e);return!(n<0)&&(n==t.length-1?t.pop():Qe.call(t,n,1),--this.size,!0)},qn.prototype.get=function(e){var t=this.__data__,n=nr(t,e);return n<0?i:t[n][1]},qn.prototype.has=function(e){return nr(this.__data__,e)>-1},qn.prototype.set=function(e,t){var n=this.__data__,r=nr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Gn.prototype.clear=function(){this.size=0,this.__data__={hash:new zn,map:new(In||qn),string:new zn}},Gn.prototype.delete=function(e){var t=co(this,e).delete(e);return this.size-=t?1:0,t},Gn.prototype.get=function(e){return co(this,e).get(e)},Gn.prototype.has=function(e){return co(this,e).has(e)},Gn.prototype.set=function(e,t){var n=co(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(e){return this.__data__.set(e,a),this},$n.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.clear=function(){this.__data__=new qn,this.size=0},Qn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Qn.prototype.get=function(e){return this.__data__.get(e)},Qn.prototype.has=function(e){return this.__data__.has(e)},Qn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!In||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Gn(r)}return n.set(e,t),this.size=n.size,this};var fr=Di(wr),hr=Di(kr,!0);function pr(e,t){var n=!0;return fr(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function vr(e,t,n){for(var r=-1,o=e.length;++r<o;){var a=e[r],s=t(a);if(null!=s&&(u===i?s===s&&!us(s):n(s,u)))var u=s,c=a}return c}function mr(e,t){var n=[];return fr(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function gr(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=yo),i||(i=[]);++o<a;){var s=e[o];t>0&&n(s)?t>1?gr(s,t-1,n,r,i):Zt(i,s):r||(i[i.length]=s)}return i}var yr=Oi(),br=Oi(!0);function wr(e,t){return e&&yr(e,t,Ns)}function kr(e,t){return e&&br(e,t,Ns)}function Sr(e,t){return Rt(t,(function(t){return Xa(e[t])}))}function Er(e,t){for(var n=0,r=(t=bi(t,e)).length;null!=e&&n<r;)e=e[Fo(t[n++])];return n&&n==r?e:i}function xr(e,t,n){var r=t(e);return Ua(e)?r:Zt(r,n(e))}function Ir(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ke&&Ke in Ce(e)?function(e){var t=Le.call(e,Ke),n=e[Ke];try{e[Ke]=i;var r=!0}catch(a){}var o=Pe.call(e);r&&(t?e[Ke]=n:delete e[Ke]);return o}(e):function(e){return Pe.call(e)}(e)}function Cr(e,t){return e>t}function Mr(e,t){return null!=e&&Le.call(e,t)}function Tr(e,t){return null!=e&&t in Ce(e)}function _r(e,t,r){for(var o=r?Ot:Dt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,d=[];u--;){var f=e[u];u&&t&&(f=Lt(f,Jt(t))),l=bn(f.length,l),c[u]=!r&&(t||a>=120&&f.length>=120)?new $n(u&&f):i}f=e[0];var h=-1,p=c[0];e:for(;++h<a&&d.length<l;){var v=f[h],m=t?t(v):v;if(v=r||0!==v?v:0,!(p?tn(p,m):o(d,m,r))){for(u=s;--u;){var g=c[u];if(!(g?tn(g,m):o(e[u],m,r)))continue e}p&&p.push(m),d.push(v)}}return d}function Ar(e,t,n){var r=null==(e=To(e,t=bi(t,e)))?e:e[Fo(Yo(t))];return null==r?i:Mt(r,e,n)}function Nr(e){return ts(e)&&Ir(e)==y}function Rr(e,t,n,r,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,n,r,o,a){var s=Ua(e),u=Ua(t),c=s?b:vo(e),l=u?b:vo(t),d=(c=c==y?M:c)==M,f=(l=l==y?M:l)==M,h=c==l;if(h&&$a(e)){if(!$a(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Qn),s||cs(e)?to(e,t,n,r,o,a):function(e,t,n,r,i,o,a){switch(n){case L:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case O:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case w:case k:case C:return Va(+e,+t);case S:return e.name==t.name&&e.message==t.message;case _:case N:return e==t+"";case I:var s=cn;case A:var u=1&r;if(s||(s=fn),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;r|=2,a.set(e,t);var l=to(s(e),s(t),r,i,o,a);return a.delete(e),l;case R:if(Pn)return Pn.call(e)==Pn.call(t)}return!1}(e,t,c,n,r,o,a);if(!(1&n)){var p=d&&Le.call(e,"__wrapped__"),v=f&&Le.call(t,"__wrapped__");if(p||v){var m=p?e.value():e,g=v?t.value():t;return a||(a=new Qn),o(m,g,n,r,a)}}if(!h)return!1;return a||(a=new Qn),function(e,t,n,r,o,a){var s=1&n,u=ro(e),c=u.length,l=ro(t),d=l.length;if(c!=d&&!s)return!1;var f=c;for(;f--;){var h=u[f];if(!(s?h in t:Le.call(t,h)))return!1}var p=a.get(e),v=a.get(t);if(p&&v)return p==t&&v==e;var m=!0;a.set(e,t),a.set(t,e);var g=s;for(;++f<c;){var y=e[h=u[f]],b=t[h];if(r)var w=s?r(b,y,h,t,e,a):r(y,b,h,e,t,a);if(!(w===i?y===b||o(y,b,n,r,a):w)){m=!1;break}g||(g="constructor"==h)}if(m&&!g){var k=e.constructor,S=t.constructor;k==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof k&&k instanceof k&&"function"==typeof S&&S instanceof S||(m=!1)}return a.delete(e),a.delete(t),m}(e,t,n,r,o,a)}(e,t,n,r,Rr,o))}function Dr(e,t,n,r){var o=n.length,a=o,s=!r;if(null==e)return!a;for(e=Ce(e);o--;){var u=n[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=n[o])[0],l=e[c],d=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var f=new Qn;if(r)var h=r(l,d,c,e,t,f);if(!(h===i?Rr(d,l,3,r,f):h))return!1}}return!0}function Or(e){return!(!es(e)||(t=e,Fe&&Fe in t))&&(Xa(e)?Be:ye).test(Po(e));var t}function Lr(e){return"function"==typeof e?e:null==e?ru:"object"==typeof e?Ua(e)?Br(e[0],e[1]):Vr(e):fu(e)}function Zr(e){if(!xo(e))return Vt(e);var t=[];for(var n in Ce(e))Le.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Fr(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var n in Ce(e))t.push(n);return t}(e);var t=xo(e),n=[];for(var r in e)("constructor"!=r||!t&&Le.call(e,r))&&n.push(r);return n}function Pr(e,t){return e<t}function jr(e,t){var r=-1,i=qa(e)?n(e.length):[];return fr(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Vr(e){var t=lo(e);return 1==t.length&&t[0][2]?Co(t[0][0],t[0][1]):function(n){return n===e||Dr(n,e,t)}}function Br(e,t){return ko(e)&&Io(t)?Co(Fo(e),t):function(n){var r=Cs(n,e);return r===i&&r===t?Ms(n,e):Rr(t,r,3)}}function Hr(e,t,n,r,o){e!==t&&yr(t,(function(a,s){if(o||(o=new Qn),es(a))!function(e,t,n,r,o,a,s){var u=_o(e,n),c=_o(t,n),l=s.get(c);if(l)return void er(e,n,l);var d=a?a(u,c,n+"",e,t,s):i,f=d===i;if(f){var h=Ua(c),p=!h&&$a(c),v=!h&&!p&&cs(c);d=c,h||p||v?Ua(u)?d=u:Ga(u)?d=_i(u):p?(f=!1,d=Ei(c,!0)):v?(f=!1,d=Ii(c,!0)):d=[]:is(c)||Wa(c)?(d=u,Wa(u)?d=gs(u):es(u)&&!Xa(u)||(d=go(c))):f=!1}f&&(s.set(c,d),o(d,c,r,a,s),s.delete(c));er(e,n,d)}(e,t,s,n,Hr,r,o);else{var u=r?r(_o(e,s),a,s+"",e,t,o):i;u===i&&(u=a),er(e,s,u)}}),Rs)}function Wr(e,t){var n=e.length;if(n)return bo(t+=t<0?n:0,n)?e[t]:i}function Ur(e,t,n){t=t.length?Lt(t,(function(e){return Ua(e)?function(t){return Er(t,1===e.length?e[0]:e)}:e})):[ru];var r=-1;t=Lt(t,Jt(uo()));var i=jr(e,(function(e,n,i){var o=Lt(t,(function(t){return t(e)}));return{criteria:o,index:++r,value:e}}));return function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(i,(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,a=i.length,s=n.length;for(;++r<a;){var u=Ci(i[r],o[r]);if(u)return r>=s?u:u*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}))}function zr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=Er(e,a);n(s,a)&&Jr(o,bi(a,e),s)}return o}function qr(e,t,n,r){var i=r?Ut:Wt,o=-1,a=t.length,s=e;for(e===t&&(t=_i(t)),n&&(s=Lt(e,Jt(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;(u=i(s,l,u,r))>-1;)s!==e&&Qe.call(s,u,1),Qe.call(e,u,1);return e}function Gr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;bo(i)?Qe.call(e,i,1):di(e,i)}}return e}function $r(e,t){return e+pt(Sn()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>p)return n;do{t%2&&(n+=e),(t=pt(t/2))&&(e+=e)}while(t);return n}function Yr(e,t){return Ro(Mo(e,t,ru),e+"")}function Xr(e){return Xn(Vs(e))}function Kr(e,t){var n=Vs(e);return Lo(n,sr(t,0,n.length))}function Jr(e,t,n,r){if(!es(e))return e;for(var o=-1,a=(t=bi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var d=u[c];(l=r?r(d,c,u):i)===i&&(l=es(d)?d:bo(t[o+1])?[]:{})}tr(u,c,l),u=u[c]}return e}var ei=An?function(e,t){return An.set(e,t),e}:ru,ti=Je?function(e,t){return Je(e,"toString",{configurable:!0,enumerable:!1,value:eu(t),writable:!0})}:ru;function ni(e){return Lo(Vs(e))}function ri(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var n;return fr(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function oi(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!us(a)&&(n?a<=t:a<t)?r=o+1:i=o}return i}return ai(e,t,ru,n)}function ai(e,t,n,r){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!==t,u=null===t,c=us(t),l=t===i;o<a;){var d=pt((o+a)/2),f=n(e[d]),h=f!==i,p=null===f,v=f===f,m=us(f);if(s)var g=r||v;else g=l?v&&(r||h):u?v&&h&&(r||!p):c?v&&h&&!p&&(r||!m):!p&&!m&&(r?f<=t:f<t);g?o=d+1:a=d}return bn(a,4294967294)}function si(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n],s=t?t(a):a;if(!n||!Va(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ui(e){return"number"==typeof e?e:us(e)?v:+e}function ci(e){if("string"==typeof e)return e;if(Ua(e))return Lt(e,ci)+"";if(us(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function li(e,t,n){var r=-1,i=Dt,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Ot;else if(o>=200){var c=t?null:Qi(e);if(c)return fn(c);a=!1,i=tn,u=new $n}else u=t?[]:s;e:for(;++r<o;){var l=e[r],d=t?t(l):l;if(l=n||0!==l?l:0,a&&d===d){for(var f=u.length;f--;)if(u[f]===d)continue e;t&&u.push(d),s.push(l)}else i(u,d,n)||(u!==s&&u.push(d),s.push(l))}return s}function di(e,t){return null==(e=To(e,t=bi(t,e)))||delete e[Fo(Yo(t))]}function fi(e,t,n,r){return Jr(e,t,n(Er(e,t)),r)}function hi(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?ri(e,r?0:o,r?o+1:i):ri(e,r?o+1:0,r?i:o)}function pi(e,t){var n=e;return n instanceof Un&&(n=n.value()),Ft(t,(function(e,t){return t.func.apply(t.thisArg,Zt([e],t.args))}),n)}function vi(e,t,r){var i=e.length;if(i<2)return i?li(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=dr(a[o]||s,e[u],t,r));return li(gr(a,1),t,r)}function mi(e,t,n){for(var r=-1,o=e.length,a=t.length,s={};++r<o;){var u=r<a?t[r]:i;n(s,e[r],u)}return s}function gi(e){return Ga(e)?e:[]}function yi(e){return"function"==typeof e?e:ru}function bi(e,t){return Ua(e)?e:ko(e,t)?[e]:Zo(ys(e))}var wi=Yr;function ki(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:ri(e,t,n)}var Si=nt||function(e){return vt.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var n=e.length,r=ze?ze(n):new e.constructor(n);return e.copy(r),r}function xi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Ii(e,t){var n=t?xi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Ci(e,t){if(e!==t){var n=e!==i,r=null===e,o=e===e,a=us(e),s=t!==i,u=null===t,c=t===t,l=us(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!o)return 1;if(!r&&!a&&!l&&e<t||l&&n&&o&&!r&&!a||u&&n&&o||!s&&o||!c)return-1}return 0}function Mi(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=$t(a-s,0),d=n(c+l),f=!i;++u<c;)d[u]=t[u];for(;++o<s;)(f||o<a)&&(d[r[o]]=e[o]);for(;l--;)d[u++]=e[o++];return d}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,d=$t(a-u,0),f=n(d+l),h=!i;++o<d;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(h||o<a)&&(f[p+r[s]]=e[o++]);return f}function _i(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):i;c===i&&(c=e[u]),o?or(n,u,c):tr(n,u,c)}return n}function Ni(e,t){return function(n,r){var i=Ua(n)?Tt:rr,o=t?t():{};return i(n,e,uo(r,2),o)}}function Ri(e){return Yr((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:i,s=o>2?n[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&wo(n[0],n[1],s)&&(a=o<3?i:a,o=1),t=Ce(t);++r<o;){var u=n[r];u&&e(t,u,r,a)}return t}))}function Di(e,t){return function(n,r){if(null==n)return n;if(!qa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Ce(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function Oi(e){return function(t,n,r){for(var i=-1,o=Ce(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function Li(e){return function(t){var n=un(t=ys(t))?vn(t):i,r=n?n[0]:t.charAt(0),o=n?ki(n,1).join(""):t.slice(1);return r[e]()+o}}function Zi(e){return function(t){return Ft(Xs(Ws(t).replace(et,"")),e,"")}}function Fi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return es(r)?r:n}}function Pi(e){return function(t,n,r){var o=Ce(t);if(!qa(t)){var a=uo(n,3);t=Ns(t),n=function(e){return a(o[e],e,o)}}var s=e(t,n,r);return s>-1?o[a?t[s]:s]:i}}function ji(e){return no((function(t){var n=t.length,r=n,a=Wn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new _e(o);if(a&&!u&&"wrapper"==ao(s))var u=new Wn([],!0)}for(r=u?r:n;++r<n;){var c=ao(s=t[r]),l="wrapper"==c?oo(s):i;u=l&&So(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[ao(l[0])].apply(u,l[3]):1==s.length&&So(s)?u[c]():u.thru(s)}return function(){var e=arguments,r=e[0];if(u&&1==e.length&&Ua(r))return u.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Vi(e,t,r,o,a,s,u,c,l,f){var h=t&d,p=1&t,v=2&t,m=24&t,g=512&t,y=v?i:Fi(e);return function d(){for(var b=arguments.length,w=n(b),k=b;k--;)w[k]=arguments[k];if(m)var S=so(d),E=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,S);if(o&&(w=Mi(w,o,a,m)),s&&(w=Ti(w,s,u,m)),b-=E,m&&b<f){var x=dn(w,S);return Gi(e,t,Vi,d.placeholder,r,w,x,c,l,f-b)}var I=p?r:this,C=v?I[e]:e;return b=w.length,c?w=function(e,t){var n=e.length,r=bn(t.length,n),o=_i(e);for(;r--;){var a=t[r];e[r]=bo(a,n)?o[a]:i}return e}(w,c):g&&b>1&&w.reverse(),h&&l<b&&(w.length=l),this&&this!==vt&&this instanceof d&&(C=y||Fi(C)),C.apply(I,w)}}function Bi(e,t){return function(n,r){return function(e,t,n,r){return wr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function Hi(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;"string"==typeof n||"string"==typeof r?(n=ci(n),r=ci(r)):(n=ui(n),r=ui(r)),o=e(n,r)}return o}}function Wi(e){return no((function(t){return t=Lt(t,Jt(uo())),Yr((function(n){var r=this;return e(t,(function(e){return Mt(e,r,n)}))}))}))}function Ui(e,t){var n=(t=t===i?" ":ci(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,ht(e/pn(t)));return un(t)?ki(vn(r),0,e).join(""):r.slice(0,e)}function zi(e){return function(t,r,o){return o&&"number"!=typeof o&&wo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=$t(ht((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function qi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=ms(t),n=ms(n)),e(t,n)}}function Gi(e,t,n,r,o,a,s,u,d,f){var h=8&t;t|=h?c:l,4&(t&=~(h?l:c))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,u,d,f],v=n.apply(i,p);return So(e)&&Ao(v,p),v.placeholder=r,Do(v,e,t)}function $i(e){var t=Ie[e];return function(e,n){if(e=ms(e),(n=null==n?0:bn(ps(n),292))&&bt(e)){var r=(ys(e)+"e").split("e");return+((r=(ys(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Qi=Mn&&1/fn(new Mn([,-0]))[1]==h?function(e){return new Mn(e)}:uu;function Yi(e){return function(t){var n=vo(t);return n==I?cn(t):n==A?hn(t):function(e,t){return Lt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Xi(e,t,r,a,h,p,v,m){var g=2&t;if(!g&&"function"!=typeof e)throw new _e(o);var y=a?a.length:0;if(y||(t&=-97,a=h=i),v=v===i?v:$t(ps(v),0),m=m===i?m:ps(m),y-=h?h.length:0,t&l){var b=a,w=h;a=h=i}var k=g?i:oo(e),S=[e,t,r,a,h,b,w,p,v,m];if(k&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=r==d&&8==n||r==d&&n==f&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var u=t[3];if(u){var c=e[3];e[3]=c?Mi(c,u,t[4]):u,e[4]=c?dn(e[3],s):t[4]}(u=t[5])&&(c=e[5],e[5]=c?Ti(c,u,t[6]):u,e[6]=c?dn(e[5],s):t[6]);(u=t[7])&&(e[7]=u);r&d&&(e[8]=null==e[8]?t[8]:bn(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(S,k),e=S[0],t=S[1],r=S[2],a=S[3],h=S[4],!(m=S[9]=S[9]===i?g?0:e.length:$t(S[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==u?function(e,t,r){var o=Fi(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=so(a);c--;)u[c]=arguments[c];var d=s<3&&u[0]!==l&&u[s-1]!==l?[]:dn(u,l);return(s-=d.length)<r?Gi(e,t,Vi,a.placeholder,i,u,d,i,i,r-s):Mt(this&&this!==vt&&this instanceof a?o:e,this,u)}}(e,t,m):t!=c&&33!=t||h.length?Vi.apply(i,S):function(e,t,r,i){var o=1&t,a=Fi(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,d=n(l+u),f=this&&this!==vt&&this instanceof t?a:e;++c<l;)d[c]=i[c];for(;u--;)d[c++]=arguments[++s];return Mt(f,o?r:this,d)}}(e,t,r,a);else var E=function(e,t,n){var r=1&t,i=Fi(e);return function t(){return(this&&this!==vt&&this instanceof t?i:e).apply(r?n:this,arguments)}}(e,t,r);return Do((k?ei:Ao)(E,S),e,t)}function Ki(e,t,n,r){return e===i||Va(e,Re[n])&&!Le.call(r,n)?t:e}function Ji(e,t,n,r,o,a){return es(e)&&es(t)&&(a.set(t,e),Hr(e,t,i,Ji,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,n,r,o,a){var s=1&n,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),d=a.get(t);if(l&&d)return l==t&&d==e;var f=-1,h=!0,p=2&n?new $n:i;for(a.set(e,t),a.set(t,e);++f<u;){var v=e[f],m=t[f];if(r)var g=s?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(g!==i){if(g)continue;h=!1;break}if(p){if(!jt(t,(function(e,t){if(!tn(p,t)&&(v===e||o(v,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(v!==m&&!o(v,m,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function no(e){return Ro(Mo(e,i,zo),e+"")}function ro(e){return xr(e,Ns,ho)}function io(e){return xr(e,Rs,po)}var oo=An?function(e){return An.get(e)}:uu;function ao(e){for(var t=e.name+"",n=Nn[t],r=Le.call(Nn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Le.call(Vn,"placeholder")?Vn:e).placeholder}function uo(){var e=Vn.iteratee||iu;return e=e===iu?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function co(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function lo(e){for(var t=Ns(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Io(i)]}return t}function fo(e,t){var n=function(e,t){return null==e?i:e[t]}(e,t);return Or(n)?n:i}var ho=mt?function(e){return null==e?[]:(e=Ce(e),Rt(mt(e),(function(t){return $e.call(e,t)})))}:vu,po=mt?function(e){for(var t=[];e;)Zt(t,ho(e)),e=qe(e);return t}:vu,vo=Ir;function mo(e,t,n){for(var r=-1,i=(t=bi(t,e)).length,o=!1;++r<i;){var a=Fo(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Ja(i)&&bo(a,i)&&(Ua(e)||Wa(e))}function go(e){return"function"!=typeof e.constructor||xo(e)?{}:Bn(qe(e))}function yo(e){return Ua(e)||Wa(e)||!!(Ye&&e&&e[Ye])}function bo(e,t){var n=typeof e;return!!(t=null==t?p:t)&&("number"==n||"symbol"!=n&&we.test(e))&&e>-1&&e%1==0&&e<t}function wo(e,t,n){if(!es(n))return!1;var r=typeof t;return!!("number"==r?qa(n)&&bo(t,n.length):"string"==r&&t in n)&&Va(n[t],e)}function ko(e,t){if(Ua(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!us(e))||(ne.test(e)||!te.test(e)||null!=t&&e in Ce(t))}function So(e){var t=ao(e),n=Vn[t];if("function"!=typeof n||!(t in Un.prototype))return!1;if(e===n)return!0;var r=oo(n);return!!r&&e===r[0]}(xn&&vo(new xn(new ArrayBuffer(1)))!=L||In&&vo(new In)!=I||Cn&&vo(Cn.resolve())!=T||Mn&&vo(new Mn)!=A||Tn&&vo(new Tn)!=D)&&(vo=function(e){var t=Ir(e),n=t==M?e.constructor:i,r=n?Po(n):"";if(r)switch(r){case Rn:return L;case Dn:return I;case On:return T;case Ln:return A;case Zn:return D}return t});var Eo=De?Xa:mu;function xo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Io(e){return e===e&&!es(e)}function Co(e,t){return function(n){return null!=n&&(n[e]===t&&(t!==i||e in Ce(n)))}}function Mo(e,t,r){return t=$t(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=$t(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),Mt(e,this,u)}}function To(e,t){return t.length<2?e:Er(e,ri(t,0,-1))}function _o(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Ao=Oo(ei),No=lt||function(e,t){return vt.setTimeout(e,t)},Ro=Oo(ti);function Do(e,t,n){var r=t+"";return Ro(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ue,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return _t(g,(function(n){var r="_."+n[0];t&n[1]&&!Dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ce);return t?t[1].split(le):[]}(r),n)))}function Oo(e){var t=0,n=0;return function(){var r=wn(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Lo(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var a=$r(n,o),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}var Zo=function(e){var t=Oa(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,(function(e,n,r,i){t.push(r?i.replace(he,"$1"):n||e)})),t}));function Fo(e){if("string"==typeof e||us(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Po(e){if(null!=e){try{return Oe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function jo(e){if(e instanceof Un)return e.clone();var t=new Wn(e.__wrapped__,e.__chain__);return t.__actions__=_i(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Vo=Yr((function(e,t){return Ga(e)?dr(e,gr(t,1,Ga,!0)):[]})),Bo=Yr((function(e,t){var n=Yo(t);return Ga(n)&&(n=i),Ga(e)?dr(e,gr(t,1,Ga,!0),uo(n,2)):[]})),Ho=Yr((function(e,t){var n=Yo(t);return Ga(n)&&(n=i),Ga(e)?dr(e,gr(t,1,Ga,!0),i,n):[]}));function Wo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Ht(e,uo(t,3),i)}function Uo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=ps(n),o=n<0?$t(r+o,0):bn(o,r-1)),Ht(e,uo(t,3),o,!0)}function zo(e){return(null==e?0:e.length)?gr(e,1):[]}function qo(e){return e&&e.length?e[0]:i}var Go=Yr((function(e){var t=Lt(e,gi);return t.length&&t[0]===e[0]?_r(t):[]})),$o=Yr((function(e){var t=Yo(e),n=Lt(e,gi);return t===Yo(n)?t=i:n.pop(),n.length&&n[0]===e[0]?_r(n,uo(t,2)):[]})),Qo=Yr((function(e){var t=Yo(e),n=Lt(e,gi);return(t="function"==typeof t?t:i)&&n.pop(),n.length&&n[0]===e[0]?_r(n,i,t):[]}));function Yo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Xo=Yr(Ko);function Ko(e,t){return e&&e.length&&t&&t.length?qr(e,t):e}var Jo=no((function(e,t){var n=null==e?0:e.length,r=ar(e,t);return Gr(e,Lt(t,(function(e){return bo(e,n)?+e:e})).sort(Ci)),r}));function ea(e){return null==e?e:En.call(e)}var ta=Yr((function(e){return li(gr(e,1,Ga,!0))})),na=Yr((function(e){var t=Yo(e);return Ga(t)&&(t=i),li(gr(e,1,Ga,!0),uo(t,2))})),ra=Yr((function(e){var t=Yo(e);return t="function"==typeof t?t:i,li(gr(e,1,Ga,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Rt(e,(function(e){if(Ga(e))return t=$t(e.length,t),!0})),Xt(t,(function(t){return Lt(e,Gt(t))}))}function oa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Lt(n,(function(e){return Mt(t,i,e)}))}var aa=Yr((function(e,t){return Ga(e)?dr(e,t):[]})),sa=Yr((function(e){return vi(Rt(e,Ga))})),ua=Yr((function(e){var t=Yo(e);return Ga(t)&&(t=i),vi(Rt(e,Ga),uo(t,2))})),ca=Yr((function(e){var t=Yo(e);return t="function"==typeof t?t:i,vi(Rt(e,Ga),i,t)})),la=Yr(ia);var da=Yr((function(e){var t=e.length,n=t>1?e[t-1]:i;return n="function"==typeof n?(e.pop(),n):i,oa(e,n)}));function fa(e){var t=Vn(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=no((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(t){return ar(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Un&&bo(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Wn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var va=Ni((function(e,t,n){Le.call(e,n)?++e[n]:or(e,n,1)}));var ma=Pi(Wo),ga=Pi(Uo);function ya(e,t){return(Ua(e)?_t:fr)(e,uo(t,3))}function ba(e,t){return(Ua(e)?At:hr)(e,uo(t,3))}var wa=Ni((function(e,t,n){Le.call(e,n)?e[n].push(t):or(e,n,[t])}));var ka=Yr((function(e,t,r){var i=-1,o="function"==typeof t,a=qa(e)?n(e.length):[];return fr(e,(function(e){a[++i]=o?Mt(t,e,r):Ar(e,t,r)})),a})),Sa=Ni((function(e,t,n){or(e,n,t)}));function Ea(e,t){return(Ua(e)?Lt:jr)(e,uo(t,3))}var xa=Ni((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var Ia=Yr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&wo(e,t[0],t[1])?t=[]:n>2&&wo(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,gr(t,1),[])})),Ca=it||function(){return vt.Date.now()};function Ma(e,t,n){return t=n?i:t,t=e&&null==t?e.length:t,Xi(e,d,i,i,i,i,t)}function Ta(e,t){var n;if("function"!=typeof t)throw new _e(o);return e=ps(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var _a=Yr((function(e,t,n){var r=1;if(n.length){var i=dn(n,so(_a));r|=c}return Xi(e,r,t,n,i)})),Aa=Yr((function(e,t,n){var r=3;if(n.length){var i=dn(n,so(Aa));r|=c}return Xi(t,r,e,n,i)}));function Na(e,t,n){var r,a,s,u,c,l,d=0,f=!1,h=!1,p=!0;if("function"!=typeof e)throw new _e(o);function v(t){var n=r,o=a;return r=a=i,d=t,u=e.apply(o,n)}function m(e){var n=e-l;return l===i||n>=t||n<0||h&&e-d>=s}function g(){var e=Ca();if(m(e))return y(e);c=No(g,function(e){var n=t-(e-l);return h?bn(n,s-(e-d)):n}(e))}function y(e){return c=i,p&&r?v(e):(r=a=i,u)}function b(){var e=Ca(),n=m(e);if(r=arguments,a=this,l=e,n){if(c===i)return function(e){return d=e,c=No(g,t),f?v(e):u}(l);if(h)return Si(c),c=No(g,t),v(l)}return c===i&&(c=No(g,t)),u}return t=ms(t)||0,es(n)&&(f=!!n.leading,s=(h="maxWait"in n)?$t(ms(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p),b.cancel=function(){c!==i&&Si(c),d=0,r=l=a=c=i},b.flush=function(){return c===i?u:y(Ca())},b}var Ra=Yr((function(e,t){return lr(e,1,t)})),Da=Yr((function(e,t,n){return lr(e,ms(t)||0,n)}));function Oa(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(o);var n=function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Oa.Cache||Gn),n}function La(e){if("function"!=typeof e)throw new _e(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Oa.Cache=Gn;var Za=wi((function(e,t){var n=(t=1==t.length&&Ua(t[0])?Lt(t[0],Jt(uo())):Lt(gr(t,1),Jt(uo()))).length;return Yr((function(r){for(var i=-1,o=bn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return Mt(e,this,r)}))})),Fa=Yr((function(e,t){var n=dn(t,so(Fa));return Xi(e,c,i,t,n)})),Pa=Yr((function(e,t){var n=dn(t,so(Pa));return Xi(e,l,i,t,n)})),ja=no((function(e,t){return Xi(e,f,i,i,i,t)}));function Va(e,t){return e===t||e!==e&&t!==t}var Ba=qi(Cr),Ha=qi((function(e,t){return e>=t})),Wa=Nr(function(){return arguments}())?Nr:function(e){return ts(e)&&Le.call(e,"callee")&&!$e.call(e,"callee")},Ua=n.isArray,za=kt?Jt(kt):function(e){return ts(e)&&Ir(e)==O};function qa(e){return null!=e&&Ja(e.length)&&!Xa(e)}function Ga(e){return ts(e)&&qa(e)}var $a=gt||mu,Qa=St?Jt(St):function(e){return ts(e)&&Ir(e)==k};function Ya(e){if(!ts(e))return!1;var t=Ir(e);return t==S||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Xa(e){if(!es(e))return!1;var t=Ir(e);return t==E||t==x||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ka(e){return"number"==typeof e&&e==ps(e)}function Ja(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var ns=Et?Jt(Et):function(e){return ts(e)&&vo(e)==I};function rs(e){return"number"==typeof e||ts(e)&&Ir(e)==C}function is(e){if(!ts(e)||Ir(e)!=M)return!1;var t=qe(e);if(null===t)return!0;var n=Le.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Oe.call(n)==je}var os=xt?Jt(xt):function(e){return ts(e)&&Ir(e)==_};var as=It?Jt(It):function(e){return ts(e)&&vo(e)==A};function ss(e){return"string"==typeof e||!Ua(e)&&ts(e)&&Ir(e)==N}function us(e){return"symbol"==typeof e||ts(e)&&Ir(e)==R}var cs=Ct?Jt(Ct):function(e){return ts(e)&&Ja(e.length)&&!!ut[Ir(e)]};var ls=qi(Pr),ds=qi((function(e,t){return e<=t}));function fs(e){if(!e)return[];if(qa(e))return ss(e)?vn(e):_i(e);if(Xe&&e[Xe])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Xe]());var t=vo(e);return(t==I?cn:t==A?fn:Vs)(e)}function hs(e){return e?(e=ms(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),n=t%1;return t===t?n?t-n:t:0}function vs(e){return e?sr(ps(e),0,m):0}function ms(e){if("number"==typeof e)return e;if(us(e))return v;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Kt(e);var n=ge.test(e);return n||be.test(e)?ft(e.slice(2),n?2:8):me.test(e)?v:+e}function gs(e){return Ai(e,Rs(e))}function ys(e){return null==e?"":ci(e)}var bs=Ri((function(e,t){if(xo(t)||qa(t))Ai(t,Ns(t),e);else for(var n in t)Le.call(t,n)&&tr(e,n,t[n])})),ws=Ri((function(e,t){Ai(t,Rs(t),e)})),ks=Ri((function(e,t,n,r){Ai(t,Rs(t),e,r)})),Ss=Ri((function(e,t,n,r){Ai(t,Ns(t),e,r)})),Es=no(ar);var xs=Yr((function(e,t){e=Ce(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&wo(t[0],t[1],o)&&(r=1);++n<r;)for(var a=t[n],s=Rs(a),u=-1,c=s.length;++u<c;){var l=s[u],d=e[l];(d===i||Va(d,Re[l])&&!Le.call(e,l))&&(e[l]=a[l])}return e})),Is=Yr((function(e){return e.push(i,Ji),Mt(Os,i,e)}));function Cs(e,t,n){var r=null==e?i:Er(e,t);return r===i?n:r}function Ms(e,t){return null!=e&&mo(e,t,Tr)}var Ts=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),e[t]=n}),eu(ru)),_s=Bi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Pe.call(t)),Le.call(e,t)?e[t].push(n):e[t]=[n]}),uo),As=Yr(Ar);function Ns(e){return qa(e)?Yn(e):Zr(e)}function Rs(e){return qa(e)?Yn(e,!0):Fr(e)}var Ds=Ri((function(e,t,n){Hr(e,t,n)})),Os=Ri((function(e,t,n,r){Hr(e,t,n,r)})),Ls=no((function(e,t){var n={};if(null==e)return n;var r=!1;t=Lt(t,(function(t){return t=bi(t,e),r||(r=t.length>1),t})),Ai(e,io(e),n),r&&(n=ur(n,7,eo));for(var i=t.length;i--;)di(n,t[i]);return n}));var Zs=no((function(e,t){return null==e?{}:function(e,t){return zr(e,t,(function(t,n){return Ms(e,n)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var n=Lt(io(e),(function(e){return[e]}));return t=uo(t),zr(e,n,(function(e,n){return t(e,n[0])}))}var Ps=Yi(Ns),js=Yi(Rs);function Vs(e){return null==e?[]:en(e,Ns(e))}var Bs=Zi((function(e,t,n){return t=t.toLowerCase(),e+(n?Hs(t):t)}));function Hs(e){return Ys(ys(e).toLowerCase())}function Ws(e){return(e=ys(e))&&e.replace(ke,on).replace(tt,"")}var Us=Zi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),zs=Zi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),qs=Li("toLowerCase");var Gs=Zi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var $s=Zi((function(e,t,n){return e+(n?" ":"")+Ys(t)}));var Qs=Zi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ys=Li("toUpperCase");function Xs(e,t,n){return e=ys(e),(t=n?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Ks=Yr((function(e,t){try{return Mt(e,i,t)}catch(n){return Ya(n)?n:new se(n)}})),Js=no((function(e,t){return _t(t,(function(t){t=Fo(t),or(e,t,_a(e[t],e))})),e}));function eu(e){return function(){return e}}var tu=ji(),nu=ji(!0);function ru(e){return e}function iu(e){return Lr("function"==typeof e?e:ur(e,1))}var ou=Yr((function(e,t){return function(n){return Ar(n,e,t)}})),au=Yr((function(e,t){return function(n){return Ar(e,n,t)}}));function su(e,t,n){var r=Ns(t),i=Sr(t,r);null!=n||es(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=Sr(t,Ns(t)));var o=!(es(n)&&"chain"in n)||!!n.chain,a=Xa(e);return _t(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__);return(n.__actions__=_i(this.__actions__)).push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Zt([this.value()],arguments))})})),e}function uu(){}var cu=Wi(Lt),lu=Wi(Nt),du=Wi(jt);function fu(e){return ko(e)?Gt(Fo(e)):function(e){return function(t){return Er(t,e)}}(e)}var hu=zi(),pu=zi(!0);function vu(){return[]}function mu(){return!1}var gu=Hi((function(e,t){return e+t}),0),yu=$i("ceil"),bu=Hi((function(e,t){return e/t}),1),wu=$i("floor");var ku=Hi((function(e,t){return e*t}),1),Su=$i("round"),Eu=Hi((function(e,t){return e-t}),0);return Vn.after=function(e,t){if("function"!=typeof t)throw new _e(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Vn.ary=Ma,Vn.assign=bs,Vn.assignIn=ws,Vn.assignInWith=ks,Vn.assignWith=Ss,Vn.at=Es,Vn.before=Ta,Vn.bind=_a,Vn.bindAll=Js,Vn.bindKey=Aa,Vn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ua(e)?e:[e]},Vn.chain=fa,Vn.chunk=function(e,t,r){t=(r?wo(e,t,r):t===i)?1:$t(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(ht(o/t));a<o;)u[s++]=ri(e,a,a+=t);return u},Vn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Vn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Zt(Ua(r)?_i(r):[r],gr(t,1))},Vn.cond=function(e){var t=null==e?0:e.length,n=uo();return e=t?Lt(e,(function(e){if("function"!=typeof e[1])throw new _e(o);return[n(e[0]),e[1]]})):[],Yr((function(n){for(var r=-1;++r<t;){var i=e[r];if(Mt(i[0],this,n))return Mt(i[1],this,n)}}))},Vn.conforms=function(e){return function(e){var t=Ns(e);return function(n){return cr(n,e,t)}}(ur(e,1))},Vn.constant=eu,Vn.countBy=va,Vn.create=function(e,t){var n=Bn(e);return null==t?n:ir(n,t)},Vn.curry=function e(t,n,r){var o=Xi(t,8,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.curryRight=function e(t,n,r){var o=Xi(t,u,i,i,i,i,i,n=r?i:n);return o.placeholder=e.placeholder,o},Vn.debounce=Na,Vn.defaults=xs,Vn.defaultsDeep=Is,Vn.defer=Ra,Vn.delay=Da,Vn.difference=Vo,Vn.differenceBy=Bo,Vn.differenceWith=Ho,Vn.drop=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=n||t===i?1:ps(t))<0?0:t,r):[]},Vn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,0,(t=r-(t=n||t===i?1:ps(t)))<0?0:t):[]},Vn.dropRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0,!0):[]},Vn.dropWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!0):[]},Vn.fill=function(e,t,n,r){var o=null==e?0:e.length;return o?(n&&"number"!=typeof n&&wo(e,t,n)&&(n=0,r=o),function(e,t,n,r){var o=e.length;for((n=ps(n))<0&&(n=-n>o?0:o+n),(r=r===i||r>o?o:ps(r))<0&&(r+=o),r=n>r?0:vs(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Vn.filter=function(e,t){return(Ua(e)?Rt:mr)(e,uo(t,3))},Vn.flatMap=function(e,t){return gr(Ea(e,t),1)},Vn.flatMapDeep=function(e,t){return gr(Ea(e,t),h)},Vn.flatMapDepth=function(e,t,n){return n=n===i?1:ps(n),gr(Ea(e,t),n)},Vn.flatten=zo,Vn.flattenDeep=function(e){return(null==e?0:e.length)?gr(e,h):[]},Vn.flattenDepth=function(e,t){return(null==e?0:e.length)?gr(e,t=t===i?1:ps(t)):[]},Vn.flip=function(e){return Xi(e,512)},Vn.flow=tu,Vn.flowRight=nu,Vn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Vn.functions=function(e){return null==e?[]:Sr(e,Ns(e))},Vn.functionsIn=function(e){return null==e?[]:Sr(e,Rs(e))},Vn.groupBy=wa,Vn.initial=function(e){return(null==e?0:e.length)?ri(e,0,-1):[]},Vn.intersection=Go,Vn.intersectionBy=$o,Vn.intersectionWith=Qo,Vn.invert=Ts,Vn.invertBy=_s,Vn.invokeMap=ka,Vn.iteratee=iu,Vn.keyBy=Sa,Vn.keys=Ns,Vn.keysIn=Rs,Vn.map=Ea,Vn.mapKeys=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,t(e,r,i),e)})),n},Vn.mapValues=function(e,t){var n={};return t=uo(t,3),wr(e,(function(e,r,i){or(n,r,t(e,r,i))})),n},Vn.matches=function(e){return Vr(ur(e,1))},Vn.matchesProperty=function(e,t){return Br(e,ur(t,1))},Vn.memoize=Oa,Vn.merge=Ds,Vn.mergeWith=Os,Vn.method=ou,Vn.methodOf=au,Vn.mixin=su,Vn.negate=La,Vn.nthArg=function(e){return e=ps(e),Yr((function(t){return Wr(t,e)}))},Vn.omit=Ls,Vn.omitBy=function(e,t){return Fs(e,La(uo(t)))},Vn.once=function(e){return Ta(2,e)},Vn.orderBy=function(e,t,n,r){return null==e?[]:(Ua(t)||(t=null==t?[]:[t]),Ua(n=r?i:n)||(n=null==n?[]:[n]),Ur(e,t,n))},Vn.over=cu,Vn.overArgs=Za,Vn.overEvery=lu,Vn.overSome=du,Vn.partial=Fa,Vn.partialRight=Pa,Vn.partition=xa,Vn.pick=Zs,Vn.pickBy=Fs,Vn.property=fu,Vn.propertyOf=function(e){return function(t){return null==e?i:Er(e,t)}},Vn.pull=Xo,Vn.pullAll=Ko,Vn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,uo(n,2)):e},Vn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?qr(e,t,i,n):e},Vn.pullAt=Jo,Vn.range=hu,Vn.rangeRight=pu,Vn.rearg=ja,Vn.reject=function(e,t){return(Ua(e)?Rt:mr)(e,La(uo(t,3)))},Vn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=uo(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}return Gr(e,i),n},Vn.rest=function(e,t){if("function"!=typeof e)throw new _e(o);return Yr(e,t=t===i?t:ps(t))},Vn.reverse=ea,Vn.sampleSize=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),(Ua(e)?Kn:Kr)(e,t)},Vn.set=function(e,t,n){return null==e?e:Jr(e,t,n)},Vn.setWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:Jr(e,t,n,r)},Vn.shuffle=function(e){return(Ua(e)?Jn:ni)(e)},Vn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&wo(e,t,n)?(t=0,n=r):(t=null==t?0:ps(t),n=n===i?r:ps(n)),ri(e,t,n)):[]},Vn.sortBy=Ia,Vn.sortedUniq=function(e){return e&&e.length?si(e):[]},Vn.sortedUniqBy=function(e,t){return e&&e.length?si(e,uo(t,2)):[]},Vn.split=function(e,t,n){return n&&"number"!=typeof n&&wo(e,t,n)&&(t=n=i),(n=n===i?m:n>>>0)?(e=ys(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ci(t))&&un(e)?ki(vn(e),0,n):e.split(t,n):[]},Vn.spread=function(e,t){if("function"!=typeof e)throw new _e(o);return t=null==t?0:$t(ps(t),0),Yr((function(n){var r=n[t],i=ki(n,0,t);return r&&Zt(i,r),Mt(e,this,i)}))},Vn.tail=function(e){var t=null==e?0:e.length;return t?ri(e,1,t):[]},Vn.take=function(e,t,n){return e&&e.length?ri(e,0,(t=n||t===i?1:ps(t))<0?0:t):[]},Vn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?ri(e,(t=r-(t=n||t===i?1:ps(t)))<0?0:t,r):[]},Vn.takeRightWhile=function(e,t){return e&&e.length?hi(e,uo(t,3),!1,!0):[]},Vn.takeWhile=function(e,t){return e&&e.length?hi(e,uo(t,3)):[]},Vn.tap=function(e,t){return t(e),e},Vn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new _e(o);return es(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Na(e,t,{leading:r,maxWait:t,trailing:i})},Vn.thru=ha,Vn.toArray=fs,Vn.toPairs=Ps,Vn.toPairsIn=js,Vn.toPath=function(e){return Ua(e)?Lt(e,Fo):us(e)?[e]:_i(Zo(ys(e)))},Vn.toPlainObject=gs,Vn.transform=function(e,t,n){var r=Ua(e),i=r||$a(e)||cs(e);if(t=uo(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:es(e)&&Xa(o)?Bn(qe(e)):{}}return(i?_t:wr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Vn.unary=function(e){return Ma(e,1)},Vn.union=ta,Vn.unionBy=na,Vn.unionWith=ra,Vn.uniq=function(e){return e&&e.length?li(e):[]},Vn.uniqBy=function(e,t){return e&&e.length?li(e,uo(t,2)):[]},Vn.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?li(e,i,t):[]},Vn.unset=function(e,t){return null==e||di(e,t)},Vn.unzip=ia,Vn.unzipWith=oa,Vn.update=function(e,t,n){return null==e?e:fi(e,t,yi(n))},Vn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:i,null==e?e:fi(e,t,yi(n),r)},Vn.values=Vs,Vn.valuesIn=function(e){return null==e?[]:en(e,Rs(e))},Vn.without=aa,Vn.words=Xs,Vn.wrap=function(e,t){return Fa(yi(t),e)},Vn.xor=sa,Vn.xorBy=ua,Vn.xorWith=ca,Vn.zip=la,Vn.zipObject=function(e,t){return mi(e||[],t||[],tr)},Vn.zipObjectDeep=function(e,t){return mi(e||[],t||[],Jr)},Vn.zipWith=da,Vn.entries=Ps,Vn.entriesIn=js,Vn.extend=ws,Vn.extendWith=ks,su(Vn,Vn),Vn.add=gu,Vn.attempt=Ks,Vn.camelCase=Bs,Vn.capitalize=Hs,Vn.ceil=yu,Vn.clamp=function(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=(n=ms(n))===n?n:0),t!==i&&(t=(t=ms(t))===t?t:0),sr(ms(e),t,n)},Vn.clone=function(e){return ur(e,4)},Vn.cloneDeep=function(e){return ur(e,5)},Vn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:i)},Vn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:i)},Vn.conformsTo=function(e,t){return null==t||cr(e,t,Ns(t))},Vn.deburr=Ws,Vn.defaultTo=function(e,t){return null==e||e!==e?t:e},Vn.divide=bu,Vn.endsWith=function(e,t,n){e=ys(e),t=ci(t);var r=e.length,o=n=n===i?r:sr(ps(n),0,r);return(n-=t.length)>=0&&e.slice(n,o)==t},Vn.eq=Va,Vn.escape=function(e){return(e=ys(e))&&X.test(e)?e.replace(Q,an):e},Vn.escapeRegExp=function(e){return(e=ys(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Vn.every=function(e,t,n){var r=Ua(e)?Nt:pr;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.find=ma,Vn.findIndex=Wo,Vn.findKey=function(e,t){return Bt(e,uo(t,3),wr)},Vn.findLast=ga,Vn.findLastIndex=Uo,Vn.findLastKey=function(e,t){return Bt(e,uo(t,3),kr)},Vn.floor=wu,Vn.forEach=ya,Vn.forEachRight=ba,Vn.forIn=function(e,t){return null==e?e:yr(e,uo(t,3),Rs)},Vn.forInRight=function(e,t){return null==e?e:br(e,uo(t,3),Rs)},Vn.forOwn=function(e,t){return e&&wr(e,uo(t,3))},Vn.forOwnRight=function(e,t){return e&&kr(e,uo(t,3))},Vn.get=Cs,Vn.gt=Ba,Vn.gte=Ha,Vn.has=function(e,t){return null!=e&&mo(e,t,Mr)},Vn.hasIn=Ms,Vn.head=qo,Vn.identity=ru,Vn.includes=function(e,t,n,r){e=qa(e)?e:Vs(e),n=n&&!r?ps(n):0;var i=e.length;return n<0&&(n=$t(i+n,0)),ss(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&Wt(e,t,n)>-1},Vn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ps(n);return i<0&&(i=$t(r+i,0)),Wt(e,t,i)},Vn.inRange=function(e,t,n){return t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n){return e>=bn(t,n)&&e<$t(t,n)}(e=ms(e),t,n)},Vn.invoke=As,Vn.isArguments=Wa,Vn.isArray=Ua,Vn.isArrayBuffer=za,Vn.isArrayLike=qa,Vn.isArrayLikeObject=Ga,Vn.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Ir(e)==w},Vn.isBuffer=$a,Vn.isDate=Qa,Vn.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Vn.isEmpty=function(e){if(null==e)return!0;if(qa(e)&&(Ua(e)||"string"==typeof e||"function"==typeof e.splice||$a(e)||cs(e)||Wa(e)))return!e.length;var t=vo(e);if(t==I||t==A)return!e.size;if(xo(e))return!Zr(e).length;for(var n in e)if(Le.call(e,n))return!1;return!0},Vn.isEqual=function(e,t){return Rr(e,t)},Vn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:i)?n(e,t):i;return r===i?Rr(e,t,i,n):!!r},Vn.isError=Ya,Vn.isFinite=function(e){return"number"==typeof e&&bt(e)},Vn.isFunction=Xa,Vn.isInteger=Ka,Vn.isLength=Ja,Vn.isMap=ns,Vn.isMatch=function(e,t){return e===t||Dr(e,t,lo(t))},Vn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:i,Dr(e,t,lo(t),n)},Vn.isNaN=function(e){return rs(e)&&e!=+e},Vn.isNative=function(e){if(Eo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Or(e)},Vn.isNil=function(e){return null==e},Vn.isNull=function(e){return null===e},Vn.isNumber=rs,Vn.isObject=es,Vn.isObjectLike=ts,Vn.isPlainObject=is,Vn.isRegExp=os,Vn.isSafeInteger=function(e){return Ka(e)&&e>=-9007199254740991&&e<=p},Vn.isSet=as,Vn.isString=ss,Vn.isSymbol=us,Vn.isTypedArray=cs,Vn.isUndefined=function(e){return e===i},Vn.isWeakMap=function(e){return ts(e)&&vo(e)==D},Vn.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Ir(e)},Vn.join=function(e,t){return null==e?"":wt.call(e,t)},Vn.kebabCase=Us,Vn.last=Yo,Vn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=(o=ps(n))<0?$t(r+o,0):bn(o,r-1)),t===t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,o):Ht(e,zt,o,!0)},Vn.lowerCase=zs,Vn.lowerFirst=qs,Vn.lt=ls,Vn.lte=ds,Vn.max=function(e){return e&&e.length?vr(e,ru,Cr):i},Vn.maxBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Cr):i},Vn.mean=function(e){return qt(e,ru)},Vn.meanBy=function(e,t){return qt(e,uo(t,2))},Vn.min=function(e){return e&&e.length?vr(e,ru,Pr):i},Vn.minBy=function(e,t){return e&&e.length?vr(e,uo(t,2),Pr):i},Vn.stubArray=vu,Vn.stubFalse=mu,Vn.stubObject=function(){return{}},Vn.stubString=function(){return""},Vn.stubTrue=function(){return!0},Vn.multiply=ku,Vn.nth=function(e,t){return e&&e.length?Wr(e,ps(t)):i},Vn.noConflict=function(){return vt._===this&&(vt._=Ve),this},Vn.noop=uu,Vn.now=Ca,Vn.pad=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ui(pt(i),n)+e+Ui(ht(i),n)},Vn.padEnd=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?e+Ui(t-r,n):e},Vn.padStart=function(e,t,n){e=ys(e);var r=(t=ps(t))?pn(e):0;return t&&r<t?Ui(t-r,n)+e:e},Vn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),kn(ys(e).replace(ae,""),t||0)},Vn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&wo(e,t,n)&&(t=n=i),n===i&&("boolean"==typeof t?(n=t,t=i):"boolean"==typeof e&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=Sn();return bn(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return $r(e,t)},Vn.reduce=function(e,t,n){var r=Ua(e)?Ft:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,fr)},Vn.reduceRight=function(e,t,n){var r=Ua(e)?Pt:Qt,i=arguments.length<3;return r(e,uo(t,4),n,i,hr)},Vn.repeat=function(e,t,n){return t=(n?wo(e,t,n):t===i)?1:ps(t),Qr(ys(e),t)},Vn.replace=function(){var e=arguments,t=ys(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Vn.result=function(e,t,n){var r=-1,o=(t=bi(t,e)).length;for(o||(o=1,e=i);++r<o;){var a=null==e?i:e[Fo(t[r])];a===i&&(r=o,a=n),e=Xa(a)?a.call(e):a}return e},Vn.round=Su,Vn.runInContext=e,Vn.sample=function(e){return(Ua(e)?Xn:Xr)(e)},Vn.size=function(e){if(null==e)return 0;if(qa(e))return ss(e)?pn(e):e.length;var t=vo(e);return t==I||t==A?e.size:Zr(e).length},Vn.snakeCase=Gs,Vn.some=function(e,t,n){var r=Ua(e)?jt:ii;return n&&wo(e,t,n)&&(t=i),r(e,uo(t,3))},Vn.sortedIndex=function(e,t){return oi(e,t)},Vn.sortedIndexBy=function(e,t,n){return ai(e,t,uo(n,2))},Vn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=oi(e,t);if(r<n&&Va(e[r],t))return r}return-1},Vn.sortedLastIndex=function(e,t){return oi(e,t,!0)},Vn.sortedLastIndexBy=function(e,t,n){return ai(e,t,uo(n,2),!0)},Vn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=oi(e,t,!0)-1;if(Va(e[n],t))return n}return-1},Vn.startCase=$s,Vn.startsWith=function(e,t,n){return e=ys(e),n=null==n?0:sr(ps(n),0,e.length),t=ci(t),e.slice(n,n+t.length)==t},Vn.subtract=Eu,Vn.sum=function(e){return e&&e.length?Yt(e,ru):0},Vn.sumBy=function(e,t){return e&&e.length?Yt(e,uo(t,2)):0},Vn.template=function(e,t,n){var r=Vn.templateSettings;n&&wo(e,t,n)&&(t=i),e=ys(e),t=ks({},t,r,Ki);var o,a,s=ks({},t.imports,r.imports,Ki),u=Ns(s),c=en(s,u),l=0,d=t.interpolate||Se,f="__p += '",h=Me((t.escape||Se).source+"|"+d.source+"|"+(d===ee?pe:Se).source+"|"+(t.evaluate||Se).source+"|$","g"),p="//# sourceURL="+(Le.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,n,r,i,s,u){return r||(r=i),f+=e.slice(l,u).replace(Ee,sn),n&&(o=!0,f+="' +\n__e("+n+") +\n'"),s&&(a=!0,f+="';\n"+s+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),f+="';\n";var v=Le.call(t,"variable")&&t.variable;if(v){if(fe.test(v))throw new se("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(a?f.replace(z,""):f).replace(q,"$1").replace(G,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ks((function(){return xe(u,p+"return "+f).apply(i,c)}));if(m.source=f,Ya(m))throw m;return m},Vn.times=function(e,t){if((e=ps(e))<1||e>p)return[];var n=m,r=bn(e,m);t=uo(t),e-=m;for(var i=Xt(r,t);++n<e;)t(n);return i},Vn.toFinite=hs,Vn.toInteger=ps,Vn.toLength=vs,Vn.toLower=function(e){return ys(e).toLowerCase()},Vn.toNumber=ms,Vn.toSafeInteger=function(e){return e?sr(ps(e),-9007199254740991,p):0===e?e:0},Vn.toString=ys,Vn.toUpper=function(e){return ys(e).toUpperCase()},Vn.trim=function(e,t,n){if((e=ys(e))&&(n||t===i))return Kt(e);if(!e||!(t=ci(t)))return e;var r=vn(e),o=vn(t);return ki(r,nn(r,o),rn(r,o)+1).join("")},Vn.trimEnd=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.slice(0,mn(e)+1);if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,0,rn(r,vn(t))+1).join("")},Vn.trimStart=function(e,t,n){if((e=ys(e))&&(n||t===i))return e.replace(ae,"");if(!e||!(t=ci(t)))return e;var r=vn(e);return ki(r,nn(r,vn(t))).join("")},Vn.truncate=function(e,t){var n=30,r="...";if(es(t)){var o="separator"in t?t.separator:o;n="length"in t?ps(t.length):n,r="omission"in t?ci(t.omission):r}var a=(e=ys(e)).length;if(un(e)){var s=vn(e);a=s.length}if(n>=a)return e;var u=n-pn(r);if(u<1)return r;var c=s?ki(s,0,u).join(""):e.slice(0,u);if(o===i)return c+r;if(s&&(u+=c.length-u),os(o)){if(e.slice(u).search(o)){var l,d=c;for(o.global||(o=Me(o.source,ys(ve.exec(o))+"g")),o.lastIndex=0;l=o.exec(d);)var f=l.index;c=c.slice(0,f===i?u:f)}}else if(e.indexOf(ci(o),u)!=u){var h=c.lastIndexOf(o);h>-1&&(c=c.slice(0,h))}return c+r},Vn.unescape=function(e){return(e=ys(e))&&Y.test(e)?e.replace($,gn):e},Vn.uniqueId=function(e){var t=++Ze;return ys(e)+t},Vn.upperCase=Qs,Vn.upperFirst=Ys,Vn.each=ya,Vn.eachRight=ba,Vn.first=qo,su(Vn,function(){var e={};return wr(Vn,(function(t,n){Le.call(Vn.prototype,n)||(e[n]=t)})),e}(),{chain:!1}),Vn.VERSION="4.17.21",_t(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Vn[e].placeholder=Vn})),_t(["drop","take"],(function(e,t){Un.prototype[e]=function(n){n=n===i?1:$t(ps(n),0);var r=this.__filtered__&&!t?new Un(this):this.clone();return r.__filtered__?r.__takeCount__=bn(n,r.__takeCount__):r.__views__.push({size:bn(n,m),type:e+(r.__dir__<0?"Right":"")}),r},Un.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),_t(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Un.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:uo(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),_t(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Un.prototype[e]=function(){return this[n](1).value()[0]}})),_t(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Un.prototype[e]=function(){return this.__filtered__?new Un(this):this[n](1)}})),Un.prototype.compact=function(){return this.filter(ru)},Un.prototype.find=function(e){return this.filter(e).head()},Un.prototype.findLast=function(e){return this.reverse().find(e)},Un.prototype.invokeMap=Yr((function(e,t){return"function"==typeof e?new Un(this):this.map((function(n){return Ar(n,e,t)}))})),Un.prototype.reject=function(e){return this.filter(La(uo(e)))},Un.prototype.slice=function(e,t){e=ps(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Un(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(n=(t=ps(t))<0?n.dropRight(-t):n.take(t-e)),n)},Un.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Un.prototype.toArray=function(){return this.take(m)},wr(Un.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=Vn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);o&&(Vn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,u=t instanceof Un,c=s[0],l=u||Ua(t),d=function(e){var t=o.apply(Vn,Zt([e],s));return r&&f?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(u=l=!1);var f=this.__chain__,h=!!this.__actions__.length,p=a&&!f,v=u&&!h;if(!a&&l){t=v?t:new Un(this);var m=e.apply(t,s);return m.__actions__.push({func:ha,args:[d],thisArg:i}),new Wn(m,f)}return p&&v?e.apply(this,s):(m=this.thru(d),p?r?m.value()[0]:m.value():m)})})),_t(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Vn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ua(i)?i:[],e)}return this[n]((function(n){return t.apply(Ua(n)?n:[],e)}))}})),wr(Un.prototype,(function(e,t){var n=Vn[t];if(n){var r=n.name+"";Le.call(Nn,r)||(Nn[r]=[]),Nn[r].push({name:t,func:n})}})),Nn[Vi(i,2).name]=[{name:"wrapper",func:i}],Un.prototype.clone=function(){var e=new Un(this.__wrapped__);return e.__actions__=_i(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=_i(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=_i(this.__views__),e},Un.prototype.reverse=function(){if(this.__filtered__){var e=new Un(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Un.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ua(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=bn(t,e+a);break;case"takeRight":e=$t(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=r?s:a-1,l=this.__iteratees__,d=l.length,f=0,h=bn(u,this.__takeCount__);if(!n||!r&&i==u&&h==u)return pi(e,this.__actions__);var p=[];e:for(;u--&&f<h;){for(var v=-1,m=e[c+=t];++v<d;){var g=l[v],y=g.iteratee,b=g.type,w=y(m);if(2==b)m=w;else if(!w){if(1==b)continue e;break e}}p[f++]=m}return p},Vn.prototype.at=pa,Vn.prototype.chain=function(){return fa(this)},Vn.prototype.commit=function(){return new Wn(this.value(),this.__chain__)},Vn.prototype.next=function(){this.__values__===i&&(this.__values__=fs(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Vn.prototype.plant=function(e){for(var t,n=this;n instanceof Hn;){var r=jo(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t},Vn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Un){var t=e;return this.__actions__.length&&(t=new Un(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Wn(t,this.__chain__)}return this.thru(ea)},Vn.prototype.toJSON=Vn.prototype.valueOf=Vn.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Vn.prototype.first=Vn.prototype.head,Xe&&(Vn.prototype[Xe]=function(){return this}),Vn}();vt._=yn,(r=function(){return yn}.call(t,n,t,e))===i||(e.exports=r)}.call(this)},2352:function(e){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return w})),n.d(t,"d",(function(){return x})),n.d(t,"b",(function(){return I})),n.d(t,"c",(function(){return C}));var r=n(1),i=n.n(r),o=n(14),a=n.n(o),s=n(2),u=n.n(s),c=n(15),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f=Array.isArray,h=Object.keys;function p(e){return"function"==typeof e}function v(e){return e instanceof HTMLElement||e instanceof Text}function m(e){return"object"===u()(e)&&!f(e)}function g(e){if(!e||"string"==typeof e)return e;var t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e);return delete t.children,t}function y(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!(!f(e)||!f(t))&&(n?e.length===t.length&&!e.find((function(e){return!t.includes(e)})):e.some((function(e){return t.includes(e)})))}function b(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=[];if(!h(e).length)return!0;if(null===t||!h(t).length)return!1;if(n)return l()(e,t);var i=h(e).filter((function(e){return h(t).includes(e)}));return i.forEach((function(n){m(e[n])&&m(t[n])&&(r=r.concat(b(e[n],t[n]))),(e[n]===t[n]||y(e[n],t[n]))&&r.push(t)})),r.length>0&&r.filter((function(e){return e})).length===i.length}function w(e){var t,n={children:[]};if(!e)return n;n.name=p(t=e.type)?t.displayName||t.name:t,n.props=g(e.memoizedProps),n.state=function(e){if(e)return e.baseState||e}(e.memoizedState);var r=e.child;if(r)for(n.children.push(r);r.sibling;)n.children.push(r.sibling),r=r.sibling;return n.children=n.children.map((function(e){return w(e)})),p(e.type)&&function(e){return e.children.length>1}(n)?(n.node=function(e){return e.children.map((function(e){return e.node})).filter((function(e){return!!e}))}(n),n.isFragment=!0):n.node=function(e){return v(e.stateNode)?e.stateNode:e.child&&v(e.child.stateNode)?e.child.stateNode:null}(e),n}function k(e){for(;e.length;){var t=e.shift();if(t.node)return t.node;t.children&&Array.isArray(t.children)&&e.push.apply(e,i()(t.children))}}function S(e,t){for(var n=[];e.length;){var r=e.shift().children;r&&Array.isArray(r)&&r.forEach((function(r){t(r)&&(!r.node&&Array.isArray(r.children)&&(r.node=k(r.children.concat([]))),n.push(r)),e.push(r)}))}return n}function E(e,t){var n=function(e){if(e){var t=e.split("(");return 1===t.length?e:t.find((function(e){return e.includes(")")})).replace(/\)*/g,"")}}(t);return new RegExp("^"+e.split("*").map((function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")})).join(".+")+"$").test(n)}function x(e,t){var n=arguments.length>3?arguments[3]:void 0;return e.reduce((function(e,t){return e.concat(S(e,n&&"function"==typeof n?n:function(e){return"string"==typeof e.name?E(t,e.name):null!==e.name&&"object"===u()(e.name)&&E(t,e.name.displayName)}))}),[t])}function I(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return p(n)?(console.warn("Functions are not supported as filter matchers"),[]):e.filter((function(e){return m(n)&&b(n,e[t],r)||f(n)&&y(n,e[t],r)||e[t]===n}))}function C(e){if(e.hasOwnProperty("_reactRootContainer"))return e._reactRootContainer._internalRoot.current;var t=Object.keys(e).find((function(e){return e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber")||e.startsWith("__reactContainer")}));return t?e[t]:void 0}},function(e,t,n){var r=n(17),i=n(18),o=n(19),a=n(20);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(3),i=n(6),o=n(22),a=n(23);function s(t){var n="function"==typeof Map?new Map:void 0;return e.exports=s=function(e){if(null===e||!o(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return a(e,arguments,r(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.default=e.exports,e.exports.__esModule=!0,s(t)}e.exports=s,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));var r=n(0);function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e3,n=arguments.length>1?arguments[1]:void 0;if(e.isReactLoaded)return Promise.resolve("React already loaded");var i=function(){var e=document.createTreeWalker(document);if(n)return document.querySelector(n);for(;e.nextNode();)if(e.currentNode.hasOwnProperty("_reactRootContainer"))return e.currentNode};return new Promise((function(n,o){var a=!1,s=null;!function t(){var o=i();if(o&&(e.isReactLoaded=!0,e.rootReactElement=Object(r.c)(o),e.rootReactElement))return clearTimeout(s),n();a||setTimeout(t,200)}(),s=setTimeout((function(){a=!0,o("Timed out")}),t)}))}}).call(this,n(9))},function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),i=n.n(r),o=n(4),a=n.n(o),s=n(5),u=n.n(s),c=n(7),l=n.n(c),d=n(13),f=n.n(d),h=n(3),p=n.n(h),v=n(8),m=n.n(v),g=n(0);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f()(this,n)}}var b=function(e){l()(n,e);var t=y(n);function n(e){return a()(this,n),e||(e=[]),t.call.apply(t,[this].concat(i()(e)))}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"props",e,t))}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this,"state",e,t))}}]),n}(m()(Array)),w=function(e){l()(n,e);var t=y(n);function n(e,r){var i;for(var o in a()(this,n),(i=t.call(this,e))._nodes=r,e)i[o]=e[o];return i}return u()(n,[{key:"byProps",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"props",e,t)[0],this._nodes)}},{key:"byState",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{exact:!1}).exact;return new n(Object(g.b)(this._nodes,"state",e,t)[0],this._nodes)}}]),n}(m()(Object)),k=function(){function e(t,n){a()(this,e),this.selectors=t.split(" ").filter((function(e){return!!e})).map((function(e){return e.trim()})),this.rootComponent=n,this.tree=Object(g.a)(this.rootComponent)}return u()(e,[{key:"find",value:function(){return this.nodes=new b(Object(g.d)(this.selectors,this.tree,!0)),new w(this.nodes[0],this.nodes)}},{key:"findAll",value:function(){return new b(Object(g.d)(this.selectors,this.tree))}}]),e}()},function(e,t,n){var r=n(2).default,i=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;e.exports=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var a,s,u,c=r(t),l=r(n);if(c&&l){if((s=t.length)!=n.length)return!1;for(a=s;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(c!=l)return!1;var d=t instanceof Date,f=n instanceof Date;if(d!=f)return!1;if(d&&f)return t.getTime()==n.getTime();var h=t instanceof RegExp,p=n instanceof RegExp;if(h!=p)return!1;if(h&&p)return t.toString()==n.toString();var v=i(t);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(!e(t[u=v[a]],n[u]))return!1;return!0}return t!=t&&n!=n}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"resq$",(function(){return s})),n.d(t,"resq$$",(function(){return u}));var r=n(12),i=n(11);n.d(t,"waitToLoadReact",(function(){return i.a}));var o=n(0);function a(t,n,i){if(!i&&!e.isReactLoaded)throw new Error("Could not find the root element of your application");var a=e.rootReactElement;if(i instanceof HTMLElement&&(a=Object(o.c)(i)),!a)throw new Error("Could not find instance of React in given element");return new r.a(t,a)[n]()}function s(e,t){return a(e,"find",t)}function u(e,t){return a(e,"findAll",t)}}.call(this,n(9))},function(e,t,n){var r=n(10);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(10);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6),i=n(24);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0}])},573:function(e,t,n){var r=n(763);function i(e){return e.reduce((function(e,t,n,r){return e+t}))}function o(e){if(r.isArray(e))return e;if("string"===typeof e)return e.split("");throw Error("Parameter must be a string or array.")}t.$m=function(e,t){return e=o(e),t=o(t),r.intersection(e,t).length/r.union(e,t).length}},907:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7326:function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{Z:function(){return r}})},5861:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(c){return void n(c)}s.done?t(u):Promise.resolve(u).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,u,"next",e)}function u(e){r(a,i,o,s,u,"throw",e)}s(void 0)}))}}n.d(t,{Z:function(){return i}})},5671:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},5647:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9611),i=n(8814);function o(e,t,n){return o=(0,i.Z)()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&(0,r.Z)(o,n.prototype),o},o.apply(null,arguments)}},3144:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9142);function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(0,r.Z)(i.key),i)}}function o(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}},7762:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(u)throw a}}}}},7277:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(1120),i=n(8814),o=n(1002),a=n(7326);function s(e){var t=(0,i.Z)();return function(){var n,i=(0,r.Z)(e);if(t){var s=(0,r.Z)(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===(0,o.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return(0,a.Z)(e)}(this,n)}}},4942:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9142);function i(e,t,n){return(t=(0,r.Z)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},1752:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1120);function i(){return i="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=(0,r.Z)(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},i.apply(this,arguments)}},1120:function(e,t,n){"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{Z:function(){return r}})},136:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9611);function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,r.Z)(e,t)}},8814:function(e,t,n){"use strict";function r(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}n.d(t,{Z:function(){return r}})},1413:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4942);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},4925:function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,{Z:function(){return r}})},4165:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(){i=function(){return t};var e,t={},n=Object.prototype,o=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof b?t:b,o=Object.create(i.prototype),s=new R(r||[]);return a(o,"_invoke",{value:T(e,n,s)}),o}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var p="suspendedStart",v="suspendedYield",m="executing",g="completed",y={};function b(){}function w(){}function k(){}var S={};d(S,u,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(D([])));x&&x!==n&&o.call(x,u)&&(S=x);var I=k.prototype=b.prototype=Object.create(S);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function n(i,a,s,u){var c=h(e[i],e,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==(0,r.Z)(d)&&o.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var i;a(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function T(t,n,r){var i=p;return function(o,a){if(i===m)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=_(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=m;var c=h(t,n,r);if("normal"===c.type){if(i=r.done?g:v,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function _(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,_(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=h(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function A(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(A,this),this.reset(!0)}function D(t){if(t||""===t){var n=t[u];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(o.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError((0,r.Z)(t)+" is not iterable")}return w.prototype=k,a(I,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=d(k,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,k):(e.__proto__=k,d(e,l,"GeneratorFunction")),e.prototype=Object.create(I),e},t.awrap=function(e){return{__await:e}},C(M.prototype),d(M.prototype,c,(function(){return this})),t.AsyncIterator=M,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new M(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},C(I),d(I,l,"Generator"),d(I,u,(function(){return this})),d(I,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=D,R.prototype={constructor:R,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(N),!t)for(var n in this)"t"===n.charAt(0)&&o.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:D(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}},9611:function(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{Z:function(){return r}})},885:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(181);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},2982:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(907);var i=n(181);function o(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,i.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9142:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(1002);function i(e){var t=function(e,t){if("object"!==(0,r.Z)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==(0,r.Z)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===(0,r.Z)(t)?t:String(t)}},1002:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},181:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(907);function i(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},8664:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1120),i=n(9611);var o=n(5647);function a(e){var t="function"===typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"===typeof e}}(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return(0,o.Z)(e,arguments,(0,r.Z)(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.Z)(n,e)},a(e)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+"."+{341:"3beee418",542:"7725f62c"}[e]+".chunk.js"},n.miniCssF=function(e){return"static/css/"+e+".37433f66.chunk.css"},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={};n.l=function(t,r,i,o){if(e[t])e[t].push(r);else{var a,s;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var l=u[c];if(l.getAttribute("src")==t||l.getAttribute("data-webpack")=="fe:"+i){a=l;break}}a||(s=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,n.nc&&a.setAttribute("nonce",n.nc),a.setAttribute("data-webpack","fe:"+i),a.src=t),e[t]=[r];var d=function(n,r){a.onerror=a.onload=null,clearTimeout(f);var i=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((function(e){return e(r)})),n)return n(r)},f=setTimeout(d.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=d.bind(null,a.onerror),a.onload=d.bind(null,a.onload),s&&document.head.appendChild(a)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},n.p="/",function(){if("undefined"!==typeof document){var e=function(e){return new Promise((function(t,r){var i=n.miniCssF(e),o=n.p+i;if(function(e,t){for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}}(i,o))return t();!function(e,t,n,r,i){var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.onerror=o.onload=function(n){if(o.onerror=o.onload=null,"load"===n.type)r();else{var a=n&&("load"===n.type?"missing":n.type),s=n&&n.target&&n.target.href||t,u=new Error("Loading CSS chunk "+e+" failed.\n("+s+")");u.code="CSS_CHUNK_LOAD_FAILED",u.type=a,u.request=s,o.parentNode&&o.parentNode.removeChild(o),i(u)}},o.href=t,n?n.parentNode.insertBefore(o,n.nextSibling):document.head.appendChild(o)}(e,o,null,t,r)}))},t={179:0};n.f.miniCss=function(n,r){t[n]?r.push(t[n]):0!==t[n]&&{341:1}[n]&&r.push(t[n]=e(n).then((function(){t[n]=0}),(function(e){throw delete t[n],e})))}}}(),function(){var e={179:0};n.f.j=function(t,r){var i=n.o(e,t)?e[t]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise((function(n,r){i=e[t]=[n,r]}));r.push(i[2]=o);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var i,o,a=r[0],s=r[1],u=r[2],c=0;if(a.some((function(t){return 0!==e[t]}))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(u)u(n)}for(t&&t(r);c<a.length;c++)o=a[c],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0},r=self.webpackChunkfe=self.webpackChunkfe||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e={};n.r(e),n.d(e,{default:function(){return Hn}});var t=n(4165),r=n(5861),i=n(603),o=n(9478),a=n(5671),s=n(3144),u=n(1752),c=n(1120),l=n(136),d=n(7277),f={attributesToExtract:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"],structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}},h=n(1413),p=n(9498),v=n(4942),m={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},g=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.limit=5,this.extractSVG=function(e){return Array.from(e.children).map((function(e){var t=m[e.tagName.toLowerCase()];if(!t)return null;var n=t.reduce((function(t,n){var r=e.getAttribute(n);return(0,h.Z)((0,h.Z)({},t),{},(0,v.Z)({},n,r))}),{});return{tagName:e.tagName.toLowerCase(),attributes:n}})).filter((function(e){return!!e}))}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(t.length&&!(t.length>this.limit))return Array.from(t).map(this.extractSVG)}}]),e}(),y=n(7762),b=n(885);function w(e){if(!e)return!1;var t=e.getBoundingClientRect();return t.top<=window.innerHeight&&t.left<=window.innerWidth&&t.bottom>=0&&t.right>=0}function k(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=window.getComputedStyle(e),r="0"===n.opacity;return{visible:"hidden"!==n.visibility&&"none"!==n.display&&(!t||!r),isTransparent:r}}function S(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,s=i.top<o.bottom&&i.bottom>o.top;return(!n||a)&&(!r||s)}function E(e){try{return"fixed"===getComputedStyle(e).position||!(!e.parentElement||e.parentElement===document.body)&&E(e.parentElement)}catch($n){return console.error("isAncestorOrSelfFixed",$n),!1}}function x(e){var t=e.getBoundingClientRect().top;return t<0?-t:0}function I(e){var t=e.getBoundingClientRect().bottom,n=window.innerHeight;return t>n?t-n:0}var C=n(2982);var M=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.excludeCrossOriginIframes,i=void 0!==r&&r,o=n.includeHTML,a=void 0!==o&&o,s=[];return function t(n){!function(t){t.querySelectorAll(e).forEach((function(e){return s.push(e)}))}(n);var r=[];!function e(t){var n;t.shadowRoot&&r.push(t.shadowRoot),null===(n=t.childNodes)||void 0===n||n.forEach((function(t){return e(t)}))}(n),r.forEach((function(e){return t(e)})),n.querySelectorAll("iframe").forEach((function(e){if(!i||!function(e){if(!e.src)return!0;var t=window.location.origin;try{return t!==new URL(e.src).origin}catch($n){return!1}}(e))try{var n=e.contentDocument;n&&t(n)}catch($n){return}}))}(t),a&&t instanceof Document&&t.documentElement.matches(e)&&s.push(t.documentElement),s},T=function e(t,n){if(t.matches(n))return t;var r=t.slot;if(r){for(var i=t.parentElement;i;){if(i.shadowRoot){var o=i.shadowRoot.querySelector('slot[name="'.concat(r,'"]'));if(o)return e(o,n)}i=i.parentElement}return null}var a=t.closest(n);if(a)return a;var s=t.getRootNode();return s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e(s.host,n):null},_=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).flattenShadowRootChildren,n=void 0!==t&&t,r=Array.from(e.childNodes);if(e.nodeType===Node.ELEMENT_NODE){var i,o=e;if(o.shadowRoot&&(r=r.filter((function(e){return!e.assignedSlot})),n?r=r.concat(Array.from(o.shadowRoot.childNodes)):r.push(o.shadowRoot)),"slot"===o.tagName.toLowerCase())(i=r).push.apply(i,(0,C.Z)(o.assignedNodes()))}return r},A=function(e){var t=e.parentElement;if(t)return t;switch(e.nodeType){case Node.ELEMENT_NODE:var n=e;if(n.assignedSlot)return n.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return e.host}var r=e.parentNode;if(r)switch(r.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return r.host;case Node.DOCUMENT_NODE:if(window.document===r)return null;var i=Array.from(window.document.querySelectorAll("iframe")).find((function(e){return e.contentDocument===r}));if(i)return i}return null},N=function(){function e(t){(0,a.Z)(this,e),this.element=void 0,this.elRect=void 0,this.initialScrollPositions=void 0,this.element=t,this.elRect=this.element.getBoundingClientRect()}return(0,s.Z)(e,[{key:"scrollIntoView",value:function(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!w(this.element)){var e,t=(0,y.Z)(this.initialScrollPositions);try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){var i=this.elRect.top-r.top+n.element.scrollTop;n.element.scrollTop=i}}}catch(o){t.e(o)}finally{t.f()}}return this}},{key:"restore",value:function(){this.initialScrollPositions.forEach((function(e){var t=e.element,n=e.top,r=e.left;try{t.scroll(r,n)}catch($n){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:t,top:n,left:r},$n)}}))}},{key:"getScrollableParentsPositions",value:function(){this.initialScrollPositions=[];for(var e=A(this.element);null!=e;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=A(e)}}]),e}(),R=function(){function e(t){var n=this,r=t.target,i=void 0===r?document:r,o=t.disabled,s=void 0!==o&&o,u=t.log,c=void 0===u||u,l=t.name,d=t.monitorInput,f=void 0!==d&&d;(0,a.Z)(this,e),this.target=void 0,this.name=void 0,this.disabled=void 0,this.logActivity=void 0,this.monitorInput=void 0,this.cache=void 0,this.observer=void 0,this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"],this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"],this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"],this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(","),this.shouldIgnoreMutationRecord=function(e){try{if("attributes"===e.type&&n.ignoreMutationsWithAttributes.includes(e.attributeName))return!0;if("attributes"===e.type&&n.ignoreMutationsWithAttributeRegexPatterns.some((function(t){return new RegExp("^"+t+"$").test(e.attributeName)})))return!0;if("attributes"===e.type&&"class"===e.attributeName){var t=function(e){return e?e.split(" ").filter((function(e){return![":hover","rrweb-paused"].includes(e)})).sort().join(" "):""};return t(e.oldValue)===t(e.target.className)}var r=function(e){return n.ignoreElementsWithClasses.some((function(t){return e.classList.contains(t)}))};if("childList"===e.type&&Array.from(e.addedNodes).every((function(e){return r(e)}))&&Array.from(e.removedNodes).every((function(e){return r(e)})))return!0}catch($n){}return!1},this.monitoredTextElements=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){n.invalidate()}))},this.target=i,this.name=l,this.disabled=s,this.logActivity=c,this.monitorInput=f,this.startObserver()}return(0,s.Z)(e,[{key:"startObserver",value:function(){var e=this;this.observer=new MutationObserver((function(t){t.every(e.shouldIgnoreMutationRecord)||(e.invalidate(),e.monitorInput&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var n=t;n.matches(e.inputEnabledSelectors)||n.isContentEditable?e.monitorInputEnabledElement(n):Array.from(n.querySelectorAll("*")).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))})))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=M(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}},{key:"get",value:function(){return this.log("get","has cache:",!!this.cache),this.cache}},{key:"set",value:function(e){this.disabled||(this.cache=e)}},{key:"hasCache",value:function(){return this.log("hasCache",!!this.cache),!!this.cache}},{key:"invalidate",value:function(){this.set(void 0)}},{key:"log",value:function(){var e;if(this.logActivity){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["[DOMMutationDependentCache] ".concat(this.name?"[".concat(this.name,"]"):"",":")].concat(n))}}}],[{key:"getInstance",value:function(t,n){var r,i=this.makeNameForCache(t,null===n||void 0===n?void 0:n.flags);e.instances[i]||(e.instances[i]=new e((0,h.Z)((0,h.Z)({},n),{},{name:null!==(r=null===n||void 0===n?void 0:n.name)&&void 0!==r?r:t})),null!==n&&void 0!==n&&n.initialValue&&e.instances[i].set(null===n||void 0===n?void 0:n.initialValue));var o=e.instances[i];return null!==n&&void 0!==n&&n.invalidate&&o.invalidate(),o}},{key:"invalidateAll",value:function(){Object.values(e.instances).forEach((function(e){return e.invalidate()}))}},{key:"makeNameForCache",value:function(e,t){return"".concat(e).concat(t?JSON.stringify(t):"")}}]),e}();function D(e,t){try{var n;if(!e.ownerDocument)return!1;var r=e.ownerDocument.defaultView;return!!r&&(e instanceof r[t]||e instanceof(null===(n=r.top)||void 0===n?void 0:n[t]))}catch($n){}return!1}function O(e,t){var n,r;return null!==(n=null!==t&&void 0!==t?t:null===e||void 0===e||null===(r=e.ownerDocument)||void 0===r?void 0:r.defaultView)&&void 0!==n?n:window}function L(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.markTransparentElementsAsHidden,i=void 0===r||r,o=n.markElementsHiddenByTransparentElementAsVisible,a=void 0!==o&&o,s=n.scrollIntoView,u=void 0===s||s,c=n.useCache,l=void 0!==c&&c;if(l){var d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Z(t);return n.has(e)?n.get(e):void 0}(e,{markTransparentElementsAsHidden:i,markElementsHiddenByTransparentElementAsVisible:a,scrollIntoView:u});if(d)return d}var f={isHidden:!0},p=function(n){return(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&t&&t.restore(),l&&F(e,n,{markTransparentElementsAsHidden:i,markElementsHiddenByTransparentElementAsVisible:a}),(0,h.Z)((0,h.Z)({},f),n)};if(!e)return p({isHidden:!0});var v=k(e="OPTION"===e.tagName&&(e.closest("select")||e.closest("datalist"))||e,i),m=v.visible,g=v.isTransparent;if(f.isTransparent=g,!m)return p({isHidden:!0});if(function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.scrollIntoView,r=void 0===n||n,i=e.parentElement,o=window.getComputedStyle(e);if("absolute"===o.position||"fixed"===o.position)return!1;var a=void 0;r&&(a=new N(e).scrollIntoView());var s=function(e){return a&&a.restore(),e},u=O(e);if(!u)return s(!1);for(;i;){if(!(i instanceof u.Element))return s(!1);var c=window.getComputedStyle(i);if("absolute"===c.position||"fixed"===c.position)return s(!1);var l="hidden"===c.overflowX,d="hidden"===c.overflowY;if((l||d)&&!S(i,e,l,d))return s(!0);i=i.parentElement}return s(!1)}(e,{scrollIntoView:u}))return p({isHidden:!0});try{var w;u&&(t=new N(e).scrollIntoView());var E=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;if(!n)return null;var r=e.ownerDocument,i={top:0,left:0,right:n.innerWidth||r.documentElement.clientWidth,bottom:n.innerHeight||r.documentElement.clientHeight},o={top:Math.max(t.top,i.top),left:Math.max(t.left,i.left),right:Math.min(t.right,i.right),bottom:Math.min(t.bottom,i.bottom),height:0,width:0};return o.width=o.right-o.left,o.height=o.bottom-o.top,o.width>0&&o.height>0?o:null}(e);if(!E)return p({isHidden:!0});var x=[[E.width/2,E.height/2,!0],[Math.max(.01*E.width,1),Math.max(.01*E.height,1)],[Math.min(.99*E.width,E.width-1),Math.max(.01*E.height,1)],[Math.max(.01*E.width,1),Math.min(.99*E.height,E.height-1)],[Math.min(.99*E.width,E.width-1),Math.min(.99*E.height,E.height-1)]],I=null!==(w=function(e){for(var t=e;t;){if(11===t.nodeType)return[t,t.ownerDocument.defaultView];t=t.parentNode}}(e))&&void 0!==w?w:[e.ownerDocument,e.ownerDocument.defaultView],C=(0,b.Z)(I,2),T=C[0],_=C[1],R=void 0,D=O(e);if(D&&e instanceof D.HTMLInputElement&&e.id&&e.type&&["checkbox","radio"].includes(e.type)){var P=M('label[for="'.concat(e.id,'"]'),T);P.length&&(R=P[0])}for(var j=0,V=x;j<V.length;j++){var B=(0,b.Z)(V[j],3),H=B[0],W=B[1],U=B[2],z=E.left+H>=0&&E.left+H<=_.innerWidth?E.left+H:H,q=E.top+W>=0&&E.top+W<=_.innerHeight?E.top+W:W,G=T.elementFromPoint(z,q);if(G===e)return p({isHidden:!1,clickOffset:U?void 0:{x:H,y:W}});if(G){if(!0===U&&G.shadowRoot)return p(L(G,n));for(var $=G;$;){if($===e||R&&R===$)return p({isHidden:!1,clickOffset:U?void 0:{x:H,y:W}});$=A($)}if(a)try{var Q,Y=T.elementsFromPoint(z,q),X=(0,y.Z)(Y);try{for(X.s();!(Q=X.n()).done;){var K=Q.value;if(K===e)return p({isHidden:!1,clickOffset:U?void 0:{x:H,y:W},isBehindTransparentElement:!0});var J=_.getComputedStyle(K),ee=K.getBoundingClientRect();if("0"!==J.opacity&&"hidden"!==J.visibility&&!/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(J.backgroundColor)||ee.width>1.2*E.width||ee.height>1.2*E.height)break}}catch(te){X.e(te)}finally{X.f()}}catch($n){console.error("Error while checking transparent elements over interactable",$n)}}}return t&&(t.restore(),t=void 0),R?L(R,n):p({isHidden:!0})}catch($n){throw $n}}R.instances={};var Z=function(e){var t=R.getInstance("isElementHidden",{log:!1,flags:e}),n=t.get();return n||(n=new Map,t.set(n)),n};var F=function(e,t){Z(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).set(e,t)};var P=function(e){return L(e,{useCache:!0}).isHidden},j=function(e,t){var n=e.tagName.toLowerCase();switch(n){case"img":case"video":case"audio":return{type:p.EI.Media,tag:n,src:e.getAttribute("src"),size:{width:e.clientWidth,height:e.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:t,isHidden:P(e)};case"svg":return{type:p.EI.SVG,tag:n,components:new g(document).extract(e)[0],isRoot:t,isHidden:P(e)};case"a":return{type:p.EI.Anchor,tag:n,href:e.getAttribute("href"),text:e.innerText,isRoot:t,isHidden:P(e)};case"button":return{type:p.EI.Button,tag:n,text:e.innerText,buttonType:e.getAttribute("type")||"button",isRoot:t,isHidden:P(e)};case"input":return{type:p.EI.Input,tag:n,inputType:e.getAttribute("type"),placeholder:e.getAttribute("placeholder"),isRoot:t,isHidden:P(e)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:p.EI.NoData,tag:n,isRoot:t,isHidden:P(e)}}if(e.innerHTML.trim()===e.innerText&&e.innerHTML.length)return{type:p.EI.Text,tag:n,text:V(e.innerHTML),isRoot:t,isHidden:P(e)}},V=function(e){return e.length>256?e.substring(0,256)+"...":e},B=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},H=function(e){var t=B(e);return!(!t||!Object.keys(t).length)},W=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord;return i?void 0!==o&&o?e===t||e.startsWith(t)||e.includes(" ".concat(t," "))||e.endsWith(t):e.includes(t):e===t},U=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.elementsByQueryCache={}}return(0,s.Z)(e,[{key:"getElementsByQuery",value:function(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=M(e,this.document)),this.elementsByQueryCache[e]}},{key:"extract",value:function(e){for(var t=this,n=e.element,r=e.setClass,i=e.setAttribute,o=e.getElementsInStructuralVicinity,a=e.getElementsInVisualVicinity,s=function(){var e=n.attributes[u],s=e.name,c=e.value;return f.attributesToExtract.includes(s)?"string"!==typeof c?0:"class"===s?(c.split(" ").forEach((function(e){e.length&&r(e,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,e,{contains:!0,matchWholeWord:!0}))})),0):void i(s,t.processAttribute({element:n,getElementsInStructuralVicinity:o,getElementsInVisualVicinity:a},s,c)):0},u=0;u<n.attributes.length;++u)s()}},{key:"processAttribute",value:function(e,t,n){var r=e.element,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=this.getElementsByQuery("*"),u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.contains,i=void 0!==r&&r,o=n.matchWholeWord,a=void 0!==o&&o;return t=t.replaceAll("\n","\\A ").replaceAll('"','\\"'),i?a?"[".concat(e,'="').concat(t,'"],[').concat(e,'*="').concat(t,' "],[').concat(e,'*=" ').concat(t,' "],[').concat(e,'*=" ').concat(t,'"]'):"[".concat(e,'*="').concat(t,'"]'):"[".concat(e,'="').concat(t,'"]')}(t,n,a),c=this.getElementsByQuery(u),l=this.getElementsByQuery("".concat(r.tagName.toLowerCase())),d=c.filter((function(e){return e.tagName===r.tagName})),f=i?i():[],h=f.filter((function(e){return e.element.attributes[t]&&W(e.element.attributes[t].value,n,a)})),p=o?o():[],v=p.filter((function(e){return e.element.attributes[t]&&W(e.element.attributes[t].value,n,a)}));return{value:n,globalUniqueness:1-c.length/s.length,tagUniqueness:1-d.length/l.length,structuralVicinityUniqueness:i?1-h.length/f.length:void 0,visualVicinityUniqueness:o?1-v.length/p.length:void 0}}}]),e}();function z(e){var t=e.getRootNode();return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?function(e,t){var n=e.querySelectorAll("slot");if(!n.length)return e.innerText;var r=e.cloneNode(!0),i=r.querySelectorAll("slot");return n.forEach((function(e,t){var n=e.assignedNodes();i[t].innerText=n.map((function(e){switch(e.nodeType){case Node.TEXT_NODE:return e.textContent;case Node.ELEMENT_NODE:return e.innerText}})).filter((function(e){return!!e})).join("\n")})),r.innerText.trim()}(e):e.innerText}var q=function(){function e(t){var n=this;(0,a.Z)(this,e),this.el=null,this.structuralVicinityData=void 0,this.visualVicinityData=void 0,this.serializedElement="",this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.react=void 0,this.innerFeatures=void 0,this.positioning=void 0,this.svgs=void 0,this.attributesExtractor=void 0,this.getElementsInStructuralVicinity=function(){return n.structuralVicinityData.elementsInStructuralVicinity},this.setElementStructuralVicinityData=function(e){n.structuralVicinityData=e},this.setElementVisualVicinityData=function(e){n.visualVicinityData=e},this.getElementsInVisualVicinity=function(){return n.visualVicinityData},this.setSerializedElement=function(e){n.serializedElement=e},this.setAttribute=function(e,t){n.attributes[e]=t},this.setClass=function(e,t){n.classes[e]=t},this.setInnerText=function(e){n.innerText=e},this.setStyle=function(e){n.style=e},this.setTag=function(e){n.tag=e},this.setReact=function(e){n.react=e},this.setInnerFeatures=function(e){n.innerFeatures=e},this.setPositioning=function(e){n.positioning=e},this.setSVGs=function(e){n.svgs=e},this.el=t,this.attributesExtractor=new U(this.el.ownerDocument)}return(0,s.Z)(e,[{key:"serialize",value:function(){}},{key:"getSerializedElement",value:function(){return this.serializedElement}},{key:"element",get:function(){return this.el}},{key:"getAttributes",value:function(){return this.attributes}},{key:"getClasses",value:function(){return this.classes}},{key:"getStyle",value:function(){return this.style}},{key:"getInlineStyle",value:function(){return this.style.inline}},{key:"getComputedStyle",value:function(){return this.style.computed}},{key:"getTag",value:function(){return this.tag}},{key:"getInnerFeatures",value:function(){return this.innerFeatures}},{key:"getInnerText",value:function(){return this.innerText}},{key:"getSVGs",value:function(){return this.svgs}},{key:"toMetadata",value:function(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}},{key:"extractStaticCandidates",value:function(){return B({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}},{key:"makeVicinityMetadata",value:function(e,t){var n=this;return e.reduce((function(e,r){var i=n.isVicinityQualifiedElement(r.element),o=i.qualified,a=i.feature;if(!o)return e;var s={},u={};n.attributesExtractor.extract({element:r.element,setClass:function(e,t){return s[e]=t},setAttribute:function(e,t){return u[e]=t}});var c=(0,h.Z)({tag:r.element.tagName.toLowerCase(),classes:s,attributes:u,text:n.extractTextForMetadata(r.element),feature:a,relativePosition:n.element.compareDocumentPosition(r.element)},t(r));return e.push(c),e}),[])}},{key:"makeStructuralVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),(function(e){return{position:e.position}}))}},{key:"makeVisualVicinityMetadata",value:function(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),(function(e){return{position:[e.position],distance:e.distance}}))}},{key:"isVicinityQualifiedElement",value:function(e){if(e===this.element)return{qualified:!1};if(!f.vicinityFeatureElementsOnly)return{qualified:!0};var t=j(e);return{qualified:!!t,feature:t}}},{key:"extractTextForMetadata",value:function(e){if(e.innerHTML===e.innerText){var t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}}},{key:"extractStaticTextCandidate",value:function(){var e,t,n;switch(this.tag){case"input":case"textarea":return null===(e=this.attributes)||void 0===e||null===(t=e.placeholder)||void 0===t?void 0:t.value;default:return null===(n=this.innerText)||void 0===n?void 0:n.content}}},{key:"extractLabeling",value:function(){if("label"===this.element.tagName.toLowerCase())return z(this.element);var e=T(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return z(e);try{if(this.element.id&&this.element.id.length)if(M('[aria-labelledby="'.concat(this.element.id,'"]')).length)return z(this.element)}catch($n){console.error("extractLabeling error",$n)}}},{key:"extractLabeled",value:function(){var e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;var t=T(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return z(t);if(this.element.id&&this.element.id.length)try{var n=M("label[for=".concat(this.element.id,"]"));if(n.length)return z(n[0])}catch($n){return}var r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){var i=M(r.split(" ").map((function(e){return"#".concat(e)})).join(","));if(i.length)return z(i[0])}}},{key:"extractSVGTitle",value:function(){try{if("svg"!==this.element.tagName.toLowerCase())return;var e=this.element.querySelector("title");if(!e)return;return z(e)}catch($n){console.error("extractSVGTitle error",$n)}}},{key:"attributeExists",value:function(e){return e&&e.length>0}}]),e}(),G=function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.structuralVicinityData={elementsInStructuralVicinity:[],html:""},this.element=t,this.config=n}return(0,s.Z)(e,[{key:"getInitialLimit",value:function(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}},{key:"calculate",value:function(){var e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,[p.i7.Element],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach((function(t){return t.element.attributes.removeNamedItem("checksum-radial-traverse-".concat(e))})),this.structuralVicinityData}},{key:"populateStructuralVicinity",value:function(e,t,n){var r=this,i=n.runId,o=n.step,a=n.limit;if(!e||o>a)return"";if(void 0!==e.attributes["checksum-radial-traverse-".concat(i)])return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute("checksum-radial-traverse-".concat(i),o.toString());var s={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},u=this.populateStructuralVicinity(A(e),[].concat((0,C.Z)(t),[p.i7.Parent]),s),c=this.populateStructuralVicinity(e.previousElementSibling,[].concat((0,C.Z)(t),[p.i7.LeftSibling]),s),l=this.populateStructuralVicinity(e.nextElementSibling,[].concat((0,C.Z)(t),[p.i7.RightSibling]),s),d=[];(function(e){var t,n,r=Array.from(e.children);return e.shadowRoot&&(t=r=r.filter((function(e){return!e.assignedSlot}))).push.apply(t,(0,C.Z)(Array.from(e.shadowRoot.children))),"slot"===e.tagName.toLowerCase()&&(n=r).push.apply(n,(0,C.Z)(e.assignedElements())),r})(e).map((function(e,n){return d.push(r.populateStructuralVicinity(e,[].concat((0,C.Z)(t),[p.i7.Child]),s))}));var f=c+e.outerHTML.replace(e.innerHTML,d.join(""))+l;return u&&!u.includes(e.outerHTML)?u.replace("></",">".concat(f,"</")):u?u.replace(e.outerHTML,f):f}}]),e}(),$=function(e){return e[e.Media=0]="Media",e[e.NoData=1]="NoData",e[e.Anchor=2]="Anchor",e[e.Button=3]="Button",e[e.Input=4]="Input",e[e.Text=5]="Text",e[e.SVG=6]="SVG",e}({}),Q=function(e){return e.Center="center",e.Top="top",e.Bottom="bottom",e.Left="left",e.Right="right",e.TopRight="top-right",e.TopLeft="top-left",e.BottomRight="bottom-right",e.BottomLeft="bottom-left",e}({}),Y=function(e){return e[e.Query=0]="Query",e[e.Intersection=1]="Intersection",e[e.Interactables=2]="Interactables",e[e.All=3]="All",e}({}),X=function(e){return e[e.New=0]="New",e[e.Covered=1]="Covered",e[e.ElementTooBig=2]="ElementTooBig",e[e.Self=3]="Self",e}(X||{}),K=function(){function e(t,n){var r;(0,a.Z)(this,e),this.document=t,this.config=n,this.debug=!1,this.sampleBoxColors=(r={},(0,v.Z)(r,X.New,"green"),(0,v.Z)(r,X.Covered,"orange"),(0,v.Z)(r,X.ElementTooBig,"red"),(0,v.Z)(r,X.Self,"blue"),r)}return(0,s.Z)(e,[{key:"calculate",value:function(e){for(var t=this,n=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect(),a=o.left-r;a<o.left+o.width+r;a+=i)for(var s=function(){var e=a+i/2,s=u+i/2;if(t.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i}))return t.addTrace(e,s,i,X.Self),0;var c=t.document.elementFromPoint(e,s);if(!c)return 0;var l=c.getBoundingClientRect();if(l.width>2*r&&l.height>2*r||t.doesRectContain(l,o))return t.addTrace(e,s,i,X.ElementTooBig),0;if(!!n.find((function(e){return e.element===c})))return t.addTrace(e,s,i,X.Covered),0;var d=t.getPosition(o,l),f=d.position,h=d.distance;n.push({element:c,position:f,distance:h}),t.addTrace(e,s,i,X.New)},u=o.top-r;u<o.top+o.height+r;u+=i)s();return n}},{key:"getPosition",value:function(e,t){var n=this.getCenter(t),r=n.x,i=n.y,o=this.getCenter(e),a=o.x,s=o.y;return{distance:Number(Math.sqrt(Math.pow(a-r,2)+Math.pow(s-i,2)).toFixed(2)),position:function(){var e=r-a,t=i-s;return e<0&&t<0?Q.TopLeft:e>0&&t<0?Q.TopRight:e<0&&t>0?Q.BottomLeft:e>0&&t>0?Q.BottomRight:0===e&&t<0?Q.Top:0===e&&t>0?Q.Bottom:e<0&&0===t?Q.Left:e>0&&0===t?Q.Right:Q.Center}()}}},{key:"getCenter",value:function(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}},{key:"addTrace",value:function(e,t,n,r){if(this.debug){var i=this.document.createElement("xdiv");i.setAttribute("style","position: absolute; width: ".concat(n,"px; height: ").concat(n,"px; top: ").concat(t,"px; left: ").concat(e,"px; background: ").concat(this.sampleBoxColors[r],"; z-index: 999999999999;opacity:0.4")),this.document.getElementsByTagName("body")[0].prepend(i)}}},{key:"doesRectContain",value:function(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}},{key:"doRectsOverlap",value:function(e,t){var n=e.right<t.left,r=e.left>t.right,i=e.top>t.bottom,o=e.top<t.top;return!(n||r||i||o)}}]),e}();window.vve=new K({radius:50,scanStep:10});var J=n(2352);window.resq$=J.resq$,window.resq$$=J.resq$$;var ee=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}},{key:"findParentComponent",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.ignoreBaseElement,i=void 0!==r&&r,o=n.baseElement,a=void 0===o?void 0:o,s=(0,J.resq$$)("*",e.parentElement).find((function(t){return 1===t.children.length&&t.children[0].node===e}));return a=null!==(t=a)&&void 0!==t?t:e,s&&(i||s.node!==a)?this.parseRESQresult(s):this.findParentComponent(e.parentElement,{baseElement:a,ignoreBaseElement:i})}},{key:"parseRESQresult",value:function(e){if(e){return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:function e(t){switch(typeof t){case"string":return[t];case"object":return Array.isArray(t)?t.map(e):Object.keys(t)}}(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}}}]),e}(),te=new ee,ne=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"extract",value:function(e){return{component:void 0,parentComponent:void 0}}}]),e}(),re=(new ne,function(){function e(t,n){(0,a.Z)(this,e),this.element=void 0,this.config=void 0,this.provider=te,this.element=t,this.config=n}return(0,s.Z)(e,[{key:"extract",value:function(){return this.provider.extract(this.element)}}]),e}()),ie=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.tagBaseComputedStyle={}}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.element,n=e.setStyle,r=t.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){var i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch($n){if(console.error("Failed to extract style for tag",r,$n),!this.tagBaseComputedStyle[r])return}n({inline:this.sanitzieStyle(t.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(t)))})}},{key:"diffComputedStyle",value:function(e,t){var n,r;return n=e,r=t,Object.keys(r).reduce((function(e,t){return n[t]===r[t]?e:(0,h.Z)((0,h.Z)({},e),{},(0,v.Z)({},t,r[t]))}),{})}},{key:"sanitzieStyle",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).acceptEmptyValue,n=void 0===t||t;return Object.keys(e).reduce((function(t,r){if(!isNaN(r))return t;var i=e[r];return n||i?(t[r]=i,t):t}),{})}}]),e}(),oe=function(){function e(t){(0,a.Z)(this,e),this.document=t,this.cache=void 0,this.makeFeatureNode=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:n?e.tagName.toLowerCase():void 0,feature:n?j(e,t):void 0,children:[],isRoot:t}},this.includeRootElements=!0,this.rootElementsTypeExceptions=[p.EI.Text],this.cache=R.getInstance("innerFeaturesExtractor",{log:!1})}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=[],n=this.makeFeatureNode(e,!0);return this.walk(e,n,t),t}},{key:"getMapFromCache",value:function(){var e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}},{key:"getFeatureNodeFromCache",value:function(e){var t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}},{key:"addFeatureNodeToCache",value:function(e,t){var n=this.getMapFromCache();n.set(e,t),this.cache.set(n)}},{key:"walk",value:function(e,t,n){var r=this,i=!1;_(e).forEach((function(e){var o,a=null!==(o=r.getFeatureNodeFromCache(e))&&void 0!==o?o:r.makeFeatureNode(e),s=r.walk(e,a,n);s&&t.children.push(a),i||(i=s)}));var o=!!t.feature;return!o||t.isRoot&&!this.shouldIncludeRootNode(t)||n.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}},{key:"shouldIncludeRootNode",value:function(e){return!!this.includeRootElements&&!this.rootElementsTypeExceptions.includes(e.type)}}]),e}();window.inner_features_extractor=new oe;var ae,se,ue=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t;return{content:null!==(t=z(e))&&void 0!==t?t:void 0}}}]),e}(),ce=function(){function e(t){(0,a.Z)(this,e),this.document=t}return(0,s.Z)(e,[{key:"extract",value:function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.bottom,i=t.left,o=t.right,a=document.documentElement.scrollHeight,s=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(n,window.innerHeight),bottom:this.normalize(r,window.innerHeight),left:this.normalize(i,window.innerWidth),right:this.normalize(o,window.innerWidth)}},document:{size:{height:a,width:s},element:{top:this.normalize(n+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,s),right:this.normalize(o+window.scrollX,s)}}}}},{key:"normalize",value:function(e,t){return e/t}}]),e}(),le=function(){function e(t,n){(0,a.Z)(this,e),this.xmlSerializer=void 0,this.document=void 0,this.config=void 0,this.visualVicinityExtractor=void 0,this.styleExtractor=void 0,this.innerFeaturesExtractor=void 0,this.innerTextExtractor=void 0,this.positioningExtractor=void 0,this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0},this.xmlSerializer=new XMLSerializer,this.document=t,this.config=null!==n&&void 0!==n?n:f,this.visualVicinityExtractor=new K(this.document,this.config.visualVicinity),this.styleExtractor=new ie(this.document),this.innerFeaturesExtractor=new oe(this.document),this.innerTextExtractor=new ue(this.document),this.positioningExtractor=new ce(this.document)}return(0,s.Z)(e,[{key:"isSameDocument",value:function(e){return this.document===e}},{key:"extract",value:function(e){var t=new N(e).scrollIntoView(),n=Date.now(),r=new q(e);return this.serializeElement(r),this.stats.serializeElement+=Date.now()-n,n=Date.now(),this.populateElementsInStructuralVicinity(r),this.stats.populateElementsInStructuralVicinity+=Date.now()-n,n=Date.now(),this.populateElementsInVisualVicinity(r),this.stats.populateElementsInVisualVicinity+=Date.now()-n,n=Date.now(),this.extractAttributes(r),this.stats.extractAttributes+=Date.now()-n,n=Date.now(),this.extractInnerText(r),this.stats.extractInnerText+=Date.now()-n,n=Date.now(),this.extractStyle(r),this.stats.extractStyle+=Date.now()-n,n=Date.now(),this.extractTag(r),this.stats.extractTag+=Date.now()-n,n=Date.now(),this.extractInnerFeatures(r),this.stats.extractInnerFeatures+=Date.now()-n,n=Date.now(),this.extractPositioning(r),this.stats.extractPositioning+=Date.now()-n,n=Date.now(),this.extractSVGComponents(r),this.stats.extractSVGComponents+=Date.now()-n,n=Date.now(),t.restore(),this.stats.final+=Date.now()-n,r}},{key:"extractReact",value:function(e){var t=e.element;(0,e.setReact)(new re(t,this.config.react).extract())}},{key:"extractTag",value:function(e){var t=e.element;(0,e.setTag)(t.tagName.toLowerCase())}},{key:"extractPositioning",value:function(e){var t=e.element;(0,e.setPositioning)(this.positioningExtractor.extract(t))}},{key:"extractSVGComponents",value:function(e){var t=e.element;(0,e.setSVGs)(new g(this.document).extract(t))}},{key:"serializeElement",value:function(e){e.element,e.setSerializedElement}},{key:"extractAttributes",value:function(e){var t=e.element,n=e.setClass,r=e.setAttribute,i=e.getElementsInStructuralVicinity,o=e.getElementsInVisualVicinity;return new U(this.document).extract({element:t,setClass:n,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}},{key:"populateElementsInStructuralVicinity",value:function(e){var t=e.element;(0,e.setElementStructuralVicinityData)(new G(t,this.config.structuralVicinity).calculate())}},{key:"populateElementsInVisualVicinity",value:function(e){var t=e.element;(0,e.setElementVisualVicinityData)(this.visualVicinityExtractor.calculate(t))}},{key:"extractInnerText",value:function(e){var t=e.element;(0,e.setInnerText)(this.innerTextExtractor.extract(t))}},{key:"extractStyle",value:function(e){var t=e.element,n=e.setStyle;return this.styleExtractor.extract({element:t,setStyle:n})}},{key:"extractInnerFeatures",value:function(e){var t=e.element;(0,e.setInnerFeatures)(this.innerFeaturesExtractor.extract(t))}}]),e}(),de=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"injectSelectorsAndLocators",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var i,o,a,s,u,c=this,l=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(i=l.length>1&&void 0!==l[1]?l[1]:{}).testIdSelector,a=i.searchParentFrames,s=void 0===a||a,u=n.map((function(e){return{container:e,removedAttributes:c.stripNodeAttributes(e.element)}})),e.next=4,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,a,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!0});case 2:return r=e.sent,i=r.selector,a=r.locator,u=r.parentFramesSelectors,e.abrupt("return",(0,h.Z)((0,h.Z)({},n),{},{selector:i,locator:a,parentFramesSelectors:u}));case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 4:return u=e.sent,e.next=7,Promise.all(u.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.removedAttributes.id||n.removedAttributes.originalClasses){e.next=2;break}return e.abrupt("return",n);case 2:if(c.restoreNodeAttributes(n.container.element,n.removedAttributes),void 0===window.playwright.$(n.selector)){e.next=5;break}return e.abrupt("return",n);case 5:return e.next=7,c.getSelectorAndLocator(n.container.element,{testIdSelector:o,searchParentFrames:s,stripAttributes:!1});case 7:return r=e.sent,console.log("Selector ".concat(n.selector," is not valid, generated new one: ").concat(r.selector)),Object.assign(n,r),e.abrupt("return",n);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return u=e.sent,e.abrupt("return",u.map((function(e){var t=e.container,n=e.selector,r=e.locator,i=e.parentFramesSelectors;return(0,h.Z)((0,h.Z)({},t),{},{selector:n,locator:r,parentFramesSelectors:i})})));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"stripNodeAttributes",value:function(e){var t,n,r=e;r.id&&(t=r.id,r.removeAttribute("id"));try{if((n=r.getAttribute("class"))&&"string"===typeof n){var i=n.split(" ").filter((function(e){return!e.startsWith("css-")&&!e.startsWith("jss-")})).join(" ");r.setAttribute("class",i)}else n=void 0}catch($n){return console.warn("[playwright selector generator] error with class filtering",$n),{}}return{id:t,originalClasses:n}}},{key:"restoreNodeAttributes",value:function(e,t){var n=e,r=t.id,i=t.originalClasses;r&&n.setAttribute("id",r),i&&n.setAttribute("class",i)}},{key:"getSelectorAndLocator",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,S,E=this,x=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=x.length>1&&void 0!==x[1]?x[1]:{}).testIdSelector,o=r.searchParentFrames,a=void 0===o||o,s=r.stripAttributes,u=void 0===s||s,c=r.ignoredIframesSelectors,l=void 0===c?[]:c,n){e.next=3;break}return e.abrupt("return",null);case 3:if(d=this.getIframes({ignoredIframesSelectors:l}),!a){e.next=10;break}return e.next=7,this.getParentFramesSelectors(n,d);case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=[];case 11:if(f=e.t0,h=n,!(p=this.getTestAttributeSelector(h,i))){e.next=16;break}return e.abrupt("return",{selector:p,locator:'locator("'.concat(p,'")'),parentFramesSelectors:f});case 16:return u&&(g=this.stripNodeAttributes(n),v=g.id,m=g.originalClasses),y="",b="",e.prev=18,e.next=21,window.playwright.generateSelectorAndLocator(n);case 21:w=e.sent,y=w.selector,b=w.locator,e.next=42;break;case 26:if(e.prev=26,e.t1=e.catch(18),(k=n.ownerDocument.defaultView)===window){e.next=42;break}return k.playwright||(k.playwright=window.playwright),e.prev=31,e.next=34,k.playwright.generateSelectorAndLocator(n);case 34:S=e.sent,y=S.selector,b=S.locator,e.next=42;break;case 39:e.prev=39,e.t2=e.catch(31),console.log("get selector and locator error",n.nodeType,n,"\n",e.t1,"\n",e.t2);case 42:return e.prev=42,u&&this.restoreNodeAttributes(n,{id:v,originalClasses:m}),e.finish(42);case 45:return b&&f&&f.length>0&&(b=f.map((function(e){return"frameLocator('".concat(E.escapeSingleQuotes(E.escapeBackslash(e)),"')")})).join(".")+".".concat(b)),e.abrupt("return",{selector:y,locator:b,parentFramesSelectors:f});case 47:case"end":return e.stop()}}),e,this,[[18,26,42,45],[31,39]])})));return function(t){return e.apply(this,arguments)}}()},{key:"findIframeWindowByParentFrameSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>0&&void 0!==u[0]?u[0]:[],r=window.top,!(n&&n.length>0)){e.next=22;break}i=(0,y.Z)(n),e.prev=4,i.s();case 6:if((o=i.n()).done){e.next=14;break}return a=o.value,e.next=10,r.playwright.$(a);case 10:s=e.sent,r=s.contentWindow;case 12:e.next=6;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(4),i.e(e.t0);case 19:return e.prev=19,i.f(),e.finish(19);case 22:return e.abrupt("return",r);case 23:case"end":return e.stop()}}),e,null,[[4,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"selector",value:function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.findIframeWindowByParentFrameSelectors(r);case 3:return a=e.sent,e.next=6,a.playwright.$(n);case 6:o=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log("selector error",n,e.t0);case 12:return e.abrupt("return",null!==(i=o)&&void 0!==i?i:this.selectFromFirstIframe(n));case 13:case"end":return e.stop()}}),e,this,[[0,9]])})));return function(t,n){return e.apply(this,arguments)}}())},{key:"getParentFramesSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.length){e.next=2;break}return e.abrupt("return",[]);case 2:if((i=n.ownerDocument)!==document){e.next=5;break}return e.abrupt("return",[]);case 5:if(o=r.find((function(e){return e.contentDocument===i}))){e.next=8;break}return e.abrupt("return",[]);case 8:return e.next=10,this.getSelectorAndLocator(o,{searchParentFrames:!1});case 10:return a=e.sent,e.t0=[],e.t1=C.Z,e.next=15,this.getParentFramesSelectors(o,r);case 15:return e.t2=e.sent,e.t3=(0,e.t1)(e.t2),e.t4=[a.selector],e.abrupt("return",e.t0.concat.call(e.t0,e.t3,e.t4));case 19:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getIframes",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).ignoredIframesSelectors,t=void 0===e?[]:e,n=function(e){return e.filter((function(e){return!t.some((function(t){return e.matches(t)}))}))},r=R.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(r.hasCache())return n(r.get());var i=M("iframe");return r.set(i),n(i)}},{key:"getFirstIframeContentWindow",value:function(){var e=document.querySelector("iframe");if(e){var t=e.contentWindow;return t.playwright||(t.playwright=window.playwright),t}}},{key:"selectFromFirstIframe",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.getFirstIframeContentWindow()){e.next=3;break}return e.abrupt("return",void 0);case 3:return e.prev=3,e.next=6,r.playwright.$(n);case 6:return e.abrupt("return",e.sent);case 9:e.prev=9,e.t0=e.catch(3),console.log("selector error",n);case 12:case"end":return e.stop()}}),e,this,[[3,9]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getTestAttributeSelector",value:function(e,t){for(var n=0,r=[t].concat(["data-cy","data-testid","data-test-id","data-test"]);n<r.length;n++){var i=r[n];if(i&&e.getAttribute(i)){var o="[".concat(i,"='").concat(e.getAttribute(i),"']");if(1===M(o).length)return o;if(M(o).length>1){var a=Array.from(M(o)).indexOf(e);return"".concat(o," >> nth=").concat(a)}}}}},{key:"replaceAll",value:function(e,t,n){return e?e.replace(new RegExp(t,"g"),n):e}},{key:"escapeSingleQuotes",value:function(e){return this.replaceAll(e,"'","\\'")}},{key:"escapeBackslash",value:function(e){return e.replace(/\\/g,"\\\\")}}]),e}(),fe=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}],he=function(){function e(){(0,a.Z)(this,e),this.observer=void 0,this.monitoringPeriodTimeout=void 0,this.flashingTextElements=[]}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.length>0&&t.addedNodes.forEach((function(t){t instanceof HTMLElement&&e.includeElement(t)&&setTimeout((function(){e.flashingTextElements.push(e.processTextElements(t))}),1e3)}))}))})),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout((function(){e.stop()}),3e5)}},{key:"stop",value:function(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}},{key:"get",value:function(){var e=this.flashingTextElements.map((function(e){return e.filter((function(e){return!e.isConnected||L(e.parentElement).isHidden}))})).filter((function(e){return e.length})).map((function(e){return"<span>".concat(e.map((function(e){return e.textContent})).join("</span><span>"),"</span>")})),t=new Set(e);return Array.from(t)}},{key:"stopAndGet",value:function(){return this.stop(),this.get()}},{key:"includeElement",value:function(e){return!(e.getElementsByTagName("*").length>50)&&!(e.outerHTML.length>5e3)}},{key:"processTextElements",value:function(e){for(var t,n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),r=[];t=n.nextNode();)L(t.parentNode).isHidden||r.push(t);return r}}]),e}(),pe=function(){function e(t){(0,a.Z)(this,e),this.counter=void 0,this.counter=null!==t&&void 0!==t?t:"0"}return(0,s.Z)(e,[{key:"increment",value:function(){for(var e=this.counter.length-1;e>=0;){var t=this.counter[e];if("9"===t)return void(this.counter=this.replaceAt(this.counter,e,"a"));if("z"!==t)return void(this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1)));if(this.counter=this.replaceAt(this.counter,e,"0"),0===e)return void(this.counter="1"+this.counter);e--}}},{key:"get",value:function(){return this.counter}},{key:"incrementAndGet",value:function(){return this.increment(),this.get()}},{key:"getAndIncrement",value:function(){var e=this.get();return this.increment(),e}},{key:"replaceAt",value:function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)}}]),e}(),ve="checksum-ignore",me="checksum-get-more-items",ge=.7,ye=0,be=function(e,t){var n=t.forceIncludeAttribute,r=t.forceIncludeFileInput,i=t.forceIncludeElements,o=t.limit;e.excludedElements=new Set;var a=e.element,s=null!==o&&void 0!==o?o:Math.min(Math.ceil(.5*a.children.length),a.children.length-20),u=function(t){var n=0,r=we(t);r.length>=e.attributes.length&&n++;var i=r.filter((function(t){return e.attributes.includes(t)})).length;i===e.attributes.length?n+=3:i>0&&n++;var o=ke(t).filter((function(t){return e.classes.includes(t)})).length;return o===e.classes.length?n+=2:o>0&&n++,n},c=Array.from(a.children).filter((function(t){return t.tagName===e.tagName&&!function(e){return!(!n||!(e.hasAttribute(n)||Array.from(e.querySelectorAll("[".concat(n,"]"))).length>0))||!(!r||"input"!==e.tagName.toLowerCase()||"file"!==e.type)||i.includes(e)}(t)})).map((function(e){return{element:e,score:u(e)}})).sort((function(e,t){return t.score-e.score})),l=c.reduce((function(e,t){var n=t.element;return w(D(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(n):e.outOfViewportElements.push(n),e}),{inViewportElements:[],outOfViewportElements:[]}),d=l.inViewportElements,f=function(t){var n,r=(0,y.Z)(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.excludedElements.add(i),e.excludedElements.size===s)return!0}}catch(o){r.e(o)}finally{r.f()}};return f(l.outOfViewportElements)||f(d),function(e){var t=e.excludedElements,n=e.element;t.forEach((function(e){e.setAttribute(ve,"")})),n._getmoreitemsid||(n._getmoreitemsid="gm"+ye++);e.id=n._getmoreitemsid,n.setAttribute(me,e.id)}(e),Array.from(e.excludedElements)};function we(e){return Array.from(e.attributes).filter((function(e){return!e.name.startsWith("checksum")})).map((function(e){return e.name.replace(/[0-9]/g,"")}))}function ke(e){var t,n;return null!==(t=null===(n=e.className)||void 0===n?void 0:n.split(" ").filter((function(e){return e})))&&void 0!==t?t:[]}function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).nodeRepetitionsThreshold,n=void 0===t?20:t;try{return console.time("bettertemplatize"),ae=new Set,Ee(e,n),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(ae)),Array.from(ae)}catch(r){return console.error("[bettertemplatize] failed during template processing:",r.message),[]}}function Ee(e,t){Array.from(e.children).forEach((function(e){if(!(e instanceof SVGElement)){var n=e.children.length;if(n>=t)for(var r=0,i=Array.from(e.children),o=Math.ceil(n*ge),a=0;a<n;a++)for(var s=a+1;s<n;s++)try{if(Te(i[a],i[s])&&++r>=o)return void ae.add((0,h.Z)({element:e},se))}catch(u){return}Ee(e,t)}}))}var xe=.8,Ie=.5,Ce=.8,Me=5;function Te(e,t){var n,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=function(t){return t&&(se={attributes:n,classes:r,tagName:e.nodeName}),t};if(e.nodeType!==t.nodeType)return o(!1);if(e instanceof SVGElement||t instanceof SVGElement)return o(!1);if(e.nodeType===Node.TEXT_NODE)return o(!0);if(e.nodeType!==Node.ELEMENT_NODE)return o(!1);var a=e,s=t;if(a.tagName.toLowerCase()!==s.tagName.toLowerCase())return o(!1);var u=we(a),c=we(s);if((n=u.filter((function(e){return c.includes(e)}))).length/Math.max(u.length,c.length)<xe)return o(!1);var l=ke(a),d=ke(s);if((r=l.filter((function(e){return d.includes(e)}))).length/Math.max(l.length,d.length)<Ie)return o(!1);if(i>=Me)return o(!0);if(a.shadowRoot&&!s.shadowRoot||!a.shadowRoot&&s.shadowRoot)return o(!1);var f=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),h=Array.from(s.shadowRoot?s.shadowRoot.children:s.children);if(0===f.length&&0===h.length)return o(!0);for(var p=0,v=0;v<Math.min(f.length,h.length);v++)Te(f[v],h[v],i+1)&&p++;return p/Math.max(f.length,h.length)<Ce?o(!1):o(!0)}var _e,Ae=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],Ne=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],Re=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],De=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e)return e;var n=window.getComputedStyle(e).cursor,r=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){return!1},r=e;r;){var i=r.parentElement;if(!i||i.nodeType!==Node.ELEMENT_NODE)return r;if(t(i))break;if(window.getComputedStyle(i).cursor!==n)return r;r=i}};try{if("isContentEditable"in e&&e.isContentEditable)return e;if("closest"in e){var i=T(e,Ae.concat(t).filter((function(e){return!!e})).join(","));if(i&&function(e){try{if(e.matches("label[for]")&&!e.matches(Ae.concat(t).filter((function(e){return!!e&&"label[for]"!==e})).join(","))){var n=e.getAttribute("for");if(!n)return!1;var r=document.getElementById(n);if(!r)return!1;var i=r.getAttribute("type");return!!i&&"input"===r.tagName.toLowerCase()&&["checkbox","radio"].includes(i)}}catch($n){console.error("interactableParentIsValid",e,$n)}return!0}(i)){if(i===e)return e;var o=r(e,(function(e){return e===i}));return o||i}}if(["auto","default","context-menu","help","progress","wait"].includes(n))return e;var a=r(e);return a||e}catch($n){return console.error("getCompoundInteractableRootElement",e,$n),e}},Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.allowDisabled,i=void 0!==r&&r,o=n.useDataVisibleAttributes,a=void 0===o||o,s=n.excludeCrossOriginIframes,u=void 0!==s&&s,c=R.getInstance("getAllInteractableHTMLElements",{target:e,log:!1}),l=Date.now(),d=function(e){var t=e.reduce((function(e,t){return!i&&t.state.disabled?e:[].concat((0,C.Z)(e),[t.element])}),[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-l,"ms"),t};if(c.hasCache())return d(c.get());var f=M("*",e,{excludeCrossOriginIframes:u}).reduce((function(e,n){var r,i="disabled"in n&&!!n.disabled,o=n.matches(Ae.concat(t.appSpecificInteractableElementsSelectors||[]).filter((function(e){return!!e})).join(","))||Ne.includes(window.getComputedStyle(n).cursor)||n.isContentEditable&&!(null!==(r=n.parentElement)&&void 0!==r&&r.isContentEditable)||!t.ignoreEventListenersWhenDeterminingInteractability&&(De.some((function(e){return n[e]}))||Ze(n));return o?[].concat((0,C.Z)(e),[{element:n,disabled:i}]):e}),[]),h=f.reduce((function(e,n){var r=Oe(n.element,t.appSpecificInteractableElementsSelectors||[]),i=e.find((function(e){return e.element===r}));return i?!n.disabled&&i.state.disabled&&(i.state.disabled=!1):e.push({element:r,state:{disabled:n.disabled}}),e}),[]).filter((function(e){var t=e.element;if(a){if(!t)return!1;var n=t.getAttribute("checksum-data-visible");if(n){var r="true"===n,i="true"===t.getAttribute("checksum-data-visible-under-transparent-element"),o="true"===t.getAttribute("checksum-data-transparently-visible");return r&&!i||o}}return!L(t,{markTransparentElementsAsHidden:!1}).isHidden}));return c.set(h),d(h)},Ze=function(e){if(e._checksum_eventListenerList){var t=e._checksum_eventListenerList;if(De.some((function(e){return t[e.slice(2)]})))return!0}var n=Object.keys(e).find((function(e){return e.startsWith("__reactFiber")})),r=n?e[n]:void 0;return!(!r||!r.memoizedProps)&&Re.some((function(e){return r.memoizedProps[e]}))},Fe=function(e){return e.ARIA_LABEL="aria-label",e.TEXT="text",e}({}),Pe=function(e){return e.SVG="svg",e}(Pe||{}),je={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Ve=function(){function e(){(0,a.Z)(this,e),this.interactableElements=void 0,this.nonInteractableElementsFromSimplifiedDom=void 0,this.interactableElementsFromSimplifiedDom=void 0,this.elementsInSimplifiedDomByChecksumId=void 0,this.selectors=void 0,this.flashingElementsDetector=new he,this.forceIncludeElements=[],this.preMapReducedHTMLSelectors=!0,this.sessionRecorder=void 0,this.templateNodes=void 0,this.excludedNodes=0,this.nodeRepetitionsThreshold=void 0,this.reducePercentage=50,this.lastReduceHTMLOptions=void 0,this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],maintainSelectorsMapping:!0,initialChecksumId:"0",forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:Fe.ARIA_LABEL,includeFlashingElements:!0,onForceIncludeElement:function(){},limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0},this.checksumIdCounter=new pe}return(0,s.Z)(e,[{key:"preprocessDocument",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=M("*",t,{includeHTML:!0}),r=(0,y.Z)(n);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(!this.shouldIgnoreElement(i)){var o=L(i,je);i.setAttribute("checksum-data-visible",o.isHidden||o.isTransparent?"false":"true"),!o.isHidden&&o.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),o.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),o.clickOffset&&i.setAttribute("checksum-data-click-offset","".concat(o.clickOffset.x,";").concat(o.clickOffset.y))}}}catch(a){r.e(a)}finally{r.f()}}},{key:"setSessionRecorder",value:function(e){this.sessionRecorder=e}},{key:"markInteractableElements",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.forceIncludeAttribute,o=r.forceIncludeFileInput;this.interactableElements=[];var a=Le(n,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),s=function(e){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2?arguments[2]:void 0;if(!t.shouldIgnoreElement(e)){var o,a,s=null===(n=e.getAttribute("checksum-data-click-offset"))||void 0===n?void 0:n.split(";"),u=s&&{x:parseInt(s[0]),y:parseInt(s[1])},c=(a=i,(o=e)._checksumid||(o._checksumid=null!==a&&void 0!==a?a:t.checksumIdCounter.getAndIncrement()),o.setAttribute("checksumid",o._checksumid),o.setAttribute("checksuminteractable","true"),o._checksumid);t.interactableElements.push({checksumId:c,element:e,forced:r,clickOffset:u})}};a.forEach((function(e){return s(e)}));var u=function(e){M(e,n,{includeHTML:!0}).forEach((function(e){return s(e,!0)}))};i&&u("[".concat(i,"]")),o&&u("input[type='file']"),this.forceIncludeElements.filter((function(e){var t=e.element;return null===t||void 0===t?void 0:t.isConnected})).forEach((function(e){var t=e.element,n=e.checksumid;return s(t,!0,n)})),console.log("Marked ".concat(this.interactableElements.length," interactable elements"))}},{key:"truthyFilter",value:function(e){return Boolean(e)}},{key:"shouldIgnoreElement",value:function(e){return e.hasAttribute(ve)}},{key:"generateSimplifiedDom",value:function(e,t){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.extraAllowedAttributes,s=void 0===a?[]:a,u=o.checkElementInstanceType,c=void 0===u||u,l=o.forceIncludeAttribute,d=void 0===l?void 0:l,f=o.forceIncludeFileInput,h=void 0!==f&&f,p=o.svgIntegration,v=void 0===p?Fe.ARIA_LABEL:p,m=o.onForceIncludeElement,g=void 0===m?void 0:m,b=o.contentWindow,w=void 0===b?window:b,k=o.assignChecksumIdsToAllElements,S=void 0===k||k,E=o.assignRrwebIdsToAllElements,x=void 0===E||E;if(!e)return null;var I,C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(e._originalNode=t,!D(e,"Element")||!D(t,"Element"))return e;var n,r,o,a=e,s=t;(S&&!s.hasAttribute("checksumid")&&(s._checksumid||(s._checksumid=i.checksumIdCounter.getAndIncrement()),a.setAttribute("checksumid",s._checksumid),i.nonInteractableElementsFromSimplifiedDom.push({checksumId:s._checksumid,element:s})),x&&!s.getAttribute("rrwebid")&&i.sessionRecorder)&&(s._rrwebid=null!==(n=null===(r=i.sessionRecorder.getMeta(s))||void 0===r||null===(o=r.id)||void 0===o?void 0:o.toString())&&void 0!==n?n:"",a.setAttribute("rrwebid",s._rrwebid));return e},M=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createTextNode(t),n)},T=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return C(document.createElement(t),n)};if(e.nodeType===Node.ELEMENT_NODE){var A=e;if("head"===A.tagName.toLowerCase())return null;if(this.shouldIgnoreElement(A))return null}if(e.nodeType===Node.TEXT_NODE)return e.parentElement&&("false"!==e.parentElement.getAttribute("checksum-data-visible")||e.parentElement.hasAttribute("checksumid"))?"body"===e.parentElement.tagName.toLowerCase()?null:null!==(I=e.textContent)&&void 0!==I&&I.trim()?M(e.textContent+" "):null:null;if(e.nodeType!==Node.ELEMENT_NODE)return null;if(c&&!D(e,"HTMLElement")&&!D(e,"SVGElement"))return null;var N=e,R="iframe"===N.tagName.toLowerCase()&&N.contentDocument,O=_(R?N.contentDocument.documentElement:N,{flattenShadowRootChildren:!0});null===(n=t.esraSelectionRules)||void 0===n||null===(r=n.limitChildren)||void 0===r||r.forEach((function(e){N.matches(e.selector)&&O.length>e.limit&&O.splice(e.limit)}));var L=O.map((function(e){return i.generateSimplifiedDom(e,t,{extraAllowedAttributes:s,checkElementInstanceType:c,forceIncludeAttribute:d,forceIncludeFileInput:h,svgIntegration:v,onForceIncludeElement:g,contentWindow:R?N.contentWindow:w,assignChecksumIdsToAllElements:S,assignRrwebIdsToAllElements:x})})).filter(this.truthyFilter),Z="false"!==N.getAttribute("checksum-data-visible"),F=N.hasAttribute("checksumid"),P=N.hasAttribute("role"),j=this.getElementCustomDescription(N,{enableSVGCustomDescription:!!v}),V=j.customDescription,B=j.customDescriptionTarget,H=!!V,W=N.hasAttribute("aria-label")||N.hasAttribute("name")||N.hasAttribute("alt"),U=N.hasAttribute(me)||this.forceIncludeElements.map((function(e){return e.element})).includes(N)||!!d&&N.hasAttribute(d)||h&&"input"===N.tagName.toLowerCase()&&"file"===N.getAttribute("type"),z=F||Z&&(P||W||H||N.matches(["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"].join(",")));if(!(z||U)){if(!L.length)return null;if(1===L.length&&!D(L[0],"Text"))return L[0]}!z&&U&&(null===g||void 0===g||g(N));var q=function(){if(H&&B===Pe.SVG)switch(v){case Fe.ARIA_LABEL:var e=T("svg");return e.setAttribute("aria-label",V),{simplifiedNode:e,appendChildren:!1};case Fe.TEXT:if(N.hasAttribute("checksumid")){var t=T("div");return t.innerText=V,{simplifiedNode:t,appendChildren:!1}}return{simplifiedNode:M(" [".concat(V,"] ")),appendChildren:!1}}var n="body"===N.tagName.toLowerCase()&&N.ownerDocument!==document?"div":N.tagName;return{simplifiedNode:T(n)}}(),G=q.simplifiedNode,$=q.appendChildren,Q=void 0===$||$;if(!D(G,"Element"))return G;var Y,X=G,K=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(s),J=N.attributes,ee=(0,y.Z)(J);try{for(ee.s();!(Y=ee.n()).done;){var te,ne=Y.value,re=(0,y.Z)(K);try{for(re.s();!(te=re.n()).done;){var ie,oe=te.value;if(new RegExp("^"+oe+"$").test(ne.name))X.setAttribute(ne.name,null===(ie=ne.value)||void 0===ie||ie)}}catch(se){re.e(se)}finally{re.f()}}}catch(se){ee.e(se)}finally{ee.f()}if(N.isContentEditable?X.setAttribute("contenteditable","true"):["TEXTAREA","INPUT","SELECT"].includes(N.tagName)||"text"!==window.getComputedStyle(N).cursor||X.setAttribute("contenteditable","cursor-text"),D(N,"HTMLInputElement")&&"checkbox"===N.getAttribute("type"))N.checked&&X.setAttribute("checked","true");else if(D(N,"HTMLInputElement")||D(N,"HTMLSelectElement"))X.setAttribute("value",N.value);else if(D(N,"HTMLTextAreaElement")&&!N.childNodes.length&&N.value){var ae=M(N.value);X.appendChild(ae)}return Q&&L.forEach((function(e){return X.appendChild(e)})),X}},{key:"getElementCustomDescription",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).enableSVGCustomDescription,n=void 0===t||t;return(D(e,"SVGElement")||"svg"===e.tagName.toLowerCase())&&n?{customDescriptionTarget:Pe.SVG,customDescription:this.getSVGDescriptionForElement(e)}:{}}},{key:"getSVGDescriptionForElement",value:function(e){var t=this.findSvgElementDescriptionFromBank(e);if(t)return t;var n=e.querySelector("title");return n?n.textContent:void 0}},{key:"findSvgElementDescriptionFromBank",value:function(e){var t;return null===(t=this.getSvgBank().find((function(t){return e.matches("svg:has(".concat(t.selector,")"))})))||void 0===t?void 0:t.description}},{key:"getSvgBank",value:function(){return fe}},{key:"restoreDom",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;M("*",e).forEach((function(e){e.removeAttribute("checksum-data-visible"),e.removeAttribute("checksum-data-transparently-visible"),e.removeAttribute("checksum-data-visible-under-transparent-element"),e.removeAttribute("checksumid"),e.removeAttribute("checksuminteractable"),e.removeAttribute("checksum-data-click-offset"),e.removeAttribute(ve),e.removeAttribute(me)}))}},{key:"removeAttribute",value:function(e){M("*",document).forEach((function(t){t.removeAttribute(e)}))}},{key:"mapAndStoreSelectors",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r=new de,e.t0=y.Z,e.next=5,r.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom);case 5:e.t1=e.sent,i=(0,e.t0)(e.t1),e.prev=7,i.s();case 9:if((o=i.n()).done){e.next=18;break}if(a=o.value,s=a.checksumId,u=a.element,c=a.clickOffset,l=a.selector,d=a.locator,f=a.parentFramesSelectors,l){e.next=14;break}return console.warn("Unable to get selector for element",u),e.abrupt("continue",16);case 14:h=u,n[s]={element:h,selector:l,locator:d,clickOffset:c,parentFramesSelectors:f,innerText:h.innerText};case 16:e.next=9;break;case 18:e.next=23;break;case 20:e.prev=20,e.t2=e.catch(7),i.e(e.t2);case 23:return e.prev=23,i.f(),e.finish(23);case 26:return e.abrupt("return",n);case 27:case"end":return e.stop()}}),e,this,[[7,20,23,26]])})));return function(){return e.apply(this,arguments)}}()},{key:"shouldFurtherReduce",value:function(e){return!e||e.outerHTML.length>16e3}},{key:"getRepeatingElementsToExclude",value:function(e,t,n){if(e.length<=t)return[];var r=t,i=e.reduce((function(e,t){var n=t._originalNode;return w(D(n,"Element")?n:null===n||void 0===n?void 0:n.parentElement)?e.inViewportElements.push(t):e.outOfViewportElements.push(t),e}),{inViewportElements:[],outOfViewportElements:[]}),o=i.inViewportElements,a=i.outOfViewportElements,s=[],u=function(e){var t,i,o=(0,y.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value;if(i=a,n&&(i.hasAttribute(n)||Array.from(i.querySelectorAll("[".concat(n,"]"))).length>0)||s.push(a),s.length===r)return!0}}catch(u){o.e(u)}finally{o.f()}};return u(a)||u(o),s}},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,p,v,m,g,y,b,w,k=this,S=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=S.length>1&&void 0!==S[1]?S[1]:{},i=S.length>2&&void 0!==S[2]?S[2]:document,console.time("reduceHTML"),o=this.lastReduceHTMLOptions=(0,h.Z)((0,h.Z)({},this.defaultReduceHTMLOptions),r),a=o.maintainSelectorsMapping,s=o.initialChecksumId,u=o.forceIncludeAttribute,c=o.forceIncludeFileInput,l=o.invalidateCache,d=o.includeFlashingElements,f=o.limitNodeRepetitions,p=o.stopFlashingElementsDetection,!(v=R.getInstance("reduce",{target:i,monitorInput:!0,invalidate:l,log:!1})).hasCache()){e.next=7;break}return e.abrupt("return",v.get());case 7:m=d?this.flashingElementsDetector.get():void 0,p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=f,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0,g=function(e){return be(e,{forceIncludeAttribute:u,forceIncludeFileInput:c,forceIncludeElements:k.forceIncludeElements.map((function(e){return e.element})),limit:Math.min(Math.ceil(e.element.children.length*(k.reducePercentage/100)),e.element.children.length-6)})},console.log("Running pre-templatize"),this.templatize(g),console.log("Preprocessing document..."),this.preprocessDocument(i),this.checksumIdCounter=new pe(null!==s&&void 0!==s?s:"0");case 19:if(console.log("Marking interactable elements..."),this.markInteractableElements(n,i,{forceIncludeAttribute:u,forceIncludeFileInput:c}),console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],y=this.generateSimplifiedDom(i.documentElement,n,this.lastReduceHTMLOptions)){e.next=27;break}throw new Error("Unable to get simplified DOM");case 27:if(!this.shouldFurtherReduce(y)){e.next=35;break}if(console.log("Will further reduce (".concat(y.outerHTML.length,")...")),this.templatize(g)){e.next=32;break}return console.log("Exceeded maximum html reduction, stopping (html size: ".concat(y.outerHTML.length,")")),e.abrupt("break",38);case 32:this.removeAttribute("checksumid"),e.next=36;break;case 35:return e.abrupt("break",38);case 36:e.next=19;break;case 38:if(console.log("Simplified DOM generated, length:",y.outerHTML.length),b=new Set(Array.from(y.querySelectorAll("[checksumid]")).map((function(e){return e.getAttribute("checksumid")}))),this.interactableElementsFromSimplifiedDom=this.interactableElements.filter((function(e){return b.has(e.checksumId)})),console.log("Found ".concat(this.interactableElementsFromSimplifiedDom.length," interactable elements in simplified DOM vs ").concat(this.interactableElements.length," in original DOM")),console.log("Restoring DOM..."),this.restoreDom(i),this.preMapReducedHTMLSelectors=!!n.preMapReducedHTMLSelectors,!this.preMapReducedHTMLSelectors||!a){e.next=51;break}return console.log("Mapping selectors..."),e.next=49,this.mapAndStoreSelectors();case 49:this.selectors=e.sent,console.log("Done mapping selectors");case 51:return this.elementsInSimplifiedDomByChecksumId=[].concat((0,C.Z)(this.interactableElementsFromSimplifiedDom),(0,C.Z)(this.nonInteractableElementsFromSimplifiedDom)).reduce((function(e,t){return e[t.checksumId]=t,e}),{}),w={reducedDomHTMLElement:y,reducedHTML:y.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:m},v.set(w),console.timeEnd("reduceHTML"),e.abrupt("return",w);case 56:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"templatize",value:function(e){var t=this,n=this.excludedNodes,r=function(){return Array.from(t.templateNodes).reduce((function(t,n){return t+e(n).length}),0)};if(this.templateNodes)do{if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50,this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=Se(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=r()}while(n===this.excludedNodes);else this.templateNodes=Se(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=r();return console.log("[templatize] ".concat(this.excludedNodes," elements marked to ignore for ").concat(this.templateNodes.length," templates")),!0}},{key:"getMoreElementsFromTemplate",value:function(e,t){var n=this;try{var r=this.templateNodes.find((function(t){return t.id===e}));if(!r)throw new Error("Template not found");var i=r.element,o=r.excludedElements;console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);for(var a=[],s=function(){return a.map((function(e){return e.outerHTML})).join("")},u=o.values(),c=function(){var e=u.next().value;if(!e)return 1;var r=Array.from(e.querySelectorAll("[checksumid]")).concat(e._checksumid?[e]:[]);n.interactableElements.filter((function(e){return r.includes(e.element)})).forEach((function(e){n.elementsInSimplifiedDomByChecksumId[e.element._checksumid]=e})),a.push(n.generateSimplifiedDom(e,t,n.lastReduceHTMLOptions)),o.delete(e)};s().length<5280&&!c(););return this.restoreDom(i),{items:s(),hasMoreItems:o.size>0}}catch($n){return void console.error("[getMoreElementsFromTemplate] error",$n)}}},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(h.length>1&&void 0!==h[1]?h[1]:{}).forceGenerate,o=void 0!==i&&i,a={selector:n,element:null,innerText:"",locator:"",parentFramesSelectors:[]},this.preMapReducedHTMLSelectors&&!o){e.next=14;break}if(s=new de,u=this.elementsInSimplifiedDomByChecksumId[n]){e.next=7;break}return e.abrupt("return",a);case 7:return e.next=9,s.getSelectorAndLocator(u.element);case 9:return c=e.sent,l=c.selector,d=c.locator,f=c.parentFramesSelectors,e.abrupt("return",{element:u.element,selector:l,locator:d,clickOffset:u.clickOffset,parentFramesSelectors:f,innerText:u.element.innerText});case 14:if(this.selectors[n]||o){e.next=16;break}return e.abrupt("return",this.getSelectorForChecksumId(n,{forceGenerate:!0}));case 16:return e.abrupt("return",null!==(r=this.selectors[n])&&void 0!==r?r:a);case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(e){var t;return null===(t=this.elementsInSimplifiedDomByChecksumId[e])||void 0===t?void 0:t.element}},{key:"hasInnerTextByChecksumId",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.maxLength,i=void 0===r?void 0:r,o=n.minLength,a=void 0===o?void 0:o;if(!this.preMapReducedHTMLSelectors){var s,u=null===(s=this.elementsInSimplifiedDomByChecksumId[e])||void 0===s?void 0:s.element,c=null===u||void 0===u?void 0:u.innerText;return!!c&&(!(a&&c.length<a)&&!(i&&c.length>i))}return!(null===(t=this.selectors[e])||void 0===t||!t.innerText)}},{key:"getInteractableElements",value:function(){return this.interactableElements}},{key:"getInteractableElementsInReducedHTML",value:function(){return this.interactableElementsFromSimplifiedDom}},{key:"startFlashingElementsDetection",value:function(){return this.flashingElementsDetector.start()}},{key:"addForceIncludeElement",value:function(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}}]),e}(),Be=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.appSpecificRules=void 0,this.playwrightSelector=new de,this.defaultModulesState={extractReducedHtmlAndSelector:!1,inspectInteractableElements:!1,extractEsraMetadata:!0,extractPlaywrightSelector:!0},this.previousTargetNodeForReducedHTML=void 0,this.currentReducedHTMLChecksumIdAllocationCount="0",this.htmlReducer=new Ve}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p,v,m,g,y=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=y.length>1&&void 0!==y[1]?y[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a?this.defaultModulesState.extractEsraMetadata:a,u=r.extractReducedHtmlAndSelector,c=void 0===u?this.defaultModulesState.extractReducedHtmlAndSelector:u,l=r.inspectInteractableElements,d=void 0===l?this.defaultModulesState.inspectInteractableElements:l,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),f={},s&&(console.log("extracting ESRA metadata..."),h=this.getESRAExtractor(n).extract(n),f.esraMetadata=h.toMetadata(),console.log("ESRA metadata extraction complete")),!o){e.next=18;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:p=e.sent,v=p.selector,m=p.locator,g=p.parentFramesSelectors,f.playwrightSelector=v,f.playwrightLocator=m,f.playwrightParentFramesSelectors=g,console.log("Playwright selector extraction complete");case 18:if(!c){e.next=24;break}return console.log("extracting reduced HTML..."),e.next=22,this.getReducedHTMLAndTargetNodeSelector(n);case 22:f.reducedHTML=e.sent,console.log("Reduced HTML extraction complete");case 24:if(!d){e.next=30;break}return console.log("extracting element inspection..."),e.next=28,this.isElementInteractable(n);case 28:f.interactionFoundOnInspection=e.sent,console.log("Element inspection extraction complete");case 30:return console.log("[SessionDigesterSelector] complete",f),e.abrupt("return",f);case 32:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"selector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.playwrightSelector.selector(n));case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"setOptions",value:function(e){var t=e.defaultExtractReducedHtmlAndSelector,n=e.defaultInspectInteractableElements,r=e.defaultExtractEsraMetadata;this.defaultModulesState.extractReducedHtmlAndSelector=t,this.defaultModulesState.inspectInteractableElements=n,this.defaultModulesState.extractEsraMetadata=r}},{key:"getReducedHTMLAndTargetNodeSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="checksum-target-node",n.setAttribute(r,"true"),i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==n,this.previousTargetNodeForReducedHTML=n,o=!1,a=function(e){e.hasAttribute(r)&&(o=!0)},e.next=8,this.htmlReducer.reduceHTML(this.appSpecificRules,{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[r],checkElementInstanceType:!1,maintainSelectorsMapping:!1,forceIncludeAttribute:r,invalidateCache:i,onForceIncludeElement:a},n.ownerDocument);case 8:return s=e.sent,u=s.reducedDomHTMLElement,c=s.reducedHTML,l=s.currentChecksumId,n.removeAttribute(r),this.currentReducedHTMLChecksumIdAllocationCount=l,d=u.matches("[".concat(r,"=true]"))?u:u.querySelector("[".concat(r,"=true]")),f=d?d.getAttribute("checksumid"):void 0,e.abrupt("return",{html:c,selector:f,targetForceIncluded:o});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=this.esraExtractors.find((function(t){return t.isSameDocument(e.ownerDocument)}));if(t)return t;var n=new le(e.ownerDocument);return this.esraExtractors.push(n),n}},{key:"isElementInteractable",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(r=this.htmlReducer.getInteractableElements())||!r.length){e.next=3;break}return e.abrupt("return",r.some((function(e){return e.element===n&&!e.forced})));case 3:return e.next=5,Le(n.ownerDocument,this.appSpecificRules);case 5:return i=e.sent,e.abrupt("return",i.includes(n));case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),He=function(e){return 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}(He||{}),We=function(e){return 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}(We||{}),Ue=function(e){return 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}(Ue||{}),ze=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(ze||{}),qe=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(qe||{}),Ge=function(e){return 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}(Ge||{}),$e=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"setSessionReplayer",value:function(e){}},{key:"skipEvents",value:function(e){}},{key:"preCastEvent",value:function(e){}},{key:"preEvent",value:function(e){}},{key:"postEvent",value:function(e,t){return t}},{key:"handleMeta",value:function(e,t){}},{key:"handleViewportResize",value:function(e){}},{key:"handleMutation",value:function(e,t){}},{key:"handleInput",value:function(e,t){}},{key:"handleClick",value:function(e,t){}},{key:"handleDblClick",value:function(e,t){}},{key:"handleMouseDown",value:function(e,t){}},{key:"handleMouseUp",value:function(e,t){}},{key:"handleMouseMove",value:function(e,t){}},{key:"handleFocus",value:function(e,t){}},{key:"handleBlur",value:function(e,t){}},{key:"handleContentEditableInput",value:function(e,t){}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleURLChange",value:function(e,t){}}]),e}(),Qe=n(5829),Ye=n(6301),Xe=n.n(Ye),Ke=function(e){(0,l.Z)(i,e);var n=(0,d.Z)(i);function i(e){var t,r=e.sessionMirror,o=e.elementSelector;return(0,a.Z)(this,i),(t=n.call(this)).sessionMirror=void 0,t.elementSelector=void 0,t.numberOfRetries=3,t.currentHref=void 0,t.previousMouseDownData=void 0,t.previousMousePositions=void 0,t.previousMousePositionsNodeSelectors={},t.hasUndefinedFocusNode=!1,t.lastMouseUpTime=0,t.lastMouseDownExtract=void 0,t.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0},t.events=void 0,t.currentEventIndex=-1,t.enableRecordingAvailableInteractableElements=!0,t.useTextInputFastForward=!0,t.textInputFastForwardInitialSelector=void 0,t.appSpecificRules=void 0,t.getBoundingBox=function(e){var n=Oe(t.sessionMirror.getNodeById(e),t.appSpecificRules.appSpecificInteractableElementsSelectors);if(n)return null===n||void 0===n?void 0:n.getBoundingClientRect()},t.isPointWithinBoundingBox=function(e,t,n){return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom},t.isPointWithinNodeBoundingBox=function(e,n,r){var i=t.getBoundingBox(e);return!!i&&(n>=i.left&&n<=i.right&&r>=i.top&&r<=i.bottom)},t.elementSelector=o,t.sessionMirror=r,t}return(0,s.Z)(i,[{key:"setEvents",value:function(e){this.events=e}},{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward,r=void 0===n||n;this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=r}},{key:"setAppRules",value:function(e){this.appSpecificRules=e}},{key:"skipEvents",value:function(e){this.currentEventIndex+=e.length}},{key:"preEvent",value:function(e){++this.currentEventIndex}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",r);case 2:if(r.availableInteractableElementsAtStart||!this.enableRecordingAvailableInteractableElements||n.type!==He.IncrementalSnapshot||n.data.source!==We.MouseInteraction&&n.data.source!==We.Input&&n.data.source!==We.MediaInteraction){e.next=6;break}return e.next=5,this.getInteractableElementsMetadata();case 5:r.availableInteractableElementsAtStart=e.sent;case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMeta",value:function(e){if(e.href!==this.currentHref)return this.currentHref=e.href,{eventCode:Qe.$.Navigation,url:e.href}}},{key:"getNextUserTriggeredInputEvent",value:function(e){for(var t=this.currentEventIndex+1;t<this.events.length;++t){var n=this.events[t];if(n.type===He.IncrementalSnapshot&&n.data.source===We.Input&&n.data.userTriggered)return n;if(n.timestamp>e)return}}},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u,c,l=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.userTriggered){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(o=e.sent,(a=this.getInputEventCode(o,n))!==Qe.$.Input||!this.useTextInputFastForward){e.next=18;break}if(this.textInputFastForwardInitialSelector){e.next=11;break}return e.next=10,this.elementSelector.getSelector(o);case 10:this.textInputFastForwardInitialSelector=e.sent;case 11:return s=(0,h.Z)({eventCode:a},this.textInputFastForwardInitialSelector),u=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=l.getNextUserTriggeredInputEvent(i.timestamp+2e3))){e.next=9;break}return r=n.data,e.next=5,l.getNodeById(r.id);case 5:if((a=e.sent)===o){e.next=8;break}return e.abrupt("return",!1);case 8:return e.abrupt("return",l.getInputEventCode(a,r)===Qe.$.Input);case 9:return e.abrupt("return",!1);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=15,u();case 15:if(e.sent){e.next=17;break}this.textInputFastForwardInitialSelector=void 0;case 17:return e.abrupt("return",s);case 18:return e.next=20,this.elementSelector.getSelector(o);case 20:return c=e.sent,e.abrupt("return",(0,h.Z)({eventCode:a},c));case 22:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleMouseMove",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.previousMousePositions=n.positions,this.previousMousePositionsNodeSelectors={},!this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){e.next=39;break}this.previousMousePositionsNodeSelectors={},r={},i=(0,y.Z)(this.previousMousePositions),e.prev=6,i.s();case 8:if((o=i.n()).done){e.next=28;break}if(a=o.value,s=a.id,!r[s]){e.next=13;break}return e.abrupt("continue",26);case 13:return r[s]=!0,e.next=16,this.getNodeById(s);case 16:return u=e.sent,e.prev=17,e.next=20,this.elementSelector.getSelector(u);case 20:this.previousMousePositionsNodeSelectors[s]=e.sent,e.next=26;break;case 23:e.prev=23,e.t0=e.catch(17),console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,e.t0);case 26:e.next=8;break;case 28:e.next=33;break;case 30:e.prev=30,e.t1=e.catch(6),i.e(e.t1);case 33:return e.prev=33,i.f(),e.finish(33);case 36:return e.next=38,this.getInteractableElementsMetadata();case 38:this.allInteractableElementsMetadata.mouseMove=e.sent;case 39:case"end":return e.stop()}}),e,this,[[6,30,33,36],[17,23]])})));return function(t){return e.apply(this,arguments)}}()},{key:"isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===He.IncrementalSnapshot)switch(t.data.source){case We.MouseMove:return!1;case We.MouseInteraction:switch(t.data.type){case Ue.Click:case Ue.MouseDown:return!0;case Ue.Focus:return-1===t.data.id}}}return!1}},{key:"handleMouseDown",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getNodeById(n.id);case 2:return r=e.sent,e.prev=3,e.t0=r,e.next=7,this.elementSelector.getSelector(r);case 7:return e.t1=e.sent,this.lastMouseDownExtract={node:e.t0,selector:e.t1},e.next=11,this.getInteractableElementsMetadata();case 11:this.allInteractableElementsMetadata.mouseDown=e.sent,e.next=17;break;case 14:e.prev=14,e.t2=e.catch(3),console.warn("error with extracting selector for node during handleMouseDown",r,e.t2);case 17:this.previousMouseDownData=n;case 18:case"end":return e.stop()}}),e,this,[[3,14]])})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseUp",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.lastMouseUpTime=r.timestamp;case 1:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isLastMouseDownValidForClick",value:function(e){return!!this.lastMouseDownExtract&&e-this.lastMouseUpTime<10}},{key:"invalidateLastMouseDown",value:function(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}},{key:"handleFocus",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.hasUndefinedFocusNode=-1===n.id;case 1:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i){var o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return o=this.isLastMouseDownValidForClick(i.timestamp),a=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var r,a,s,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=19;break}return e.t0=h.Z,e.t1=(0,h.Z)({},u.lastMouseDownExtract.selector),e.t2={},e.next=6,u.elementSelector.getSelector(u.lastMouseDownExtract.node,{extractEsraMetadata:!1});case 6:if(e.t4=r=e.sent,e.t3=null===e.t4,e.t3){e.next=10;break}e.t3=void 0===r;case 10:if(!e.t3){e.next=14;break}e.t5=void 0,e.next=15;break;case 14:e.t5=r.playwrightSelector;case 15:return e.t6=e.t5,e.t7=u.allInteractableElementsMetadata.mouseDown,e.t8={playwrightSelectorForSnapshot:e.t6,availableInteractableElementsAtStart:e.t7},e.abrupt("return",(0,e.t0)(e.t1,e.t2,e.t8));case 19:return a=u.getNodeIdForClick(n,i),e.next=22,u.getNodeById(a);case 22:if(s=e.sent,!u.previousMousePositionsNodeSelectors[a]){e.next=42;break}return e.t9=h.Z,e.t10=(0,h.Z)({},u.previousMousePositionsNodeSelectors[a]),e.t11={},e.next=29,u.elementSelector.getSelector(s,{extractEsraMetadata:!1});case 29:if(e.t13=c=e.sent,e.t12=null===e.t13,e.t12){e.next=33;break}e.t12=void 0===c;case 33:if(!e.t12){e.next=37;break}e.t14=void 0,e.next=38;break;case 37:e.t14=c.playwrightSelector;case 38:return e.t15=e.t14,e.t16=u.allInteractableElementsMetadata.mouseMove,e.t17={playwrightSelectorForSnapshot:e.t15,availableInteractableElementsAtStart:e.t16},e.abrupt("return",(0,e.t9)(e.t10,e.t11,e.t17));case 42:return e.abrupt("return",u.elementSelector.getSelector(s));case 43:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),e.next=6,a();case 6:return s=e.sent,this.invalidateLastMouseDown(),e.abrupt("return",(0,h.Z)({eventCode:Qe.$.Click},s));case 9:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getNextMouseMoveEvent",value:function(){for(var e=this.currentEventIndex+1;e<this.events.length;++e){var t=this.events[e];if(t.type===He.IncrementalSnapshot&&t.data.source===We.MouseMove)return t}}},{key:"getNodeIdForClick",value:function(e,t){var n=this;if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==e.id){var r={next:function(){var e=n.getNextMouseMoveEvent();if(e){var r=e.data,i=(0,C.Z)(r.positions).reverse().find((function(n){return e.timestamp+n.timeOffset<t.timestamp}));if(i)return i.id}}(),previous:function(){if(n.previousMousePositions){var e=(0,C.Z)(n.previousMousePositions).reverse().find((function(e){return!0}));if(e)return e.id}}(),point:function(){try{var t=n.sessionMirror.getNodeById(e.id),r=Array.from(_(t)).filter((function(e){return"none"===window.getComputedStyle(e).pointerEvents})),i=[];if(r.length){r.forEach((function(e){var t=e,n=t.getAttribute("style");i.push(n),t.setAttribute("style",n+";pointer-events:auto !important")}));var o=document.querySelector("iframe").contentDocument.elementFromPoint(e.x,e.y);if(r.forEach((function(e,t){e.setAttribute("style",i[t])})),o){var a=n.sessionMirror.getMeta(o);if(a)return a.id}}}catch($n){console.warn("element from point calc error",$n)}}(),original:e.id},i=r.next||r.previous||e.id;return r.point&&function(){if(i===r.point)return!1;var t=n.sessionMirror.getNodeById(i);return n.isPointWithinBoundingBox(e.x,e.y,t.getBoundingClientRect())}()?r.point:i}return e.id}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.numberOfRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionMirror.getNodeById(n)){e.next=9;break}return e.next=8,Xe()(100*(this.numberOfRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?Oe(u,this.appSpecificRules.appSpecificInteractableElementsSelectors):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"checkbox":case"radio":return t.isChecked?Qe.$.Check:Qe.$.UnCheck;default:return Qe.$.Input}}},{key:"getInteractableElementsMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o,a,s;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.enableRecordingAvailableInteractableElements){e.next=2;break}return e.abrupt("return",[]);case 2:return n=document.querySelector("iframe").contentWindow,i=n.document,console.log("Getting all interactable elements..."),o=Le(i,this.appSpecificRules),console.log("Got ".concat(o.length," interactable elements")),console.log("Extracting ESRA metadata for all interactable elements..."),a=new le(i),e.next=11,Promise.all(o.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.extract(n).toMetadata(),e.abrupt("return",{esraMetadata:r});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 11:return s=e.sent,console.log("Done processing all interactable elements..."),e.abrupt("return",s);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),i}($e),Je=function(e){return e.KeyStroke="key-stroke",e.ContentEditableInput="contenteditable-input",e.URLChange="url-change",e}({}),et=function(){function e(n){var i=this,o=n.eventHandlers;(0,a.Z)(this,e),this.handlers=void 0,this.preCastEvent=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.handlers.preCastEvent(n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.processEvent=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!(s.length>1&&void 0!==s[1])||s[1],i.handlers.preEvent(n),!r){e.next=8;break}return e.next=5,i.handleEvent(n);case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=void 0;case 9:return o=e.t0,e.next=12,i.handlers.postEvent(n,o);case 12:return a=e.sent,e.abrupt("return",i.handlers.controlledReturn?i.handlers.getReturnValue():a);case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.skipEvents=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",i.handlers.skipEvents(n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handlers=o}return(0,s.Z)(e,[{key:"setHandlers",value:function(e){this.handlers=e}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n.type,e.next=e.t0===He.Meta?3:e.t0===He.IncrementalSnapshot?4:e.t0===He.Custom?14:21;break;case 3:return e.abrupt("return",this.handlers.handleMeta(n.data,n));case 4:e.t1=n.data.source,e.next=e.t1===We.ViewportResize?7:e.t1===We.Mutation?8:e.t1===We.Input?9:e.t1===We.MouseInteraction?10:e.t1===We.MouseMove?11:12;break;case 7:return e.abrupt("return",this.handlers.handleViewportResize(n.data,n));case 8:return e.abrupt("return",this.handlers.handleMutation(n.data,n));case 9:return e.abrupt("return",this.handlers.handleInput(n.data,n));case 10:return e.abrupt("return",this.handleMouseInteraction(n.data,n));case 11:return e.abrupt("return",this.handlers.handleMouseMove(n.data,n));case 12:return e.abrupt("break",13);case 13:case 20:case 21:return e.abrupt("break",22);case 14:e.t2=n.data.tag,e.next=e.t2===Je.ContentEditableInput?17:e.t2===Je.KeyStroke?18:e.t2===Je.URLChange?19:20;break;case 17:return e.abrupt("return",this.handlers.handleContentEditableInput(n.data.payload,n));case 18:return e.abrupt("return",this.handlers.handleKeyStroke(n.data.payload,n));case 19:return e.abrupt("return",this.handlers.handleURLChange(n.data.payload,n));case 22:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"handleMouseInteraction",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=n.type,e.next=e.t0===Ue.Click?3:e.t0===Ue.DblClick?4:e.t0===Ue.MouseDown?5:e.t0===Ue.MouseUp?6:e.t0===Ue.Focus?7:e.t0===Ue.Blur?8:9;break;case 3:return e.abrupt("return",this.handlers.handleClick(n,r));case 4:return e.abrupt("return",this.handlers.handleDblClick(n,r));case 5:return e.abrupt("return",this.handlers.handleMouseDown(n,r));case 6:return e.abrupt("return",this.handlers.handleMouseUp(n,r));case 7:return e.abrupt("return",this.handlers.handleFocus(n,r));case 8:return e.abrupt("return",this.handlers.handleBlur(n,r));case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()}]),e}();function tt(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch($n){o($n)}}function s(e){try{u(r.throw(e))}catch($n){o($n)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function nt(e){return e.nodeType===e.ELEMENT_NODE}function rt(e){var t=null===e||void 0===e?void 0:e.host;return Boolean((null===t||void 0===t?void 0:t.shadowRoot)===e)}function it(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ot(e){try{var t=e.rules||e.cssRules;return t?((n=Array.from(t,at).join("")).includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n):null}catch(r){return null}var n}function at(e){var t;if(function(e){return"styleSheet"in e}(e))try{t=ot(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url(".concat(JSON.stringify(e.href),")")];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer(".concat(e.layerName,")")),e.supportsText&&n.push("supports(".concat(e.supportsText,")")),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(n){}else if(function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function(e){var t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(e.cssText);return t||e.cssText}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(_e||(_e={}));var st=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function ut(){return new st}function ct(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",u=i&&lt(i);return(n[r.toLowerCase()]||u&&n[u])&&(s=a?a(s,t):"*".repeat(s.length)),s}function lt(e){return e.toLowerCase()}var dt="__rrweb_original__";function ft(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?lt(t):null}function ht(e,t){var n,r;try{r=new URL(e,null!==t&&void 0!==t?t:window.location.href)}catch(o){return null}var i=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(n=null===i||void 0===i?void 0:i[1])&&void 0!==n?n:null}var pt,vt,mt=1,gt=new RegExp("[^a-z0-9-_:]"),yt=-2;function bt(){return mt++}var wt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,kt=/^(?:[a-z+]+:)?\/\//i,St=/^www\..*/i,Et=/^(data:)([^,]*),(.*)/i;function xt(e,t){return(e||"").replace(wt,(function(e,n,r,i,o,a){var s,u=r||o||a,c=n||i||"";if(!u)return e;if(kt.test(u)||St.test(u))return"url(".concat(c).concat(u).concat(c,")");if(Et.test(u))return"url(".concat(c).concat(u).concat(c,")");if("/"===u[0])return"url(".concat(c).concat((s=t,(s.indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+u)).concat(c,")");var l=t.split("/"),d=u.split("/");l.pop();var f,h=(0,y.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;"."!==p&&(".."===p?l.pop():l.push(p))}}catch(v){h.e(v)}finally{h.f()}return"url(".concat(c).concat(l.join("/")).concat(c,")")}))}var It=/^[^ \t\n\r\u000c]+/,Ct=/^[, \t\n\r\u000c]+/;var Mt=new WeakMap;function Tt(e,t){return t&&""!==t.trim()?At(e,t):t}function _t(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function At(e,t){var n=Mt.get(e);if(n||(n=e.createElement("a"),Mt.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Nt(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Tt(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(Ct),!(n>=t.length);){var o=r(It);if(","===o.slice(-1))o=Tt(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=Tt(e,o);for(var s=!1;;){var u=t.charAt(n);if(""===u){i.push((o+a).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((o+a).trim());break}"("===u&&(s=!0)}a+=u,n+=1}}}return i.join(", ")}(e,r):"style"===n?xt(r,At(e)):"object"===t&&"data"===n?Tt(e,r):r:Tt(e,r):r}function Rt(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Dt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Dt(e.parentNode,t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Dt(e.parentNode,t,n)}function Ot(e,t,n,r){try{var i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("string"===typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(Dt(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch($n){}return!1}function Lt(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.needsMask,s=t.inlineStylesheet,u=t.maskInputOptions,c=void 0===u?{}:u,l=t.maskTextFn,d=t.maskInputFn,f=t.dataURLOptions,h=void 0===f?{}:f,p=t.inlineImages,v=t.recordCanvas,m=t.keepIframeSrcFn,g=t.newlyAddedElement,y=void 0!==g&&g,b=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:_e.Document,childNodes:[],compatMode:e.compatMode}:{type:_e.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:_e.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,c=t.maskInputFn,l=t.dataURLOptions,d=void 0===l?{}:l,f=t.inlineImages,h=t.recordCanvas,p=t.keepIframeSrcFn,v=t.newlyAddedElement,m=void 0!==v&&v,g=t.rootId,y=function(e,t,n){try{if("string"===typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch($n){}return!1}(e,i,o),b=function(e){if(e instanceof HTMLFormElement)return"form";var t=lt(e.tagName);return gt.test(t)?"div":t}(e),w={},k=e.attributes.length,S=0;S<k;S++){var E=e.attributes[S];Rt(b,E.name,E.value)||(w[E.name]=Nt(r,b,lt(E.name),E.value))}if("link"===b&&a){var x=Array.from(r.styleSheets).find((function(t){return t.href===e.href})),I=null;x&&(I=ot(x)),I&&(delete w.rel,delete w.href,w._cssText=xt(I,x.href))}if("style"===b&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var C=ot(e.sheet);C&&(w._cssText=xt(C,At(r)))}if("input"===b||"textarea"===b||"select"===b){var M=e.value,T=e.checked;"radio"!==w.type&&"checkbox"!==w.type&&"submit"!==w.type&&"button"!==w.type&&M?w.value=ct({element:e,type:ft(e),tagName:b,value:M,maskInputOptions:u,maskInputFn:c}):T&&(w.checked=T)}"option"===b&&(e.selected&&!u.select?w.selected=!0:delete w.selected);if("canvas"===b&&h)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=dt in i?i[dt]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(w.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var _=e.toDataURL(d.type,d.quality),A=document.createElement("canvas");A.width=e.width,A.height=e.height,_!==A.toDataURL(d.type,d.quality)&&(w.rr_dataURL=_)}if("img"===b&&f){pt||(pt=r.createElement("canvas"),vt=pt.getContext("2d"));var N=e,R=N.crossOrigin;N.crossOrigin="anonymous";var D=function e(){N.removeEventListener("load",e);try{pt.width=N.naturalWidth,pt.height=N.naturalHeight,vt.drawImage(N,0,0),w.rr_dataURL=pt.toDataURL(d.type,d.quality)}catch(t){console.warn("Cannot inline img src=".concat(N.currentSrc,"! Error: ").concat(t))}R?w.crossOrigin=R:N.removeAttribute("crossorigin")};N.complete&&0!==N.naturalWidth?D():N.addEventListener("load",D)}if("audio"===b||"video"===b){var O=w;O.rr_mediaState=e.paused?"paused":"played",O.rr_mediaCurrentTime=e.currentTime,O.rr_mediaPlaybackRate=e.playbackRate,O.rr_mediaMuted=e.muted,O.rr_mediaLoop=e.loop,O.rr_mediaVolume=e.volume}m||(e.scrollLeft&&(w.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(w.rr_scrollTop=e.scrollTop));if(y){var L=e.getBoundingClientRect(),Z=L.width,F=L.height;w={class:w.class,rr_width:"".concat(Z,"px"),rr_height:"".concat(F,"px")}}"iframe"!==b||p(w.src)||(e.contentDocument||(w.rr_src=w.src),delete w.src);try{customElements.get(b)&&(n=!0)}catch($n){}return{type:_e.Element,tagName:b,attributes:w,childNodes:[],isSVG:_t(e)||void 0,needBlock:y,rootId:g,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:c,maskInputFn:d,dataURLOptions:h,inlineImages:p,recordCanvas:v,keepIframeSrcFn:m,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){var n,r=t.needsMask,i=t.maskTextFn,o=t.rootId,a=e.parentNode&&e.parentNode.tagName,s=e.textContent,u="STYLE"===a||void 0,c="SCRIPT"===a||void 0;if(u&&s){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(s=ot(e.parentNode.sheet))}catch(l){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(l),e)}s=xt(s,At(t.doc))}c&&(s="SCRIPT_PLACEHOLDER");!u&&!c&&s&&r&&(s=i?i(s,e.parentElement):s.replace(/[\S]/g,"*"));return{type:_e.Text,textContent:s||"",isStyle:u,rootId:o}}(e,{doc:n,needsMask:a,maskTextFn:l,rootId:b});case e.CDATA_SECTION_NODE:return{type:_e.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:_e.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Zt(e){return void 0===e||null===e?"":e.toLowerCase()}function Ft(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,u=t.skipChild,c=void 0!==u&&u,l=t.inlineStylesheet,d=void 0===l||l,f=t.maskInputOptions,h=void 0===f?{}:f,p=t.maskTextFn,v=t.maskInputFn,m=t.slimDOMOptions,g=t.dataURLOptions,y=void 0===g?{}:g,b=t.inlineImages,w=void 0!==b&&b,k=t.recordCanvas,S=void 0!==k&&k,E=t.onSerialize,x=t.onIframeLoad,I=t.iframeLoadTimeout,C=void 0===I?5e3:I,M=t.onStylesheetLoad,T=t.stylesheetLoadTimeout,_=void 0===T?5e3:T,A=t.keepIframeSrcFn,N=void 0===A?function(){return!1}:A,R=t.newlyAddedElement,D=void 0!==R&&R,O=t.needsMask,L=t.preserveWhiteSpace,Z=void 0===L||L;!O&&e.childNodes&&(O=Ot(e,a,s,void 0===O));var F,P=Lt(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:O,inlineStylesheet:d,maskInputOptions:h,maskTextFn:p,maskInputFn:v,dataURLOptions:y,inlineImages:w,recordCanvas:S,keepIframeSrcFn:N,newlyAddedElement:D});if(!P)return console.warn(e,"not serialized"),null;F=r.hasNode(e)?r.getId(e):!function(e,t){if(t.comment&&e.type===_e.Comment)return!0;if(e.type===_e.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&"js"===ht(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Zt(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Zt(e.attributes.name)||"icon"===Zt(e.attributes.rel)||"apple-touch-icon"===Zt(e.attributes.rel)||"shortcut icon"===Zt(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Zt(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Zt(e.attributes.property).match(/^(og|twitter|fb):/)||Zt(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Zt(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Zt(e.attributes.name)||"googlebot"===Zt(e.attributes.name)||"bingbot"===Zt(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Zt(e.attributes.name)||"generator"===Zt(e.attributes.name)||"framework"===Zt(e.attributes.name)||"publisher"===Zt(e.attributes.name)||"progid"===Zt(e.attributes.name)||Zt(e.attributes.property).match(/^article:/)||Zt(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Zt(e.attributes.name)||"yandex-verification"===Zt(e.attributes.name)||"csrf-token"===Zt(e.attributes.name)||"p:domain_verify"===Zt(e.attributes.name)||"verify-v1"===Zt(e.attributes.name)||"verification"===Zt(e.attributes.name)||"shopify-checkout-api-token"===Zt(e.attributes.name)))return!0}}return!1}(P,m)&&(Z||P.type!==_e.Text||P.isStyle||P.textContent.replace(/^\s+|\s+$/gm,"").length)?bt():yt;var j=Object.assign(P,{id:F});if(r.add(e,j),F===yt)return null;E&&E(e);var V=!c;if(j.type===_e.Element){V=V&&!j.needBlock,delete j.needBlock;var B=e.shadowRoot;B&&it(B)&&(j.isShadowHost=!0)}if((j.type===_e.Document||j.type===_e.Element)&&V){m.headWhitespace&&j.type===_e.Element&&"head"===j.tagName&&(Z=!1);var H={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:O,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:Z,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:_,keepIframeSrcFn:N};if(j.type===_e.Element&&"textarea"===j.tagName&&void 0!==j.attributes.value);else for(var W=0,U=Array.from(e.childNodes);W<U.length;W++){var z=Ft(U[W],H);z&&j.childNodes.push(z)}if(nt(e)&&e.shadowRoot)for(var q=0,G=Array.from(e.shadowRoot.childNodes);q<G.length;q++){var $=Ft(G[q],H);$&&(it(e.shadowRoot)&&($.isShadow=!0),j.childNodes.push($))}}return e.parentNode&&rt(e.parentNode)&&it(e.parentNode)&&(j.isShadow=!0),j.type===_e.Element&&"iframe"===j.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(u){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout((function(){o||(t(),o=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),o=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&x){var n=Ft(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:O,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:Z,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:_,keepIframeSrcFn:N});n&&x(e,n)}}),C),j.type===_e.Element&&"link"===j.tagName&&"string"===typeof j.attributes.rel&&("stylesheet"===j.attributes.rel||"preload"===j.attributes.rel&&"string"===typeof j.attributes.href&&"css"===ht(j.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(a){return}if(!r){var o=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(o),i=!0,t()}))}}(e,(function(){if(M){var t=Ft(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:O,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:h,maskTextFn:p,maskInputFn:v,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:S,preserveWhiteSpace:Z,onSerialize:E,onIframeLoad:x,iframeLoadTimeout:C,onStylesheetLoad:M,stylesheetLoadTimeout:_,keepIframeSrcFn:N});t&&M(e,t)}}),_),j}var Pt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function jt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=1,r=1;function i(e){var t=e.match(/\n/g);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=-1===i?r+e.length:e.length-i}function o(){var e={line:n,column:r};return function(t){return t.position=new u(e),v(),t}}var u=(0,s.Z)((function e(i){(0,a.Z)(this,e),this.start=i,this.end={line:n,column:r},this.source=t.source}));u.prototype.content=e;var c=[];function l(i){var o=new Error("".concat(t.source||"",":").concat(n,":").concat(r,": ").concat(i));if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o;c.push(o)}function d(){return p(/^{\s*/)}function f(){return p(/^}/)}function h(){var t,n=[];for(v(),m(n);e.length&&"}"!==e.charAt(0)&&(t=M()||T());)t&&(n.push(t),m(n));return n}function p(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function v(){p(/^\s*/)}function m(){for(var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e=g();)e&&t.push(e),e=g();return t}function g(){var t=o();if("/"===e.charAt(0)&&"*"===e.charAt(1)){for(var n=2;""!==e.charAt(n)&&("*"!==e.charAt(n)||"/"!==e.charAt(n+1));)++n;if(n+=2,""===e.charAt(n-1))return l("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function b(){for(v();"}"==e[0];)l("extra closing bracket"),e=e.slice(1),v();var t=p(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(t){var n=t[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,(function(e){return e.replace(/,/g,"\u200c")}));return function(e){var t,n=[],r="",i=0,o=0,a=null,s=(0,y.Z)(e);try{for(s.s();!(t=s.n()).done;){var u=t.value,c=r.endsWith("\\");a?a!==u||c||(a=null):"("===u?i++:")"===u?i--:"["===u?o++:"]"===u?o--:"'\"".includes(u)&&(a=u),","===u&&0===i&&0===o?(n.push(r),r=""):r+=u}}catch(l){s.e(l)}finally{s.f()}r&&n.push(r);return n}(n).map((function(e){return e.replace(/\u200C/g,",").trim()}))}}function w(){var e=o(),t=p(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(t){var n=Vt(t[0]);if(!p(/^:\s*/))return l("property missing ':'");var r=p(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),i=e({type:"declaration",property:n.replace(Pt,""),value:r?Vt(r[0]).replace(Pt,""):""});return p(/^[;\s]*/),i}}function k(){var e,t=[];if(!d())return l("missing '{'");for(m(t);e=w();)!1!==e&&(t.push(e),m(t)),e=w();return f()?t:l("missing '}'")}function S(){for(var e,t=[],n=o();e=p(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)t.push(e[1]),p(/^,\s*/);if(t.length)return n({type:"keyframe",values:t,declarations:k()})}var E=C("import"),x=C("charset"),I=C("namespace");function C(e){var t=new RegExp("^@"+e+"\\s*((?:"+['(?<!\\\\)"(?:\\\\"|[^"])*"',"(?<!\\\\)'(?:\\\\'|[^'])*'","[^;]"].join("|")+")+);");return function(){var n=o(),r=p(t);if(r){var i={type:e};return i[e]=r[1].trim(),n(i)}}}function M(){if("@"===e[0])return function(){var e=o(),t=p(/^@([-\w]+)?keyframes\s*/);if(t){var n=t[1];if(!(t=p(/^([-\w]+)\s*/)))return l("@keyframes missing name");var r,i=t[1];if(!d())return l("@keyframes missing '{'");for(var a=m();r=S();)a.push(r),a=a.concat(m());return f()?e({type:"keyframes",name:i,vendor:n,keyframes:a}):l("@keyframes missing '}'")}}()||function(){var e=o(),t=p(/^@media *([^{]+)/);if(t){var n=Vt(t[1]);if(!d())return l("@media missing '{'");var r=m().concat(h());return f()?e({type:"media",media:n,rules:r}):l("@media missing '}'")}}()||function(){var e=o(),t=p(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(t)return e({type:"custom-media",name:Vt(t[1]),media:Vt(t[2])})}()||function(){var e=o(),t=p(/^@supports *([^{]+)/);if(t){var n=Vt(t[1]);if(!d())return l("@supports missing '{'");var r=m().concat(h());return f()?e({type:"supports",supports:n,rules:r}):l("@supports missing '}'")}}()||E()||x()||I()||function(){var e=o(),t=p(/^@([-\w]+)?document *([^{]+)/);if(t){var n=Vt(t[1]),r=Vt(t[2]);if(!d())return l("@document missing '{'");var i=m().concat(h());return f()?e({type:"document",document:r,vendor:n,rules:i}):l("@document missing '}'")}}()||function(){var e=o();if(p(/^@page */)){var t=b()||[];if(!d())return l("@page missing '{'");for(var n,r=m();n=w();)r.push(n),r=r.concat(m());return f()?e({type:"page",selectors:t,declarations:r}):l("@page missing '}'")}}()||function(){var e=o();if(p(/^@host\s*/)){if(!d())return l("@host missing '{'");var t=m().concat(h());return f()?e({type:"host",rules:t}):l("@host missing '}'")}}()||function(){var e=o();if(p(/^@font-face\s*/)){if(!d())return l("@font-face missing '{'");for(var t,n=m();t=w();)n.push(t),n=n.concat(m());return f()?e({type:"font-face",declarations:n}):l("@font-face missing '}'")}}()}function T(){var e=o(),t=b();return t?(m(),e({type:"rule",selectors:t,declarations:k()})):l("selector missing")}return Bt(function(){var e=h();return{type:"stylesheet",stylesheet:{source:t.source,rules:e,parsingErrors:c}}}())}function Vt(e){return e?e.replace(/^\s+|\s+$/g,""):""}function Bt(e,t){for(var n=e&&"string"===typeof e.type,r=n?e:t,i=0,o=Object.keys(e);i<o.length;i++){var a=e[o[i]];Array.isArray(a)?a.forEach((function(e){Bt(e,r)})):a&&"object"===typeof a&&Bt(a,r)}return n&&Object.defineProperty(e,"parent",{configurable:!0,writable:!0,enumerable:!1,value:t||null}),e}var Ht={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 Wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}var Ut=/(max|min)-device-(width|height)/,zt=new RegExp(Ut.source,"g"),qt=/([^\\]):hover/,Gt=new RegExp(qt.source,"g");function $t(e,t){var n=null===t||void 0===t?void 0:t.stylesWithHoverClass.get(e);if(n)return n;var r=jt(e,{silent:!0});if(!r.stylesheet)return e;var i=[],o=[];!function e(t){"selectors"in t&&t.selectors&&t.selectors.forEach((function(e){qt.test(e)&&i.push(e)})),"media"in t&&t.media&&Ut.test(t.media)&&o.push(t.media),"rules"in t&&t.rules&&t.rules.forEach(e)}(r.stylesheet);var a=e;if(i.length>0){var s=new RegExp(i.filter((function(e,t){return i.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return Wt(e)})).join("|"),"g");a=a.replace(s,(function(e){var t=e.replace(Gt,"$1.\\:hover");return"".concat(e,", ").concat(t)}))}if(o.length>0){var u=new RegExp(o.filter((function(e,t){return o.indexOf(e)===t})).sort((function(e,t){return t.length-e.length})).map((function(e){return Wt(e)})).join("|"),"g");a=a.replace(u,(function(e){return e.replace(zt,"$1-$2")}))}return null===t||void 0===t||t.stylesWithHoverClass.set(e,a),a}function Qt(){return{stylesWithHoverClass:new Map}}function Yt(e,t){var n,r=t.doc,i=t.hackCss,o=t.cache;switch(e.type){case _e.Document:return r.implementation.createDocument(null,"",null);case _e.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case _e.Element:var u,c=function(e){var t=Ht[e.tagName]?Ht[e.tagName]:e.tagName;return"link"===t&&e.attributes._cssText&&(t="style"),t}(e);e.isSVG?u=r.createElementNS("http://www.w3.org/2000/svg",c):(e.isCustom&&(null===(n=r.defaultView)||void 0===n?void 0:n.customElements)&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(r.defaultView.HTMLElement)),u=r.createElement(c));var f={};for(var h in e.attributes)if(Object.prototype.hasOwnProperty.call(e.attributes,h)){var p=e.attributes[h];if(("option"!==c||"selected"!==h||!1!==p)&&null!==p)if(!0===p&&(p=""),h.startsWith("rr_"))f[h]=p;else{var v="textarea"===c&&"value"===h,m="style"===c&&"_cssText"===h;if(m&&i&&"string"===typeof p&&(p=$t(p,o)),!v&&!m||"string"!==typeof p)try{if(e.isSVG&&"xlink:href"===h)u.setAttributeNS("http://www.w3.org/1999/xlink",h,p.toString());else if("onload"===h||"onclick"===h||"onmouse"===h.substring(0,7))u.setAttribute("_"+h,p.toString());else{if("meta"===c&&"Content-Security-Policy"===e.attributes["http-equiv"]&&"content"===h){u.setAttribute("csp-content",p.toString());continue}("link"!==c||"preload"!==e.attributes.rel&&"modulepreload"!==e.attributes.rel||"script"!==e.attributes.as)&&("link"===c&&"prefetch"===e.attributes.rel&&"string"===typeof e.attributes.href&&e.attributes.href.endsWith(".js")||("img"===c&&e.attributes.srcset&&e.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",e.attributes.srcset):u.setAttribute(h,p.toString())))}}catch(b){}else u.appendChild(r.createTextNode(p)),e.childNodes=[]}}var g=function(){var t=f[y];if("canvas"===c&&"rr_dataURL"===y){var n=document.createElement("img");n.onload=function(){var e=u.getContext("2d");e&&e.drawImage(n,0,0,n.width,n.height)},n.src=t.toString(),u.RRNodeType&&(u.rr_dataURL=t.toString())}else if("img"===c&&"rr_dataURL"===y){var r=u;r.currentSrc.startsWith("data:")||(r.setAttribute("rrweb-original-src",e.attributes.src),r.src=t.toString())}if("rr_width"===y)u.style.width=t.toString();else if("rr_height"===y)u.style.height=t.toString();else if("rr_mediaCurrentTime"===y&&"number"===typeof t)u.currentTime=t;else if("rr_mediaState"===y)switch(t){case"played":u.play().catch((function(e){return console.warn("media playback error",e)}));break;case"paused":u.pause()}else"rr_mediaPlaybackRate"===y&&"number"===typeof t?u.playbackRate=t:"rr_mediaMuted"===y&&"boolean"===typeof t?u.muted=t:"rr_mediaLoop"===y&&"boolean"===typeof t?u.loop=t:"rr_mediaVolume"===y&&"number"===typeof t&&(u.volume=t)};for(var y in f)g();if(e.isShadowHost)if(u.shadowRoot)for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);else u.attachShadow({mode:"open"});return u;case _e.Text:return r.createTextNode(e.isStyle&&i?$t(e.textContent,o):e.textContent);case _e.CDATA:return r.createCDATASection(e.textContent);case _e.Comment:return r.createComment(e.textContent);default:return null}}function Xt(e,t){var n=t.doc,r=t.mirror,i=t.skipChild,o=void 0!==i&&i,a=t.hackCss,s=void 0===a||a,u=t.afterAppend,c=t.cache;if(r.has(e.id)){var l=r.getNode(e.id);if(function(e,t){return!(!e||!t||e.type!==t.type)&&(e.type===_e.Document?e.compatMode===t.compatMode:e.type===_e.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===_e.Comment||e.type===_e.Text||e.type===_e.CDATA?e.textContent===t.textContent:e.type===_e.Element&&e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock)}(r.getMeta(l),e))return r.getNode(e.id)}var d=Yt(e,{doc:n,hackCss:s,cache:c});if(!d)return null;if(e.rootId&&r.getNode(e.rootId)!==n&&r.replace(e.rootId,n),e.type===_e.Document&&(n.close(),n.open(),"BackCompat"===e.compatMode&&e.childNodes&&e.childNodes[0].type!==_e.DocumentType&&(e.childNodes[0].type===_e.Element&&"xmlns"in e.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===e.childNodes[0].attributes.xmlns?n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):n.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),d=n),r.add(d,e),(e.type===_e.Document||e.type===_e.Element)&&!o){var f,h=(0,y.Z)(e.childNodes);try{var p=function(){var t=f.value,i=Xt(t,{doc:n,mirror:r,skipChild:!1,hackCss:s,afterAppend:u,cache:c});if(!i)return console.warn("Failed to rebuild",t),1;if(t.isShadow&&nt(d)&&d.shadowRoot)d.shadowRoot.appendChild(i);else if(e.type===_e.Document&&t.type==_e.Element){var o=i,a=null;o.childNodes.forEach((function(e){"BODY"===e.nodeName&&(a=e)})),a?(o.removeChild(a),d.appendChild(i),o.appendChild(a)):d.appendChild(i)}else d.appendChild(i);u&&u(i,t.id)};for(h.s();!(f=h.n()).done;)p()}catch(v){h.e(v)}finally{h.f()}}return d}function Kt(e,t){var n=t.doc,r=t.onVisit,i=t.hackCss,o=void 0===i||i,a=t.afterAppend,s=t.cache,u=t.mirror,c=void 0===u?new st:u,l=Xt(e,{doc:n,mirror:c,skipChild:!1,hackCss:o,afterAppend:a,cache:s});return function(e,t){var n,r=(0,y.Z)(e.getIds());try{for(r.s();!(n=r.n()).done;){var i=n.value;e.has(i)&&t(e.getNode(i))}}catch(o){r.e(o)}finally{r.f()}}(c,(function(e){r&&r(e),function(e,t){var n=t.getMeta(e);if((null===n||void 0===n?void 0:n.type)===_e.Element){var r=e;for(var i in n.attributes)if(Object.prototype.hasOwnProperty.call(n.attributes,i)&&i.startsWith("rr_")){var o=n.attributes[i];"rr_scrollLeft"===i&&(r.scrollLeft=o),"rr_scrollTop"===i&&(r.scrollTop=o)}}}(e,c)})),l}var Jt,en=n(7326);!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Jt||(Jt={}));var tn=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function nn(e){var t=[];for(var n in e){var r=e[n];if("string"===typeof r){var i=un(n);t.push("".concat(i,": ").concat(r,";"))}}return t.join(" ")}var rn=/-([a-z])/g,on=/^--[a-zA-Z0-9-]+$/,an=function(e){return on.test(e)?e:e.replace(rn,(function(e,t){return t?t.toUpperCase():""}))},sn=/\B([A-Z])/g,un=function(e){return e.replace(sn,"-$1").toLowerCase()},cn=function(){function e(){(0,a.Z)(this,e),this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=vn.ELEMENT_NODE,this.TEXT_NODE=vn.TEXT_NODE}return(0,s.Z)(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),e}();function ln(e){return function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e,r,i){var o;return(0,a.Z)(this,n),(o=t.call(this)).nodeType=vn.DOCUMENT_TYPE_NODE,o.RRNodeType=Jt.DocumentType,o.name=e,o.publicId=r,o.systemId=i,o.nodeName=e,o.textContent=null,o}return(0,s.Z)(n,[{key:"toString",value:function(){return"RRDocumentType"}}]),n}(e)}function dn(e){return function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=vn.ELEMENT_NODE,r.RRNodeType=Jt.Element,r.attributes={},r.shadowRoot=null,r.tagName=e.toUpperCase(),r.nodeName=e.toUpperCase(),r}return(0,s.Z)(n,[{key:"textContent",get:function(){var e="";return this.childNodes.forEach((function(t){return e+=t.textContent})),e},set:function(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}},{key:"classList",get:function(){var e=this;return new mn(this.attributes.class,(function(t){e.attributes.class=t}))}},{key:"id",get:function(){return this.attributes.id||""}},{key:"className",get:function(){return this.attributes.class||""}},{key:"style",get:function(){var e=this,t=this.attributes.style?function(e){var t={},n=/:(.+)/;return e.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[an(r[0].trim())]=r[1].trim())}})),t}(this.attributes.style):{},n=/\B([A-Z])/g;return t.setProperty=function(r,i,o){if(!n.test(r)){var a=an(r);i?t[a]=i:delete t[a],"important"===o&&(t[a]+=" !important"),e.attributes.style=nn(t)}},t.removeProperty=function(r){if(n.test(r))return"";var i=an(r),o=t[i]||"";return delete t[i],e.attributes.style=nn(t),o},t}},{key:"getAttribute",value:function(e){return this.attributes[e]||null}},{key:"setAttribute",value:function(e,t){this.attributes[e]=t}},{key:"setAttributeNS",value:function(e,t,n){this.setAttribute(t,n)}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"appendChild",value:function(e){return gn(this,e)}},{key:"insertBefore",value:function(e,t){return yn(this,e,t)}},{key:"removeChild",value:function(e){return bn(this,e)}},{key:"attachShadow",value:function(e){var t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}},{key:"dispatchEvent",value:function(e){return!0}},{key:"toString",value:function(){var e="";for(var t in this.attributes)e+="".concat(t,'="').concat(this.attributes[t],'" ');return"".concat(this.tagName," ").concat(e)}}]),n}(e)}function fn(e){return function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=vn.TEXT_NODE,r.nodeName="#text",r.RRNodeType=Jt.Text,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRText text=".concat(JSON.stringify(this.data))}}]),n}(e)}function hn(e){return function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeType=vn.COMMENT_NODE,r.nodeName="#comment",r.RRNodeType=Jt.Comment,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRComment text=".concat(JSON.stringify(this.data))}}]),n}(e)}function pn(e){return function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).nodeName="#cdata-section",r.nodeType=vn.CDATA_SECTION_NODE,r.RRNodeType=Jt.CDATA,r.data=e,r}return(0,s.Z)(n,[{key:"textContent",get:function(){return this.data},set:function(e){this.data=e}},{key:"toString",value:function(){return"RRCDATASection data=".concat(JSON.stringify(this.data))}}]),n}(e)}var vn,mn=(0,s.Z)((function e(t,n){var r=this;if((0,a.Z)(this,e),this.classes=[],this.add=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,o=t;i<o.length;i++){var a=o[i],s=String(a);r.classes.indexOf(s)>=0||r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))},this.remove=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];r.classes=r.classes.filter((function(e){return-1===t.indexOf(e)})),r.onChange&&r.onChange(r.classes.join(" "))},t){var i,o=t.trim().split(/\s+/);(i=this.classes).push.apply(i,(0,C.Z)(o))}this.onChange=n}));function gn(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 yn(e,t,n){if(!n)return gn(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 bn(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}!function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(vn||(vn={}));var wn={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},kn={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"},Sn=null;function En(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t.mirror||t.ownerDocument.mirror;e=function(e,t,n,r){var i;n.afterAppend&&!Sn&&(Sn=new WeakSet,setTimeout((function(){Sn=null}),0));if(!Cn(e,t)){var o=In(t,n.mirror,r);null===(i=e.parentNode)||void 0===i||i.replaceChild(o,e),e=o}switch(t.RRNodeType){case Jt.Document:if(!Mn(e,t,n.mirror,r)){var a=r.getMeta(t);a&&(n.mirror.removeNodeFromMap(e),e.close(),e.open(),n.mirror.add(e,a),null===Sn||void 0===Sn||Sn.add(e))}break;case Jt.Element:var s=e,u=t;switch(u.tagName){case"IFRAME":var c=e.contentDocument;if(!c)break;En(c,t.contentDocument,n,r)}u.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),xn(s.shadowRoot,u.shadowRoot,n,r)),function(e,t,n){var r=e.attributes,i=t.attributes,o=function(){var r=i[a],o=n.getMeta(t);if((null===o||void 0===o?void 0:o.isSVG)&&wn[a])e.setAttributeNS(wn[a],a,r);else if("CANVAS"===t.tagName&&"rr_dataURL"===a){var s=document.createElement("img");s.src=r,s.onload=function(){var t=e.getContext("2d");t&&t.drawImage(s,0,0,s.width,s.height)}}else{if("IFRAME"===t.tagName&&"srcdoc"===a)return 1;e.setAttribute(a,r)}};for(var a in i)o();for(var s=0,u=Array.from(r);s<u.length;s++){var c=u[s].name;c in i||e.removeAttribute(c)}t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}(s,u,r)}return e}(e,t,n,r),xn(e,t,n,r),function(e,t,n){var r;switch(t.RRNodeType){case Jt.Document:var i=t.scrollData;i&&n.applyScroll(i,!0);break;case Jt.Element:var o=e,a=t;switch(a.scrollData&&n.applyScroll(a.scrollData,!0),a.inputData&&n.applyInput(a.inputData),a.tagName){case"AUDIO":case"VIDEO":var s=e,u=a;void 0!==u.paused&&(u.paused?s.pause():s.play()),void 0!==u.muted&&(s.muted=u.muted),void 0!==u.volume&&(s.volume=u.volume),void 0!==u.currentTime&&(s.currentTime=u.currentTime),void 0!==u.playbackRate&&(s.playbackRate=u.playbackRate),void 0!==u.loop&&(s.loop=u.loop);break;case"CANVAS":var c=t;if(null!==c.rr_dataURL){var l=document.createElement("img");l.onload=function(){var e=o.getContext("2d");e&&e.drawImage(l,0,0,l.width,l.height)},l.src=c.rr_dataURL}c.canvasMutations.forEach((function(t){return n.applyCanvas(t.event,t.mutation,e)}));break;case"STYLE":var d=o.sheet;d&&t.rules.forEach((function(e){return n.applyStyleSheetMutation(e,d)}))}break;case Jt.Text:case Jt.Comment:case Jt.CDATA:e.textContent!==t.data&&(e.textContent=t.data)}(null===Sn||void 0===Sn?void 0:Sn.has(e))&&(Sn.delete(e),null===(r=n.afterAppend)||void 0===r||r.call(n,e,n.mirror.getId(e)))}(e,t,n)}function xn(e,t,n,r){var i=Array.from(e.childNodes),o=t.childNodes;if(0!==i.length||0!==o.length){for(var a=0,s=i.length-1,u=0,c=o.length-1,l=i[a],d=i[s],f=o[u],h=o[c],p=void 0,v=void 0;a<=s&&u<=c;)if(void 0===l)l=i[++a];else if(void 0===d)d=i[--s];else if(Mn(l,f,n.mirror,r))l=i[++a],f=o[++u];else if(Mn(d,h,n.mirror,r))d=i[--s],h=o[--c];else if(Mn(l,h,n.mirror,r)){try{e.insertBefore(l,d.nextSibling)}catch($n){console.warn($n)}l=i[++a],h=o[--c]}else if(Mn(d,f,n.mirror,r)){try{e.insertBefore(d,l)}catch($n){console.warn($n)}d=i[--s],f=o[++u]}else{if(!p){p={};for(var m=a;m<=s;m++){var g=i[m];g&&n.mirror.hasNode(g)&&(p[n.mirror.getId(g)]=m)}}var y=i[v=p[r.getId(f)]];if(void 0!==v&&y&&Mn(y,f,n.mirror,r)){try{e.insertBefore(y,l)}catch($n){console.warn($n)}i[v]=void 0}else{var b=In(f,n.mirror,r);"#document"===e.nodeName&&l&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(e.removeChild(l),n.mirror.removeNodeFromMap(l),l=i[++a]);try{e.insertBefore(b,l||null)}catch($n){console.warn($n)}}f=o[++u]}if(a>s){var w=o[c+1],k=null;for(w&&(k=n.mirror.getNode(r.getId(w)));u<=c;++u){var S=In(o[u],n.mirror,r);try{e.insertBefore(S,k)}catch($n){console.warn($n)}}}else if(u>c)for(;a<=s;a++){var E=i[a];if(E&&E.parentNode===e)try{e.removeChild(E),n.mirror.removeNodeFromMap(E)}catch($n){console.warn($n)}}for(var x=e.firstChild,I=t.firstChild;null!==x&&null!==I;)En(x,I,n,r),x=x.nextSibling,I=I.nextSibling}}function In(e,t,n){var r=n.getId(e),i=n.getMeta(e),o=null;if(r>-1&&(o=t.getNode(r)),null!==o&&Cn(o,e))return o;switch(e.RRNodeType){case Jt.Document:o=new Document;break;case Jt.DocumentType:o=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case Jt.Element:var a=e.tagName.toLowerCase();a=kn[a]||a,o=i&&"isSVG"in i&&(null===i||void 0===i?void 0:i.isSVG)?document.createElementNS(wn.svg,a):document.createElement(e.tagName);break;case Jt.Text:o=document.createTextNode(e.data);break;case Jt.Comment:o=document.createComment(e.data);break;case Jt.CDATA:o=document.createCDATASection(e.data)}i&&t.add(o,Object.assign({},i));try{null===Sn||void 0===Sn||Sn.add(o)}catch($n){}return o}function Cn(e,t){return e.nodeType===t.nodeType&&(e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName)}function Mn(e,t,n,r){var i=n.getId(e),o=r.getId(t);return-1!==i&&i===o&&Cn(e,t)}var Tn=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e){var r;return(0,a.Z)(this,n),(r=t.call(this)).UNSERIALIZED_STARTING_ID=-2,r._unserializedId=r.UNSERIALIZED_STARTING_ID,r.mirror=new Vn,r.scrollData=null,e&&(r.mirror=e),r}return(0,s.Z)(n,[{key:"unserializedId",get:function(){return this._unserializedId--}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new _n(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t,n=e.toUpperCase();switch(n){case"AUDIO":case"VIDEO":t=new Nn(n);break;case"IFRAME":t=new On(n,this.mirror);break;case"CANVAS":t=new Rn(n);break;case"STYLE":t=new Dn(n);break;default:t=new An(n)}return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new Zn(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new Fn(e);return t.ownerDocument=this,t}},{key:"createTextNode",value:function(e){var t=new Ln(e);return t.ownerDocument=this,t}},{key:"destroyTree",value:function(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}},{key:"open",value:function(){(0,u.Z)((0,c.Z)(n.prototype),"open",this).call(this),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}]),n}(function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;(0,a.Z)(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call(this,i)).nodeType=vn.DOCUMENT_NODE,e.nodeName="#document",e.compatMode="CSS1Compat",e.RRNodeType=Jt.Document,e.textContent=null,e.ownerDocument=(0,en.Z)(e),e}return(0,s.Z)(n,[{key:"documentElement",get:function(){return this.childNodes.find((function(e){return e.RRNodeType===Jt.Element&&"HTML"===e.tagName}))||null}},{key:"body",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Jt.Element&&"BODY"===e.tagName})))||null}},{key:"head",get:function(){var e;return(null===(e=this.documentElement)||void 0===e?void 0:e.childNodes.find((function(e){return e.RRNodeType===Jt.Element&&"HEAD"===e.tagName})))||null}},{key:"implementation",get:function(){return this}},{key:"firstElementChild",get:function(){return this.documentElement}},{key:"appendChild",value:function(e){var t=e.RRNodeType;if((t===Jt.Element||t===Jt.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===t})))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ".concat(t===Jt.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var n=gn(this,e);return n.parentElement=null,n}},{key:"insertBefore",value:function(e,t){var n=e.RRNodeType;if((n===Jt.Element||n===Jt.DocumentType)&&this.childNodes.some((function(e){return e.RRNodeType===n})))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ".concat(n===Jt.Element?"RRElement":"RRDoctype"," on RRDocument allowed."));var r=yn(this,e,t);return r.parentElement=null,r}},{key:"removeChild",value:function(e){return bn(this,e)}},{key:"open",value:function(){this.firstChild=null,this.lastChild=null}},{key:"close",value:function(){}},{key:"write",value:function(e){var t;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===e?t="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===e&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){var n=this.createDocumentType("html",t,"");this.open(),this.appendChild(n)}}},{key:"createDocument",value:function(e,t,r){return new n}},{key:"createDocumentType",value:function(e,t,n){var r=new(ln(cn))(e,t,n);return r.ownerDocument=this,r}},{key:"createElement",value:function(e){var t=new(dn(cn))(e);return t.ownerDocument=this,t}},{key:"createElementNS",value:function(e,t){return this.createElement(t)}},{key:"createTextNode",value:function(e){var t=new(fn(cn))(e);return t.ownerDocument=this,t}},{key:"createComment",value:function(e){var t=new(hn(cn))(e);return t.ownerDocument=this,t}},{key:"createCDATASection",value:function(e){var t=new(pn(cn))(e);return t.ownerDocument=this,t}},{key:"toString",value:function(){return"RRDocument"}}]),n}(cn)),_n=ln(cn),An=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).inputData=null,e.scrollData=null,e}return(0,s.Z)(n)}(dn(cn)),Nn=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n)}(function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){return(0,a.Z)(this,n),t.apply(this,arguments)}return(0,s.Z)(n,[{key:"attachShadow",value:function(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}},{key:"play",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}}]),n}(An)),Rn=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rr_dataURL=null,e.canvasMutations=[],e}return(0,s.Z)(n,[{key:"getContext",value:function(){return null}}]),n}(An),Dn=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;return(0,a.Z)(this,n),(e=t.apply(this,arguments)).rules=[],e}return(0,s.Z)(n)}(An),On=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(e,r){var i;return(0,a.Z)(this,n),(i=t.call(this,e)).contentDocument=new Tn,i.contentDocument.mirror=r,i}return(0,s.Z)(n)}(An),Ln=fn(cn),Zn=hn(cn),Fn=pn(cn);function Pn(e,t,n,r){var i,o;switch(e.nodeType){case vn.DOCUMENT_NODE:r&&"IFRAME"===r.nodeName?i=r.contentDocument:(i=t).compatMode=e.compatMode;break;case vn.DOCUMENT_TYPE_NODE:var a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break;case vn.ELEMENT_NODE:for(var s=e,u=(o=s)instanceof HTMLFormElement?"FORM":o.tagName.toUpperCase(),c=i=t.createElement(u),l=0,d=Array.from(s.attributes);l<d.length;l++){var f=d[l],h=f.name,p=f.value;c.attributes[h]=p}s.scrollLeft&&(c.scrollLeft=s.scrollLeft),s.scrollTop&&(c.scrollTop=s.scrollTop);break;case vn.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case vn.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case vn.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case vn.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}var v=n.getMeta(e);return t instanceof Tn&&(v||(v=Bn(i,t.unserializedId),n.add(e,v)),t.mirror.add(i,Object.assign({},v))),i}function jn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new tn,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new Tn;return function e(r,i){var o=Pn(r,n,t,i);if(null!==o)if("IFRAME"!==(null===i||void 0===i?void 0:i.nodeName)&&r.nodeType!==vn.DOCUMENT_FRAGMENT_NODE&&(null===i||void 0===i||i.appendChild(o),o.parentNode=i,o.parentElement=i),"IFRAME"===r.nodeName){var a=r.contentDocument;a&&e(a,o)}else r.nodeType!==vn.DOCUMENT_NODE&&r.nodeType!==vn.ELEMENT_NODE&&r.nodeType!==vn.DOCUMENT_FRAGMENT_NODE||(r.nodeType===vn.ELEMENT_NODE&&r.shadowRoot&&e(r.shadowRoot,o),r.childNodes.forEach((function(t){return e(t,o)})))}(e,null),n}var Vn=function(){function e(){(0,a.Z)(this,e),this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;if(!e)return-1;var n=null===(t=this.getMeta(e))||void 0===t?void 0:t.id;return null!==n&&void 0!==n?n:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]),e}();function Bn(e,t){switch(e.RRNodeType){case Jt.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case Jt.DocumentType:var n=e;return{id:t,type:e.RRNodeType,name:n.name,publicId:n.publicId,systemId:n.systemId};case Jt.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case Jt.Text:case Jt.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case Jt.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function Hn(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(e){e(n)})),(r=e.get("*"))&&r.slice().map((function(e){e(t,n)}))}}}function Wn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,i=468,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||u,scrollIntoView:r.prototype.scrollIntoView},a=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,s=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?p.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(c(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):p.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==c(arguments[0])){var e=arguments[0].left,t=arguments[0].top;p.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==c(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==c(arguments[0])){var n=function(e){for(;e!==t.body&&!1===f(e);)e=e.parentNode||e.host;return e}(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(p.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function u(e,t){this.scrollLeft=e,this.scrollTop=t}function c(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function l(e,t){return"Y"===t?e.clientHeight+s<e.scrollHeight:"X"===t?e.clientWidth+s<e.scrollWidth:void 0}function d(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function f(e){var t=l(e,"Y")&&d(e,"Y"),n=l(e,"X")&&d(e,"X");return t||n}function h(t){var n,r,o,s,u=(a()-t.startTime)/i;s=u=u>1?1:u,n=.5*(1-Math.cos(Math.PI*s)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(h.bind(e,t))}function p(n,r,i){var s,c,l,d,f=a();n===t.body?(s=e,c=e.scrollX||e.pageXOffset,l=e.scrollY||e.pageYOffset,d=o.scroll):(s=n,c=n.scrollLeft,l=n.scrollTop,d=u),h({scrollable:s,method:d,startTime:f,startX:c,startY:l,x:r,y:i})}}var Un,zn=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.timeOffset=0,this.raf=null,this.actions=t,this.speed=n.speed}return(0,s.Z)(e,[{key:"addAction",value:function(e){var t=!0===this.raf;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{var n=this.findActionIndex(e);this.actions.splice(n,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}},{key:"start",value:function(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}},{key:"rafCheck",value:function(){var e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){var t=this.actions[0];if(!(this.timeOffset>=t.delay))break;this.actions.shift(),t.doAction()}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}},{key:"clear",value:function(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}},{key:"setSpeed",value:function(e){this.speed=e}},{key:"isActive",value:function(){return null!==this.raf}},{key:"findActionIndex",value:function(e){for(var t=0,n=this.actions.length-1;t<=n;){var r=Math.floor((t+n)/2);if(this.actions[r].delay<e.delay)t=r+1;else{if(!(this.actions[r].delay>e.delay))return r+1;n=r-1}}return t}}]),e}();function qn(e,t){if(e.type===He.IncrementalSnapshot&&e.data.source===We.MouseMove&&e.data.positions&&e.data.positions.length){var 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 Gn(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Un||(Un={}));var $n={type:"xstate.init"};function Qn(e){return void 0===e?[]:[].concat(e)}function Yn(e){return{type:"xstate.assign",assignment:e}}function Xn(e,t){return"string"==typeof(e="string"==typeof e&&t&&t[e]?t[e]:e)?{type:e}:"function"==typeof e?{type:e.name,exec:e}:e}function Kn(e){return function(t){return e===t}}function Jn(e){return"string"==typeof e?{type:e}:e}function er(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Kn(e)}}function tr(e,t,n){var r=t,i=!1;return[e.filter((function(e){if("xstate.assign"===e.type){i=!0;var t=Object.assign({},r);return"function"==typeof e.assignment?t=e.assignment(r,n):Object.keys(e.assignment).forEach((function(i){t[i]="function"==typeof e.assignment[i]?e.assignment[i](r,n):e.assignment[i]})),r=t,!1}return!0})),r,i]}function nr(e,t){void 0===t&&(t={});var n=Gn(tr(Qn(e.states[e.initial].entry).map((function(e){return Xn(e,t.actions)})),e.context,$n),2),r=n[0],i=n[1],o={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Kn(e.initial)},transition:function(t,n){var r,i,a="string"==typeof t?{value:t,context:e.context}:t,s=a.value,u=a.context,c=Jn(n),l=e.states[s];if(l.on){var d=Qn(l.on[c.type]);try{for(var f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),h=f.next();!h.done;h=f.next()){var p=h.value;if(void 0===p)return er(s,u);var v="string"==typeof p?{target:p}:p,m=v.target,g=v.actions,y=void 0===g?[]:g,b=v.cond,w=void 0===b?function(){return!0}:b,k=void 0===m,S=null!=m?m:s,E=e.states[S];if(w(u,c)){var x=Gn(tr((k?Qn(y):[].concat(l.exit,y,E.entry).filter((function(e){return e}))).map((function(e){return Xn(e,o._options.actions)})),u,c),3),I=x[0],C=x[1],M=x[2],T=null!=m?m:s;return{value:T,context:C,actions:I,changed:m!==s||I.length>0||M,matches:Kn(T)}}}}catch(Gn){r={error:Gn}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(r)throw r.error}}}return er(s,u)}};return o}var rr=function(e,t){return e.actions.forEach((function(n){var r=n.exec;return r&&r(e.context,t)}))};function ir(e){var t=e.initialState,n=Un.NotStarted,r=new Set,i={_machine:e,send:function(i){n===Un.Running&&(t=e.transition(t,i),rr(t,Jn(i)),r.forEach((function(e){return e(t)})))},subscribe:function(e){return r.add(e),e(t),{unsubscribe:function(){return r.delete(e)}}},start:function(r){if(r){var o="object"==typeof r?r:{context:e.config.context,value:r};t={value:o.value,actions:[],context:o.context,matches:Kn(o.value)}}return n=Un.Running,rr(t,$n),i},stop:function(){return n=Un.Stopped,r.clear(),i},get state(){return t},get status(){return n}};return i}function or(e,t){var n=t.getCastFn,r=t.applyEventsSynchronously,i=t.emitter,o=nr({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:Yn({lastPlayedEvent:function(e,t){return"CAST_EVENT"===t.type?t.payload.event:e.lastPlayedEvent}}),recordTimeOffset:Yn((function(e,t){var n=e.timeOffset;return"payload"in t&&"timeOffset"in t.payload&&(n=t.payload.timeOffset),Object.assign(Object.assign({},e),{timeOffset:n,baselineTime:e.events[0].timestamp+n})})),play:function(e){var t,o=e.timer,a=e.events,s=e.baselineTime,u=e.lastPlayedEvent;o.clear();var c,l=(0,y.Z)(a);try{for(l.s();!(c=l.n()).done;){qn(c.value,s)}}catch(g){l.e(g)}finally{l.f()}var d=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.type===He.Meta&&r.timestamp<=t)return e.slice(n)}return e}(a,s),f=null===u||void 0===u?void 0:u.timestamp;(null===u||void 0===u?void 0:u.type)===He.IncrementalSnapshot&&u.data.source===We.MouseMove&&(f=u.timestamp+(null===(t=u.data.positions[0])||void 0===t?void 0:t.timeOffset)),s<(f||0)&&i.emit(Ge.PlayBack);var h,p=new Array,v=(0,y.Z)(d);try{var m=function(){var e=h.value;if(f&&f<s&&(e.timestamp<=f||e===u))return 1;if(e.timestamp<s)p.push(e);else{var t=n(e,!1);o.addAction({doAction:function(){t()},delay:e.delay})}};for(v.s();!(h=v.n()).done;)m()}catch(g){v.e(g)}finally{v.f()}r(p),i.emit(Ge.Flush),o.start()},pause:function(e){e.timer.clear()},resetLastPlayedEvent:Yn((function(e){return Object.assign(Object.assign({},e),{lastPlayedEvent:null})})),startLive:Yn({baselineTime:function(e,t){return e.timer.start(),"TO_LIVE"===t.type&&t.payload.baselineTime?t.payload.baselineTime:Date.now()}}),addEvent:Yn((function(e,t){var r=e.baselineTime,i=e.timer,o=e.events;if("ADD_EVENT"===t.type){var a=t.payload.event;qn(a,r);var s=o.length-1;if(!o[s]||o[s].timestamp<=a.timestamp)o.push(a);else{for(var u=-1,c=0;c<=s;){var l=Math.floor((c+s)/2);o[l].timestamp<=a.timestamp?c=l+1:s=l-1}-1===u&&(u=c),o.splice(u,0,a)}var d=a.timestamp<r,f=n(a,d);d?f():i.isActive()&&i.addAction({doAction:function(){f()},delay:a.delay})}return Object.assign(Object.assign({},e),{events:o})}))}});return ir(o)}function ar(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document,r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var sr="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",ur={map:{},getId:function(){return console.error(sr),-1},getNode:function(){return console.error(sr),null},removeNodeFromMap:function(){console.error(sr)},has:function(){return console.error(sr),!1},reset:function(){console.error(sr)}};function cr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var u=Date.now();i||!1!==n.leading||(i=u);var c=t-(u-i),l=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=u,e.apply(l,a)):r||!1===n.trailing||(r=setTimeout((function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(l,a)}),c))}}function lr(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),o&&o.set&&o.set.call(this,e)}}),function(){return lr(e,t,o||{},!0)}}function dr(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"===typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch($i){return function(){}}}"undefined"!==typeof window&&window.Proxy&&window.Reflect&&(ur=new Proxy(ur,{get:function(e,t,n){return"map"===t&&console.error(sr),Reflect.get(e,t,n)}}));var fr=Date.now;function hr(e){var t,n,r,i,o,a,s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null===s||void 0===s?void 0:s.documentElement.scrollLeft)||(null===(n=null===(t=null===s||void 0===s?void 0:s.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===(r=null===s||void 0===s?void 0:s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null===s||void 0===s?void 0:s.documentElement.scrollTop)||(null===(o=null===(i=null===s||void 0===s?void 0:s.body)||void 0===i?void 0:i.parentElement)||void 0===o?void 0:o.scrollTop)||(null===(a=null===s||void 0===s?void 0:s.body)||void 0===a?void 0:a.scrollTop)||0}}function pr(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vr(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function mr(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function gr(e,t,n,r){if(!e)return!1;var i=mr(e);if(!i)return!1;try{if("string"===typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Dt(i,t,r))return!0}catch($n){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function yr(e,t){return t.getId(e)===yt}function br(e,t){if(rt(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||br(e.parentNode,t))}function wr(e){return Boolean(e.changedTouches)}function kr(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(!(0 in n))throw new TypeError("1 argument is required");do{if(e===i)return!0}while(i=i&&i.parentNode);return!1})}function Sr(e){var t,n={},r=function(e,t){var r={value:e,parent:t,children:[]};return n[e.node.id]=r,r},i=[],o=(0,y.Z)(e);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=a.nextId,u=a.parentId;if(s&&s in n){var c=n[s];if(c.parent){var l=c.parent.children.indexOf(c);c.parent.children.splice(l,0,r(a,c.parent))}else{var d=i.indexOf(c);i.splice(d,0,r(a,null))}}else if(u in n){var f=n[u];f.children.push(r(a,f))}else i.push(r(a,null))}}catch(h){o.e(h)}finally{o.f()}return i}function Er(e,t){t(e.value);for(var n=e.children.length-1;n>=0;n--)Er(e.children[n],t)}function xr(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Ir(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Cr(e,t){var n,r,i=null===(r=null===(n=e.ownerDocument)||void 0===n?void 0:n.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};var o=i.getBoundingClientRect(),a=Cr(i,t),s=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:s,absoluteScale:a.absoluteScale*s}}function Mr(e){return Boolean(null===e||void 0===e?void 0:e.shadowRoot)}function Tr(e,t){var n=e[t[0]];return 1===t.length?n:Tr(n.cssRules[t[1]].cssRules,t.slice(2))}function _r(e){var t=(0,C.Z)(e),n=t.pop();return{positions:t,index:n}}/[1-9][0-9]{12}/.test(Date.now().toString())||(fr=function(){return(new Date).getTime()});var Ar=function(){function e(){(0,a.Z)(this,e),this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}return(0,s.Z)(e,[{key:"getId",value:function(e){var t;return null!==(t=this.styleIDMap.get(e))&&void 0!==t?t:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]),e}();function Nr(e){var t,n,r=null;return(null===(n=null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||void 0===n?void 0:n.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(r=e.getRootNode().host),r}function Rr(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=Nr(n);)n=t;return n}(e);return t.contains(n)}function Dr(e){var t=e.ownerDocument;return!!t&&(t.contains(e)||Rr(e))}for(var Or=n(5647),Lr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zr="undefined"===typeof Uint8Array?[]:new Uint8Array(256),Fr=0;Fr<64;Fr++)Zr[Lr.charCodeAt(Fr)]=Fr;var Pr=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),l=new Uint8Array(c);for(t=0;t<s;t+=4)n=Zr[e.charCodeAt(t)],r=Zr[e.charCodeAt(t+1)],i=Zr[e.charCodeAt(t+2)],o=Zr[e.charCodeAt(t+3)],l[u++]=n<<2|r>>4,l[u++]=(15&r)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c},jr=new Map;function Vr(e,t){var n=jr.get(e);return n||(n=new Map,jr.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}function Br(e,n,r){var i=this;return function(o){return tt(i,void 0,void 0,(0,t.Z)().mark((function i(){var a,s,u,c,l,d,f,h,p,v,m;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o||"object"!==typeof o||!("rr_type"in o)){t.next=55;break}if(r&&(r.isUnchanged=!1),"ImageBitmap"!==o.rr_type||!("args"in o)){t.next=11;break}return t.next=5,Br(e,n,r)(o.args);case 5:return a=t.sent,t.next=8,createImageBitmap.apply(null,a);case 8:return t.abrupt("return",t.sent);case 11:if(!("index"in o)){t.next=18;break}if(!r&&null!==n){t.next=14;break}return t.abrupt("return",o);case 14:return s=o.rr_type,u=o.index,t.abrupt("return",Vr(n,s)[u]);case 18:if(!("args"in o)){t.next=31;break}return c=o.rr_type,l=o.args,d=window[c],t.t0=Or.Z,t.t1=d,t.t2=C.Z,t.next=26,Promise.all(l.map(Br(e,n,r)));case 26:return t.t3=t.sent,t.t4=(0,t.t2)(t.t3),t.abrupt("return",(0,t.t0)(t.t1,t.t4));case 31:if(!("base64"in o)){t.next=35;break}return t.abrupt("return",Pr(o.base64));case 35:if(!("src"in o)){t.next=47;break}if(!(f=e.get(o.src))){t.next=41;break}return t.abrupt("return",f);case 41:return(h=new Image).src=o.src,e.set(o.src,h),t.abrupt("return",h);case 45:t.next=53;break;case 47:if(!("data"in o)||"Blob"!==o.rr_type){t.next=53;break}return t.next=50,Promise.all(o.data.map(Br(e,n,r)));case 50:return p=t.sent,v=new Blob(p,{type:o.type}),t.abrupt("return",v);case 53:t.next=60;break;case 55:if(!Array.isArray(o)){t.next=60;break}return t.next=58,Promise.all(o.map(Br(e,n,r)));case 58:return m=t.sent,t.abrupt("return",m);case 60:return t.abrupt("return",o);case 61:case"end":return t.stop()}}),i)})))}}function Hr(e,t){try{return t===qe.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch($n){return null}}var Wr=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Ur(e,t){if(null===t||void 0===t?void 0:t.constructor){var n=t.constructor.name;if(Wr.includes(n)){var r=Vr(e,n);r.includes(t)||r.push(t)}}}function zr(e){var n=e.mutation,r=e.target,i=e.type,o=e.imageMap,a=e.errorHandler;return tt(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,s=Hr(r,i)){e.next=4;break}return e.abrupt("return");case 4:if(!n.setter){e.next=7;break}return s[n.property]=n.args[0],e.abrupt("return");case 7:return u=s[n.property],e.next=10,Promise.all(n.args.map(Br(o,s)));case 10:c=e.sent,l=u.apply(s,c),Ur(s,l),!1,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),a(n,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}function qr(e){var n=e.event,r=e.mutations,i=e.target,o=e.imageMap,a=e.errorHandler;return tt(this,void 0,void 0,(0,t.Z)().mark((function e(){var s,u,c=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s=i.getContext("2d")){e.next=4;break}return a(r[0],new Error("Canvas context is null")),e.abrupt("return");case 4:return u=r.map((function(e){return tt(c,void 0,void 0,(0,t.Z)().mark((function n(){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Promise.all(e.args.map(Br(o,s))));case 1:case"end":return t.stop()}}),n)})))})),e.next=7,Promise.all(u);case 7:e.sent.forEach((function(e,t){var i=r[t];try{if(i.setter)return void(s[i.property]=i.args[0]);var u=s[i.property];"drawImage"===i.property&&"string"===typeof i.args[0]?(o.get(n),u.apply(s,i.args)):u.apply(s,e)}catch(c){a(i,c)}}));case 9:case"end":return e.stop()}}),e)})))}function Gr(e){var n=e.event,r=e.mutation,i=e.target,o=e.imageMap,a=e.canvasEventMap,s=e.errorHandler;return tt(this,void 0,void 0,(0,t.Z)().mark((function e(){var u,c,l,d;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,u=a.get(n)||r,c="commands"in u?u.commands:[u],![qe.WebGL,qe.WebGL2].includes(r.type)){e.next=13;break}l=0;case 5:if(!(l<c.length)){e.next=12;break}return d=c[l],e.next=9,zr({mutation:d,type:r.type,target:i,imageMap:o,errorHandler:s});case 9:l++,e.next=5;break;case 12:return e.abrupt("return");case 13:return e.next=15,qr({event:n,mutations:c,target:i,imageMap:o,errorHandler:s});case 15:e.next=20;break;case 17:e.prev=17,e.t0=e.catch(0),s(r,e.t0);case 20:case"end":return e.stop()}}),e,null,[[0,17]])})))}var $r=function(){function e(t){var n=this;(0,a.Z)(this,e),this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(Ge.Start,this.start.bind(this)),this.emitter.on(Ge.SkipStart,this.start.bind(this)),this.emitter.on(Ge.Pause,this.pause.bind(this)),this.emitter.on(Ge.Finish,this.pause.bind(this)),this.speedService.subscribe((function(){n.syncAllMediaElements()}))}return(0,s.Z)(e,[{key:"syncAllMediaElements",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{pause:!1};this.mediaMap.forEach((function(n,r){e.syncTargetWithState(r),t.pause&&r.pause()}))}},{key:"start",value:function(){this.syncAllMediaElements()}},{key:"pause",value:function(){this.syncAllMediaElements({pause:!0})}},{key:"seekTo",value:function(e){var t=e.time,n=e.target,r=e.mediaState;if(r.isPlaying){var i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,o="duration"in n&&n.duration;if(Number.isNaN(o))return void this.waitForMetadata(n);var a=r.currentTimeAtLastInteraction+i;n.loop&&!1!==o&&(a%=o),n.currentTime=a}else n.pause(),n.currentTime=r.currentTimeAtLastInteraction}},{key:"waitForMetadata",value:function(e){var t=this;if(!this.metadataCallbackMap.has(e)&&"addEventListener"in e){var n=function(){t.metadataCallbackMap.delete(e);var n=t.mediaMap.get(e);n&&t.seekTo({time:t.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,n),e.addEventListener("loadedmetadata",n,{once:!0})}}},{key:"getMediaStateFromMutation",value:function(e){var t,n,r,i,o,a=e.target,s=e.timeOffset,u=e.mutation,c=this.mediaMap.get(a),l=u.type,d=u.playbackRate,f=u.currentTime,h=u.muted,p=u.volume,v=u.loop;return{isPlaying:0===l||1!==l&&((null===c||void 0===c?void 0:c.isPlaying)||null!==a.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(t=null!==f&&void 0!==f?f:null===c||void 0===c?void 0:c.currentTimeAtLastInteraction)&&void 0!==t?t:0,lastInteractionTimeOffset:s,playbackRate:null!==(n=null!==d&&void 0!==d?d:null===c||void 0===c?void 0:c.playbackRate)&&void 0!==n?n:1,volume:null!==(r=null!==p&&void 0!==p?p:null===c||void 0===c?void 0:c.volume)&&void 0!==r?r:1,muted:null!==(i=null!==h&&void 0!==h?h:null===c||void 0===c?void 0:c.muted)&&void 0!==i?i:null===a.getAttribute("muted"),loop:null!==(o=null!==v&&void 0!==v?v:null===c||void 0===c?void 0:c.loop)&&void 0!==o?o:null===a.getAttribute("loop")}}},{key:"syncTargetWithState",value:function(e){var t=this.mediaMap.get(e);if(t){var n=t.muted,r=t.loop,i=t.volume,o=t.isPlaying,a=this.service.state.matches("paused"),s=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==i&&(e.volume=i),e.muted=n,e.loop=r,e.playbackRate!==s&&(e.playbackRate=s),o&&!a?e.play():e.pause()}catch(u){this.warn("Failed to replay media interactions: ".concat(u.message||u))}}}},{key:"addMediaElements",value:function(e,t,n){if(["AUDIO","VIDEO"].includes(e.nodeName)){var r=e,i=n.getMeta(r);if(i&&"attributes"in i){var o=this.service.state.matches("paused"),a=i.attributes,s=!1;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==r.getAttribute("autoplay"))&&o&&r.pause();var u=1;"number"===typeof a.rr_mediaPlaybackRate&&(u=a.rr_mediaPlaybackRate);var c=!1;c="boolean"===typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==r.getAttribute("muted");var l=!1;l="boolean"===typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==r.getAttribute("loop");var d=1;"number"===typeof a.rr_mediaVolume&&(d=a.rr_mediaVolume);var f=0;"number"===typeof a.rr_mediaCurrentTime&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:s,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:t,playbackRate:u,volume:d,muted:c,loop:l}),this.syncTargetWithState(r)}}}},{key:"mediaMutation",value:function(e){var t=e.target,n=e.timeOffset,r=e.mutation;this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:n,mutation:r})),this.syncTargetWithState(t)}},{key:"isSupportedMediaElement",value:function(e){return["AUDIO","VIDEO"].includes(e.nodeName)}},{key:"reset",value:function(){this.mediaMap.clear()}}]),e}(),Qr=Hn||e,Yr="[replayer]",Xr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kr(e){return e.type==He.IncrementalSnapshot&&(e.data.source==We.TouchMove||e.data.source==We.MouseInteraction&&e.data.type==Ue.TouchStart)}var Jr=function(){function e(t,n){var r=this;if((0,a.Z)(this,e),this.usingVirtualDom=!1,this.virtualDom=new Tn,this.mouseTail=null,this.tailPositions=[],this.emitter=Qr(),this.legacy_missingNodeRetryMap={},this.cache=Qt(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=ut(),this.styleMirror=new Ar,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=function(e){r.iframe.style.display="inherit";for(var t=0,n=[r.mouseTail,r.iframe];t<n.length;t++){var i=n[t];i&&(i.setAttribute("width",String(e.width)),i.setAttribute("height",String(e.height)))}},this.applyEventsSynchronously=function(e){var t,n=(0,y.Z)(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;switch(i.type){case He.DomContentLoaded:case He.Load:case He.Custom:continue;case He.FullSnapshot:case He.Meta:case He.Plugin:case He.IncrementalSnapshot:}r.getCastFn(i,!0)()}}catch(o){n.e(o)}finally{n.f()}},this.getCastFn=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];switch(e.type){case He.DomContentLoaded:case He.Load:break;case He.Custom:t=function(){r.emitter.emit(Ge.CustomEvent,e)};break;case He.Meta:t=function(){return r.emitter.emit(Ge.Resize,{width:e.data.width,height:e.data.height})};break;case He.FullSnapshot:t=function(){var t;if(r.firstFullSnapshot){if(r.firstFullSnapshot===e)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.rebuildFullSnapshot(e,n),null===(t=r.iframe.contentWindow)||void 0===t||t.scrollTo(e.data.initialOffset)};break;case He.IncrementalSnapshot:t=function(){if(r.applyIncremental(e,n),!n&&(e===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){var t,i=(0,y.Z)(r.service.state.context.events);try{for(i.s();!(t=i.n()).done;){var o=t.value;if(!(o.timestamp<=e.timestamp)&&r.isUserInteraction(o)){o.delay-e.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=o);break}}}catch(u){i.e(u)}finally{i.f()}if(r.nextUserInteractionEvent){var a=r.nextUserInteractionEvent.delay-e.delay,s={speed:Math.min(Math.round(a/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:s}),r.emitter.emit(Ge.SkipStart,s)}}}}return function(){t&&t();var i,o=(0,y.Z)(r.config.plugins||[]);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.handler&&a.handler(e,n,{replayer:r})}}catch(c){o.e(c)}finally{o.f()}r.service.send({type:"CAST_EVENT",payload:{event:e}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&e===r.service.state.context.events[s]){var u=50;e.type===He.IncrementalSnapshot&&e.data.source===We.MouseMove&&e.data.positions.length&&(u+=Math.max(0,-e.data.positions[0].timeOffset)),setTimeout((function(){s<r.service.state.context.events.length-1||(r.backToNormal(),r.service.send("END"),r.emitter.emit(Ge.Finish))}),u)}r.emitter.emit(Ge.EventCast,e)}},!(null===n||void 0===n?void 0:n.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Xr,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,n),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Ge.Resize,this.handleResize),this.setupDom();var o,s=(0,y.Z)(this.config.plugins||[]);try{for(s.s();!(o=s.n()).done;){var u=o.value;u.getMirror&&u.getMirror({nodeMirror:this.mirror})}}catch(v){s.e(v)}finally{s.f()}this.emitter.on(Ge.Flush,(function(){if(r.usingVirtualDom){var e={mirror:r.mirror,applyCanvas:function(e,t,n){Gr({event:e,mutation:t,target:n,imageMap:r.imageMap,canvasEventMap:r.canvasEventMap,errorHandler:r.warnCanvasMutationFailed.bind(r)})},applyInput:r.applyInput.bind(r),applyScroll:r.applyScroll.bind(r),applyStyleSheetMutation:function(e,t){e.source===We.StyleSheetRule?r.applyStyleSheetRule(e,t):e.source===We.StyleDeclaration&&r.applyStyleDeclaration(e,t)},afterAppend:function(e,t){var n,i=(0,y.Z)(r.config.plugins||[]);try{for(i.s();!(n=i.n()).done;){var o=n.value;o.onBuild&&o.onBuild(e,{id:t,replayer:r})}}catch(v){i.e(v)}finally{i.f()}}};if(r.iframe.contentDocument)try{En(r.iframe.contentDocument,r.virtualDom,e,r.virtualDom.mirror)}catch($n){console.warn($n)}if(r.virtualDom.destroyTree(),r.usingVirtualDom=!1,Object.keys(r.legacy_missingNodeRetryMap).length)for(var t in r.legacy_missingNodeRetryMap)try{var n=r.legacy_missingNodeRetryMap[t],i=In(n.node,r.mirror,r.virtualDom.mirror);En(i,n.node,e,r.virtualDom.mirror),n.node=i}catch(u){r.warn(u)}r.constructedStyleMutations.forEach((function(e){r.applyStyleSheetMutation(e)})),r.constructedStyleMutations=[],r.adoptedStyleSheets.forEach((function(e){r.applyAdoptedStyleSheet(e)})),r.adoptedStyleSheets=[]}if(r.mousePos&&(r.moveAndHover(r.mousePos.x,r.mousePos.y,r.mousePos.id,!0,r.mousePos.debugData),r.mousePos=null),!0===r.touchActive?r.mouse.classList.add("touch-active"):!1===r.touchActive&&r.mouse.classList.remove("touch-active"),r.touchActive=null,r.lastMouseDownEvent){var o=(0,b.Z)(r.lastMouseDownEvent,2),a=o[0],s=o[1];a.dispatchEvent(s)}r.lastMouseDownEvent=null,r.lastSelectionData&&(r.applySelection(r.lastSelectionData),r.lastSelectionData=null)})),this.emitter.on(Ge.PlayBack,(function(){r.firstFullSnapshot=null,r.mirror.reset(),r.styleMirror.reset(),r.mediaManager.reset()}));var c=new zn([],{speed:this.config.speed});this.service=or({events:t.map((function(e){return n&&n.unpackFn?n.unpackFn(e):e})).sort((function(e,t){return e.timestamp-t.timestamp})),timer:c,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe((function(e){r.emitter.emit(Ge.StateChange,{player:e})})),this.speedService=ir(nr({id:"speed",context:{normalSpeed:-1,timer:c},initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:function(e,t){"payload"in t&&e.timer.setSpeed(t.payload.speed)},recordSpeed:Yn({normalSpeed:function(e){return e.timer.speed}}),restoreSpeed:function(e){e.timer.setSpeed(e.normalSpeed)}}})),this.speedService.start(),this.speedService.subscribe((function(e){r.emitter.emit(Ge.StateChange,{speed:e})})),this.mediaManager=new $r({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var l=this.service.state.context.events.find((function(e){return e.type===He.Meta})),d=this.service.state.context.events.find((function(e){return e.type===He.FullSnapshot}));if(l){var f=l.data,h=f.width,p=f.height;setTimeout((function(){r.emitter.emit(Ge.Resize,{width:h,height:p})}),0)}d&&setTimeout((function(){var e;r.firstFullSnapshot||(r.firstFullSnapshot=d,r.rebuildFullSnapshot(d),null===(e=r.iframe.contentWindow)||void 0===e||e.scrollTo(d.data.initialOffset))}),1),this.service.state.context.events.find(Kr)&&this.mouse.classList.add("touch-device")}return(0,s.Z)(e,[{key:"timer",get:function(){return this.service.state.context.timer}},{key:"on",value:function(e,t){return this.emitter.on(e,t),this}},{key:"off",value:function(e,t){return this.emitter.off(e,t),this}},{key:"setConfig",value:function(e){var t=this;Object.keys(e).forEach((function(n){e[n],t.config[n]=e[n]})),this.config.skipInactive||this.backToNormal(),"undefined"!==typeof e.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),"undefined"!==typeof e.mouseTail&&(!1===e.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}},{key:"getMetaData",value:function(){var e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}},{key:"getCurrentTime",value:function(){return this.timer.timeOffset+this.getTimeOffset()}},{key:"getTimeOffset",value:function(){var e=this.service.state.context;return e.baselineTime-e.events[0].timestamp}},{key:"getMirror",value:function(){return this.mirror}},{key:"play",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:n}}),null===(t=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.getElementsByTagName("html")[0])||void 0===t||t.classList.remove("rrweb-paused"),this.emitter.emit(Ge.Start)}},{key:"pause",value:function(e){var t,n;void 0===e&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"===typeof e&&(this.play(e),this.service.send({type:"PAUSE"})),null===(n=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.getElementsByTagName("html")[0])||void 0===n||n.classList.add("rrweb-paused"),this.emitter.emit(Ge.Pause)}},{key:"resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(Ge.Resume)}},{key:"destroy",value:function(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Ge.Destroy)}},{key:"startLive",value:function(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}},{key:"addEvent",value:function(e){var t=this,n=this.config.unpackFn?this.config.unpackFn(e):e;Kr(n)&&this.mouse.classList.add("touch-device"),Promise.resolve().then((function(){return t.service.send({type:"ADD_EVENT",payload:{event:n}})}))}},{key:"enableInteract",value:function(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}},{key:"disableInteract",value:function(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}},{key:"resetCache",value:function(){this.cache=Qt()}},{key:"setupDom",value:function(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Wn(this.iframe.contentWindow,this.iframe.contentDocument),kr(this.iframe.contentWindow))}},{key:"rebuildFullSnapshot",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.iframe.contentDocument)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={};var r=[],i=function(n,i){if(t.collectIframeAndAttachDocument(r,n),t.mediaManager.isSupportedMediaElement(n)){var o=t.service.state.context.events;t.mediaManager.addMediaElements(n,e.timestamp-o[0].timestamp,t.mirror)}var a,s=(0,y.Z)(t.config.plugins||[]);try{for(s.s();!(a=s.n()).done;){var u=a.value;u.onBuild&&u.onBuild(n,{id:i,replayer:t})}}catch(c){s.e(c)}finally{s.f()}};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Kt(e.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,e.data.node.id);for(var o=function(){var e=s[a],n=e.mutationInQueue,r=e.builtNode;t.attachDocumentToIframe(n,r),t.newDocumentQueue=t.newDocumentQueue.filter((function(e){return e!==n}))},a=0,s=r;a<s.length;a++)o();var u=this.iframe.contentDocument,c=u.documentElement,l=u.head;this.insertStyleRules(c,l),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Ge.FullsnapshotRebuilded,e),n||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}},{key:"insertStyleRules",value:function(e,t){var n,r,i=(r=this.config.blockClass,[".".concat(r," { background: currentColor }"),"noscript { display: none !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Bn(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:We.StyleSheetRule,adds:i.map((function(e,t){return{rule:e,index:t}}))})}else{var a=document.createElement("style");e.insertBefore(a,t);for(var s=0;s<i.length;s++)null===(n=a.sheet)||void 0===n||n.insertRule(i[s],s)}}},{key:"attachDocumentToIframe",value:function(e,t){var n=this,r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=function(e,o){n.collectIframeAndAttachDocument(i,e);var a=r.getMeta(e);if((null===a||void 0===a?void 0:a.type)===_e.Element&&"HTML"===(null===a||void 0===a?void 0:a.tagName.toUpperCase())){var s=t.contentDocument,u=s.documentElement,c=s.head;n.insertStyleRules(u,c)}if(!n.usingVirtualDom){var l,d=(0,y.Z)(n.config.plugins||[]);try{for(d.s();!(l=d.n()).done;){var f=l.value;f.onBuild&&f.onBuild(e,{id:o,replayer:n})}}catch(h){d.e(h)}finally{d.f()}}};Xt(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(t.contentDocument,e.node.id);for(var a=function(){var e=u[s],t=e.mutationInQueue,r=e.builtNode;n.attachDocumentToIframe(t,r),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==t}))},s=0,u=i;s<u.length;s++)a()}},{key:"collectIframeAndAttachDocument",value:function(e,t){var n=this;if(xr(t,this.mirror)){var r=this.newDocumentQueue.find((function(e){return e.parentId===n.mirror.getId(t)}));r&&e.push({mutationInQueue:r,builtNode:t})}}},{key:"waitForStylesheetLoad",value:function(){var e,t=this,n=null===(e=this.iframe.contentDocument)||void 0===e?void 0:e.head;if(n){var r,i=new Set,o=this.service.state,a=function(){o=t.service.state};this.emitter.on(Ge.Start,a),this.emitter.on(Ge.Pause,a);var s=function(){t.emitter.off(Ge.Start,a),t.emitter.off(Ge.Pause,a)};n.querySelectorAll('link[rel="stylesheet"]').forEach((function(e){e.sheet||(i.add(e),e.addEventListener("load",(function(){i.delete(e),0===i.size&&-1!==r&&(o.matches("playing")&&t.play(t.getCurrentTime()),t.emitter.emit(Ge.LoadStylesheetEnd),r&&clearTimeout(r),s())})))})),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Ge.LoadStylesheetStart),r=setTimeout((function(){o.matches("playing")&&t.play(t.getCurrentTime()),r=-1,s()}),this.config.loadTimeout))}}},{key:"preloadAllImages",value:function(){return tt(this,void 0,void 0,(0,t.Z)().mark((function e(){var n,r,i,o,a,s=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.service.state,n=function(){s.service.state},this.emitter.on(Ge.Start,n),this.emitter.on(Ge.Pause,n),r=[],i=(0,y.Z)(this.service.state.context.events),e.prev=6,a=(0,t.Z)().mark((function e(){var n;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(n=o.value).type===He.IncrementalSnapshot&&n.data.source===We.CanvasMutation&&(r.push(s.deserializeAndPreloadCanvasEvents(n.data,n)),("commands"in n.data?n.data.commands:[n.data]).forEach((function(e){s.preloadImages(e,n)})));case 2:case"end":return e.stop()}}),e)})),i.s();case 9:if((o=i.n()).done){e.next=13;break}return e.delegateYield(a(),"t0",11);case 11:e.next=9;break;case 13:e.next=18;break;case 15:e.prev=15,e.t1=e.catch(6),i.e(e.t1);case 18:return e.prev=18,i.f(),e.finish(18);case 21:return e.abrupt("return",Promise.all(r));case 22:case"end":return e.stop()}}),e,this,[[6,15,18,21]])})))}},{key:"preloadImages",value:function(e,t){if("drawImage"===e.property&&"string"===typeof e.args[0]&&!this.imageMap.has(t)){var n=document.createElement("canvas"),r=n.getContext("2d"),i=null===r||void 0===r?void 0:r.createImageData(n.width,n.height);null===i||void 0===i||i.data,JSON.parse(e.args[0]),null===r||void 0===r||r.putImageData(i,0,0)}}},{key:"deserializeAndPreloadCanvasEvents",value:function(e,n){return tt(this,void 0,void 0,(0,t.Z)().mark((function r(){var i,o,a,s=this;return(0,t.Z)().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(this.canvasEventMap.has(n)){r.next=13;break}if(i={isUnchanged:!0},!("commands"in e)){r.next=9;break}return r.next=5,Promise.all(e.commands.map((function(e){return tt(s,void 0,void 0,(0,t.Z)().mark((function n(){var r;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all(e.args.map(Br(this.imageMap,null,i)));case 2:return r=t.sent,t.abrupt("return",Object.assign(Object.assign({},e),{args:r}));case 4:case"end":return t.stop()}}),n,this)})))})));case 5:o=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{commands:o})),r.next=13;break;case 9:return r.next=11,Promise.all(e.args.map(Br(this.imageMap,null,i)));case 11:a=r.sent,!1===i.isUnchanged&&this.canvasEventMap.set(n,Object.assign(Object.assign({},e),{args:a}));case 13:case"end":return r.stop()}}),r,this)})))}},{key:"applyIncremental",value:function(e,t){var n,r,i,o=this,a=e.data;switch(a.source){case We.Mutation:try{this.applyMutation(a,t)}catch(b){this.warn("Exception in mutation ".concat(b.message||b),a)}break;case We.Drag:case We.TouchMove:case We.MouseMove:if(t){var s=a.positions[a.positions.length-1];this.mousePos={x:s.x,y:s.y,id:s.id,debugData:a}}else a.positions.forEach((function(n){var r={doAction:function(){o.moveAndHover(n.x,n.y,n.id,t,a)},delay:n.timeOffset+e.timestamp-o.service.state.context.baselineTime};o.timer.addAction(r)})),this.timer.addAction({doAction:function(){},delay:e.delay-(null===(n=a.positions[0])||void 0===n?void 0:n.timeOffset)});break;case We.MouseInteraction:if(-1===a.id)break;var u=new Event(lt(Ue[a.type])),c=this.mirror.getNode(a.id);if(!c)return this.debugNodeNotFound(a,a.id);this.emitter.emit(Ge.MouseInteraction,{type:a.type,target:c});var l=this.config.triggerFocus;switch(a.type){case Ue.Blur:"blur"in c&&c.blur();break;case Ue.Focus:l&&c.focus&&c.focus({preventScroll:!0});break;case Ue.Click:case Ue.TouchStart:case Ue.TouchEnd:case Ue.MouseDown:case Ue.MouseUp:t?(a.type===Ue.TouchStart?this.touchActive=!0:a.type===Ue.TouchEnd&&(this.touchActive=!1),a.type===Ue.MouseDown?this.lastMouseDownEvent=[c,u]:a.type===Ue.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===Ue.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===Ue.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===Ue.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===Ue.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(u));break;case Ue.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(u)}break;case We.Scroll:if(-1===a.id)break;if(this.usingVirtualDom){var d=this.virtualDom.mirror.getNode(a.id);if(!d)return this.debugNodeNotFound(a,a.id);d.scrollData=a;break}this.applyScroll(a,t);break;case We.ViewportResize:this.emitter.emit(Ge.Resize,{width:a.width,height:a.height});break;case We.Input:if(-1===a.id)break;if(this.usingVirtualDom){var f=this.virtualDom.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);f.inputData=a;break}this.applyInput(a);break;case We.MediaInteraction:var h=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!h)return this.debugNodeNotFound(a,a.id);var p=h,v=this.service.state.context.events;this.mediaManager.mediaMutation({target:p,timeOffset:e.timestamp-v[0].timestamp,mutation:a});break;case We.StyleSheetRule:case We.StyleDeclaration:this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&(null===(r=this.virtualDom.mirror.getNode(a.id))||void 0===r||r.rules.push(a)):this.applyStyleSheetMutation(a);break;case We.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var m=this.virtualDom.mirror.getNode(a.id);if(!m)return this.debugNodeNotFound(a,a.id);m.canvasMutations.push({event:e,mutation:a})}else{var g=this.mirror.getNode(a.id);if(!g)return this.debugNodeNotFound(a,a.id);Gr({event:e,mutation:a,target:g,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case We.Font:try{var y=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);null===(i=this.iframe.contentDocument)||void 0===i||i.fonts.add(y)}catch(b){this.warn(b)}break;case We.Selection:if(t){this.lastSelectionData=a;break}this.applySelection(a);break;case We.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a)}}},{key:"applyMutation",value:function(e,t){var n=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,jn(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(var r in this.legacy_missingNodeRetryMap)try{var i=this.legacy_missingNodeRetryMap[r],o=Pn(i.node,this.virtualDom,this.mirror);o&&(i.node=o)}catch(v){this.warn(v)}var a=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter((function(t){return!!a.getNode(t.id)||(n.warnNodeNotFound(e,t.id),!1)})),e.removes.forEach((function(t){var r,i=a.getNode(t.id);if(i){var o=a.getNode(t.parentId);if(!o)return n.warnNodeNotFound(e,t.parentId);if(t.isShadow&&Mr(o)&&(o=o.shadowRoot),a.removeNodeFromMap(i),o)try{o.removeChild(i),n.usingVirtualDom&&"#text"===i.nodeName&&"STYLE"===o.nodeName&&(null===(r=o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}catch(v){if(!(v instanceof DOMException))throw v;n.warn("parent could not remove child in mutation",o,i,e)}}}));var s=Object.assign({},this.legacy_missingNodeRetryMap),u=[],c=function(e){var t,r;if(!n.iframe.contentDocument)return n.warn("Looks like your replayer has been destroyed.");var i=a.getNode(e.parentId);if(!i)return e.node.type===_e.Document?n.newDocumentQueue.push(e):u.push(e);e.node.isShadow&&(Mr(i)||i.attachShadow({mode:"open"}),i=i.shadowRoot);var o=null,c=null;if(e.previousId&&(o=a.getNode(e.previousId)),e.nextId&&(c=a.getNode(e.nextId)),function(e){var t=null;return e.nextId&&(t=a.getNode(e.nextId)),null!==e.nextId&&void 0!==e.nextId&&-1!==e.nextId&&!t}(e))return u.push(e);if(!e.node.rootId||a.getNode(e.node.rootId)){var l=e.node.rootId?a.getNode(e.node.rootId):n.usingVirtualDom?n.virtualDom:n.iframe.contentDocument;if(xr(i,a))n.attachDocumentToIframe(e,i);else{var d=function(e,t){if(!n.usingVirtualDom){var r,i=(0,y.Z)(n.config.plugins||[]);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.onBuild&&o.onBuild(e,{id:t,replayer:n})}}catch(a){i.e(a)}finally{i.f()}}},f=Xt(e.node,{doc:l,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache,afterAppend:d});if(-1!==e.previousId&&-1!==e.nextId){var h=a.getMeta(i);if(h&&h.type===_e.Element&&"textarea"===h.tagName&&e.node.type===_e.Text){var p,v=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes),m=(0,y.Z)(v);try{for(m.s();!(p=m.n()).done;){var g=p.value;g.nodeType===i.TEXT_NODE&&i.removeChild(g)}}catch(S){m.e(S)}finally{m.f()}}else if((null===h||void 0===h?void 0:h.type)===_e.Document){var b=i;e.node.type===_e.DocumentType&&(null===(t=b.childNodes[0])||void 0===t?void 0:t.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),"HTML"===f.nodeName&&b.documentElement&&b.removeChild(b.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(f,o.nextSibling):c&&c.parentNode?i.contains(c)?i.insertBefore(f,c):i.insertBefore(f,null):i.appendChild(f),d(f,e.node.id),n.usingVirtualDom&&"#text"===f.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),xr(f,n.mirror)){var w=n.mirror.getId(f),k=n.newDocumentQueue.find((function(e){return e.parentId===w}));k&&(n.attachDocumentToIframe(k,f),n.newDocumentQueue=n.newDocumentQueue.filter((function(e){return e!==k})))}(e.previousId||e.nextId)&&n.legacy_resolveMissingNode(s,i,f,e)}else s[e.node.id]={node:f,mutation:e}}}};e.adds.forEach((function(e){c(e)}));for(var l=Date.now();u.length;){var d=Sr(u);if(u.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}var f,h=(0,y.Z)(d);try{for(h.s();!(f=h.n()).done;){var p=f.value;a.getNode(p.value.parentId)?Er(p,(function(e){c(e)})):this.debug("Drop resolve tree since there is no parent for the root node.",p)}}catch(m){h.e(m)}finally{h.f()}}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),function(e){for(var t=new Set,n=[],r=e.length;r--;){var i=e[r];t.has(i.id)||(n.push(i),t.add(i.id))}return n}(e.texts).forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}if(i.textContent=t.value,n.usingVirtualDom){var o=i.parentNode;(null===(r=null===o||void 0===o?void 0:o.rules)||void 0===r?void 0:r.length)>0&&(o.rules=[])}})),e.attributes.forEach((function(t){var r,i=a.getNode(t.id);if(!i){if(e.removes.find((function(e){return e.id===t.id})))return;return n.warnNodeNotFound(e,t.id)}var o=function(){if("string"===typeof s){var e=t.attributes[s];if(null===e)i.removeAttribute(s);else if("string"===typeof e)try{if("_cssText"===s&&("LINK"===i.nodeName||"STYLE"===i.nodeName))try{var o=a.getMeta(i);Object.assign(o.attributes,t.attributes);var u=Xt(o,{doc:i.ownerDocument,mirror:a,skipChild:!0,hackCss:!0,cache:n.cache}),c=i.nextSibling,l=i.parentNode;if(u&&l)return l.removeChild(i),l.insertBefore(u,c),a.replace(t.id,u),1}catch($n){}if("value"===s&&"TEXTAREA"===i.nodeName){var d=i;d.childNodes.forEach((function(e){return d.removeChild(e)}));var f=null===(r=i.ownerDocument)||void 0===r?void 0:r.createTextNode(e);f&&d.appendChild(f)}else i.setAttribute(s,e)}catch(v){n.warn("An error occurred may due to the checkout feature.",v)}else if("style"===s){var h=e,p=i;for(var m in h)if(!1===h[m])p.style.removeProperty(m);else if(h[m]instanceof Array){var g=h[m];p.style.setProperty(m,g[0],g[1])}else{var y=h[m];p.style.setProperty(m,y)}}}};for(var s in t.attributes)if(o())break}))}},{key:"applyScroll",value:function(e,t){var n,r,i=this.mirror.getNode(e.id);if(!i)return this.debugNodeNotFound(e,e.id);var o=this.mirror.getMeta(i);if(i===this.iframe.contentDocument)null===(n=this.iframe.contentWindow)||void 0===n||n.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if((null===o||void 0===o?void 0:o.type)===_e.Document)null===(r=i.defaultView)||void 0===r||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch(a){}}},{key:"applyInput",value:function(e){var t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch(n){}}},{key:"applySelection",value:function(e){var t=this;try{var n=new Set,r=e.ranges.map((function(e){var r=e.start,i=e.startOffset,o=e.end,a=e.endOffset,s=t.mirror.getNode(r),u=t.mirror.getNode(o);if(s&&u){var c=new Range;c.setStart(s,i),c.setEnd(u,a);var l=s.ownerDocument,d=null===l||void 0===l?void 0:l.getSelection();return d&&n.add(d),{range:c,selection:d}}}));n.forEach((function(e){return e.removeAllRanges()})),r.forEach((function(e){var t;return e&&(null===(t=e.selection)||void 0===t?void 0:t.addRange(e.range))}))}catch(i){}}},{key:"applyStyleSheetMutation",value:function(e){var t,n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=(null===(t=this.mirror.getNode(e.id))||void 0===t?void 0:t.sheet)||null),n&&(e.source===We.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===We.StyleDeclaration&&this.applyStyleDeclaration(e,n))}},{key:"applyStyleSheetRule",value:function(e,t){var n,r,i,o;if(null===(n=e.adds)||void 0===n||n.forEach((function(e){var n=e.rule,r=e.index;try{if(Array.isArray(r)){var i=_r(r),o=i.positions,a=i.index;Tr(t.cssRules,o).insertRule(n,a)}else{var s=void 0===r?void 0:Math.min(r,t.cssRules.length);null===t||void 0===t||t.insertRule(n,s)}}catch($n){}})),null===(r=e.removes)||void 0===r||r.forEach((function(e){var n=e.index;try{if(Array.isArray(n)){var r=_r(n),i=r.positions,o=r.index;Tr(t.cssRules,i).deleteRule(o||0)}else null===t||void 0===t||t.deleteRule(n)}catch($n){}})),e.replace)try{null===(i=t.replace)||void 0===i||i.call(t,e.replace)}catch($n){}if(e.replaceSync)try{null===(o=t.replaceSync)||void 0===o||o.call(t,e.replaceSync)}catch($n){}}},{key:"applyStyleDeclaration",value:function(e,t){e.set&&Tr(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority);e.remove&&Tr(t.rules,e.index).style.removeProperty(e.remove.property)}},{key:"applyAdoptedStyleSheet",value:function(e){var t,n=this,r=this.mirror.getNode(e.id);if(r){null===(t=e.styles)||void 0===t||t.forEach((function(e){var t,i=null,o=null;if(Mr(r)?o=(null===(t=r.ownerDocument)||void 0===t?void 0:t.defaultView)||null:"#document"===r.nodeName&&(o=r.defaultView),o)try{i=new o.CSSStyleSheet,n.styleMirror.add(i,e.styleId),n.applyStyleSheetRule({source:We.StyleSheetRule,adds:e.rules},i)}catch($n){}}));var i=0;!function e(t,r){var o=r.map((function(e){return n.styleMirror.getStyle(e)})).filter((function(e){return null!==e}));Mr(t)?t.shadowRoot.adoptedStyleSheets=o:"#document"===t.nodeName&&(t.adoptedStyleSheets=o),o.length!==r.length&&i<10&&(setTimeout((function(){return e(t,r)}),0+100*i),i++)}(r,e.styleIds)}}},{key:"legacy_resolveMissingNode",value:function(e,t,n,r){var i=r.previousId,o=r.nextId,a=i&&e[i],s=o&&e[o];if(a){var u=a.node,c=a.mutation;t.insertBefore(u,n),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(s){var l=s.node,d=s.mutation;t.insertBefore(l,n.nextSibling),delete e[d.node.id],delete this.legacy_missingNodeRetryMap[d.node.id],(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(e,t,l,d)}}},{key:"moveAndHover",value:function(e,t,n,r,i){var o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(i,n);var a=Cr(o,this.iframe),s=e*a.absoluteScale+a.x,u=t*a.absoluteScale+a.y;this.mouse.style.left="".concat(s,"px"),this.mouse.style.top="".concat(u,"px"),r||this.drawMouseTail({x:s,y:u}),this.hoverElements(o)}},{key:"drawMouseTail",value:function(e){var t=this;if(this.mouseTail){var n=!0===this.config.mouseTail?Xr:Object.assign({},Xr,this.config.mouseTail),r=n.lineCap,i=n.lineWidth,o=n.strokeStyle,a=n.duration,s=function(){if(t.mouseTail){var e=t.mouseTail.getContext("2d");e&&t.tailPositions.length&&(e.clearRect(0,0,t.mouseTail.width,t.mouseTail.height),e.beginPath(),e.lineWidth=i,e.lineCap=r,e.strokeStyle=o,e.moveTo(t.tailPositions[0].x,t.tailPositions[0].y),t.tailPositions.forEach((function(t){return e.lineTo(t.x,t.y)})),e.stroke())}};this.tailPositions.push(e),s(),setTimeout((function(){t.tailPositions=t.tailPositions.filter((function(t){return t!==e})),s()}),a/this.speedService.state.context.timer.speed)}}},{key:"hoverElements",value:function(e){var t;null===(t=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===t||t.querySelectorAll(".\\:hover").forEach((function(e){e.classList.remove(":hover")})),this.lastHoveredRootNode=e.getRootNode();for(var n=e;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}},{key:"isUserInteraction",value:function(e){return e.type===He.IncrementalSnapshot&&(e.data.source>We.Mutation&&e.data.source<=We.Input)}},{key:"backToNormal",value:function(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Ge.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}},{key:"warnNodeNotFound",value:function(e,t){this.warn("Node with id '".concat(t,"' not found. "),e)}},{key:"warnCanvasMutationFailed",value:function(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}},{key:"debugNodeNotFound",value:function(e,t){this.debug("Node with id '".concat(t,"' not found. "),e)}},{key:"warn",value:function(){var e;if(this.config.showWarning){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).warn.apply(e,[Yr].concat(n))}}},{key:"debug",value:function(){var e;if(this.config.showDebug){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=this.config.logger).log.apply(e,[Yr].concat(n))}}}]),e}(),ei=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.events=[],this.castedEvents=[],this.isLive=!0,this.liveEvents=void 0,this.currentTraveledTimestamp=void 0,this.replayer=void 0,this.onEventCast=void 0,this.config={enableInteract:!1},this.useTimestampCompression=!0,this.startOptions=void 0,this.fastForward=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,l,d=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d.length>1&&void 0!==d[1]&&d[1]||n.isLive){e.next=4;break}return(i=n.liveEvents).push.apply(i,(0,C.Z)(r)),e.abrupt("return");case 4:o=r.sort((function(e,t){return e.timestamp-t.timestamp})),n.useTimestampCompression&&(a=Date.now(),o=o.map((function(e,t){var r;return(0,h.Z)((0,h.Z)({},e),{},{timestamp:a+t,originalTimestamp:null!==(r=n.getOriginalTimestamp(e))&&void 0!==r?r:e.timestamp})}))),n.events=[].concat((0,C.Z)(n.events),(0,C.Z)(o)),s=new Promise((function(e){n.onEventCast=function(t){n.castedEvents.push(t),n.castedEvents.length===n.events.length&&(n.onEventCast=void 0,e())}})),u=(0,y.Z)(o);try{for(u.s();!(c=u.n()).done;)l=c.value,n.replayer.addEvent(l)}catch(t){u.e(t)}finally{u.f()}return e.abrupt("return",s);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.stop=function(){n.replayer.destroy()},this.getOriginalTimestamp=function(e){return e.originalTimestamp},this.getNodeById=function(e){return n.replayer.getMirror().getNode(e)},this.getMeta=function(e){return n.replayer.getMirror().getMeta(e)},this.config=(0,h.Z)((0,h.Z)({},this.config),i)}return(0,s.Z)(e,[{key:"start",value:function(e){var t=this;this.startOptions=e;var n=e.firstEventTimestamp,r=e.speed,i=void 0===r?8:r,o=e.useTimestampCompression,a=void 0===o||o;this.replayer=new Jr([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():n),this.replayer.on("event-cast",(function(e){t.onEventCast&&t.onEventCast(e)}))}},{key:"goBack",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u=this,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).sleepAfter,o=void 0===i?1e3:i,a=r.beforeTimestamp,s=void 0!==a&&a,this.currentTraveledTimestamp!==n){e.next=3;break}return e.abrupt("return");case 3:return this.currentTraveledTimestamp=n,this.isLive&&(this.liveEvents=this.events),this.stop(),this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!1,e.next=12,this.fastForward(this.liveEvents.filter((function(e){return s?u.getOriginalTimestamp(e)<n:u.getOriginalTimestamp(e)<=n})),!0);case 12:if(!o){e.next=15;break}return e.next=15,Xe()(o);case 15:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"goLive",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.length>0&&void 0!==r[0]?r[0]:1e3,!this.isLive){e.next=3;break}return e.abrupt("return");case 3:return this.stop(),this.currentTraveledTimestamp=void 0,this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!0,e.next=11,this.fastForward(this.liveEvents);case 11:if(!n){e.next=14;break}return e.next=14,Xe()(n);case 14:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),e}(),ti=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,a.Z)(this,e),this.eventProcessor=void 0,this.sessionReplayer=void 0,this.eventHandlers=void 0,this.sessionReplayer=new ei(t),this.eventProcessor=new et({eventHandlers:new $e})}return(0,s.Z)(e,[{key:"setEventHandlers",value:function(e){e.setSessionReplayer(this.sessionReplayer),this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}},{key:"start",value:function(e){this.sessionReplayer.start(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.preCastEvent(n);case 2:return e.next=4,this.sessionReplayer.fastForward([n]);case 4:return e.next=6,this.eventProcessor.processEvent(n);case 6:return e.abrupt("return",e.sent);case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"skipEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.eventProcessor.skipEvents(n);case 2:return e.next=4,this.sessionReplayer.fastForward(n);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"stop",value:function(){this.sessionReplayer.stop()}}]),e}(),ni=function(e){(0,l.Z)(i,e);var n=(0,d.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).pageIdentifiers=void 0,e.elementSelector=new Be,e.appSpecificRules=void 0,e.setEventHandlers(new Ke({sessionMirror:e.sessionReplayer,elementSelector:e.elementSelector})),e}return(0,s.Z)(i,[{key:"setConfiguration",value:function(e){var t=e.enableRecordingAvailableInteractableElements,n=e.useTextInputFastForward;this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:n})}},{key:"setEvents",value:function(e){this.eventHandlers.setEvents(e)}},{key:"setOptions",value:function(e){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:e.extractReducedHTML,defaultInspectInteractableElements:e.inspectInteractables,defaultExtractEsraMetadata:e.extractESRAMetadata})}},{key:"setAppRules",value:function(e){this.appSpecificRules=e,this.elementSelector.setAppRules(e),this.eventHandlers.setAppRules(e)}},{key:"handleEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.Z)((0,c.Z)(i.prototype),"handleEvent",this).call(this,n);case 2:return r=e.sent,e.abrupt("return",r);case 4:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),i}(ti),ri=n(4925),ii=n(8664),oi=function(){function e(t){if((0,a.Z)(this,e),this.structuralVicinity=void 0,this.visualVicinity=void 0,this.serializedElement=void 0,this.attributes={},this.classes={},this.innerText=void 0,this.tag=void 0,this.style=void 0,this.innerFeatures=void 0,this.staticCandidates=void 0,this.positioning=void 0,this.svgs=void 0,"object"===typeof t)for(var n in t)this[n]=t[n];else if("string"===typeof t){var r=JSON.parse(t);for(var i in r)this[i]=r[i]}}return(0,s.Z)(e,[{key:"serialize",value:function(){return JSON.stringify(this)}}]),e}(),ai=n(573),si=new(function(){function e(){(0,a.Z)(this,e),this.weightsSum=0,this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(.4)},tagName:{decisionWeight:this.makeWeight(.6)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(.4)},innerText:{decisionWeight:this.makeWeight(.6),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(.8)},visualVicinity:{decisionWeight:this.makeWeight(.2)},structuralVicinity:{decisionWeight:this.makeWeight(.2)}}}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"get",value:function(){return this.config}},{key:"weight",value:function(e){return e/this.weightsSum}}]),e}()),ui=function(){function e(t){var n=this;(0,a.Z)(this,e),this.targetElementESRAMetadata=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.unqualifiedClasses=[],this.qualifiedInnerText=void 0,this.visualVicinityComparable=[],this.structuralVicinityComparable=[],this.innerFeaturesComparable=[],this.rank=function(e){if(n.isDealBreaker(e))return{score:0,scores:{}};var t=n.tagSimilarity(e),r=n.attributesSimilarity(e),i=n.classSimilarity(e),o=n.styleSimilarity(e),a=n.innerTextSimilarity(e),s=n.innerFeaturesSimilarity(e),u=n.visualVicinitySimilarity(e),c=n.structuralVicinitySimilarity(e),l={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:s,visualVicinityScore:u,structuralVicinityScore:c,svgsScore:n.svgsSimilarity(e)},d={tagScore:si.weight(si.get().tagName.decisionWeight)*t,attributesScore:si.weight(si.get().attributes.decisionWeight)*r,classesScore:si.weight(si.get().classes.decisionWeight)*i,innerTextScore:si.weight(si.get().innerText.decisionWeight)*a,innerFeaturesScore:si.weight(si.get().innerFeatures.decisionWeight)*s,styleScore:si.weight(si.get().style.decisionWeight)*o,visualVicinityScore:si.weight(si.get().visualVicinity.decisionWeight)*u,structuralVicinityScore:si.weight(si.get().structuralVicinity.decisionWeight)*c};return{score:Object.values(d).reduce((function(e,t){return e+t}),0),scores:l}},this.targetElementESRAMetadata=t,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}return(0,s.Z)(e,[{key:"getQualifiedAttributes",value:function(){return this.qualifiedAttributes}},{key:"getQualifiedClasses",value:function(){return this.qualifiedClasses}},{key:"getQualifiedInnerText",value:function(){return this.qualifiedInnerText}},{key:"setQualifiedAttributes",value:function(){var e=this.targetElementESRAMetadata.attributes,t=this.makeQualifiedAttributes(e),n=t.qualifiedAttributes,r=t.qualifiedAttributesMap;this.qualifiedAttributes=n,this.qualifiedAttributesMap=r}},{key:"makeQualifiedAttributes",value:function(e,t){var n=Object.keys(e).filter((function(n){if("input"===t)if("value"===n)return!1;var r=e[n];for(var i in r)i.endsWith("Uniqenuess")&&(r[i.replace("Uniqenuess","Uniqueness")]=r[i]);return r.globalUniqueness>si.get().attributes.qualification.globalUniquenessThreshold||r.tagUniqueness>si.get().attributes.qualification.tagUniquenessThreshold})),r=n.reduce((function(t,n){return t[n]=e[n].value,t}),{});return{qualifiedAttributes:n,qualifiedAttributesMap:r}}},{key:"setQualifiedClasses",value:function(){var e=this;this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter((function(t){return!e.qualifiedClasses.includes(t)}))}},{key:"isValidClass",value:function(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}},{key:"makeQualifiedClasses",value:function(e){var t=this;return Object.keys(e).filter((function(n){var r=e[n];return!!t.isValidClass(n)&&(!n.startsWith("jss")&&!n.startsWith("css-")&&":hover"!==n&&(r.globalUniqueness>si.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>si.get().classes.qualification.tagUniquenessThreshold))}))}},{key:"setQualifiedInnerText",value:function(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}},{key:"makeQualifiedInnerText",value:function(e){var t,n;return e&&(null===(t=e.content)||void 0===t?void 0:t.length)<=si.get().innerText.qualification.maxLength&&(null===(n=e.content)||void 0===n?void 0:n.length)>=si.get().innerText.qualification.minLength?e:null}},{key:"makeBasicElementPropertiesComparable",value:function(e){var t=this;return e.reduce((function(e,n){var r=n.position?"".concat(n.tag,".").concat(n.position.slice(0,2).join(",")):n.tag,i="".concat(r,"+").concat(n.relativePosition),o=t.makeQualifiedClasses(n.classes).map((function(e){return"".concat(r,".").concat(e)})),a=[];t.makeQualifiedAttributes(n.attributes).qualifiedAttributes.forEach((function(e){a.push("".concat(r,"[").concat(e,"]")),a.push("".concat(r,"[").concat(e,"]=").concat(n.attributes[e].value))}));var s=n.feature?t.makeInnerFeaturesComparable([n.feature],{customTag:r,includeTag:!1,featureTypeWhiteList:[$.SVG]}):[],u=[].concat((0,C.Z)(e),[r,i],(0,C.Z)(o),a,(0,C.Z)(s));return n.text&&(u.push("".concat(r,"<>")),u.push("".concat(r,"<").concat(n.text,">"))),n.distance&&(u.push("".concat(r,"->").concat(n.distance)),u.push("".concat(r,"->[]").concat(t.getDistanceRange(n.distance)))),u}),[])}},{key:"getDistanceRange",value:function(e){for(var t=[10,20,30,40,50,60,70,80,90,100],n=0,r=t;n<r.length;n++){var i=r[n];if(e<i)return i}return t[t.length-1]}},{key:"setVisualVicinityComparable",value:function(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}},{key:"makeVisualVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"setStructuralVicinityComparable",value:function(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}},{key:"makeStructuralVicinityComparable",value:function(e){return this.makeBasicElementPropertiesComparable(e)}},{key:"makeInnerFeaturesComparable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.customTag,r=void 0===n?void 0:n,i=t.includeTag,o=void 0===i||i,a=t.featureTypeWhiteList,s=void 0===a?void 0:a;return e.reduce((function(e,t){if(s&&!s.includes(t.type)||t.isHidden)return e;var n=null!==r&&void 0!==r?r:t.tag,i=o?[].concat((0,C.Z)(e),[n]):e;switch(t.type){case $.Button:i.push("".concat(n,"[type=").concat(t.buttonType,"]"));break;case $.Input:t.inputType&&i.push("".concat(n,"[type=").concat(t.inputType,"]")),t.placeholder&&i.push("".concat(n,"[placeholder=").concat(t.placeholder,"]"));break;case $.SVG:t.components.forEach((function(e){var t=[];for(var r in e.attributes)t.push("[".concat(r,"=").concat(e.attributes[r],"]"));i.push("".concat(n).concat(t.join("")))}))}return"text"in t&&t.text&&(i.push("".concat(n,"<>")),i.push("".concat(n,"<").concat(t.text,">"))),i}),[])}},{key:"setInnerFeaturesComparable",value:function(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}},{key:"isDealBreaker",value:function(e){if("input"===this.targetElementESRAMetadata.tag&&"input"===e.tag){var t=function(e){return e.type?e.type.value:"text"};if(t(this.targetElementESRAMetadata.attributes)!==t(e.attributes))return!0}return!1}},{key:"tagSimilarity",value:function(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}},{key:"attributesSimilarity",value:function(e){var t=this,n=function(e){return[].concat((0,C.Z)(t.keyValueObjectToArray(e)),(0,C.Z)(Object.keys(e)))},r=this.makeQualifiedAttributes(e.attributes).qualifiedAttributesMap;return this.jaccard(n(this.qualifiedAttributesMap),n(r))}},{key:"indicativeAttributesSimilarity",value:function(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}},{key:"classSimilarity",value:function(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}},{key:"innerTextSimilarity",value:function(e){var t=this;if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;var n=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!n)return 0;if(this.qualifiedInnerText.content===n.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach((function(e){if(e.test(t.qualifiedInnerText.content)&&e.test(n.content))return.5}));try{return new Date(this.qualifiedInnerText.content),new Date(n.content),.5}catch($n){}var r=function(e){return e.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s")};return r(this.qualifiedInnerText.content)===r(n.content)?.5:0}},{key:"innerFeaturesSimilarity",value:function(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}},{key:"visualVicinitySimilarity",value:function(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}},{key:"structuralVicinitySimilarity",value:function(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}},{key:"styleSimilarity",value:function(e){var t,n,r,i,o=this,a=function(e){return[].concat((0,C.Z)(o.keyValueObjectToArray(e)),(0,C.Z)(Object.keys(e)))},s=this.jaccard(a(null!==(t=this.targetElementESRAMetadata.style.inline)&&void 0!==t?t:{}),a(null!==(n=e.style.inline)&&void 0!==n?n:{})),u=this.jaccard(a(null!==(r=this.targetElementESRAMetadata.style.computed)&&void 0!==r?r:{}),a(null!==(i=e.style.computed)&&void 0!==i?i:{}));return s*si.get().style.inlineWeight+u*si.get().style.computedWeight}},{key:"svgsSimilarity",value:function(e){return this.targetElementESRAMetadata.svgs||e.svgs?this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0:1}},{key:"keyValueObjectToArray",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return Object.keys(e).map((function(r){return"".concat(r).concat(t).concat(function(t){return n?n(e,t):e[t]}(r))}))}},{key:"jaccard",value:function(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,ai.$m)(e,t)}}]),e}(),ci=function(e){return Object.keys(e||{}).reduce((function(t,n){var r=e[n];return r&&(t[n]=r),t}),{})},li=function(){function e(t,n){var r=this;(0,a.Z)(this,e),this.POSITIONING_SATISFACTORY_SCORE=1,this.processStartTime=void 0,this.targetElementESRAMetadata=void 0,this.targetElementStaticData={},this.esraMetadataExtractor=void 0,this.elementsFiltering=void 0,this.qualifiedAttributes=[],this.qualifiedAttributesMap={},this.qualifiedClasses=[],this.qualifiedInnerFeatures=void 0,this.qualifiedInnerText=void 0,this.candidateQueries=[],this.candidates=[],this.uniqueCandidates=[],this.queryCandidates=[],this.interactableCandidates=[],this.rankedCandidates=[],this.filteredAndSortedRankedCandidates=[],this.finalCandidates=[],this.removedCandidates=void 0,this.similarity=void 0,this.weightsSum=0,this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}},this.getSelectionResultForCandidate=function(e){var t=R.getInstance("getElementSelectionResult",{log:!1}),n=t.get();if(n||(n=new Map,t.set(n)),n.has(e))return n.get(e);r.checkTimeout();var i=r.extractMetadata(e),o=r.similarity.rank(i),a={score:o.score,candidate:e,scores:o.scores,esraMetadata:i};return n.set(e,a),t.set(n),a},this.targetElementESRAMetadata=t,this.targetElementStaticData=n||t.staticMetadata,this.similarity=new ui(this.targetElementESRAMetadata),this.esraMetadataExtractor=new le(document)}return(0,s.Z)(e,[{key:"makeWeight",value:function(e){return this.weightsSum+=e,e}},{key:"getWeight",value:function(e){return e/this.weightsSum}},{key:"extractMetadata",value:function(e){return new oi(this.esraMetadataExtractor.extract(e).toMetadata())}},{key:"getLastSelectionLogs",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5;if(null===(e=this.candidates)||void 0===e||!e.length)return{};var n=new XMLSerializer,r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return e.slice(0,t).map((function(e){return{score:e.score,metadata:e.metadata,element:n.serializeToString(e.candidate).substring(0,200)}}))},i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,t)].score,o=function(e){return r(e,t).filter((function(e){return e.score>=i}))};return{candidatesQuery:this.candidateQueries.filter((function(e){return!!e.length})).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,t),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(this.removedCandidates.static)}}}},{key:"selectByPositioning",value:function(){var e=this.targetElementESRAMetadata.positioning;if(window.innerWidth===e.viewport.size.width&&window.innerHeight===e.viewport.size.height){var t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight),n=this.extractMetadata(t),r=this.similarity.rank(n).score;return r>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:r,esraMetadata:n}:void 0}}},{key:"collectCandidates",value:function(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];var e=this.candidateQueries.filter((function(e){return!!e.length})).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=M(e)),this.interactableCandidates=[],this.elementsFiltering!==Y.Query&&(this.interactableCandidates=Le())}},{key:"select",value:function(){var t,n,r=this;console.log("selecting elements, filtering: ",Y[this.elementsFiltering]);for(var i,o=function(e){switch(e){case Y.Query:return r.queryCandidates;case Y.Intersection:return r.intersectElements(r.queryCandidates,r.interactableCandidates);case Y.Interactables:return r.interactableCandidates;case Y.All:return r.queryCandidates.concat(r.interactableCandidates)}};this.candidates=o(this.elementsFiltering),!this.candidates.length&&this.elementsFiltering!==Y.All;)console.log("no candidates found, expanding selection to ".concat(Y[this.elementsFiltering+1])),this.elementsFiltering++;(console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),(t=this.candidates).push.apply(t,(0,C.Z)(this.getInnerTextCandidates())),this.candidates.length)||(i=this.candidates).push.apply(i,(0,C.Z)(this.getTagCandidates()));this.uniqueCandidates=this.candidates.filter((function(e,t,n){return n.indexOf(e)===t}));var a=e.limitChildren;null!==(n=a)&&void 0!==n&&n.length&&(a=a.map((function(e){return(0,h.Z)((0,h.Z)({},e),{},{parent:document.querySelector(e.selector)})})),this.uniqueCandidates=this.uniqueCandidates.filter((function(e){var t,n=(0,y.Z)(a);try{for(n.s();!(t=n.n()).done;){var i=t.value;if(i.parent&&r.isDescendant(i.parent,e)&&i.limit--<=0)return!1}}catch(o){n.e(o)}finally{n.f()}return!0}))),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter((function(e){return e instanceof O(e).HTMLElement||e instanceof O(e).SVGElement})).map(this.getSelectionResultForCandidate).sort((function(e,t){return t.score-e.score})),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter((function(e){var t=r.isHidden(e.candidate),n=t.isHidden,i=t.clickOffset;return!0===n?(r.removedCandidates.hidden.push(e),!1):(i&&(e.clickOffset=i),!(function(e){var t=ci(e);return!(!t||!Object.keys(t).length)}(r.targetElementStaticData)&&!function(e,t){var n=ci(e),r=ci(t),i=function(e){return!e||0===Object.keys(e).length};if(i(n)&&i(r))return!0;if(i(n)||i(r))return!1;var o=Object.keys(n).sort(),a=Object.keys(r).sort();if(o.length!==a.length)return!1;if(!o.every((function(e,t){return e===a[t]})))return!1;for(var s in n)if(n[s]!==r[s])return!1;return!0}(r.formatStaticCandidates(e.esraMetadata.staticCandidates),r.targetElementStaticData))||(e.metadata=JSON.stringify(e.esraMetadata.staticCandidates),r.removedCandidates.static.push(e),!1))})),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((function(e,t,n){"INPUT"===e.candidate.tagName&&r.filteredAndSortedRankedCandidates.find((function(t){return t.score>.1&&t.candidate.contains(e.candidate)}))&&(r.removedCandidates.hidden.splice(n.length-1-t,1),r.filteredAndSortedRankedCandidates.push(e))})),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((function(e,t){return t.score-e.score}));var s=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];for(var u=null,c=0;c<this.filteredAndSortedRankedCandidates.length;++c){var l=this.filteredAndSortedRankedCandidates[c];if(c>=s&&(!u||u.score-l.score>this.config.results.epsilon))break;u=l,this.finalCandidates.push(l)}return this.finalCandidates}},{key:"intersectElements",value:function(e,t){var n=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).useElementSize,n=void 0!==t&&t,r=new Set;return e.forEach((function(e){for(var t=2,i=e;i&&t-- >0&&(r.add(i),!(n&&Math.abs(i.parentElement.clientWidth-i.clientWidth)>.3*i.clientWidth&&Math.abs(i.parentElement.clientHeight-i.clientHeight)>.3*i.clientHeight));)i=i.parentElement})),r},r=n(e),i=n(t),o=new Set;return r.forEach((function(e){i.has(e)&&o.add(e)})),Array.from(o)}},{key:"checkTimeout",value:function(){if(e.timeout&&Date.now()-this.processStartTime>e.timeout)throw new di}},{key:"selectOne",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.elementsFiltering,n=void 0===t?Y.Intersection:t,r=e.minSelectionScore,i=void 0===r?.3:r;try{if(this.elementsFiltering=n,this.processStartTime=Date.now(),"html"===this.targetElementESRAMetadata.tag){var o=document.querySelector("html");return{candidate:o,score:1,esraMetadata:this.extractMetadata(o)}}var a=this.selectByPositioning();if(a)return console.log("Found element by positioning"),a;for(this.collectCandidates();;){var s=this.select();if(!s.length)break;var u=s[0].score;if(!(u<i&&this.elementsFiltering!==Y.All))return s[0];this.elementsFiltering++,console.log("Best matching element is below threshold (".concat(u,"/").concat(i,"), expanding selection to ").concat(Y[this.elementsFiltering]))}}catch($n){$n instanceof di?console.error("ESRA selection timeout"):console.error("ESRA selection error",$n)}return{candidate:void 0,score:0,esraMetadata:void 0}}},{key:"getFinalCandidates",value:function(){return this.finalCandidates}},{key:"setQualifiedAttributesQueries",value:function(){var e=this;this.candidateQueries.push(this.similarity.getQualifiedAttributes().map((function(t){return"[".concat(t,'="').concat(e.targetElementESRAMetadata.attributes[t].value,'"]')})).join(","))}},{key:"setQualifiedClassesQueries",value:function(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map((function(e){return".".concat(e)})).join(","))}},{key:"setInnerFeaturesQueries",value:function(){var e=this,t=this.targetElementESRAMetadata.innerFeatures.filter((function(e){return!e.isRoot}));t.length>10&&(t=Object.values(t.reduce((function(e,t){var n="".concat(t.type,"_").concat(t.tag);return e[n]?e:(0,h.Z)((0,h.Z)({},e),{},(0,v.Z)({},n,t))}),{})));var n,r=Math.min(Math.ceil(t.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax),i=(n=t,n.reduce((function(e,t){var n=e.map((function(e){return[].concat((0,C.Z)(e),[t])})).filter((function(e){return e.length<=r}));return e.concat(n)}),[[]])).filter((function(e){return e.length===r}));i.forEach((function(t){var n=[];t.forEach((function(t){return n.push(e.getFeatureSelector(t))})),e.cartesian(n).forEach((function(t){return e.candidateQueries.push("*"+t.map((function(e){return":has(".concat(e,")")})).join(""))}))}))}},{key:"cartesian",value:function(e){if(!e.length)return[];var t=[],n=e.length-1;return function r(i,o){for(var a=0,s=e[o].length;a<s;a++){var u=i.slice(0);u.push(e[o][a]),o===n?t.push(u):r(u,o+1)}}([],0),t}},{key:"getFeatureSelector",value:function(e){var t=[e.tag];switch(e.type){case $.Media:e.src&&t.push("".concat(e.tag,'[src="').concat(e.src,'"]'));break;case $.Anchor:t.push("".concat(e.tag,'[href="').concat(e.href,'"]'));break;case $.Button:break;case $.Input:t.push("".concat(e.tag,'[type="').concat(e.inputType,'"]')),e.placeholder&&t.push("".concat(e.tag,'[placeholder="').concat(e.placeholder,'"]'))}return t}},{key:"getInnerTextCandidates",value:function(){var e=this.similarity.getQualifiedInnerText();if(!e)return[];var t=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).tag;return M(void 0===t?"*":t).filter((function(t){var n;return(null===(n=t.innerText)||void 0===n?void 0:n.trim())===e.trim()}))}(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}},{key:"getTagCandidates",value:function(){return M(this.targetElementESRAMetadata.tag)}},{key:"isDescendant",value:function(e,t){return e.contains(t)}},{key:"formatStaticCandidates",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]=e[n]})),t}},{key:"isHidden",value:function(e){return L(e,{useCache:!0})}}]),e}();li.limitChildren=void 0,li.timeout=void 0;var di=function(e){(0,l.Z)(n,e);var t=(0,d.Z)(n);function n(){return(0,a.Z)(this,n),t.call(this,"ESRA selection timeout")}return(0,s.Z)(n)}((0,ii.Z)(Error));function fi(e){return"__ln"in e}var hi,pi=function(){function e(){(0,a.Z)(this,e),this.length=0,this.head=null,this.tail=null}return(0,s.Z)(e,[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null===t||void 0===t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&fi(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&fi(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),e}(),vi=function(e,t){return"".concat(e,"@").concat(t)},mi=function(){function e(){var t=this;(0,a.Z)(this,e),this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(e){e.forEach(t.processMutation),t.emit()},this.emit=function(){if(!t.frozen&&!t.locked){for(var e=[],n=new Set,r=new pi,i=function(e){for(var n=e,r=yt;r===yt;)r=(n=n&&n.nextSibling)&&t.mirror.getId(n);return r},o=function(o){if(o.parentNode&&Dr(o)&&"TEXTAREA"!==o.parentNode.tagName){var a=rt(o.parentNode)?t.mirror.getId(Nr(o)):t.mirror.getId(o.parentNode),s=i(o);if(-1===a||-1===s)return r.addNode(o);var u=Ft(o,{doc:t.doc,mirror:t.mirror,blockClass:t.blockClass,blockSelector:t.blockSelector,maskTextClass:t.maskTextClass,maskTextSelector:t.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:t.inlineStylesheet,maskInputOptions:t.maskInputOptions,maskTextFn:t.maskTextFn,maskInputFn:t.maskInputFn,slimDOMOptions:t.slimDOMOptions,dataURLOptions:t.dataURLOptions,recordCanvas:t.recordCanvas,inlineImages:t.inlineImages,onSerialize:function(e){xr(e,t.mirror)&&t.iframeManager.addIframe(e),Ir(e,t.mirror)&&t.stylesheetManager.trackLinkElement(e),Mr(o)&&t.shadowDomManager.addShadowRoot(o.shadowRoot,t.doc)},onIframeLoad:function(e,n){t.iframeManager.attachIframe(e,n),t.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,n){t.stylesheetManager.attachLinkElement(e,n)}});u&&(e.push({parentId:a,nextId:s,node:u}),n.add(u.id))}};t.mapRemoves.length;)t.mirror.removeNodeFromMap(t.mapRemoves.shift());var a,s=(0,y.Z)(t.movedSet);try{for(s.s();!(a=s.n()).done;){var u=a.value;yi(t.removes,u,t.mirror)&&!t.movedSet.has(u.parentNode)||o(u)}}catch(E){s.e(E)}finally{s.f()}var c,l=(0,y.Z)(t.addedSet);try{for(l.s();!(c=l.n()).done;){var d=c.value;wi(t.droppedSet,d)||yi(t.removes,d,t.mirror)?wi(t.movedSet,d)?o(d):t.droppedSet.add(d):o(d)}}catch(E){l.e(E)}finally{l.f()}for(var f=null;r.length;){var h=null;if(f){var p=t.mirror.getId(f.value.parentNode),v=i(f.value);-1!==p&&-1!==v&&(h=f)}if(!h)for(var m=r.tail;m;){var g=m;if(m=m.previous,g){var b=t.mirror.getId(g.value.parentNode);if(-1===i(g.value))continue;if(-1!==b){h=g;break}var w=g.value;if(w.parentNode&&w.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var k=w.parentNode.host;if(-1!==t.mirror.getId(k)){h=g;break}}}}if(!h){for(;r.head;)r.removeNode(r.head.value);break}f=h.previous,r.removeNode(h.value),o(h.value)}var S={texts:t.texts.map((function(e){var n=e.node;return n.parentNode&&"TEXTAREA"===n.parentNode.tagName&&t.genTextAreaValueMutation(n.parentNode),{id:t.mirror.getId(n),value:e.value}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),attributes:t.attributes.map((function(e){var n=e.attributes;if("string"===typeof n.style){var r=JSON.stringify(e.styleDiff),i=JSON.stringify(e._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=e.styleDiff)}return{id:t.mirror.getId(e.node),attributes:n}})).filter((function(e){return!n.has(e.id)})).filter((function(e){return t.mirror.has(e.id)})),removes:t.removes,adds:e};(S.texts.length||S.attributes.length||S.removes.length||S.adds.length)&&(t.texts=[],t.attributes=[],t.attributeMap=new WeakMap,t.removes=[],t.addedSet=new Set,t.movedSet=new Set,t.droppedSet=new Set,t.movedMap={},t.mutationCb(S))}},this.genTextAreaValueMutation=function(e){var n=t.attributeMap.get(e);n||(n={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(n),t.attributeMap.set(e,n)),n.attributes.value=Array.from(e.childNodes,(function(e){return e.textContent||""})).join("")},this.processMutation=function(e){if(!yr(e.target,t.mirror))switch(e.type){case"characterData":var n=e.target.textContent;gr(e.target,t.blockClass,t.blockSelector,!1)||n===e.oldValue||t.texts.push({value:Ot(e.target,t.maskTextClass,t.maskTextSelector,!0)&&n?t.maskTextFn?t.maskTextFn(n,mr(e.target)):n.replace(/[\S]/g,"*"):n,node:e.target});break;case"attributes":var r=e.target,i=e.attributeName,o=e.target.getAttribute(i);if("value"===i){var a=ft(r);o=ct({element:r,maskInputOptions:t.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:t.maskInputFn})}if(gr(e.target,t.blockClass,t.blockSelector,!1)||o===e.oldValue)return;var s=t.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===i&&!t.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},t.attributes.push(s),t.attributeMap.set(e.target,s)),"type"===i&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Rt(r.tagName,i)&&(s.attributes[i]=Nt(t.doc,lt(r.tagName),lt(i),o),"style"===i)){if(!t.unattachedDoc)try{t.unattachedDoc=document.implementation.createHTMLDocument()}catch($n){t.unattachedDoc=t.doc}var u=t.unattachedDoc.createElement("span");e.oldValue&&u.setAttribute("style",e.oldValue);for(var c=0,l=Array.from(r.style);c<l.length;c++){var d=l[c],f=r.style.getPropertyValue(d),h=r.style.getPropertyPriority(d);f!==u.style.getPropertyValue(d)||h!==u.style.getPropertyPriority(d)?s.styleDiff[d]=""===h?f:[f,h]:s._unchangedStyles[d]=[f,h]}for(var p=0,v=Array.from(u.style);p<v.length;p++){var m=v[p];""===r.style.getPropertyValue(m)&&(s.styleDiff[m]=!1)}}break;case"childList":if(gr(e.target,t.blockClass,t.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void t.genTextAreaValueMutation(e.target);e.addedNodes.forEach((function(n){return t.genAdds(n,e.target)})),e.removedNodes.forEach((function(n){var r=t.mirror.getId(n),i=rt(e.target)?t.mirror.getId(e.target.host):t.mirror.getId(e.target);gr(e.target,t.blockClass,t.blockSelector,!1)||yr(n,t.mirror)||!function(e,t){return-1!==t.getId(e)}(n,t.mirror)||(t.addedSet.has(n)?(gi(t.addedSet,n),t.droppedSet.add(n)):t.addedSet.has(e.target)&&-1===r||br(e.target,t.mirror)||(t.movedSet.has(n)&&t.movedMap[vi(r,i)]?gi(t.movedSet,n):t.removes.push({parentId:i,id:r,isShadow:!(!rt(e.target)||!it(e.target))||void 0})),t.mapRemoves.push(n))}))}},this.genAdds=function(e,n){if(!t.processedNodeManager.inOtherBuffer(e,t)&&!t.addedSet.has(e)&&!t.movedSet.has(e)){if(t.mirror.hasNode(e)){if(yr(e,t.mirror))return;t.movedSet.add(e);var r=null;n&&t.mirror.hasNode(n)&&(r=t.mirror.getId(n)),r&&-1!==r&&(t.movedMap[vi(t.mirror.getId(e),r)]=!0)}else t.addedSet.add(e),t.droppedSet.delete(e);gr(e,t.blockClass,t.blockSelector,!1)||(e.childNodes.forEach((function(e){return t.genAdds(e)})),Mr(e)&&e.shadowRoot.childNodes.forEach((function(n){t.processedNodeManager.add(n,t),t.genAdds(n,e)})))}}}return(0,s.Z)(e,[{key:"init",value:function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((function(n){t[n]=e[n]}))}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]),e}();function gi(e,t){e.delete(t),t.childNodes.forEach((function(t){return gi(e,t)}))}function yi(e,t,n){return 0!==e.length&&bi(e,t,n)}function bi(e,t,n){var r=t.parentNode;if(!r)return!1;var i=n.getId(r);return!!e.some((function(e){return e.id===i}))||bi(e,r,n)}function wi(e,t){return 0!==e.size&&ki(e,t)}function ki(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||ki(e,n))}function Si(e){hi=e}function Ei(){hi=void 0}var xi=function(e){if(!hi)return e;return function(){try{return e.apply(void 0,arguments)}catch(t){if(hi&&!0===hi(t))return;throw t}}},Ii=[];function Ci(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch($i){}return e&&e.target}function Mi(e,t){var n,r,i=new mi;Ii.push(i),i.init(e);var o=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(o=window[a]);var s=new o(xi(i.processMutations.bind(i)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Ti(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],c=null;return Object.keys(Ue).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]})).forEach((function(e){var a=lt(e),s=function(e){return function(n){var a=Ci(n);if(!gr(a,i,o,!0)){var s=null,u=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=ze.Mouse;break;case"touch":s=ze.Touch;break;case"pen":s=ze.Pen}s===ze.Touch?Ue[e]===Ue.MouseDown?u="TouchStart":Ue[e]===Ue.MouseUp&&(u="TouchEnd"):ze.Pen}else wr(n)&&(s=ze.Touch);null!==s?(c=s,(u.startsWith("Touch")&&s===ze.Touch||u.startsWith("Mouse")&&s===ze.Mouse)&&(s=null)):Ue[e]===Ue.Click&&(s=c,c=null);var l=wr(n)?n.changedTouches[0]:n;if(l){var d=r.getId(a),f=l.clientX,h=l.clientY;xi(t)(Object.assign({type:Ue[u],id:d,x:f,y:h},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(Ue[e]){case Ue.MouseDown:case Ue.MouseUp:a=a.replace("mouse","pointer");break;case Ue.TouchStart:case Ue.TouchEnd:return}u.push(ar(a,s,n))})),xi((function(){u.forEach((function(e){return e()}))}))}function _i(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;return ar("scroll",xi(cr(xi((function(e){var a=Ci(e);if(a&&!gr(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var u=hr(n.defaultView);t({id:s,x:u.left,y:u.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}})),a.scroll||100)),n)}var Ai=["INPUT","TEXTAREA","SELECT"],Ni=new WeakMap;function Ri(e){return function(e,t){if(Zi("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Zi("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Zi("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Zi("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function Di(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function Oi(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(t.host);var u="#document"===t.nodeName?null===(n=t.defaultView)||void 0===n?void 0:n.Document:null===(i=null===(r=t.ownerDocument)||void 0===r?void 0:r.defaultView)||void 0===i?void 0:i.ShadowRoot,c=(null===u||void 0===u?void 0:u.prototype)?Object.getOwnPropertyDescriptor(null===u||void 0===u?void 0:u.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&u&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null===(e=c.get)||void 0===e?void 0:e.call(this)},set:function(e){var t,n=null===(t=c.set)||void 0===t?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch($n){}return n}}),xi((function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))):function(){}}function Li(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,u=e.mediaInteractionCb,c=e.styleSheetRuleCb,l=e.styleDeclarationCb,d=e.canvasMutationCb,f=e.fontCb,h=e.selectionCb,p=e.customElementCb;e.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},e.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),r.apply(void 0,arguments)},e.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),i.apply(void 0,arguments)},e.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),o.apply(void 0,arguments)},e.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),a.apply(void 0,arguments)},e.inputCb=function(){t.input&&t.input.apply(t,arguments),s.apply(void 0,arguments)},e.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),u.apply(void 0,arguments)},e.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),c.apply(void 0,arguments)},e.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),l.apply(void 0,arguments)},e.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),d.apply(void 0,arguments)},e.fontCb=function(){t.font&&t.font.apply(t,arguments),f.apply(void 0,arguments)},e.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),h.apply(void 0,arguments)},e.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),p.apply(void 0,arguments)}}(e,n),e.recordDOM&&(t=Mi(e,e.doc));var i=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"===typeof n.mousemove?n.mousemove:50,s="number"===typeof n.mousemoveCallback?n.mousemoveCallback:500,u=[],c=cr(xi((function(e){var n=Date.now()-o;t(u.map((function(e){return e.timeOffset-=n,e})),e),u=[],o=null})),s),l=xi(cr(xi((function(e){var t=Ci(e),n=wr(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=fr()),u.push({x:r,y:a,id:i.getId(t),timeOffset:fr()-o}),c("undefined"!==typeof DragEvent&&e instanceof DragEvent?We.Drag:e instanceof MouseEvent?We.MouseMove:We.TouchMove)})),a,{trailing:!1})),d=[ar("mousemove",l,r),ar("touchmove",l,r),ar("drag",l,r)];return xi((function(){d.forEach((function(e){return e()}))}))}(e),o=Ti(e),a=_i(e),s=function(e,t){var n=e.viewportResizeCb,r=t.win,i=-1,o=-1;return ar("resize",xi(cr(xi((function(){var e=pr(),t=vr();i===e&&o===t||(n({width:Number(t),height:Number(e)}),i=e,o=t)})),200)),r)}(e,{win:r}),u=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.ignoreClass,s=e.ignoreSelector,u=e.maskInputOptions,c=e.maskInputFn,l=e.sampling,d=e.userTriggeredOnInput;function f(e){var t=Ci(e),r=e.isTrusted,l=t&&t.tagName;if(t&&"OPTION"===l&&(t=t.parentElement),t&&l&&!(Ai.indexOf(l)<0)&&!gr(t,i,o,!0)&&!(t.classList.contains(a)||s&&t.matches(s))){var f=t.value,p=!1,v=ft(t)||"";"radio"===v||"checkbox"===v?p=t.checked:(u[l.toLowerCase()]||u[v])&&(f=ct({element:t,maskInputOptions:u,tagName:l,type:v,value:f,maskInputFn:c})),h(t,d?{text:f,isChecked:p,userTriggered:r}:{text:f,isChecked:p});var m=t.name;"radio"===v&&m&&p&&n.querySelectorAll('input[type="radio"][name="'.concat(m,'"]')).forEach((function(e){if(e!==t){var n=e.value;h(e,d?{text:n,isChecked:!p,userTriggered:!1}:{text:n,isChecked:!p})}}))}}function h(e,n){var i=Ni.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){Ni.set(e,n);var o=r.getId(e);xi(t)(Object.assign(Object.assign({},n),{id:o}))}}var p=("last"===l.input?["change"]:["input","change"]).map((function(e){return ar(e,xi(f),n)})),v=n.defaultView;if(!v)return function(){p.forEach((function(e){return e()}))};var m=v.Object.getOwnPropertyDescriptor(v.HTMLInputElement.prototype,"value"),g=[[v.HTMLInputElement.prototype,"value"],[v.HTMLInputElement.prototype,"checked"],[v.HTMLSelectElement.prototype,"value"],[v.HTMLTextAreaElement.prototype,"value"],[v.HTMLSelectElement.prototype,"selectedIndex"],[v.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push.apply(p,(0,C.Z)(g.map((function(e){return lr(e[0],e[1],{set:function(){xi(f)({target:this,isTrusted:!1})}},!1,v)})))),xi((function(){p.forEach((function(e){return e()}))}))}(e),c=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=xi((function(e){return cr(xi((function(o){var a=Ci(o);if(a&&!gr(a,n,r,!0)){var s=a.currentTime,u=a.volume,c=a.muted,l=a.playbackRate,d=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:u,muted:c,playbackRate:l,loop:d})}})),o.media||500)})),u=[ar("play",s(0),a),ar("pause",s(1),a),ar("seeked",s(2),a),ar("volumechange",s(3),a),ar("ratechange",s(4),a)];return xi((function(){u.forEach((function(e){return e()}))}))}(e),l=function(){},d=function(){},f=function(){},h=function(){};e.recordDOM&&(l=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,2),s=a[0],u=a[1],c=Di(t,r,i.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,adds:[{rule:s,index:u}]}),e.apply(t,o)}))});var s,u,c=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,1)[0],s=Di(t,r,i.styleMirror),u=s.id,c=s.styleId;return(u&&-1!==u||c&&-1!==c)&&n({id:u,styleId:c,removes:[{index:a}]}),e.apply(t,o)}))}),o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,1)[0],s=Di(t,r,i.styleMirror),u=s.id,c=s.styleId;return(u&&-1!==u||c&&-1!==c)&&n({id:u,styleId:c,replace:a}),e.apply(t,o)}))})),o.CSSStyleSheet.prototype.replaceSync&&(u=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,1)[0],s=Di(t,r,i.styleMirror),u=s.id,c=s.styleId;return(u&&-1!==u||c&&-1!==c)&&n({id:u,styleId:c,replaceSync:a}),e.apply(t,o)}))}));var l={};Fi("CSSGroupingRule")?l.CSSGroupingRule=o.CSSGroupingRule:(Fi("CSSMediaRule")&&(l.CSSMediaRule=o.CSSMediaRule),Fi("CSSConditionRule")&&(l.CSSConditionRule=o.CSSConditionRule),Fi("CSSSupportsRule")&&(l.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(l).forEach((function(e){var t=(0,b.Z)(e,2),o=t[0],a=t[1];d[o]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(d[o].insertRule,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,2),s=a[0],u=a[1],c=Di(t.parentStyleSheet,r,i.styleMirror),l=c.id,d=c.styleId;return(l&&-1!==l||d&&-1!==d)&&n({id:l,styleId:d,adds:[{rule:s,index:[].concat((0,C.Z)(Ri(t)),[u||0])}]}),e.apply(t,o)}))}),a.prototype.deleteRule=new Proxy(d[o].deleteRule,{apply:xi((function(e,t,o){var a=(0,b.Z)(o,1)[0],s=Di(t.parentStyleSheet,r,i.styleMirror),u=s.id,c=s.styleId;return(u&&-1!==u||c&&-1!==c)&&n({id:u,styleId:c,removes:[{index:[].concat((0,C.Z)(Ri(t)),[a])}]}),e.apply(t,o)}))})})),xi((function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=c,s&&(o.CSSStyleSheet.prototype.replace=s),u&&(o.CSSStyleSheet.prototype.replaceSync=u),Object.entries(l).forEach((function(e){var t=(0,b.Z)(e,2),n=t[0],r=t[1];r.prototype.insertRule=d[n].insertRule,r.prototype.deleteRule=d[n].deleteRule}))}))}(e,{win:r}),d=Oi(e,e.doc),f=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:xi((function(e,t,a){var u,c=(0,b.Z)(a,3),l=c[0],d=c[1],f=c[2];if(i.has(l))return s.apply(t,[l,d,f]);var h=Di(null===(u=t.parentRule)||void 0===u?void 0:u.parentStyleSheet,r,o.styleMirror),p=h.id,v=h.styleId;return(p&&-1!==p||v&&-1!==v)&&n({id:p,styleId:v,set:{property:l,value:d,priority:f},index:Ri(t.parentRule)}),e.apply(t,a)}))});var u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:xi((function(e,t,a){var s,c=(0,b.Z)(a,1)[0];if(i.has(c))return u.apply(t,[c]);var l=Di(null===(s=t.parentRule)||void 0===s?void 0:s.parentStyleSheet,r,o.styleMirror),d=l.id,f=l.styleId;return(d&&-1!==d||f&&-1!==f)&&n({id:d,styleId:f,remove:{property:c},index:Ri(t.parentRule)}),e.apply(t,a)}))}),xi((function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=u}))}(e,{win:r}),e.collectFonts&&(h=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!==typeof t,descriptors:n,fontSource:"string"===typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=dr(n.fonts,"add",(function(e){return function(n){return setTimeout(xi((function(){var e=o.get(n);e&&(t(e),o.delete(n))})),0),e.apply(this,[n])}}));return i.push((function(){r.FontFace=a})),i.push(s),xi((function(){i.forEach((function(e){return e()}))}))}(e)));var p,v=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=xi((function(){var e=t.getSelection();if(!(!e||a&&(null===e||void 0===e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],u=e.rangeCount||0,c=0;c<u;c++){var l=e.getRangeAt(c),d=l.startContainer,f=l.startOffset,h=l.endContainer,p=l.endOffset;gr(d,r,i,!0)||gr(h,r,i,!0)||s.push({start:n.getId(d),startOffset:f,end:n.getId(h),endOffset:p})}o({ranges:s})}}));return s(),ar("selectionchange",s)}(e),m=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?dr(r.customElements,"define",(function(e){return function(t,r,i){try{n({define:{name:t}})}catch($n){console.warn("Custom element callback failed for ".concat(t))}return e.apply(this,[t,r,i])}})):function(){}}(e),g=[],w=(0,y.Z)(e.plugins);try{for(w.s();!(p=w.n()).done;){var k=p.value;g.push(k.observer(k.callback,r,k.options))}}catch(S){w.e(S)}finally{w.f()}return xi((function(){Ii.forEach((function(e){return e.reset()})),null===t||void 0===t||t.disconnect(),i(),o(),a(),s(),u(),c(),l(),d(),f(),h(),v(),m(),g.forEach((function(e){return e()}))}))}function Zi(e){return"undefined"!==typeof window[e]}function Fi(e){return Boolean("undefined"!==typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var Pi=function(){function e(t){(0,a.Z)(this,e),this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}return(0,s.Z)(e,[{key:"getId",value:function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a}},{key:"getIds",value:function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getId(e,t,r,i)}))}},{key:"getRemoteId",value:function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!==typeof t)return t;var i=r.get(t);return i||-1}},{key:"getRemoteIds",value:function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map((function(t){return n.getRemoteId(e,t,r)}))}},{key:"reset",value:function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),e}(),ji=function(){function e(t){(0,a.Z)(this,e),this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Pi(bt),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Pi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}return(0,s.Z)(e,[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}}},{key:"transformCrossOriginEvent",value:function(e,t){var n,r=this;switch(t.type){case He.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:He.IncrementalSnapshot,data:{source:We.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case He.Meta:case He.Load:case He.DomContentLoaded:return!1;case He.Plugin:return t;case He.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case He.IncrementalSnapshot:switch(t.data.source){case We.Mutation:return t.data.adds.forEach((function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((function(t){r.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((function(t){r.replaceIds(t,e,["id"])})),t.data.texts.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case We.Drag:case We.TouchMove:case We.MouseMove:return t.data.positions.forEach((function(t){r.replaceIds(t,e,["id"])})),t;case We.ViewportResize:return!1;case We.MediaInteraction:case We.MouseInteraction:case We.Scroll:case We.CanvasMutation:case We.Input:return this.replaceIds(t.data,e,["id"]),t;case We.StyleSheetRule:case We.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case We.Font:return t;case We.Selection:return t.data.ranges.forEach((function(t){r.replaceIds(t,e,["start","end"])})),t;case We.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null===(n=t.data.styles)||void 0===n||n.forEach((function(t){r.replaceStyleIds(t,e,["styleId"])})),t}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=(0,y.Z)(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;(Array.isArray(t[a])||"number"===typeof t[a])&&(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(s){o.e(s)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((function(e){n.replaceIdOnNode(e,t)}))}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===_e.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((function(e){n.patchRootIdOnNode(e,t)}))}}]),e}(),Vi=function(){function e(t){(0,a.Z)(this,e),this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}return(0,s.Z)(e,[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n=this;if(it(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=Mi(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push((function(){return r.disconnect()})),this.restoreHandlers.push(_i(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout((function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(e.host)),n.restoreHandlers.push(Oi({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))}),0)}}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,t){var n=this;this.restoreHandlers.push(dr(e.prototype,"attachShadow",(function(e){return function(r){var i=e.call(this,r);return this.shadowRoot&&Dr(this)&&n.addShadowRoot(this.shadowRoot,t),i}})))}},{key:"reset",value:function(){this.restoreHandlers.forEach((function(e){try{e()}catch($n){}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),e}(),Bi=new Map;var Hi=function(e,t,n){if(e&&(zi(e,t)||"object"===typeof e)){var r=function(e,t){var n=Bi.get(e);return n||(n=new Map,Bi.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function Wi(e,t,n){if(e instanceof Array)return e.map((function(e){return Wi(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var r=e.constructor.name,i=function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=Lr[n[t]>>2],i+=Lr[(3&n[t])<<4|n[t+1]>>4],i+=Lr[(15&n[t+1])<<2|n[t+2]>>6],i+=Lr[63&n[t+2]];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i}(e);return{rr_type:r,base64:i}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Wi(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement)return{rr_type:e.constructor.name,src:e.src};if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return e instanceof ImageData?{rr_type:e.constructor.name,args:[Wi(e.data,t,n),e.width,e.height]}:zi(e,t)||"object"===typeof e?{rr_type:e.constructor.name,index:Hi(e,t,n)}:e}var Ui=function(e,t,n){return e.map((function(e){return Wi(e,t,n)}))},zi=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"===typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function qi(e,t,n,r){var i=[];try{var o=dr(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!gr(this,t,n,!0)){var u=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&"object"===typeof a[0]){var c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i].concat(a))}}));i.push(o)}catch($i){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){i.forEach((function(e){return e()}))}}function Gi(e,t,n,r,i,o,a){var s,u=[],c=Object.getOwnPropertyNames(e),l=(0,y.Z)(c);try{var d=function(){var o=s.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))return 0;try{if("function"!==typeof e[o])return 0;var c=dr(e,o,(function(e){return function(){for(var s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];var l=e.apply(this,u);if(Hi(l,a,this),"tagName"in this.canvas&&!gr(this.canvas,r,i,!0)){var d=Ui(u,a,this),f={type:t,property:o,args:d};n(this.canvas,f)}return l}}));u.push(c)}catch($i){var l=lr(e,o,{set:function(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});u.push(l)}};for(l.s();!(s=l.n()).done;)d()}catch(f){l.e(f)}finally{l.f()}return u}var $i,Qi,Yi,Xi,Ki=function(e,t){var n;return function(r){return n=n||function(e,t){var n=function(e,t){var n=void 0===t?null:t,r=e.toString().split("\n");r.pop(),r.shift();for(var i=r[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,s=r.length;a<s;++a)r[a]=r[a].substring(i).replace(o,"$1use strict$2")+"\n";return n&&r.push("//# sourceMappingURL="+n+"\n"),r}(e,t),r=new Blob(n,{type:"application/javascript"});return URL.createObjectURL(r)}(e,t),new Worker(n,r)}}((function(){!function(){function e(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch($n){o($n)}}function s(e){try{u(r.throw(e))}catch($n){o($n)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r="undefined"===typeof Uint8Array?[]:new Uint8Array(256),i=0;i<64;i++)r[n.charCodeAt(i)]=i;var o=function(e){var t,r=new Uint8Array(e),i=r.length,o="";for(t=0;t<i;t+=3)o+=n[r[t]>>2],o+=n[(3&r[t])<<4|r[t+1]>>4],o+=n[(15&r[t+1])<<2|r[t+2]>>6],o+=n[63&r[t+2]];return i%3===2?o=o.substring(0,o.length-1)+"=":i%3===1&&(o=o.substring(0,o.length-2)+"=="),o},a=new Map,s=new Map;function u(n,r,i){return e(this,void 0,void 0,(0,t.Z)().mark((function e(){var a,u,c,l,d;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a="".concat(n,"-").concat(r),!("OffscreenCanvas"in globalThis)){e.next=17;break}if(!s.has(a)){e.next=4;break}return e.abrupt("return",s.get(a));case 4:return(u=new OffscreenCanvas(n,r)).getContext("2d"),e.next=8,u.convertToBlob(i);case 8:return c=e.sent,e.next=11,c.arrayBuffer();case 11:return l=e.sent,d=o(l),s.set(a,d),e.abrupt("return",d);case 17:return e.abrupt("return","");case 18:case"end":return e.stop()}}),e)})))}var c=self;c.onmessage=function(n){return e(this,void 0,void 0,(0,t.Z)().mark((function e(){var r,i,s,l,d,f,h,p,v,m,g,y;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("OffscreenCanvas"in globalThis)){e.next=31;break}return r=n.data,i=r.id,s=r.bitmap,l=r.width,d=r.height,f=r.dataURLOptions,h=u(l,d,f),p=new OffscreenCanvas(l,d),p.getContext("2d").drawImage(s,0,0),s.close(),e.next=9,p.convertToBlob(f);case 9:return v=e.sent,m=v.type,e.next=13,v.arrayBuffer();case 13:if(g=e.sent,y=o(g),e.t0=!a.has(i),!e.t0){e.next=22;break}return e.next=19,h;case 19:e.t1=e.sent,e.t2=y,e.t0=e.t1===e.t2;case 22:if(!e.t0){e.next=25;break}return a.set(i,y),e.abrupt("return",c.postMessage({id:i}));case 25:if(a.get(i)!==y){e.next=27;break}return e.abrupt("return",c.postMessage({id:i}));case 27:c.postMessage({id:i,type:m,base64:y,width:l,height:d}),a.set(i,y),e.next=32;break;case 31:return e.abrupt("return",c.postMessage({id:n.data.id}));case 32:case"end":return e.stop()}}),e)})))}}()}),null),Ji=function(){function e(t){var n=this;(0,a.Z)(this,e),this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId)&&n.rafStamps.invokeId||(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)};var r=t.sampling,i=void 0===r?"all":r,o=t.win,s=t.blockClass,u=t.blockSelector,c=t.recordCanvas,l=t.dataURLOptions;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&"all"===i&&this.initCanvasMutationObserver(o,s,u),c&&"number"===typeof i&&this.initCanvasFPSObserver(i,o,s,u,{dataURLOptions:l})}return(0,s.Z)(e,[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,n,r,i,o){var a=this,s=qi(n,r,i,!0),u=new Map,c=new Ki;c.onmessage=function(e){var t=e.data.id;if(u.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,o=n.width,s=n.height;a.mutationCb({id:t,type:qe["2D"],commands:[{property:"clearRect",args:[0,0,o,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var l,d=1e3/e,f=0;l=requestAnimationFrame((function e(s){f&&s-f<d||(f=s,function(){var e=[];return n.document.querySelectorAll("canvas").forEach((function(t){gr(t,r,i,!0)||e.push(t)})),e}().forEach((function(e){return tt(a,void 0,void 0,(0,t.Z)().mark((function n(){var r,i,a,s;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.mirror.getId(e),!u.get(i)){t.next=3;break}return t.abrupt("return");case 3:if(0!==e.width&&0!==e.height){t.next=5;break}return t.abrupt("return");case 5:return u.set(i,!0),["webgl","webgl2"].includes(e.__context)&&(a=e.getContext(e.__context),!1===(null===(r=null===a||void 0===a?void 0:a.getContextAttributes())||void 0===r?void 0:r.preserveDrawingBuffer)&&a.clear(a.COLOR_BUFFER_BIT)),t.next=9,createImageBitmap(e);case 9:s=t.sent,c.postMessage({id:i,bitmap:s,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[s]);case 11:case"end":return t.stop()}}),n,this)})))}))),l=requestAnimationFrame(e)})),this.resetObservers=function(){s(),cancelAnimationFrame(l)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=qi(e,t,n,!1),i=function(e,t,n,r){var i,o=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=(0,y.Z)(a);try{var u=function(){var a=i.value;try{if("function"!==typeof t.CanvasRenderingContext2D.prototype[a])return 1;var s=dr(t.CanvasRenderingContext2D.prototype,a,(function(i){return function(){for(var o=this,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];return gr(this.canvas,n,r,!0)||setTimeout((function(){var n=Ui(u,t,o);e(o.canvas,{type:qe["2D"],property:a,args:n})}),0),i.apply(this,u)}}));o.push(s)}catch($i){var u=lr(t.CanvasRenderingContext2D.prototype,a,{set:function(t){e(this.canvas,{type:qe["2D"],property:a,args:[t],setter:!0})}});o.push(u)}};for(s.s();!(i=s.n()).done;)u()}catch(c){s.e(c)}finally{s.f()}return function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r,i){var o=[];return o.push.apply(o,(0,C.Z)(Gi(t.WebGLRenderingContext.prototype,qe.WebGL,e,n,r,0,t))),"undefined"!==typeof t.WebGL2RenderingContext&&o.push.apply(o,(0,C.Z)(Gi(t.WebGL2RenderingContext.prototype,qe.WebGL2,e,n,r,0,t))),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,n,this.mirror);this.resetObservers=function(){r(),i(),o()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"startRAFTimestamping",value:function(){var e=this;requestAnimationFrame((function t(n){e.rafStamps.latestId=n,requestAnimationFrame(t)}))}},{key:"flushPendingCanvasMutations",value:function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))}},{key:"flushPendingCanvasMutationFor",value:function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){var t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(e,["type"]);return t})),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}}}]),e}(),eo=function(){function e(t){(0,a.Z)(this,e),this.trackedLinkElements=new WeakSet,this.styleMirror=new Ar,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}return(0,s.Z)(e,[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){if(0!==e.length){var n,r={id:t,styleIds:[]},i=[],o=(0,y.Z)(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=void 0;this.styleMirror.has(a)?s=this.styleMirror.getId(a):(s=this.styleMirror.add(a),i.push({styleId:s,rules:Array.from(a.rules||CSSRule,(function(e,t){return{rule:at(e),index:t}}))})),r.styleIds.push(s)}}catch(u){o.e(u)}finally{o.f()}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),e}(),to=function(){function e(){(0,a.Z)(this,e),this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}return(0,s.Z)(e,[{key:"periodicallyClear",value:function(){var e=this;requestAnimationFrame((function(){e.clear(),e.loop&&e.periodicallyClear()}))}},{key:"inOtherBuffer",value:function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some((function(e){return e!==t}))}},{key:"add",value:function(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"clear",value:function(){this.nodeMap=new WeakMap}},{key:"destroy",value:function(){this.loop=!1}}]),e}(),no=!1;try{if(2!==Array.from([1],(function(e){return 2*e}))[0]){var ro=document.createElement("iframe");document.body.appendChild(ro),Array.from=(null===($i=ro.contentWindow)||void 0===$i?void 0:$i.Array.from)||Array.from,document.body.removeChild(ro)}}catch(qo){console.debug("Unable to override Array.from",qo)}var io=ut();function oo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,a=e.blockSelector,s=void 0===a?null:a,u=e.ignoreClass,c=void 0===u?"rr-ignore":u,l=e.ignoreSelector,d=void 0===l?null:l,f=e.maskTextClass,h=void 0===f?"rr-mask":f,p=e.maskTextSelector,v=void 0===p?null:p,m=e.inlineStylesheet,g=void 0===m||m,b=e.maskAllInputs,w=e.maskInputOptions,k=e.slimDOMOptions,S=e.maskInputFn,E=e.maskTextFn,x=e.hooks,I=e.packFn,C=e.sampling,M=void 0===C?{}:C,T=e.dataURLOptions,_=void 0===T?{}:T,A=e.mousemoveWait,N=e.recordDOM,R=void 0===N||N,D=e.recordCanvas,O=void 0!==D&&D,L=e.recordCrossOriginIframes,Z=void 0!==L&&L,F=e.recordAfter,P=void 0===F?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":F,j=e.userTriggeredOnInput,V=void 0!==j&&j,B=e.collectFonts,H=void 0!==B&&B,W=e.inlineImages,U=void 0!==W&&W,z=e.plugins,q=e.keepIframeSrcFn,G=void 0===q?function(){return!1}:q,$=e.ignoreCSSAttributes,Q=void 0===$?new Set([]):$;Si(e.errorHandler);var Y=!Z||window.parent===window,X=!1;if(!Y)try{window.parent.document&&(X=!1)}catch($n){X=!0}if(Y&&!t)throw new Error("emit function is required");void 0!==A&&void 0===M.mousemove&&(M.mousemove=A),io.reset();var K,J=!0===b?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==w?w:{password:!0},ee=!0===k||"all"===k?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===k,headMetaDescKeywords:"all"===k}:k||{};kr();var te=0,ne=function(e){var t,n=(0,y.Z)(z||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(qo){n.e(qo)}finally{n.f()}return I&&!X&&(e=I(e)),e};Qi=function(e,i){var o,a=e;if(a.timestamp=fr(),!(null===(o=Ii[0])||void 0===o?void 0:o.isFrozen())||a.type===He.FullSnapshot||a.type===He.IncrementalSnapshot&&a.data.source===We.Mutation||Ii.forEach((function(e){return e.unfreeze()})),Y)null===t||void 0===t||t(ne(a),i);else if(X){var s={type:"rrweb",event:ne(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(s,"*")}if(a.type===He.FullSnapshot)K=a,te=0;else if(a.type===He.IncrementalSnapshot){if(a.data.source===We.Mutation&&a.data.isAttachIframe)return;te++;var u=r&&te>=r,c=n&&a.timestamp-K.timestamp>n;(u||c)&&Yi(!0)}};var re,ie=function(e){Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.Mutation},e)})},oe=function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.Scroll},e)})},ae=function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.CanvasMutation},e)})},se=new eo({mutationCb:ie,adoptedStyleSheetCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.AdoptedStyleSheet},e)})}}),ue=new ji({mirror:io,mutationCb:ie,stylesheetManager:se,recordCrossOriginIframes:Z,wrappedEmit:Qi}),ce=(0,y.Z)(z||[]);try{for(ce.s();!(re=ce.n()).done;){var le=re.value;le.getMirror&&le.getMirror({nodeMirror:io,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror})}}catch(qo){ce.e(qo)}finally{ce.f()}var de=new to;Xi=new Ji({recordCanvas:O,mutationCb:ae,win:window,blockClass:o,blockSelector:s,mirror:io,sampling:M.canvas,dataURLOptions:_});var fe=new Vi({mutationCb:ie,scrollCb:oe,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:h,maskTextSelector:v,inlineStylesheet:g,maskInputOptions:J,dataURLOptions:_,maskTextFn:E,maskInputFn:S,recordCanvas:O,inlineImages:U,sampling:M,slimDOMOptions:ee,iframeManager:ue,stylesheetManager:se,canvasManager:Xi,keepIframeSrcFn:G,processedNodeManager:de},mirror:io});Yi=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(R){Qi({type:He.Meta,data:{href:window.location.href,width:vr(),height:pr()}},e),se.reset(),fe.init(),Ii.forEach((function(e){return e.lock()}));var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new st:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,u=void 0===s?null:s,c=n.maskTextClass,l=void 0===c?"rr-mask":c,d=n.maskTextSelector,f=void 0===d?null:d,h=n.inlineStylesheet,p=void 0===h||h,v=n.inlineImages,m=void 0!==v&&v,g=n.recordCanvas,y=void 0!==g&&g,b=n.maskAllInputs,w=void 0!==b&&b,k=n.maskTextFn,S=n.maskInputFn,E=n.slimDOM,x=void 0!==E&&E,I=n.dataURLOptions,C=n.preserveWhiteSpace,M=n.onSerialize,T=n.onIframeLoad,_=n.iframeLoadTimeout,A=n.onStylesheetLoad,N=n.stylesheetLoadTimeout,R=n.keepIframeSrcFn;return Ft(e,{doc:e,mirror:i,blockClass:a,blockSelector:u,maskTextClass:l,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:!0===w?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===w?{password:!0}:w,maskTextFn:k,maskInputFn:S,slimDOMOptions:!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===x,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===x?{}:x,dataURLOptions:I,inlineImages:m,recordCanvas:y,preserveWhiteSpace:C,onSerialize:M,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:A,stylesheetLoadTimeout:N,keepIframeSrcFn:void 0===R?function(){return!1}:R,newlyAddedElement:!1})}(document,{mirror:io,blockClass:o,blockSelector:s,maskTextClass:h,maskTextSelector:v,inlineStylesheet:g,maskAllInputs:J,maskTextFn:E,slimDOM:ee,dataURLOptions:_,recordCanvas:O,inlineImages:U,onSerialize:function(e){xr(e,io)&&ue.addIframe(e),Ir(e,io)&&se.trackLinkElement(e),Mr(e)&&fe.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){ue.attachIframe(e,t),fe.observeAttachShadow(e)},onStylesheetLoad:function(e,t){se.attachLinkElement(e,t)},keepIframeSrcFn:G});if(!t)return console.warn("Failed to snapshot the document");Qi({type:He.FullSnapshot,data:{node:t,initialOffset:hr(window)}},e),Ii.forEach((function(e){return e.unlock()})),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&se.adoptStyleSheets(document.adoptedStyleSheets,io.getId(document))}};try{var he=[],pe=function(e){var t;return xi(Li)({mutationCb:ie,mousemoveCb:function(e,t){return Qi({type:He.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.MouseInteraction},e)})},scrollCb:oe,viewportResizeCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.ViewportResize},e)})},inputCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.Input},e)})},mediaInteractionCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.MediaInteraction},e)})},styleSheetRuleCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.StyleSheetRule},e)})},styleDeclarationCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.StyleDeclaration},e)})},canvasMutationCb:ae,fontCb:function(e){return Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.Font},e)})},selectionCb:function(e){Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.Selection},e)})},customElementCb:function(e){Qi({type:He.IncrementalSnapshot,data:Object.assign({source:We.CustomElement},e)})},blockClass:o,ignoreClass:c,ignoreSelector:d,maskTextClass:h,maskTextSelector:v,maskInputOptions:J,inlineStylesheet:g,sampling:M,recordDOM:R,recordCanvas:O,inlineImages:U,userTriggeredOnInput:V,collectFonts:H,doc:e,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:G,blockSelector:s,slimDOMOptions:ee,dataURLOptions:_,mirror:io,iframeManager:ue,stylesheetManager:se,shadowDomManager:fe,processedNodeManager:de,canvasManager:Xi,ignoreCSSAttributes:Q,plugins:(null===(t=null===z||void 0===z?void 0:z.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return Qi({type:He.Plugin,data:{plugin:e.name,payload:t}})}}})))||[]},x)};ue.addLoadListener((function(e){try{he.push(pe(e.contentDocument))}catch(t){console.warn(t)}}));var ve=function(){Yi(),he.push(pe(document)),no=!0};return"interactive"===document.readyState||"complete"===document.readyState?ve():(he.push(ar("DOMContentLoaded",(function(){Qi({type:He.DomContentLoaded,data:{}}),"DOMContentLoaded"===P&&ve()}))),he.push(ar("load",(function(){Qi({type:He.Load,data:{}}),"load"===P&&ve()}),window))),function(){he.forEach((function(e){return e()})),de.destroy(),no=!1,Ei()}}catch(me){console.warn(me)}}oo.addCustomEvent=function(e,t){if(!no)throw new Error("please add custom event after start recording");Qi({type:He.Custom,data:{tag:e,payload:t}})},oo.freezePage=function(){Ii.forEach((function(e){return e.freeze()}))},oo.takeFullSnapshot=function(e){if(!no)throw new Error("please take full snapshot after start recording");Yi(e)},oo.mirror=io;var ao=function(e){var t=function(t){try{if((i=t.target)&&(i instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(i.type||"")||i instanceof HTMLTextAreaElement)&&!i.disabled&&!i.readOnly)return;n=function(e){return(e.ctrlKey?"ctrl ":"")+(e.altKey?"alt ":"")+(e.shiftKey?"shift ":"")+(e.metaKey?"meta ":"")+e.key}(t),r=t.target,e({key:n,eventTarget:r})}catch($n){}var n,r,i};window.addEventListener("keyup",(function(e){t(e)}))},so=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,r=arguments.length>1?arguments[1]:void 0;(0,a.Z)(this,e),this.target=n,this.onEvent=r,this.observer=void 0,this.monitoredTextElements=[],this.inputEnabledSelectors=["[contenteditable=true]"].join(","),this.iframeObservers=[],this.monitorInputEnabledElement=function(e){e.addEventListener("input",(function(e){var n;t.onEvent({text:null===(n=e.target)||void 0===n?void 0:n.innerText,eventTarget:e.target})}))}}return(0,s.Z)(e,[{key:"startObserver",value:function(){var e=this;this.startIframesObserver(),this.observer=new MutationObserver((function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.querySelector){var n=t.querySelector("iframe");n&&console.log("FFF",n)}if(t.nodeType===Node.ELEMENT_NODE&&t.nodeType===Node.ELEMENT_NODE){var r=t;r.matches(e.inputEnabledSelectors)||r.isContentEditable?e.monitorInputEnabledElement(r):Array.from(M("*",r)).filter((function(t){return t.matches&&t.matches(e.inputEnabledSelectors)||t.isContentEditable})).forEach(e.monitorInputEnabledElement)}}))}))})),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}},{key:"startIframesObserver",value:function(){var t=this;setInterval((function(){M("iframe",t.target).forEach((function(n){if(!t.iframeObservers.find((function(e){return e.iframe===n}))){var r=function(n){if(n.iframe.contentWindow)try{n.observer=new e(n.iframe.contentWindow.document,t.onEvent),n.observer.startObserver()}catch($n){}},i=n,o={iframe:i,observer:null};t.iframeObservers.push(o),i.contentWindow?r(o):i.addEventListener("load",(function(){r(o)}))}}))}),500)}},{key:"startInputMonitoring",value:function(){this.monitoredTextElements=M(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}}]),e}(),uo=function(){function e(t){var n=this;(0,a.Z)(this,e),this.onEvent=t,this.currentURL=void 0,this.onURLChange=function(){setTimeout((function(){var e=window.location.href;if(e!==n.currentURL){n.currentURL=e;try{n.onEvent({url:e})}catch($n){}}}))}}return(0,s.Z)(e,[{key:"start",value:function(){var e=this;window.addEventListener("popstate",(function(t){e.onURLChange()})),window.addEventListener("locationchange",(function(t){e.onURLChange()})),window.addEventListener("hashchange",(function(t){e.onURLChange()}));var t=window.history.pushState;window.history.pushState=function(){e.onURLChange();for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.apply(window.history,r)};var n=window.history.replaceState;window.history.replaceState=function(){e.onURLChange();for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return n.apply(window.history,r)}}}]),e}(),co=(0,s.Z)((function e(t){var n=this;(0,a.Z)(this,e),this.contentEditableObserver=void 0,this.urlObserver=void 0,this.logNativeMutationObserver=!1,this.stopRRWebRecording=function(){},this.eventHandler=void 0,this.currentURL=void 0,this.start=function(){n.stopRRWebRecording=oo({emit:n.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),n.logNativeMutationObserver&&n.selfObserve(),n.startURLObserver(),n.startKeyboardObserver(),n.startContentEditableObserver()},this.stop=function(){n.stopRRWebRecording()},this.startURLObserver=function(){n.urlObserver=new uo((function(e){var t={url:e.url};n.addCustomEvent(Je.URLChange,t)})),n.urlObserver.start()},this.startContentEditableObserver=function(){n.contentEditableObserver=new so(document,(function(e){var t,r=e.text,i=e.eventTarget,o={text:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(Je.ContentEditableInput,o)})),n.contentEditableObserver.startObserver()},this.startKeyboardObserver=function(){ao((function(e){var t,r=e.key,i=e.eventTarget,o={key:r,id:null===(t=n.tryGetMetaFromEventTarget(i))||void 0===t?void 0:t.id};n.addCustomEvent(Je.KeyStroke,o)}))},this.addCustomEvent=function(e,t){oo.addCustomEvent(e,t)},this.tryGetMetaFromEventTarget=function(e){try{return n.getMeta(e)}catch($n){}},this.selfObserve=function(){var e=document.getElementsByTagName("body");new MutationObserver((function(e,t){var n,r=(0,y.Z)(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;"childList"===i.type?console.log("A child node has been added or removed.",i):"attributes"===i.type&&console.log("The ".concat(i.attributeName," attribute was modified."),i)}}catch(qo){r.e(qo)}finally{r.f()}})).observe(e[0],{attributes:!0,childList:!0,subtree:!0})},this.getNodeById=function(e){return oo.mirror.getNode(e)},this.getMeta=function(e){return oo.mirror.getMeta(e)},this.eventHandler=t,this.currentURL=window.location.href})),lo=["aria-label","aria-labelledby","label","title","alt"];function fo(e){var t,n;return null!==(t=e._debugSource)&&void 0!==t&&t.fileName?null===(n=e._debugSource)||void 0===n?void 0:n.fileName:""}function ho(e,t){if("Unknown"===e)return!1;if("string"!==typeof e)return!1;if(e[0]!==e[0].toUpperCase())return!1;if(t.type.$$typeof===Symbol.for("react.context")||t.type.$$typeof===Symbol.for("react.forward_ref")||t.type.$$typeof===Symbol.for("react.memo")||t.type.$$typeof===Symbol.for("react.profiler")||t.type.$$typeof===Symbol.for("react.suspense"))return!1;var n=fo(t);return!/.*\/node_modules\//.test(n)&&e!==n&&!/^(?!.*src).*$/.test(n)}function po(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return["",{}];var n=e.type,r=n?n.name||n:"Unknown",i="";if(ho(r,e)){i+="<".concat(r,">");var o=fo(e);t[r]=o}if(e.child){var a=po(e.child,t),s=(0,b.Z)(a,2),u=s[0],c=s[1];i+=u,t=(0,h.Z)((0,h.Z)({},t),c)}if(ho(r,e)&&(i+="</".concat(r,">")),e.sibling){var l=po(e.sibling,t),d=(0,b.Z)(l,2),f=d[0],p=d[1];i+=f,t=(0,h.Z)((0,h.Z)({},t),p)}return[i,t]}function vo(e){var t,n=null===(t=e._reactRootContainer)||void 0===t?void 0:t._internalRoot.current;return n||console.log("No react tree in element",e),po(n)}var mo=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,null,[{key:"setPrefix",value:function(e){}}]),e}();mo.original={};var go,yo=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e.map((function(e){return e.target}))},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collectElement:!0};(0,a.Z)(this,e),this.filterElements=t,this.observeOptions=n,this.options=r,this.elements=void 0,this.observer=void 0,this.mutationEventListeners=[]}return(0,s.Z)(e,[{key:"addEventListener",value:function(e,t){this.mutationEventListeners.push({selector:e,listener:t})}},{key:"startListening",value:function(){var e=this;this.elements=[],this.observer=new MutationObserver((function(t){e.options.collectElement&&(e.elements=[].concat((0,C.Z)(e.elements),(0,C.Z)(e.filterElements(t)))),e.mutationEventListeners.length&&t.forEach((function(t){t.addedNodes.forEach((function(t){if(t.nodeType===Node.ELEMENT_NODE){var n=t;e.mutationEventListeners.forEach((function(e){n.matches(e.selector)?e.listener(n):n.querySelectorAll(e.selector).forEach((function(t){e.listener(t)}))}))}}))}))})),this.observer.observe(document.body,this.observeOptions)}},{key:"stopListening",value:function(){return this.observer.disconnect(),this.elements}}]),e}();function bo(e){var t=e.filter((function(e){return e.addedNodes.length>0})).reduce((function(e,t){return[].concat((0,C.Z)(e),(0,C.Z)(t.addedNodes))}),[]),n=e.filter((function(e){return"attributes"===e.type&&"style"===e.attributeName&&e.target instanceof HTMLElement&&/display\s*:\s*none/.test(e.oldValue)&&k(e.target).visible})).map((function(e){return e.target}));return[].concat((0,C.Z)(t),(0,C.Z)(n))}function wo(e){go=!1;var t=ko(e);return go?t:null}var ko=function e(t){var n=function(e){var t=window.getComputedStyle(e).backgroundImage;if(t&&"none"!==t){var n=t.match(/url\("(.+)"\)/);if(n)return go=!0,"BGIMG:".concat(e.tagName.toLowerCase()+n[1])}for(var r=0,i=["::before","::after"];r<i.length;r++){var o=i[r],a=window.getComputedStyle(e,o).content.replace(/['"]/g,""),s=window.getComputedStyle(e,o).fontFamily;if("none"!==a&&""!==a){go=!0;var u=a.charCodeAt(0).toString(16).padStart(4,"0");return"FONT:".concat(e.tagName.toLowerCase()+s+u)}}return e.tagName.toLowerCase()};if(t&&t.nodeType!==Node.TEXT_NODE&&t.tagName){var r=t instanceof SVGElement?function(e){if(!(e.tagName.toLowerCase()in m))return e.tagName.toLowerCase();var t=m[e.tagName.toLowerCase()].map((function(t){return"".concat(t,":").concat(e.getAttribute(t))})).join(",");return t?(go=!0,"SVG:".concat(t)):e.tagName.toLowerCase()}(t):t instanceof HTMLImageElement?function(e){go=!0;var t=n(e);return"IMG:".concat(e.src)+(t!==e.tagName.toLowerCase()?"(".concat(t,")"):"")}(t):n(t);if(t.childNodes.length>0){var i=Array.from(t.childNodes).map(e).filter(Boolean).join("+");i&&i.length>0&&(r+="("+i+")")}return r}};function So(e,t){var n,r=function(e,t){for(var n=new Set;e;)n.add(e),e=e.parentNode;for(;t;){if(n.has(t))return t;t=t.parentNode}return null}(e,t),i=0;if(!r)return 99999;for(n=e;n&&n!==r;)i++,n=n.parentNode;for(n=t;n&&n!==r;)i++,n=n.parentNode;return i}var Eo=function(){function e(){(0,a.Z)(this,e),this.lastHighlights=[]}return(0,s.Z)(e,[{key:"clearHighlights",value:function(){this.lastHighlights.length&&(this.lastHighlights.forEach((function(e){return e.remove()})),this.lastHighlights=[])}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.highlightStyle,r=void 0===n?{}:n,i=t.textStyle,o=void 0===i?{}:i,a=t.mousePosition,s=t.text,u=t.textType,c=void 0===u?"static":u,l=t.textPosition,d=void 0===l?"overlap":l,f=t.textWidthType,h=void 0===f?"rect":f,p=t.clear,v=void 0===p||p,m=t.shouldFlipHighlightTextOutsideViewport,g=void 0===m||m,y=t.pointerEvents,b=t.classNames,w=void 0===b?[]:b;if(v&&this.clearHighlights(),e){var k=e.ownerDocument,S=E(e),M=e.getBoundingClientRect(),T=k.createElement("div");if(T.style.outline="2px dashed rgba(255,0,0,.75)",T.style.position=S?"fixed":"absolute",T.style.left=M.left+"px",T.style.top=M.top+"px",T.style.width=M.right-M.left+"px",T.style.height=M.bottom-M.top+"px",T.style.pointerEvents=null!==y&&void 0!==y?y:"none",T.style.zIndex="2147483647",T.className=["checksum-dom-cache-ignore"].concat((0,C.Z)(w)).join(" "),this.mergeStyle(T,r),a){var _=k.createElement("div");if(_.style.position="absolute",_.style.left=+a.x-16+"px",_.style.top=+a.y-16+"px",_.style.color="#004DFF",_.className=["checksum-dom-cache-ignore","mouse-cross"].concat((0,C.Z)(w)).join(" "),_.style.zIndex="2147483648",!k.head.querySelector("style[role=mouse-location]")){var A=k.head.appendChild(k.createElement("style"));A.setAttribute("role","mouse-location"),A.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}k.body.appendChild(_),this.lastHighlights.push(_)}var N=k.createElement("div");s&&(N.className=["checksum-dom-cache-ignore"].concat((0,C.Z)(w)).join(" "),N.innerText=s,N.style.fontSize="12px",N.style.width="rect"===h?"".concat(M.width,"px"):"auto",N.style.background="#000000a1",N.style.color="white",N.style.padding="5px",N.style.position="absolute",N.style.pointerEvents="none",N.style.userSelect="none","above"===d?N.style.bottom="".concat(M.height,"px"):"below"===d&&(N.style.top="".concat(M.height,"px")),this.mergeStyle(N,o),T.appendChild(N),T.style.pointerEvents=null!==y&&void 0!==y?y:"none","hover"===c&&(N.style.display="none",T.addEventListener("mouseover",(function(){N.style.display="block"})),T.addEventListener("mouseout",(function(){N.style.display="none"})))),k.body.appendChild(T),"above"===d&&x(N)>0?(N.style.bottom="initial",N.style.top="".concat(M.height,"px")):"below"===d&&I(N)>0&&(N.style.top="initial",N.style.bottom="".concat(M.height,"px")),this.lastHighlights.push(T),g&&this.flipHighlightTextPositionOutsideViewport(N,d,M.height)}}},{key:"mergeStyle",value:function(e,t){for(var n in t)e.style[n]=t[n]}},{key:"flipHighlightTextPositionOutsideViewport",value:function(e,t,n){"above"===t&&x(e)>0?(e.style.bottom="initial",e.style.top="".concat(n,"px")):"below"===t&&I(e)>0&&(e.style.top="initial",e.style.bottom="".concat(n,"px"))}}]),e}(),xo=new Eo,Io=function(){function e(t,n){(0,a.Z)(this,e),this.rawDbName=t,this.storeName=n,this.db=null,this._dbName=void 0}return(0,s.Z)(e,[{key:"getDBName",value:function(){if(!this._dbName){if(!window.name){var e,t=null!==(e=window.sessionStorage.getItem("nextTabIndex"))&&void 0!==e?e:"0";window.name=t,window.sessionStorage.setItem("nextTabIndex","".concat(parseInt(t)+1))}this._dbName="".concat(this.rawDbName,"-").concat(window.name)}return this._dbName}},{key:"open",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return new Promise((function(n,r){var i=indexedDB.open(e.getDBName(),t);i.onupgradeneeded=function(t){e.db=i.result,e.db.objectStoreNames.contains(e.storeName)||e.db.createObjectStore(e.storeName)},i.onsuccess=function(t){e.db=i.result,n(e.db)},i.onerror=function(e){console.log("IndexedDBClient.open() error",e,i.error),r(i.error)}}))}},{key:"count",value:function(){var e=this;return new Promise((function(t,n){if(e.db){var r=e.db.transaction([e.storeName]).objectStore(e.storeName).count();r.onsuccess=function(){return t(r.result)},r.onerror=function(){return n(r.error)}}else n("Database has not been initialized")}))}},{key:"set",value:function(e,t){var n=this;return new Promise((function(r,i){if(n.db){var o=n.db.transaction([n.storeName],"readwrite").objectStore(n.storeName).add(e,t);o.onsuccess=function(){return r()},o.onerror=function(){return i(o.error)}}else i("Database has not been initialized")}))}},{key:"get",value:function(e,t,n){var r=this;return new Promise((function(i,o){if(r.db){var a=r.db.transaction([r.storeName]).objectStore(r.storeName),s=e?a.getAll(t,n):a.get(t);s.onsuccess=function(){return i(s.result)},s.onerror=function(){return o(s.error)}}else o("Database has not been initialized")}))}},{key:"getOne",value:function(e){return this.get(!1,e)}},{key:"getAll",value:function(e,t){return this.get(!0,e,t)}}]),e}(),Co=function(){function e(){(0,a.Z)(this,e),this.initialized=!1,this.rrwebEventsIndexedDB=void 0,this.rrwebEventsLoaded=!1,this.loadRRwebEvents=[],this.rrwebCrossFrameEventIdCounter=0}return(0,s.Z)(e,[{key:"initRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.initialized){e.next=3;break}return console.warn("[RrwebEventsStorageManager] initRRwebEvents called more than once"),e.abrupt("return");case 3:return this.initialized=!0,this.rrwebEventsIndexedDB=new Io("checksum","rrwebEvents"),e.prev=5,e.next=8,this.rrwebEventsIndexedDB.open();case 8:e.next=13;break;case 10:return e.prev=10,e.t0=e.catch(5),e.abrupt("return");case 13:return e.next=15,this.rrwebEventsIndexedDB.count();case 15:this.rrwebCrossFrameEventIdCounter=e.sent,this.loadRRwebEvents.forEach((function(e){n.rrwebEventsIndexedDB.set(e,n.rrwebCrossFrameEventIdCounter++)})),this.rrwebEventsLoaded=!0;case 18:case"end":return e.stop()}}),e,this,[[5,10]])})));return function(){return e.apply(this,arguments)}}()},{key:"onRRwebEvent",value:function(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll();case 4:return r=e.sent,e.abrupt("return",fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.rrwebEventsLoaded){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(n));case 4:return r=e.sent,e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Mo=new Co,To=["element","innerText"],_o=function(e){(0,l.Z)(i,e);var n=(0,d.Z)(i);function i(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.Z)(this,i),mo.setPrefix("$checksum"),(e=n.call(this)).options={skipElementHighlighting:!1},e.elementSelector=void 0,e.testIdCounter=0,e.currentESRASelector=void 0,e.initialized=!1,e.htmlReducer=void 0,e.appSpecificRules=void 0,e.config=void 0,e.sessionMirror=void 0,e.mutationDetector=void 0,e.elementSelector=new de,e.options=(0,h.Z)((0,h.Z)({},e.options),t),e.htmlReducer=new Ve,e}return(0,s.Z)(i,[{key:"init",value:function(e){var t,n,r,i,o=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).sessionRecorder,u=void 0===s||s,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.appSpecificRules=e,this.config=a,this.options=(0,h.Z)((0,h.Z)({},this.options),c),this.initialized||(this.initialized=!0,u&&(this.sessionMirror=new co((function(e){return Mo.onRRwebEvent(e),o.eventProcessor.processEvent(e)})),Mo.initRRwebEvents()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),li.limitChildren=null!==(t=null===(n=this.appSpecificRules)||void 0===n||null===(r=n.esraSelectionRules)||void 0===r?void 0:r.limitChildren)&&void 0!==t?t:[],li.timeout=this.config.esraTimeout,null!==(i=this.config.logPrefix)&&void 0!==i&&i.length&&mo.setPrefix(this.config.logPrefix))}},{key:"getElementSelector",value:function(){return this.elementSelector}},{key:"getLastSelectionLogs",value:function(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}},{key:"getBestMatchingElementSimilarityScore",value:function(e){return this.currentESRASelector=new li(e),this.currentESRASelector.selectOne().score}},{key:"extractESRAMetadata",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new le(document).extract(n).toMetadata());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"select",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.elementSelector.selector(n,r);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getSelectionDataForSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u,c;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.elementSelector.selector(n,r);case 3:if(a=e.sent){e.next=7;break}return console.warn("could not find element for selector: "+n),e.abrupt("return",null);case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(a,{testIdSelector:null===(i=this.appSpecificRules)||void 0===i||null===(o=i.esraSelectionRules)||void 0===o?void 0:o.testIdSelector});case 9:return s=e.sent,u=s.locator,e.next=13,this.extractESRAMetadata(a);case 13:return c=e.sent,e.abrupt("return",{generatedLocator:u,esraMetadata:c,selector:n,parentFramesSelectors:r});case 17:return e.prev=17,e.t0=e.catch(0),console.log("getMetadataForSelector exception",e.t0),e.abrupt("return");case 21:case"end":return e.stop()}}),e,this,[[0,17]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"getMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=h.length>1&&void 0!==h[1]?h[1]:{minSelectionScore:.3}).minSelectionScore,o=r.cachedSelector,a=r.staticMetadata,s=h.length>2&&void 0!==h[2]&&h[2],e.prev=2,!o){e.next=8;break}return console.log("Trying to locate using cached selector",o),e.next=7,this.elementSelector.selector(o);case 7:u=e.sent;case 8:if(u||(console.log("Trying to locate using ESRA",n),H(a)&&console.log("and static data",a),this.currentESRASelector=new li(n,a),(d=this.currentESRASelector.selectOne({minSelectionScore:i})).score>=i?(u=d.candidate,c=d.score,l=d.clickOffset):console.log("Best matching element was below threshold",d)),console.log(u?["Located with score ".concat(c),u]:"Element not located"),u){e.next=12;break}return e.abrupt("return");case 12:return s&&new N(u).scrollIntoView(),this.highlightElement(u),e.next=16,this.makeMatchingElementSelectionData(u,c);case 16:return f=e.sent,l&&(f.clickOffset=l),e.abrupt("return",f);case 21:return e.prev=21,e.t0=e.catch(2),console.log("getMatchingElementSelectionData exception",e.t0),e.abrupt("return");case 25:case"end":return e.stop()}}),e,this,[[2,21]])})));return function(t){return e.apply(this,arguments)}}()},{key:"getAllInteractableElementsForLastSelectQuery",value:function(){var e=this,n=this.currentESRASelector.getFinalCandidates();return Promise.all(n.map(function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=r.esraMetadata,t.next=3,e.makeMatchingElementSelectionData(r.candidate,r.score);case 3:return t.t1=t.sent,t.abrupt("return",{esraMetadata:t.t0,selectionData:t.t1});case 5:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()))}},{key:"getInteractableElementsRaw",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Le());case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getInteractableElements",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,i,o=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Le(),i=new le(document),e.abrupt("return",Promise.all(n.map(function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.extract(n).toMetadata(),e.next=3,o.makeMatchingElementSelectionData(n);case 3:return a=e.sent,e.abrupt("return",{esraMetadata:r,selectionData:a});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"getCurrentESRASelector",value:function(){return this.currentESRASelector}},{key:"startFlashingElementsDetection",value:function(){return this.htmlReducer.startFlashingElementsDetection()}},{key:"postRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Mo.postRRwebEvents(n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"getRRwebEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Mo.getRRwebEvents(n));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},{key:"reduceHTML",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=s.length>0&&void 0!==s[0]?s[0]:{},r=s.length>1&&void 0!==s[1]?s[1]:{},i=s.length>2&&void 0!==s[2]?s[2]:document,e.next=5,this.htmlReducer.reduceHTML((0,h.Z)((0,h.Z)({},this.appSpecificRules),n),r,i);case 5:return o=e.sent,r.extractESRAForInterpretationRequiredElements&&(console.log("Extracting ESRA for interpretation required elements..."),a=this.htmlReducer.getInteractableElementsInReducedHTML(),o.elementsForNodeInterpretation=a.reduce((function(e,t){var n,r=t.checksumId,i=t.element;if(!(i instanceof HTMLElement))return e;if(null!==(n=i.innerText)&&void 0!==n&&n.trim().length)return e;var o=new le(document).extract(i).toMetadata();return[].concat((0,C.Z)(e),[{checksumId:r,esraMetadata:o}])}),[]),console.log("Done with ESRA extraction for interpretation required elements")),e.abrupt("return",o);case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getMoreItemsForTemplate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.htmlReducer.getMoreElementsFromTemplate(e,(0,h.Z)((0,h.Z)({},this.appSpecificRules),t))}},{key:"displayInterpretationForElements",value:function(e){var t=this;this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach((function(n){var r=n.checksumId,i=n.element,o=e[r];o&&(i.isConnected?t.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}}):console.log("Element ".concat(r," is not connected to the DOM, skipping display")))}))}},{key:"overlayInteractableElementsWithChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u,c,l,d,f,p,v=this,m=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(n=m.length>0&&void 0!==m[0]?m[0]:{}).reduceBeforeRender,i=void 0!==r&&r,o=n.mode,a=void 0===o?"full":o,s=n.textPosition,u=void 0===s?"tag"===a?"above":void 0:s,c=n.shouldFlipHighlightTextOutsideViewport,l=void 0===c||c,d=n.scrollIntoView,f=void 0!==d&&d,this.clearHighlights(),!i){e.next=5;break}return e.next=5,this.reduceHTML();case 5:p=function(e,t,n){if(t.isConnected){var r=t.getBoundingClientRect(),i=r.width,o=r.height;if(!(i<=0||o<=0)){var s=function(e){var t=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return e?t[e%t.length]:"red"}(n);v.highlightElement(t,(0,h.Z)((0,h.Z)({text:e,clear:!1,highlightStyle:{outline:"tag"===a?"3px dashed ".concat(s):"none"}},u?{textPosition:u}:{}),{},{textStyle:function(e){switch(a){case"tag":return{background:e,width:"initial",left:"-2px",border:"3px dashed ".concat(e),"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}(s),shouldFlipHighlightTextOutsideViewport:l}))}}else console.log("Element ".concat(e," is not connected to the DOM, skipping display"))},this.htmlReducer.getInteractableElementsInReducedHTML().filter((function(e){return!L(e.element,(0,h.Z)((0,h.Z)({},je),{},{scrollIntoView:f})).isHidden})).forEach((function(e,t){var n=e.checksumId,r=e.element;p(n,r,t)}));case 8:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"getElementForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:if(e.t1=r=e.sent,e.t0=null===e.t1,e.t0){e.next=6;break}e.t0=void 0===r;case 6:if(!e.t0){e.next=10;break}e.t2=void 0,e.next=11;break;case 10:e.t2=r.element;case 11:return e.abrupt("return",e.t2);case 12:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getSelectorForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.htmlReducer.getSelectorForChecksumId(n);case 2:return r=e.sent,r.element,r.innerText,i=(0,ri.Z)(r,To),e.abrupt("return",i);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"hasInnerTextByChecksumId",value:function(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}},{key:"getSelectorByPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=document.elementFromPoint(n,r),e.next=3,this.elementSelector.getSelectorAndLocator(i);case 3:return o=e.sent,a=o.selector,s=o.locator,u=o.parentFramesSelectors,e.abrupt("return",{selector:a,locator:s,parentFramesSelectors:u});case 8:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isInput",value:function(e){var t=M(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}},{key:"querySelectorExtended",value:function(e){return M(e)}},{key:"getReactTree",value:function(e){return vo(e)}},{key:"isHidden",value:function(e,t){return L(e,t)}},{key:"showGrid",value:function(){this.removeGrid();var e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML='\n .checksum_grid {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");\n background-repeat: repeat;\n background-size: 20px;\n background-position: 0px 0px;\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 100%;\n height: 100%;\n z-index: 1000;\n }\n',document.body.prepend(e);var t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}},{key:"removeGrid",value:function(){var e=document.querySelector("#checksum_grid_style");e&&e.remove();var t=document.querySelector(".checksum_grid");t&&t.remove()}},{key:"clearHighlights",value:function(){xo.clearHighlights()}},{key:"highlightElement",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.options.skipElementHighlighting||xo.highlightElement(e,t)}},{key:"getInspectedElementSelectionResultByRRwebId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(r=a.length>1&&void 0!==a[1]?a[1]:{fromTimeMachine:!1}).fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror,e.next=4,i.getNodeById(n);case 4:if(o=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelectorAndLocator(o,{ignoredIframesSelectors:r.fromTimeMachine?[".replayer-wrapper > iframe"]:[]});case 9:return e.abrupt("return",e.sent);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getNodeSelector",value:function(e){return(new Be).getSelector(e)}},{key:"startListeningForHTMLChanges",value:function(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new yo(bo),this.mutationDetector.startListening()}},{key:"stopListeningForHTMLChanges",value:function(e){return this.mutationDetector.stopListening().map((function(e){var t,n;return null===(t=null!==(n=e.innerText)&&void 0!==n?n:e.textContent)||void 0===t?void 0:t.trim()}))}},{key:"recordScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if(r=e.sent){e.next=5;break}return e.abrupt("return");case 5:(i=new N(r)).getScrollableParentsPositions(),r._checksumScrollHelper=i;case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"restoreScrollPosition",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getElementForChecksumId(n);case 2:if((r=e.sent)&&"_checksumScrollHelper"in r){e.next=5;break}return e.abrupt("return");case 5:r._checksumScrollHelper.restore(),delete r._checksumScrollHelper;case 7:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getElementCaptioningKeyForChecksumId",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.htmlReducer.getElementForChecksumId(n)){e.next=4;break}return console.warn("Element with checksumId ".concat(n," not found")),e.abrupt("return");case 4:return e.abrupt("return",wo(r));case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"determineClosestNode",value:function(e,t,n){return So(e,n)-So(t,n)}},{key:"addForceIncludeElement",value:function(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}},{key:"shouldCaptionElement",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{recursive:!0}).recursive,n=this.htmlReducer.getElementForChecksumId(e);if(!n)return!1;for(var r,i=lo,o=!1,a=n,s=function(){var e=function(){var e;return o?a=null===(e=a)||void 0===e?void 0:e.parentElement:o=!0,a}();return i.some((function(t){return e.getAttribute(t)}))||e.querySelectorAll("[checksuminteractable]").length>0||1===i.filter((function(t){return e.querySelectorAll("[".concat(t,"]"))})).length?{v:!1}:t&&function(e){var t=e.parentElement;if(!t||t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t.getBoundingClientRect(),r=n.width,i=n.height,o=e.getBoundingClientRect(),a=o.width,s=o.height;return Math.abs(r-a)<15&&Math.abs(i-s)<15}(e)?void 0:0};0!==(r=s());)if(r)return r.v;return!0}},{key:"makeMatchingElementSelectionData",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,i,o){var a,s,u,c,l,d,f,h,p,v,m,g,y,b,w,k,S,E,x,I,C,M;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f=this.setAndGetTestId(n),h=this.getVisibleParent(n),p=this.setAndGetTestId(h),v=this.getElementAtCenterOfElement(n),m=this.setAndGetTestId(v),g={element:f,visibleElement:p===f?void 0:p,atPointElement:m===f||m===p?void 0:m},e.next=9,this.elementSelector.getSelectorAndLocator(n,{testIdSelector:null===(a=this.appSpecificRules)||void 0===a||null===(s=a.esraSelectionRules)||void 0===s?void 0:s.testIdSelector});case 9:return y=e.sent,e.next=12,this.elementSelector.getSelectorAndLocator(v,{testIdSelector:null===(u=this.appSpecificRules)||void 0===u||null===(c=u.esraSelectionRules)||void 0===c?void 0:c.testIdSelector});case 12:return b=e.sent,e.next=15,this.elementSelector.getSelectorAndLocator(h,{testIdSelector:null===(l=this.appSpecificRules)||void 0===l||null===(d=l.esraSelectionRules)||void 0===d?void 0:d.testIdSelector});case 15:return w=e.sent,k={element:null===y||void 0===y?void 0:y.selector,visibleElement:null===w||void 0===w?void 0:w.selector,atPointElement:null===b||void 0===b?void 0:b.selector},S={element:null===y||void 0===y?void 0:y.parentFramesSelectors,visibleElement:null===w||void 0===w?void 0:w.parentFramesSelectors,atPointElement:null===b||void 0===b?void 0:b.parentFramesSelectors},x={element:(E=function(e){return{tag:e.tagName.toLowerCase()}})(n),visibleElement:g.visibleElement?E(h):void 0,atPointElement:g.atPointElement?E(v):void 0},I=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r!==n||!o){e.next=2;break}return e.abrupt("return",o);case 2:return i=new le(document),e.abrupt("return",i.extract(r).toMetadata());case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.next=23,I(n);case 23:if(e.t0=e.sent,!g.visibleElement){e.next=30;break}return e.next=27,I(h);case 27:e.t1=e.sent,e.next=31;break;case 30:e.t1=void 0;case 31:if(e.t2=e.t1,!g.atPointElement){e.next=38;break}return e.next=35,I(v);case 35:e.t3=e.sent,e.next=39;break;case 38:e.t3=void 0;case 39:return e.t4=e.t3,C={element:e.t0,visibleElement:e.t2,atPointElement:e.t4},M=null===y||void 0===y?void 0:y.locator,e.abrupt("return",{testIds:g,selectors:k,parentFramesSelectors:S,elementData:x,score:i,esraMetadata:C,generatedLocator:M});case 45:return e.prev=45,e.t5=e.catch(0),console.log("[makeMatchingElementSelectionData] exception",e.t5),e.abrupt("return",{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0});case 49:case"end":return e.stop()}}),e,this,[[0,45]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"getElementAtCenterOfElement",value:function(e){var t=e.getBoundingClientRect(),n=t.x,r=t.y,i=e.ownerDocument.elementFromPoint(n,r);return i instanceof HTMLElement?i:void 0}},{key:"setAndGetTestId",value:function(e){if(e){var t=e.getAttribute("data-checksum-testid");if(t)return t;var n=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",n),n}}},{key:"getVisibleParent",value:function(e){return e instanceof HTMLElement?null!==e.offsetParent?e:this.getVisibleParent(A(e)):e}}]),i}(ti),Ao=function(){function e(){(0,a.Z)(this,e),this.goals=void 0,this.goals={}}return(0,s.Z)(e,[{key:"init",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()},{key:"recordGoalFinished",value:function(e){var t;console.log("Goal reached: ".concat(e)),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,null===(t=window.checksumai)||void 0===t||t.capture("goal_reached",{goalName:e})}},{key:"getGoals",value:function(){return this.goals}}]),e}(),No=function(e){(0,l.Z)(i,e);var n=(0,d.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this,{enableInteract:!0})).shouldHandleEvents=!0,e}return(0,s.Z)(i,[{key:"setEventHandlers",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.shouldHandleEvents=t,(0,u.Z)((0,c.Z)(i.prototype),"setEventHandlers",this).call(this,e)}},{key:"handleEvents",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:console.log("starting handleEvents",r),e.prev=1,i=(0,y.Z)(n),e.prev=3,i.s();case 5:if((o=i.n()).done){e.next=13;break}return a=o.value,e.next=9,this.eventProcessor.processEvent(a,this.shouldHandleEvents);case 9:return e.next=11,this.skipEvents([a]);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),i.e(e.t0);case 18:return e.prev=18,i.f(),e.finish(18);case 21:e.next=26;break;case 23:e.prev=23,e.t1=e.catch(1),console.error(e.t1);case 26:console.log("done handleEvents",r);case 27:case"end":return e.stop()}}),e,this,[[1,23],[3,15,18,21]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"setShouldHandleEvents",value:function(e){this.shouldHandleEvents=e}},{key:"goBack",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?this.sessionReplayer.goBack(e,t):this.goLive()}},{key:"goLive",value:function(){return this.sessionReplayer.goLive()}}]),i}(ti),Ro=function(e){return e.Click="click",e.DoubleClick="double_click",e.DragAndDrop="drag_and_drop",e.Input="input",e.ClickAndType="click_and_type",e.ClearAndType="clear_and_type",e.Check="check",e.UnCheck="uncheck",e.Hover="hover",e.Navigation="navigation",e.Keystroke="keystroke",e.SelectOption="selectoption",e.UploadFiles="upload_files",e.GetMoreItems="get_more_items",e.Wait="wait",e.SwitchTab="switch_tab",e.CustomCode="custom_code",e}({}),Do=function(){function e(){(0,a.Z)(this,e),this.esraExtractors=[],this.playwrightSelector=new de}return(0,s.Z)(e,[{key:"getSelector",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c,l,d,f,h,p=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=p.length>1&&void 0!==p[1]?p[1]:{}).extractPlaywrightSelector,o=void 0===i||i,a=r.extractEsraMetadata,s=void 0===a||a,n){e.next=3;break}return e.abrupt("return",null);case 3:if(console.log("[SessionDigesterSelector] generating for node",n),u={},s)try{console.log("extracting ESRA metadata..."),c=this.getESRAExtractor(n).extract(n),u.esraMetadata=c.toMetadata(),console.log("ESRA metadata extraction complete")}catch($n){console.error("Failed to extract ESRA metadata",$n)}if(!o){e.next=18;break}return console.log("extracting playwright selector..."),e.next=10,this.playwrightSelector.getSelectorAndLocator(n);case 10:l=e.sent,d=l.selector,f=l.locator,h=l.parentFramesSelectors,u.playwrightSelector=d,u.playwrightLocator=f,u.playwrightParentFramesSelectors=h,console.log("Playwright selector extraction complete");case 18:return e.abrupt("return",u);case 19:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getESRAExtractor",value:function(e){var t=e.ownerDocument;if(!t)throw console.warn("Node does not have an owner document",e),new Error("Node does not have an owner document");var n=this.esraExtractors.find((function(e){return e.isSameDocument(t)}));if(n)return n;var r=new le(t);return this.esraExtractors.push(r),r}}]),e}(),Oo=function(){function e(){(0,a.Z)(this,e)}return(0,s.Z)(e,[{key:"findSequence",value:function(e,t,n){for(var r=0;r<=e.length-t.length;r++){var i=this.findMatch(r,e,t,n);if(null!==i)return i}return null}},{key:"findMatch",value:function(e,t,n,r){for(var i={},o=[],a=0;a<n.length;a++){var s=t[e+a],u=n[a];if(!this.matchItem(u,s,i,null!==r&&void 0!==r?r:s))return null;o.push(s)}return{items:o,token_values:i}}},{key:"matchItem",value:function(e,t,n,r){if(Array.isArray(e)&&Array.isArray(t))return this.matchArray(e,t,n,r);if("object"===typeof e&&null!==e&&"object"===typeof t&&null!==t){for(var i in e){var o=e[i],a=t[i];if("string"===typeof o&&o.startsWith("$")){if(void 0===n[o])n[o]={value:a,item:r};else if(n[o].value!==a)return!1}else if("object"===typeof o&&null!==o){if(!this.matchItem(o,a,n,r))return!1}else if(o!==a)return!1}return!0}return e===t}},{key:"matchArray",value:function(e,t,n,r){for(var i=0;i<=t.length-e.length;i++){var o=t.slice(i,i+e.length),a=this.findSequence(o,e,r);if(a){for(var s in a.token_values)if(void 0===n[s])n[s]={value:a.token_values[s].value,item:r};else if(n[s].value!==a.token_values[s].value)return!1;return!0}}return!1}},{key:"runExample",value:function(){var t=(new e).findSequence([{x:"banana",id:"1gf3",class:"fruit",index:"3",details:{a:1,b:2,nested:{key:"value1"}},arr:[{a:3,b:2},{a:1,b:2}]},{y:"apple",id:"4gs2",class:"fruit",parentIndex:"3",index:"7",details:{a:1,b:2,nested:{key:"value1"}}}],[{class:"$1",index:"$2",details:{a:1,b:"$3",nested:{key:"$4"}},arr:[{a:1,b:"$5"}]},{class:"$1",parentIndex:"$2",details:{a:1,b:"$3",nested:{key:"$4"}}}]);console.log(t)}}]),e}(),Lo=function(e){(0,l.Z)(i,e);var n=(0,d.Z)(i);function i(){var e;return(0,a.Z)(this,i),(e=n.call(this)).elementSelector=void 0,e.sessionReplayer=void 0,e.events=[],e.interactions=[],e.lastInteractionEventIndex=0,e.sequences=[],e.sequenceMatcher=new Oo,e.inputFilter=void 0,e.clickFilter=void 0,e.releasePendingInputAction=function(){clearTimeout(e.inputFilter.timeout),e.addInteraction(e.inputFilter.action),e.inputFilter=void 0},e.releasePendingClickActions=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];clearTimeout(e.clickFilter.timeout),t&&e.clickFilter.actions.forEach((function(t){return e.addInteraction(t)})),e.clickFilter=void 0},e.dragAndDropSequence={events:[{type:He.IncrementalSnapshot,data:{source:We.MouseInteraction,type:Ue.MouseDown}},{type:He.IncrementalSnapshot,data:{source:We.Mutation,adds:[{parentId:"$dropzoneId",node:{id:"$draggableId"}}],removes:[{id:"$draggableId"}]}}],handler:function(){var n=(0,r.Z)((0,t.Z)().mark((function n(r){var i,o,a,s,u,c,l,d,f,h;return(0,t.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=r.token_values,o=i.$dropzoneId,a=i.$draggableId,s=r.items,t.next=3,e.sessionReplayer.goBack(a.item.timestamp);case 3:return u=a.value,t.next=6,e.getNodeById(u);case 6:if(c=t.sent){t.next=9;break}return t.abrupt("return");case 9:return t.next=11,e.elementSelector.getSelector(c);case 11:if(l=t.sent){t.next=14;break}return t.abrupt("return");case 14:return t.next=16,e.sessionReplayer.goBack(o.item.timestamp);case 16:return d=o.value,t.next=19,e.getNodeById(d);case 19:if(f=t.sent){t.next=22;break}return t.abrupt("return");case 22:return t.next=24,e.elementSelector.getSelector(f);case 24:if(h=t.sent){t.next=27;break}return t.abrupt("return");case 27:return console.log("Drag and drop",l.playwrightLocator,h.playwrightLocator),t.abrupt("return",[e.makePageAction(Ro.DragAndDrop,s[0],l,{dropTarget:{selector:h.playwrightSelector,locator:h.playwrightLocator,parentFramesSelectors:h.playwrightParentFramesSelectors,esraMetadata:h.esraMetadata}})]);case 29:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()},e.maxNumberOfGetNodeRetries=3,e.elementSelector=new Do,e.buildSequences(),e}return(0,s.Z)(i,[{key:"setSessionReplayer",value:function(e){this.sessionReplayer=e}},{key:"getInteractions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.interactions.slice(e)}},{key:"preEvent",value:function(e){this.inputFilter&&this.isActionEvent(e)&&!this.isConsecutiveInputEvent(e)&&this.releasePendingInputAction(),this.clickFilter&&this.isActionEvent(e)&&!this.isConsecutiveClickEvent(e)&&this.releasePendingClickActions(),this.events.push(e)}},{key:"postEvent",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this.performSequenceSearch();case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("performSequenceSearch",e.t0);case 8:case"end":return e.stop()}}),e,this,[[0,5]])})));return function(t,n){return e.apply(this,arguments)}}()},{key:"handleInput",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a,s,u=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=u.length>2&&void 0!==u[2]&&u[2],!this.inputFilter){e.next=5;break}return this.inputFilter.action.fillValue=n.text,this.inputFilter.timeout=this.setInputWaitTimeout(),e.abrupt("return");case 5:if(n.userTriggered){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.getNodeById(n.id);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,this.elementSelector.getSelector(o);case 14:if(a=e.sent){e.next=17;break}return e.abrupt("return");case 17:if((s=this.makePageAction(this.getInputEventCode(o,n),r,a)).eventCode!==Ro.Input){e.next=22;break}return s.fillValue=n.text,this.inputFilter={action:s,nodeId:n.id,contenteditable:i,timeout:this.setInputWaitTimeout()},e.abrupt("return");case 22:s.eventCode===Ro.UploadFiles&&(s.files=[],s.files.push(n.text)),this.addInteraction(s);case 24:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveInputEvent",value:function(e){return!!this.inputFilter&&(this.inputFilter.contenteditable?e.type===He.Custom&&e.data.tag===Je.ContentEditableInput&&e.data.payload.id===this.inputFilter.nodeId:e.type===He.IncrementalSnapshot&&e.data.source===We.Input&&e.data.id===this.inputFilter.nodeId&&!!e.data.userTriggered)}},{key:"setInputWaitTimeout",value:function(){var e;return null!==(e=this.inputFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.inputFilter.timeout),setTimeout(this.releasePendingInputAction,1e3)}},{key:"handleContentEditableInput",value:function(e,t){this.handleInput({userTriggered:!0,id:e.id,text:e.text,isChecked:!1,source:We.Input},t,!0)}},{key:"handleKeyStroke",value:function(e,t){}},{key:"handleClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:if(a=this.makePageAction(Ro.Click,r,o),!this.clickFilter){e.next=16;break}return this.clickFilter.actions.push(a),e.abrupt("return");case 16:this.clickFilter={actions:[a],nodeId:n.id,timeout:this.setClickWaitTimeout()};case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"isConsecutiveClickEvent",value:function(e){return!!this.clickFilter&&(e.type===He.IncrementalSnapshot&&e.data.source===We.MouseInteraction&&e.data.type===Ue.Click&&e.data.id===this.clickFilter.nodeId)}},{key:"setClickWaitTimeout",value:function(){var e;return null!==(e=this.clickFilter)&&void 0!==e&&e.timeout&&clearTimeout(this.clickFilter.timeout),setTimeout(this.releasePendingClickActions,600)}},{key:"handleDblClick",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n,r){var i,o,a;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==n.x&&void 0!==n.y){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.getNodeById(n.id);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,this.elementSelector.getSelector(i);case 9:if(o=e.sent){e.next=12;break}return e.abrupt("return");case 12:a=this.makePageAction(Ro.DoubleClick,r,o),this.addInteraction(a),this.releasePendingClickActions(!1);case 15:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}()},{key:"buildSequences",value:function(){this.sequences.push(this.dragAndDropSequence)}},{key:"performSequenceSearch",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(){var n,r,i,o,a,s,u=this;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=this.events.slice(this.lastInteractionEventIndex),r=(0,y.Z)(this.sequences),e.prev=2,r.s();case 4:if((i=r.n()).done){e.next=14;break}if(o=i.value,!(a=this.sequenceMatcher.findSequence(n,o.events))){e.next=12;break}return e.next=10,o.handler(a);case 10:(s=e.sent)&&s.forEach((function(e){return u.addInteraction(e)}));case 12:e.next=4;break;case 14:e.next=19;break;case 16:e.prev=16,e.t0=e.catch(2),r.e(e.t0);case 19:return e.prev=19,r.f(),e.finish(19);case 22:return e.next=24,this.sessionReplayer.goLive();case 24:case"end":return e.stop()}}),e,this,[[2,16,19,22]])})));return function(){return e.apply(this,arguments)}}()},{key:"isActionEvent",value:function(e){switch(e.type){case He.Meta:return!1;case He.IncrementalSnapshot:switch(e.data.source){case We.Input:return e.data.userTriggered;case We.MouseInteraction:case We.MouseMove:return!0;default:return!1}case He.Custom:return e.data.tag===Je.ContentEditableInput;default:return!1}}},{key:"addInteraction",value:function(e){this.interactions.push(e),this.lastInteractionEventIndex=this.events.length}},{key:"makePageAction",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,h.Z)({nodeId:this.interactions.length.toString(),eventCode:e,selector:n.playwrightSelector,locator:n.playwrightLocator,parentFramesSelectors:n.playwrightParentFramesSelectors,esraMetadata:n.esraMetadata,pageId:void 0,timestamp:t.timestamp},r)}},{key:"getNodeById",value:function(){var e=(0,r.Z)((0,t.Z)().mark((function e(n){var r,i,o,a,s,u,c=arguments;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=(r=c.length>1&&void 0!==c[1]?c[1]:{}).retriesLeft,o=void 0===i?this.maxNumberOfGetNodeRetries:i,a=r.useCompoundInteractableDetection,s=void 0===a||a,o){e.next=4;break}return console.error("no node"),e.abrupt("return",null);case 4:if(u=this.sessionReplayer.getNodeById(n)){e.next=9;break}return e.next=8,Xe()(100*(this.maxNumberOfGetNodeRetries-o+1));case 8:return e.abrupt("return",this.getNodeById(n,{retriesLeft:o-1,useCompoundInteractableDetection:s}));case 9:return e.abrupt("return",s?Oe(u,[]):u);case 10:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"getInputEventCode",value:function(e,t){switch(e.getAttribute("type")){case"file":return Ro.UploadFiles;case"checkbox":case"radio":return t.isChecked?Ro.Check:Ro.UnCheck;default:return Ro.Input}}}]),i}($e),Zo=function(){function e(){var n=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,o=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0;(0,a.Z)(this,e),this.rootDocument=i,this.defaultView=o,this.topLevelInspector=s,this.playwrightElementSelectorGenerator=void 0,this.hoveredElement=void 0,this.hoveredElementSelection=void 0,this.wasHoveredElementSelected=!1,this.selected=[],this.singleSelection=!0,this.subDocumentInspector=null,this.listening=!1,this.onMouseOver=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){var i,o,a,s,u,c,l;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!("getRootNode"in(i=r.composedPath()[0]))){e.next=6;break}if((o=i.getRootNode())===n.rootDocument){e.next=6;break}return n.handleSubDocument(o,n.defaultView),e.abrupt("return");case 6:if(!(i instanceof n.defaultView.HTMLIFrameElement)){e.next=9;break}return n.handleSubDocument(i.contentDocument,i.contentDocument.defaultView),e.abrupt("return");case 9:if(n.subDocumentInspector&&n.stopSubDocumentInspector(!0),i instanceof n.defaultView.Element){e.next=12;break}return e.abrupt("return");case 12:if(i!==n.hoveredElement&&!i.matches(".element-inspector-ignore")){e.next=14;break}return e.abrupt("return");case 14:return xo.clearHighlights(),n.hoveredElement&&n.hoveredElement.removeEventListener("click",n.onClick,{capture:!0}),e.next=18,n.playwrightElementSelectorGenerator.getSelectorAndLocator(i);case 18:return a=e.sent,s=a.locator,u=a.selector,c=a.parentFramesSelectors,xo.highlightElement(i,{text:s.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"]}),e.next=25,n.playwrightElementSelectorGenerator.selector(u,c);case 25:(l=e.sent)!==i&&xo.highlightElement(l,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"]}),n.hoveredElement=i,n.hoveredElementSelection={locator:s,selector:u,parentFramesSelectors:c},n.wasHoveredElementSelected=!1,i.addEventListener("click",n.onClick,{capture:!0});case 31:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.onClick=function(){var e=(0,r.Z)((0,t.Z)().mark((function e(r){return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.stopPropagation(),r.preventDefault(),!n.wasHoveredElementSelected){e.next=4;break}return e.abrupt("return");case 4:n.wasHoveredElementSelected=!0,n.selected.push(n.hoveredElementSelection),n.singleSelection&&(n.topLevelInspector?n.topLevelInspector.stop():n.stop()),console.log("selected",n.selected);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),this.handleSubDocument=function(t,r){var i;if(n.subDocumentInspector){if(n.subDocumentInspector.rootDocument===t)return!0;n.stopSubDocumentInspector(!0)}return n.subDocumentInspector=new e(t,r,null!==(i=n.topLevelInspector)&&void 0!==i?i:n),n.subDocumentInspector.start(n.singleSelection),!0},this.stopSubDocumentInspector=function(e){n.subDocumentInspector&&(n.subDocumentInspector.stop(e),n.subDocumentInspector=null)},this.playwrightElementSelectorGenerator=new de,o||(this.defaultView=this.rootDocument.nodeType===Node.DOCUMENT_NODE?this.rootDocument.defaultView:window)}return(0,s.Z)(e,[{key:"start",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.singleSelection=e,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.listening=!0}},{key:"stop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),xo.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}},{key:"cleanSelection",value:function(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}},{key:"consumeSelections",value:function(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();var e=this.selected;return this.cleanSelection(),e}}]),e}(),Fo=function(){function e(t){(0,a.Z)(this,e),this.timeMachine=t,this.eventHandlers=void 0,this.elementInspector=void 0,this.lengthOfConsumedInteractions=0,this.eventHandlers=new Lo}return(0,s.Z)(e,[{key:"init",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.timeMachine.setEventHandlers(this.eventHandlers,e)}},{key:"consumeInteractions",value:function(){var e=this.eventHandlers.getInteractions(this.lengthOfConsumedInteractions);return this.lengthOfConsumedInteractions+=e.length,e}},{key:"startInspector",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;this.elementInspector=new Zo(null!==t&&void 0!==t?t:this.getRRwebReplayerDocument()),this.elementInspector.start(e)}},{key:"getRRwebReplayerDocument",value:function(){return document.querySelector(".replayer-wrapper > iframe").contentDocument}},{key:"stopInspector",value:function(){this.elementInspector.stop()}},{key:"consumeSelections",value:function(){return this.elementInspector.consumeSelections()}}]),e}();if(function(){var e=Element.prototype.addEventListener;Element.prototype.addEventListener=function(t,n,r){e.call(this,t,n,r),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[t]||(this._checksum_eventListenerList[t]=[]),this._checksum_eventListenerList[t].push(n)}}(),!window.checksum){var Po=new _o,jo=new ni,Vo=new Ao,Bo=new No,Ho=new Fo(Bo);window.checksum={testGenerator:Po,sessionDigester:jo,goalTracker:Vo,timeMachine:Bo,visualTestGenerator:Ho}}var Wo=!!(0,i.v)().app,Uo=(0,i.v)().type||Wo?o.pR.App:void 0;function zo(){return(zo=(0,r.Z)((0,t.Z)().mark((function e(){var r;return(0,t.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=Uo||o.De.appType,e.next=e.t0===o.pR.App?3:e.t0===o.pR.Script?9:10;break;case 3:return e.next=5,Promise.all([n.e(542),n.e(341)]).then(n.bind(n,5745));case 5:return r=e.sent,(0,r.bootstrapApp)(),e.abrupt("break",10);case 9:return e.abrupt("break",10);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){zo.apply(this,arguments)}()}()}();
3
- //# sourceMappingURL=main.6e41703c.js.map
1
+ (()=>{var cS=Object.create;var ms=Object.defineProperty;var uS=Object.getOwnPropertyDescriptor;var dS=Object.getOwnPropertyNames;var fS=Object.getPrototypeOf,hS=Object.prototype.hasOwnProperty;var o=(n,e)=>ms(n,"name",{value:e,configurable:!0});var ps=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),mS=(n,e)=>{for(var t in e)ms(n,t,{get:e[t],enumerable:!0})},pS=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of dS(e))!hS.call(n,a)&&a!==t&&ms(n,a,{get:()=>e[a],enumerable:!(i=uS(e,a))||i.enumerable});return n};var ni=(n,e,t)=>(t=n!=null?cS(fS(n)):{},pS(e||!n||!n.__esModule?ms(t,"default",{value:n,enumerable:!0}):t,n));var Gd=ps((Ms,tl)=>{(function(n,e){typeof Ms=="object"&&typeof tl=="object"?tl.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Ms=="object"?Ms.resq=e():(n.window=n.window||{},n.window.resq=e())})(window,function(){return function(n){var e={};function t(i){if(e[i])return e[i].exports;var a=e[i]={i,l:!1,exports:{}};return n[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}return o(t,"r"),t.m=n,t.c=e,t.d=function(i,a,l){t.o(i,a)||Object.defineProperty(i,a,{enumerable:!0,get:l})},t.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t.t=function(i,a){if(1&a&&(i=t(i)),8&a||4&a&&typeof i=="object"&&i&&i.__esModule)return i;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:i}),2&a&&typeof i!="string")for(var u in i)t.d(l,u,function(d){return i[d]}.bind(null,u));return l},t.n=function(i){var a=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(a,"a",a),a},t.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},t.p="",t(t.s=16)}([function(n,e,t){"use strict";t.d(e,"a",function(){return F}),t.d(e,"d",function(){return X}),t.d(e,"b",function(){return se}),t.d(e,"c",function(){return he});var i=t(1),a=t.n(i),l=t(14),u=t.n(l),d=t(2),f=t.n(d),h=t(15),p=t.n(h);function v(V,W){var K=Object.keys(V);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(V);W&&(Y=Y.filter(function(z){return Object.getOwnPropertyDescriptor(V,z).enumerable})),K.push.apply(K,Y)}return K}o(v,"l");var y=Array.isArray,w=Object.keys;function M(V){return typeof V=="function"}o(M,"x");function b(V){return V instanceof HTMLElement||V instanceof Text}o(b,"y");function R(V){return f()(V)==="object"&&!y(V)}o(R,"h");function T(V){if(!V||typeof V=="string")return V;var W=function(K){for(var Y=1;Y<arguments.length;Y++){var z=arguments[Y]!=null?arguments[Y]:{};Y%2?v(Object(z),!0).forEach(function(J){u()(K,J,z[J])}):Object.getOwnPropertyDescriptors?Object.defineProperties(K,Object.getOwnPropertyDescriptors(z)):v(Object(z)).forEach(function(J){Object.defineProperty(K,J,Object.getOwnPropertyDescriptor(z,J))})}return K}({},V);return delete W.children,W}o(T,"b");function _(V,W){var K=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return!(!y(V)||!y(W))&&(K?V.length===W.length&&!V.find(function(Y){return!W.includes(Y)}):V.some(function(Y){return W.includes(Y)}))}o(_,"v");function C(){var V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},W=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},K=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Y=[];if(!w(V).length)return!0;if(W===null||!w(W).length)return!1;if(K)return p()(V,W);var z=w(V).filter(function(J){return w(W).includes(J)});return z.forEach(function(J){R(V[J])&&R(W[J])&&(Y=Y.concat(C(V[J],W[J]))),(V[J]===W[J]||_(V[J],W[J]))&&Y.push(W)}),Y.length>0&&Y.filter(function(J){return J}).length===z.length}o(C,"_");function F(V){var W,K={children:[]};if(!V)return K;K.name=M(W=V.type)?W.displayName||W.name:W,K.props=T(V.memoizedProps),K.state=function(z){if(z){var J=z.baseState;return J||z}}(V.memoizedState);var Y=V.child;if(Y)for(K.children.push(Y);Y.sibling;)K.children.push(Y.sibling),Y=Y.sibling;return K.children=K.children.map(function(z){return F(z)}),M(V.type)&&function(z){return z.children.length>1}(K)?(K.node=function(z){return z.children.map(function(J){return J.node}).filter(function(J){return!!J})}(K),K.isFragment=!0):K.node=function(z){return b(z.stateNode)?z.stateNode:z.child&&b(z.child.stateNode)?z.child.stateNode:null}(V),K}o(F,"m");function G(V){for(;V.length;){var W=V.shift();if(W.node)return W.node;W.children&&Array.isArray(W.children)&&V.push.apply(V,a()(W.children))}}o(G,"g");function Q(V,W){for(var K=[];V.length;){var Y=V.shift().children;Y&&Array.isArray(Y)&&Y.forEach(function(z){W(z)&&(!z.node&&Array.isArray(z.children)&&(z.node=G(z.children.concat([]))),K.push(z)),V.push(z)})}return K}o(Q,"O");function le(V,W){var K=function(Y){if(Y){var z=Y.split("(");return z.length===1?Y:z.find(function(J){return J.includes(")")}).replace(/\)*/g,"")}}(W);return new RegExp("^"+V.split("*").map(function(Y){return Y.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}).join(".+")+"$").test(K)}o(le,"w");function X(V,W){var K=arguments.length>3?arguments[3]:void 0;return V.reduce(function(Y,z){return Y.concat(Q(Y,K&&typeof K=="function"?K:function(J){return typeof J.name=="string"?le(z,J.name):J.name!==null&&f()(J.name)==="object"&&le(z,J.name.displayName)}))},[W])}o(X,"j");function se(V,W,K){var Y=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return M(K)?(console.warn("Functions are not supported as filter matchers"),[]):V.filter(function(z){return R(K)&&C(K,z[W],Y)||y(K)&&_(K,z[W],Y)||z[W]===K})}o(se,"M");function he(V){if(V.hasOwnProperty("_reactRootContainer"))return V._reactRootContainer._internalRoot.current;var W=Object.keys(V).find(function(K){return K.startsWith("__reactInternalInstance")||K.startsWith("__reactFiber")||K.startsWith("__reactContainer")});return W?V[W]:void 0}o(he,"P")},function(n,e,t){var i=t(17),a=t(18),l=t(19),u=t(20);n.exports=function(d){return i(d)||a(d)||l(d)||u()},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?(n.exports=t=o(function(a){return typeof a},"r"),n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=t=o(function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},"r"),n.exports.default=n.exports,n.exports.__esModule=!0),t(i)}o(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(i){return n.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},n.exports.default=n.exports,n.exports.__esModule=!0,t(i)}o(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(i,a){for(var l=0;l<a.length;l++){var u=a[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(i,u.key,u)}}o(t,"r"),n.exports=function(i,a,l){return a&&t(i.prototype,a),l&&t(i,l),i},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(i,a){return n.exports=t=Object.setPrototypeOf||function(l,u){return l.__proto__=u,l},n.exports.default=n.exports,n.exports.__esModule=!0,t(i,a)}o(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var i=t(6);n.exports=function(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),l&&i(a,l)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var i=t(3),a=t(6),l=t(22),u=t(23);function d(f){var h=typeof Map=="function"?new Map:void 0;return n.exports=d=o(function(p){if(p===null||!l(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(h!==void 0){if(h.has(p))return h.get(p);h.set(p,v)}function v(){return u(p,arguments,i(this).constructor)}return o(v,"e"),v.prototype=Object.create(p.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),a(v,p)},"c"),n.exports.default=n.exports,n.exports.__esModule=!0,d(f)}o(d,"c"),n.exports=d,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){var t;t=function(){return this}();try{t=t||new Function("return this")()}catch{typeof window=="object"&&(t=window)}n.exports=t},function(n,e){n.exports=function(t,i){(i==null||i>t.length)&&(i=t.length);for(var a=0,l=new Array(i);a<i;a++)l[a]=t[a];return l},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";(function(i){t.d(e,"a",function(){return l});var a=t(0);function l(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3,d=arguments.length>1?arguments[1]:void 0;if(i.isReactLoaded)return Promise.resolve("React already loaded");var f=o(function(){var h=document.createTreeWalker(document);if(d)return document.querySelector(d);for(;h.nextNode();)if(h.currentNode.hasOwnProperty("_reactRootContainer"))return h.currentNode},"o");return new Promise(function(h,p){var v=!1,y=null;o(function w(){var M=f();if(M&&(i.isReactLoaded=!0,i.rootReactElement=Object(a.c)(M),i.rootReactElement))return clearTimeout(y),h();v||setTimeout(w,200)},"e")(),y=setTimeout(function(){v=!0,p("Timed out")},u)})}o(l,"o")}).call(this,t(9))},function(n,e,t){"use strict";t.d(e,"a",function(){return G});var i=t(1),a=t.n(i),l=t(4),u=t.n(l),d=t(5),f=t.n(d),h=t(7),p=t.n(h),v=t(13),y=t.n(v),w=t(3),M=t.n(w),b=t(8),R=t.n(b),T=t(0);function _(Q){var le=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var X,se=M()(Q);if(le){var he=M()(this).constructor;X=Reflect.construct(se,arguments,he)}else X=se.apply(this,arguments);return y()(this,X)}}o(_,"v");var C=function(Q){p()(X,Q);var le=_(X);function X(se){return u()(this,X),se||(se=[]),le.call.apply(le,[this].concat(a()(se)))}return o(X,"r"),f()(X,[{key:"byProps",value:o(function(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},V=he.exact,W=Object(T.b)(this,"props",se,V);return new X(W)},"value")},{key:"byState",value:o(function(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},V=he.exact,W=Object(T.b)(this,"state",se,V);return new X(W)},"value")}]),X}(R()(Array)),F=function(Q){p()(X,Q);var le=_(X);function X(se,he){var V;for(var W in u()(this,X),(V=le.call(this,se))._nodes=he,se)V[W]=se[W];return V}return o(X,"r"),f()(X,[{key:"byProps",value:o(function(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},V=he.exact,W=Object(T.b)(this._nodes,"props",se,V)[0];return new X(W,this._nodes)},"value")},{key:"byState",value:o(function(se){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},V=he.exact,W=Object(T.b)(this._nodes,"state",se,V)[0];return new X(W,this._nodes)},"value")}]),X}(R()(Object)),G=function(){function Q(le,X){u()(this,Q),this.selectors=le.split(" ").filter(function(se){return!!se}).map(function(se){return se.trim()}),this.rootComponent=X,this.tree=Object(T.a)(this.rootComponent)}return o(Q,"t"),f()(Q,[{key:"find",value:o(function(){return this.nodes=new C(Object(T.d)(this.selectors,this.tree,!0)),new F(this.nodes[0],this.nodes)},"value")},{key:"findAll",value:o(function(){return new C(Object(T.d)(this.selectors,this.tree))},"value")}]),Q}()},function(n,e,t){var i=t(2).default,a=t(21);n.exports=function(l,u){return!u||i(u)!=="object"&&typeof u!="function"?a(l):u},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,i,a){return i in t?Object.defineProperty(t,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[i]=a,t},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";var i=Array.isArray,a=Object.keys,l=Object.prototype.hasOwnProperty;n.exports=o(function u(d,f){if(d===f)return!0;if(d&&f&&typeof d=="object"&&typeof f=="object"){var h,p,v,y=i(d),w=i(f);if(y&&w){if((p=d.length)!=f.length)return!1;for(h=p;h--!=0;)if(!u(d[h],f[h]))return!1;return!0}if(y!=w)return!1;var M=d instanceof Date,b=f instanceof Date;if(M!=b)return!1;if(M&&b)return d.getTime()==f.getTime();var R=d instanceof RegExp,T=f instanceof RegExp;if(R!=T)return!1;if(R&&T)return d.toString()==f.toString();var _=a(d);if((p=_.length)!==a(f).length)return!1;for(h=p;h--!=0;)if(!l.call(f,_[h]))return!1;for(h=p;h--!=0;)if(!u(d[v=_[h]],f[v]))return!1;return!0}return d!=d&&f!=f},"t")},function(n,e,t){"use strict";t.r(e),function(i){t.d(e,"resq$",function(){return f}),t.d(e,"resq$$",function(){return h});var a=t(12),l=t(11);t.d(e,"waitToLoadReact",function(){return l.a});var u=t(0);function d(p,v,y){if(!y&&!i.isReactLoaded)throw new Error("Could not find the root element of your application");var w=i.rootReactElement;if(y instanceof HTMLElement&&(w=Object(u.c)(y)),!w)throw new Error("Could not find instance of React in given element");return new a.a(p,w)[v]()}o(d,"i");function f(p,v){return d(p,"find",v)}o(f,"c");function h(p,v){return d(p,"findAll",v)}o(h,"f")}.call(this,t(9))},function(n,e,t){var i=t(10);n.exports=function(a){if(Array.isArray(a))return i(a)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var i=t(10);n.exports=function(a,l){if(a){if(typeof a=="string")return i(a,l);var u=Object.prototype.toString.call(a).slice(8,-1);return u==="Object"&&a.constructor&&(u=a.constructor.name),u==="Map"||u==="Set"?Array.from(a):u==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(u)?i(a,l):void 0}},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t){return Function.toString.call(t).indexOf("[native code]")!==-1},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var i=t(6),a=t(24);function l(u,d,f){return a()?(n.exports=l=Reflect.construct,n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=l=o(function(h,p,v){var y=[null];y.push.apply(y,p);var w=new(Function.bind.apply(h,y));return v&&i(w,v.prototype),w},"u"),n.exports.default=n.exports,n.exports.__esModule=!0),l.apply(null,arguments)}o(l,"u"),n.exports=l,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}},n.exports.default=n.exports,n.exports.__esModule=!0}])})});var oo=ps(($C,hh)=>{hh.exports=n=>new Promise(e=>setTimeout(e,n))});var gh=ps((Or,wi)=>{(function(){var n,e="4.17.21",t=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",l="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",d=500,f="__lodash_placeholder__",h=1,p=2,v=4,y=1,w=2,M=1,b=2,R=4,T=8,_=16,C=32,F=64,G=128,Q=256,le=512,X=30,se="...",he=800,V=16,W=1,K=2,Y=3,z=1/0,J=9007199254740991,ve=17976931348623157e292,et=NaN,Ue=4294967295,B=Ue-1,P=Ue>>>1,te=[["ary",G],["bind",M],["bindKey",b],["curry",T],["curryRight",_],["flip",le],["partial",C],["partialRight",F],["rearg",Q]],ee="[object Arguments]",Oe="[object Array]",ut="[object AsyncFunction]",Xe="[object Boolean]",it="[object Date]",en="[object DOMException]",hn="[object Error]",tn="[object Function]",Me="[object GeneratorFunction]",Pe="[object Map]",Ce="[object Number]",ke="[object Null]",Ge="[object Object]",Te="[object Promise]",Fr="[object Proxy]",Pr="[object RegExp]",kt="[object Set]",Hr="[object String]",Ti="[object Symbol]",Rh="[object Undefined]",Wr="[object WeakMap]",Ah="[object WeakSet]",Br="[object ArrayBuffer]",nr="[object DataView]",Ao="[object Float32Array]",_o="[object Float64Array]",Do="[object Int8Array]",No="[object Int16Array]",Lo="[object Int32Array]",Oo="[object Uint8Array]",ko="[object Uint8ClampedArray]",Fo="[object Uint16Array]",Po="[object Uint32Array]",_h=/\b__p \+= '';/g,Dh=/\b(__p \+=) '' \+/g,Nh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,sc=/&(?:amp|lt|gt|quot|#39);/g,oc=/[&<>"']/g,Lh=RegExp(sc.source),Oh=RegExp(oc.source),kh=/<%-([\s\S]+?)%>/g,Fh=/<%([\s\S]+?)%>/g,ac=/<%=([\s\S]+?)%>/g,Ph=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hh=/^\w*$/,Wh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ho=/[\\^$.*+?()[\]{}|]/g,Bh=RegExp(Ho.source),Wo=/^\s+/,Vh=/\s/,Uh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gh=/\{\n\/\* \[wrapped with (.+)\] \*/,$h=/,? & /,qh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zh=/[()=,{}\[\]\/\s]/,jh=/\\(\\)?/g,Kh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lc=/\w*$/,Yh=/^[-+]0x[0-9a-f]+$/i,Qh=/^0b[01]+$/i,Xh=/^\[object .+?Constructor\]$/,Zh=/^0o[0-7]+$/i,Jh=/^(?:0|[1-9]\d*)$/,em=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ii=/($^)/,tm=/['\n\r\u2028\u2029\\]/g,Ci="\\ud800-\\udfff",nm="\\u0300-\\u036f",rm="\\ufe20-\\ufe2f",im="\\u20d0-\\u20ff",cc=nm+rm+im,uc="\\u2700-\\u27bf",dc="a-z\\xdf-\\xf6\\xf8-\\xff",sm="\\xac\\xb1\\xd7\\xf7",om="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",am="\\u2000-\\u206f",lm=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fc="A-Z\\xc0-\\xd6\\xd8-\\xde",hc="\\ufe0e\\ufe0f",mc=sm+om+am+lm,Bo="['\u2019]",cm="["+Ci+"]",pc="["+mc+"]",Ri="["+cc+"]",gc="\\d+",um="["+uc+"]",vc="["+dc+"]",yc="[^"+Ci+mc+gc+uc+dc+fc+"]",Vo="\\ud83c[\\udffb-\\udfff]",dm="(?:"+Ri+"|"+Vo+")",Ec="[^"+Ci+"]",Uo="(?:\\ud83c[\\udde6-\\uddff]){2}",Go="[\\ud800-\\udbff][\\udc00-\\udfff]",rr="["+fc+"]",bc="\\u200d",Sc="(?:"+vc+"|"+yc+")",fm="(?:"+rr+"|"+yc+")",wc="(?:"+Bo+"(?:d|ll|m|re|s|t|ve))?",Mc="(?:"+Bo+"(?:D|LL|M|RE|S|T|VE))?",xc=dm+"?",Tc="["+hc+"]?",hm="(?:"+bc+"(?:"+[Ec,Uo,Go].join("|")+")"+Tc+xc+")*",mm="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pm="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ic=Tc+xc+hm,gm="(?:"+[um,Uo,Go].join("|")+")"+Ic,vm="(?:"+[Ec+Ri+"?",Ri,Uo,Go,cm].join("|")+")",ym=RegExp(Bo,"g"),Em=RegExp(Ri,"g"),$o=RegExp(Vo+"(?="+Vo+")|"+vm+Ic,"g"),bm=RegExp([rr+"?"+vc+"+"+wc+"(?="+[pc,rr,"$"].join("|")+")",fm+"+"+Mc+"(?="+[pc,rr+Sc,"$"].join("|")+")",rr+"?"+Sc+"+"+wc,rr+"+"+Mc,pm,mm,gc,gm].join("|"),"g"),Sm=RegExp("["+bc+Ci+cc+hc+"]"),wm=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Mm=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],xm=-1,Ne={};Ne[Ao]=Ne[_o]=Ne[Do]=Ne[No]=Ne[Lo]=Ne[Oo]=Ne[ko]=Ne[Fo]=Ne[Po]=!0,Ne[ee]=Ne[Oe]=Ne[Br]=Ne[Xe]=Ne[nr]=Ne[it]=Ne[hn]=Ne[tn]=Ne[Pe]=Ne[Ce]=Ne[Ge]=Ne[Pr]=Ne[kt]=Ne[Hr]=Ne[Wr]=!1;var _e={};_e[ee]=_e[Oe]=_e[Br]=_e[nr]=_e[Xe]=_e[it]=_e[Ao]=_e[_o]=_e[Do]=_e[No]=_e[Lo]=_e[Pe]=_e[Ce]=_e[Ge]=_e[Pr]=_e[kt]=_e[Hr]=_e[Ti]=_e[Oo]=_e[ko]=_e[Fo]=_e[Po]=!0,_e[hn]=_e[tn]=_e[Wr]=!1;var Tm={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Im={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cm={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Rm={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Am=parseFloat,_m=parseInt,Cc=typeof global=="object"&&global&&global.Object===Object&&global,Dm=typeof self=="object"&&self&&self.Object===Object&&self,Ye=Cc||Dm||Function("return this")(),qo=typeof Or=="object"&&Or&&!Or.nodeType&&Or,On=qo&&typeof wi=="object"&&wi&&!wi.nodeType&&wi,Rc=On&&On.exports===qo,zo=Rc&&Cc.process,Ct=function(){try{var A=On&&On.require&&On.require("util").types;return A||zo&&zo.binding&&zo.binding("util")}catch{}}(),Ac=Ct&&Ct.isArrayBuffer,_c=Ct&&Ct.isDate,Dc=Ct&&Ct.isMap,Nc=Ct&&Ct.isRegExp,Lc=Ct&&Ct.isSet,Oc=Ct&&Ct.isTypedArray;function yt(A,L,N){switch(N.length){case 0:return A.call(L);case 1:return A.call(L,N[0]);case 2:return A.call(L,N[0],N[1]);case 3:return A.call(L,N[0],N[1],N[2])}return A.apply(L,N)}o(yt,"apply");function Nm(A,L,N,j){for(var ce=-1,xe=A==null?0:A.length;++ce<xe;){var je=A[ce];L(j,je,N(je),A)}return j}o(Nm,"arrayAggregator");function Rt(A,L){for(var N=-1,j=A==null?0:A.length;++N<j&&L(A[N],N,A)!==!1;);return A}o(Rt,"arrayEach");function Lm(A,L){for(var N=A==null?0:A.length;N--&&L(A[N],N,A)!==!1;);return A}o(Lm,"arrayEachRight");function kc(A,L){for(var N=-1,j=A==null?0:A.length;++N<j;)if(!L(A[N],N,A))return!1;return!0}o(kc,"arrayEvery");function mn(A,L){for(var N=-1,j=A==null?0:A.length,ce=0,xe=[];++N<j;){var je=A[N];L(je,N,A)&&(xe[ce++]=je)}return xe}o(mn,"arrayFilter");function Ai(A,L){var N=A==null?0:A.length;return!!N&&ir(A,L,0)>-1}o(Ai,"arrayIncludes");function jo(A,L,N){for(var j=-1,ce=A==null?0:A.length;++j<ce;)if(N(L,A[j]))return!0;return!1}o(jo,"arrayIncludesWith");function Fe(A,L){for(var N=-1,j=A==null?0:A.length,ce=Array(j);++N<j;)ce[N]=L(A[N],N,A);return ce}o(Fe,"arrayMap");function pn(A,L){for(var N=-1,j=L.length,ce=A.length;++N<j;)A[ce+N]=L[N];return A}o(pn,"arrayPush");function Ko(A,L,N,j){var ce=-1,xe=A==null?0:A.length;for(j&&xe&&(N=A[++ce]);++ce<xe;)N=L(N,A[ce],ce,A);return N}o(Ko,"arrayReduce");function Om(A,L,N,j){var ce=A==null?0:A.length;for(j&&ce&&(N=A[--ce]);ce--;)N=L(N,A[ce],ce,A);return N}o(Om,"arrayReduceRight");function Yo(A,L){for(var N=-1,j=A==null?0:A.length;++N<j;)if(L(A[N],N,A))return!0;return!1}o(Yo,"arraySome");var km=Qo("length");function Fm(A){return A.split("")}o(Fm,"asciiToArray");function Pm(A){return A.match(qh)||[]}o(Pm,"asciiWords");function Fc(A,L,N){var j;return N(A,function(ce,xe,je){if(L(ce,xe,je))return j=xe,!1}),j}o(Fc,"baseFindKey");function _i(A,L,N,j){for(var ce=A.length,xe=N+(j?1:-1);j?xe--:++xe<ce;)if(L(A[xe],xe,A))return xe;return-1}o(_i,"baseFindIndex");function ir(A,L,N){return L===L?Ym(A,L,N):_i(A,Pc,N)}o(ir,"baseIndexOf");function Hm(A,L,N,j){for(var ce=N-1,xe=A.length;++ce<xe;)if(j(A[ce],L))return ce;return-1}o(Hm,"baseIndexOfWith");function Pc(A){return A!==A}o(Pc,"baseIsNaN");function Hc(A,L){var N=A==null?0:A.length;return N?Zo(A,L)/N:et}o(Hc,"baseMean");function Qo(A){return function(L){return L==null?n:L[A]}}o(Qo,"baseProperty");function Xo(A){return function(L){return A==null?n:A[L]}}o(Xo,"basePropertyOf");function Wc(A,L,N,j,ce){return ce(A,function(xe,je,Ae){N=j?(j=!1,xe):L(N,xe,je,Ae)}),N}o(Wc,"baseReduce");function Wm(A,L){var N=A.length;for(A.sort(L);N--;)A[N]=A[N].value;return A}o(Wm,"baseSortBy");function Zo(A,L){for(var N,j=-1,ce=A.length;++j<ce;){var xe=L(A[j]);xe!==n&&(N=N===n?xe:N+xe)}return N}o(Zo,"baseSum");function Jo(A,L){for(var N=-1,j=Array(A);++N<A;)j[N]=L(N);return j}o(Jo,"baseTimes");function Bm(A,L){return Fe(L,function(N){return[N,A[N]]})}o(Bm,"baseToPairs");function Bc(A){return A&&A.slice(0,$c(A)+1).replace(Wo,"")}o(Bc,"baseTrim");function Et(A){return function(L){return A(L)}}o(Et,"baseUnary");function ea(A,L){return Fe(L,function(N){return A[N]})}o(ea,"baseValues");function Vr(A,L){return A.has(L)}o(Vr,"cacheHas");function Vc(A,L){for(var N=-1,j=A.length;++N<j&&ir(L,A[N],0)>-1;);return N}o(Vc,"charsStartIndex");function Uc(A,L){for(var N=A.length;N--&&ir(L,A[N],0)>-1;);return N}o(Uc,"charsEndIndex");function Vm(A,L){for(var N=A.length,j=0;N--;)A[N]===L&&++j;return j}o(Vm,"countHolders");var Um=Xo(Tm),Gm=Xo(Im);function $m(A){return"\\"+Rm[A]}o($m,"escapeStringChar");function qm(A,L){return A==null?n:A[L]}o(qm,"getValue");function sr(A){return Sm.test(A)}o(sr,"hasUnicode");function zm(A){return wm.test(A)}o(zm,"hasUnicodeWord");function jm(A){for(var L,N=[];!(L=A.next()).done;)N.push(L.value);return N}o(jm,"iteratorToArray");function ta(A){var L=-1,N=Array(A.size);return A.forEach(function(j,ce){N[++L]=[ce,j]}),N}o(ta,"mapToArray");function Gc(A,L){return function(N){return A(L(N))}}o(Gc,"overArg");function gn(A,L){for(var N=-1,j=A.length,ce=0,xe=[];++N<j;){var je=A[N];(je===L||je===f)&&(A[N]=f,xe[ce++]=N)}return xe}o(gn,"replaceHolders");function Di(A){var L=-1,N=Array(A.size);return A.forEach(function(j){N[++L]=j}),N}o(Di,"setToArray");function Km(A){var L=-1,N=Array(A.size);return A.forEach(function(j){N[++L]=[j,j]}),N}o(Km,"setToPairs");function Ym(A,L,N){for(var j=N-1,ce=A.length;++j<ce;)if(A[j]===L)return j;return-1}o(Ym,"strictIndexOf");function Qm(A,L,N){for(var j=N+1;j--;)if(A[j]===L)return j;return j}o(Qm,"strictLastIndexOf");function or(A){return sr(A)?Zm(A):km(A)}o(or,"stringSize");function Ft(A){return sr(A)?Jm(A):Fm(A)}o(Ft,"stringToArray");function $c(A){for(var L=A.length;L--&&Vh.test(A.charAt(L)););return L}o($c,"trimmedEndIndex");var Xm=Xo(Cm);function Zm(A){for(var L=$o.lastIndex=0;$o.test(A);)++L;return L}o(Zm,"unicodeSize");function Jm(A){return A.match($o)||[]}o(Jm,"unicodeToArray");function ep(A){return A.match(bm)||[]}o(ep,"unicodeWords");var tp=o(function A(L){L=L==null?Ye:vn.defaults(Ye.Object(),L,vn.pick(Ye,Mm));var N=L.Array,j=L.Date,ce=L.Error,xe=L.Function,je=L.Math,Ae=L.Object,na=L.RegExp,np=L.String,At=L.TypeError,Ni=N.prototype,rp=xe.prototype,ar=Ae.prototype,Li=L["__core-js_shared__"],Oi=rp.toString,Re=ar.hasOwnProperty,ip=0,qc=function(){var r=/[^.]+$/.exec(Li&&Li.keys&&Li.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),ki=ar.toString,sp=Oi.call(Ae),op=Ye._,ap=na("^"+Oi.call(Re).replace(Ho,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fi=Rc?L.Buffer:n,yn=L.Symbol,Pi=L.Uint8Array,zc=Fi?Fi.allocUnsafe:n,Hi=Gc(Ae.getPrototypeOf,Ae),jc=Ae.create,Kc=ar.propertyIsEnumerable,Wi=Ni.splice,Yc=yn?yn.isConcatSpreadable:n,Ur=yn?yn.iterator:n,kn=yn?yn.toStringTag:n,Bi=function(){try{var r=Bn(Ae,"defineProperty");return r({},"",{}),r}catch{}}(),lp=L.clearTimeout!==Ye.clearTimeout&&L.clearTimeout,cp=j&&j.now!==Ye.Date.now&&j.now,up=L.setTimeout!==Ye.setTimeout&&L.setTimeout,Vi=je.ceil,Ui=je.floor,ra=Ae.getOwnPropertySymbols,dp=Fi?Fi.isBuffer:n,Qc=L.isFinite,fp=Ni.join,hp=Gc(Ae.keys,Ae),Ke=je.max,tt=je.min,mp=j.now,pp=L.parseInt,Xc=je.random,gp=Ni.reverse,ia=Bn(L,"DataView"),Gr=Bn(L,"Map"),sa=Bn(L,"Promise"),lr=Bn(L,"Set"),$r=Bn(L,"WeakMap"),qr=Bn(Ae,"create"),Gi=$r&&new $r,cr={},vp=Vn(ia),yp=Vn(Gr),Ep=Vn(sa),bp=Vn(lr),Sp=Vn($r),$i=yn?yn.prototype:n,zr=$i?$i.valueOf:n,Zc=$i?$i.toString:n;function E(r){if(We(r)&&!ue(r)&&!(r instanceof ye)){if(r instanceof _t)return r;if(Re.call(r,"__wrapped__"))return Ju(r)}return new _t(r)}o(E,"lodash");var ur=function(){function r(){}return o(r,"object"),function(s){if(!He(s))return{};if(jc)return jc(s);r.prototype=s;var c=new r;return r.prototype=n,c}}();function qi(){}o(qi,"baseLodash");function _t(r,s){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=n}o(_t,"LodashWrapper"),E.templateSettings={escape:kh,evaluate:Fh,interpolate:ac,variable:"",imports:{_:E}},E.prototype=qi.prototype,E.prototype.constructor=E,_t.prototype=ur(qi.prototype),_t.prototype.constructor=_t;function ye(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ue,this.__views__=[]}o(ye,"LazyWrapper");function wp(){var r=new ye(this.__wrapped__);return r.__actions__=dt(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=dt(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=dt(this.__views__),r}o(wp,"lazyClone");function Mp(){if(this.__filtered__){var r=new ye(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}o(Mp,"lazyReverse");function xp(){var r=this.__wrapped__.value(),s=this.__dir__,c=ue(r),m=s<0,g=c?r.length:0,S=Fg(0,g,this.__views__),x=S.start,I=S.end,D=I-x,O=m?I:x-1,k=this.__iteratees__,H=k.length,q=0,Z=tt(D,this.__takeCount__);if(!c||!m&&g==D&&Z==D)return wu(r,this.__actions__);var re=[];e:for(;D--&&q<Z;){O+=s;for(var fe=-1,ie=r[O];++fe<H;){var ge=k[fe],Se=ge.iteratee,wt=ge.type,at=Se(ie);if(wt==K)ie=at;else if(!at){if(wt==W)continue e;break e}}re[q++]=ie}return re}o(xp,"lazyValue"),ye.prototype=ur(qi.prototype),ye.prototype.constructor=ye;function Fn(r){var s=-1,c=r==null?0:r.length;for(this.clear();++s<c;){var m=r[s];this.set(m[0],m[1])}}o(Fn,"Hash");function Tp(){this.__data__=qr?qr(null):{},this.size=0}o(Tp,"hashClear");function Ip(r){var s=this.has(r)&&delete this.__data__[r];return this.size-=s?1:0,s}o(Ip,"hashDelete");function Cp(r){var s=this.__data__;if(qr){var c=s[r];return c===u?n:c}return Re.call(s,r)?s[r]:n}o(Cp,"hashGet");function Rp(r){var s=this.__data__;return qr?s[r]!==n:Re.call(s,r)}o(Rp,"hashHas");function Ap(r,s){var c=this.__data__;return this.size+=this.has(r)?0:1,c[r]=qr&&s===n?u:s,this}o(Ap,"hashSet"),Fn.prototype.clear=Tp,Fn.prototype.delete=Ip,Fn.prototype.get=Cp,Fn.prototype.has=Rp,Fn.prototype.set=Ap;function nn(r){var s=-1,c=r==null?0:r.length;for(this.clear();++s<c;){var m=r[s];this.set(m[0],m[1])}}o(nn,"ListCache");function _p(){this.__data__=[],this.size=0}o(_p,"listCacheClear");function Dp(r){var s=this.__data__,c=zi(s,r);if(c<0)return!1;var m=s.length-1;return c==m?s.pop():Wi.call(s,c,1),--this.size,!0}o(Dp,"listCacheDelete");function Np(r){var s=this.__data__,c=zi(s,r);return c<0?n:s[c][1]}o(Np,"listCacheGet");function Lp(r){return zi(this.__data__,r)>-1}o(Lp,"listCacheHas");function Op(r,s){var c=this.__data__,m=zi(c,r);return m<0?(++this.size,c.push([r,s])):c[m][1]=s,this}o(Op,"listCacheSet"),nn.prototype.clear=_p,nn.prototype.delete=Dp,nn.prototype.get=Np,nn.prototype.has=Lp,nn.prototype.set=Op;function rn(r){var s=-1,c=r==null?0:r.length;for(this.clear();++s<c;){var m=r[s];this.set(m[0],m[1])}}o(rn,"MapCache");function kp(){this.size=0,this.__data__={hash:new Fn,map:new(Gr||nn),string:new Fn}}o(kp,"mapCacheClear");function Fp(r){var s=is(this,r).delete(r);return this.size-=s?1:0,s}o(Fp,"mapCacheDelete");function Pp(r){return is(this,r).get(r)}o(Pp,"mapCacheGet");function Hp(r){return is(this,r).has(r)}o(Hp,"mapCacheHas");function Wp(r,s){var c=is(this,r),m=c.size;return c.set(r,s),this.size+=c.size==m?0:1,this}o(Wp,"mapCacheSet"),rn.prototype.clear=kp,rn.prototype.delete=Fp,rn.prototype.get=Pp,rn.prototype.has=Hp,rn.prototype.set=Wp;function Pn(r){var s=-1,c=r==null?0:r.length;for(this.__data__=new rn;++s<c;)this.add(r[s])}o(Pn,"SetCache");function Bp(r){return this.__data__.set(r,u),this}o(Bp,"setCacheAdd");function Vp(r){return this.__data__.has(r)}o(Vp,"setCacheHas"),Pn.prototype.add=Pn.prototype.push=Bp,Pn.prototype.has=Vp;function Pt(r){var s=this.__data__=new nn(r);this.size=s.size}o(Pt,"Stack");function Up(){this.__data__=new nn,this.size=0}o(Up,"stackClear");function Gp(r){var s=this.__data__,c=s.delete(r);return this.size=s.size,c}o(Gp,"stackDelete");function $p(r){return this.__data__.get(r)}o($p,"stackGet");function qp(r){return this.__data__.has(r)}o(qp,"stackHas");function zp(r,s){var c=this.__data__;if(c instanceof nn){var m=c.__data__;if(!Gr||m.length<t-1)return m.push([r,s]),this.size=++c.size,this;c=this.__data__=new rn(m)}return c.set(r,s),this.size=c.size,this}o(zp,"stackSet"),Pt.prototype.clear=Up,Pt.prototype.delete=Gp,Pt.prototype.get=$p,Pt.prototype.has=qp,Pt.prototype.set=zp;function Jc(r,s){var c=ue(r),m=!c&&Un(r),g=!c&&!m&&Mn(r),S=!c&&!m&&!g&&mr(r),x=c||m||g||S,I=x?Jo(r.length,np):[],D=I.length;for(var O in r)(s||Re.call(r,O))&&!(x&&(O=="length"||g&&(O=="offset"||O=="parent")||S&&(O=="buffer"||O=="byteLength"||O=="byteOffset")||ln(O,D)))&&I.push(O);return I}o(Jc,"arrayLikeKeys");function eu(r){var s=r.length;return s?r[ga(0,s-1)]:n}o(eu,"arraySample");function jp(r,s){return ss(dt(r),Hn(s,0,r.length))}o(jp,"arraySampleSize");function Kp(r){return ss(dt(r))}o(Kp,"arrayShuffle");function oa(r,s,c){(c!==n&&!Ht(r[s],c)||c===n&&!(s in r))&&sn(r,s,c)}o(oa,"assignMergeValue");function jr(r,s,c){var m=r[s];(!(Re.call(r,s)&&Ht(m,c))||c===n&&!(s in r))&&sn(r,s,c)}o(jr,"assignValue");function zi(r,s){for(var c=r.length;c--;)if(Ht(r[c][0],s))return c;return-1}o(zi,"assocIndexOf");function Yp(r,s,c,m){return En(r,function(g,S,x){s(m,g,c(g),x)}),m}o(Yp,"baseAggregator");function tu(r,s){return r&&zt(s,Qe(s),r)}o(tu,"baseAssign");function Qp(r,s){return r&&zt(s,ht(s),r)}o(Qp,"baseAssignIn");function sn(r,s,c){s=="__proto__"&&Bi?Bi(r,s,{configurable:!0,enumerable:!0,value:c,writable:!0}):r[s]=c}o(sn,"baseAssignValue");function aa(r,s){for(var c=-1,m=s.length,g=N(m),S=r==null;++c<m;)g[c]=S?n:Va(r,s[c]);return g}o(aa,"baseAt");function Hn(r,s,c){return r===r&&(c!==n&&(r=r<=c?r:c),s!==n&&(r=r>=s?r:s)),r}o(Hn,"baseClamp");function Dt(r,s,c,m,g,S){var x,I=s&h,D=s&p,O=s&v;if(c&&(x=g?c(r,m,g,S):c(r)),x!==n)return x;if(!He(r))return r;var k=ue(r);if(k){if(x=Hg(r),!I)return dt(r,x)}else{var H=nt(r),q=H==tn||H==Me;if(Mn(r))return Tu(r,I);if(H==Ge||H==ee||q&&!g){if(x=D||q?{}:$u(r),!I)return D?Cg(r,Qp(x,r)):Ig(r,tu(x,r))}else{if(!_e[H])return g?r:{};x=Wg(r,H,I)}}S||(S=new Pt);var Z=S.get(r);if(Z)return Z;S.set(r,x),Ed(r)?r.forEach(function(ie){x.add(Dt(ie,s,c,ie,r,S))}):vd(r)&&r.forEach(function(ie,ge){x.set(ge,Dt(ie,s,c,ge,r,S))});var re=O?D?Ca:Ia:D?ht:Qe,fe=k?n:re(r);return Rt(fe||r,function(ie,ge){fe&&(ge=ie,ie=r[ge]),jr(x,ge,Dt(ie,s,c,ge,r,S))}),x}o(Dt,"baseClone");function Xp(r){var s=Qe(r);return function(c){return nu(c,r,s)}}o(Xp,"baseConforms");function nu(r,s,c){var m=c.length;if(r==null)return!m;for(r=Ae(r);m--;){var g=c[m],S=s[g],x=r[g];if(x===n&&!(g in r)||!S(x))return!1}return!0}o(nu,"baseConformsTo");function ru(r,s,c){if(typeof r!="function")throw new At(a);return ei(function(){r.apply(n,c)},s)}o(ru,"baseDelay");function Kr(r,s,c,m){var g=-1,S=Ai,x=!0,I=r.length,D=[],O=s.length;if(!I)return D;c&&(s=Fe(s,Et(c))),m?(S=jo,x=!1):s.length>=t&&(S=Vr,x=!1,s=new Pn(s));e:for(;++g<I;){var k=r[g],H=c==null?k:c(k);if(k=m||k!==0?k:0,x&&H===H){for(var q=O;q--;)if(s[q]===H)continue e;D.push(k)}else S(s,H,m)||D.push(k)}return D}o(Kr,"baseDifference");var En=_u(qt),iu=_u(ca,!0);function Zp(r,s){var c=!0;return En(r,function(m,g,S){return c=!!s(m,g,S),c}),c}o(Zp,"baseEvery");function ji(r,s,c){for(var m=-1,g=r.length;++m<g;){var S=r[m],x=s(S);if(x!=null&&(I===n?x===x&&!St(x):c(x,I)))var I=x,D=S}return D}o(ji,"baseExtremum");function Jp(r,s,c,m){var g=r.length;for(c=de(c),c<0&&(c=-c>g?0:g+c),m=m===n||m>g?g:de(m),m<0&&(m+=g),m=c>m?0:Sd(m);c<m;)r[c++]=s;return r}o(Jp,"baseFill");function su(r,s){var c=[];return En(r,function(m,g,S){s(m,g,S)&&c.push(m)}),c}o(su,"baseFilter");function Ze(r,s,c,m,g){var S=-1,x=r.length;for(c||(c=Vg),g||(g=[]);++S<x;){var I=r[S];s>0&&c(I)?s>1?Ze(I,s-1,c,m,g):pn(g,I):m||(g[g.length]=I)}return g}o(Ze,"baseFlatten");var la=Du(),ou=Du(!0);function qt(r,s){return r&&la(r,s,Qe)}o(qt,"baseForOwn");function ca(r,s){return r&&ou(r,s,Qe)}o(ca,"baseForOwnRight");function Ki(r,s){return mn(s,function(c){return cn(r[c])})}o(Ki,"baseFunctions");function Wn(r,s){s=Sn(s,r);for(var c=0,m=s.length;r!=null&&c<m;)r=r[jt(s[c++])];return c&&c==m?r:n}o(Wn,"baseGet");function au(r,s,c){var m=s(r);return ue(r)?m:pn(m,c(r))}o(au,"baseGetAllKeys");function st(r){return r==null?r===n?Rh:ke:kn&&kn in Ae(r)?kg(r):Kg(r)}o(st,"baseGetTag");function ua(r,s){return r>s}o(ua,"baseGt");function eg(r,s){return r!=null&&Re.call(r,s)}o(eg,"baseHas");function tg(r,s){return r!=null&&s in Ae(r)}o(tg,"baseHasIn");function ng(r,s,c){return r>=tt(s,c)&&r<Ke(s,c)}o(ng,"baseInRange");function da(r,s,c){for(var m=c?jo:Ai,g=r[0].length,S=r.length,x=S,I=N(S),D=1/0,O=[];x--;){var k=r[x];x&&s&&(k=Fe(k,Et(s))),D=tt(k.length,D),I[x]=!c&&(s||g>=120&&k.length>=120)?new Pn(x&&k):n}k=r[0];var H=-1,q=I[0];e:for(;++H<g&&O.length<D;){var Z=k[H],re=s?s(Z):Z;if(Z=c||Z!==0?Z:0,!(q?Vr(q,re):m(O,re,c))){for(x=S;--x;){var fe=I[x];if(!(fe?Vr(fe,re):m(r[x],re,c)))continue e}q&&q.push(re),O.push(Z)}}return O}o(da,"baseIntersection");function rg(r,s,c,m){return qt(r,function(g,S,x){s(m,c(g),S,x)}),m}o(rg,"baseInverter");function Yr(r,s,c){s=Sn(s,r),r=Ku(r,s);var m=r==null?r:r[jt(Lt(s))];return m==null?n:yt(m,r,c)}o(Yr,"baseInvoke");function lu(r){return We(r)&&st(r)==ee}o(lu,"baseIsArguments");function ig(r){return We(r)&&st(r)==Br}o(ig,"baseIsArrayBuffer");function sg(r){return We(r)&&st(r)==it}o(sg,"baseIsDate");function Qr(r,s,c,m,g){return r===s?!0:r==null||s==null||!We(r)&&!We(s)?r!==r&&s!==s:og(r,s,c,m,Qr,g)}o(Qr,"baseIsEqual");function og(r,s,c,m,g,S){var x=ue(r),I=ue(s),D=x?Oe:nt(r),O=I?Oe:nt(s);D=D==ee?Ge:D,O=O==ee?Ge:O;var k=D==Ge,H=O==Ge,q=D==O;if(q&&Mn(r)){if(!Mn(s))return!1;x=!0,k=!1}if(q&&!k)return S||(S=new Pt),x||mr(r)?Vu(r,s,c,m,g,S):Lg(r,s,D,c,m,g,S);if(!(c&y)){var Z=k&&Re.call(r,"__wrapped__"),re=H&&Re.call(s,"__wrapped__");if(Z||re){var fe=Z?r.value():r,ie=re?s.value():s;return S||(S=new Pt),g(fe,ie,c,m,S)}}return q?(S||(S=new Pt),Og(r,s,c,m,g,S)):!1}o(og,"baseIsEqualDeep");function ag(r){return We(r)&&nt(r)==Pe}o(ag,"baseIsMap");function fa(r,s,c,m){var g=c.length,S=g,x=!m;if(r==null)return!S;for(r=Ae(r);g--;){var I=c[g];if(x&&I[2]?I[1]!==r[I[0]]:!(I[0]in r))return!1}for(;++g<S;){I=c[g];var D=I[0],O=r[D],k=I[1];if(x&&I[2]){if(O===n&&!(D in r))return!1}else{var H=new Pt;if(m)var q=m(O,k,D,r,s,H);if(!(q===n?Qr(k,O,y|w,m,H):q))return!1}}return!0}o(fa,"baseIsMatch");function cu(r){if(!He(r)||Gg(r))return!1;var s=cn(r)?ap:Xh;return s.test(Vn(r))}o(cu,"baseIsNative");function lg(r){return We(r)&&st(r)==Pr}o(lg,"baseIsRegExp");function cg(r){return We(r)&&nt(r)==kt}o(cg,"baseIsSet");function ug(r){return We(r)&&ds(r.length)&&!!Ne[st(r)]}o(ug,"baseIsTypedArray");function uu(r){return typeof r=="function"?r:r==null?mt:typeof r=="object"?ue(r)?hu(r[0],r[1]):fu(r):Nd(r)}o(uu,"baseIteratee");function ha(r){if(!Jr(r))return hp(r);var s=[];for(var c in Ae(r))Re.call(r,c)&&c!="constructor"&&s.push(c);return s}o(ha,"baseKeys");function dg(r){if(!He(r))return jg(r);var s=Jr(r),c=[];for(var m in r)m=="constructor"&&(s||!Re.call(r,m))||c.push(m);return c}o(dg,"baseKeysIn");function ma(r,s){return r<s}o(ma,"baseLt");function du(r,s){var c=-1,m=ft(r)?N(r.length):[];return En(r,function(g,S,x){m[++c]=s(g,S,x)}),m}o(du,"baseMap");function fu(r){var s=Aa(r);return s.length==1&&s[0][2]?zu(s[0][0],s[0][1]):function(c){return c===r||fa(c,r,s)}}o(fu,"baseMatches");function hu(r,s){return Da(r)&&qu(s)?zu(jt(r),s):function(c){var m=Va(c,r);return m===n&&m===s?Ua(c,r):Qr(s,m,y|w)}}o(hu,"baseMatchesProperty");function Yi(r,s,c,m,g){r!==s&&la(s,function(S,x){if(g||(g=new Pt),He(S))fg(r,s,x,c,Yi,m,g);else{var I=m?m(La(r,x),S,x+"",r,s,g):n;I===n&&(I=S),oa(r,x,I)}},ht)}o(Yi,"baseMerge");function fg(r,s,c,m,g,S,x){var I=La(r,c),D=La(s,c),O=x.get(D);if(O){oa(r,c,O);return}var k=S?S(I,D,c+"",r,s,x):n,H=k===n;if(H){var q=ue(D),Z=!q&&Mn(D),re=!q&&!Z&&mr(D);k=D,q||Z||re?ue(I)?k=I:$e(I)?k=dt(I):Z?(H=!1,k=Tu(D,!0)):re?(H=!1,k=Iu(D,!0)):k=[]:ti(D)||Un(D)?(k=I,Un(I)?k=wd(I):(!He(I)||cn(I))&&(k=$u(D))):H=!1}H&&(x.set(D,k),g(k,D,m,S,x),x.delete(D)),oa(r,c,k)}o(fg,"baseMergeDeep");function mu(r,s){var c=r.length;if(c)return s+=s<0?c:0,ln(s,c)?r[s]:n}o(mu,"baseNth");function pu(r,s,c){s.length?s=Fe(s,function(S){return ue(S)?function(x){return Wn(x,S.length===1?S[0]:S)}:S}):s=[mt];var m=-1;s=Fe(s,Et(ne()));var g=du(r,function(S,x,I){var D=Fe(s,function(O){return O(S)});return{criteria:D,index:++m,value:S}});return Wm(g,function(S,x){return Tg(S,x,c)})}o(pu,"baseOrderBy");function hg(r,s){return gu(r,s,function(c,m){return Ua(r,m)})}o(hg,"basePick");function gu(r,s,c){for(var m=-1,g=s.length,S={};++m<g;){var x=s[m],I=Wn(r,x);c(I,x)&&Xr(S,Sn(x,r),I)}return S}o(gu,"basePickBy");function mg(r){return function(s){return Wn(s,r)}}o(mg,"basePropertyDeep");function pa(r,s,c,m){var g=m?Hm:ir,S=-1,x=s.length,I=r;for(r===s&&(s=dt(s)),c&&(I=Fe(r,Et(c)));++S<x;)for(var D=0,O=s[S],k=c?c(O):O;(D=g(I,k,D,m))>-1;)I!==r&&Wi.call(I,D,1),Wi.call(r,D,1);return r}o(pa,"basePullAll");function vu(r,s){for(var c=r?s.length:0,m=c-1;c--;){var g=s[c];if(c==m||g!==S){var S=g;ln(g)?Wi.call(r,g,1):Ea(r,g)}}return r}o(vu,"basePullAt");function ga(r,s){return r+Ui(Xc()*(s-r+1))}o(ga,"baseRandom");function pg(r,s,c,m){for(var g=-1,S=Ke(Vi((s-r)/(c||1)),0),x=N(S);S--;)x[m?S:++g]=r,r+=c;return x}o(pg,"baseRange");function va(r,s){var c="";if(!r||s<1||s>J)return c;do s%2&&(c+=r),s=Ui(s/2),s&&(r+=r);while(s);return c}o(va,"baseRepeat");function me(r,s){return Oa(ju(r,s,mt),r+"")}o(me,"baseRest");function gg(r){return eu(pr(r))}o(gg,"baseSample");function vg(r,s){var c=pr(r);return ss(c,Hn(s,0,c.length))}o(vg,"baseSampleSize");function Xr(r,s,c,m){if(!He(r))return r;s=Sn(s,r);for(var g=-1,S=s.length,x=S-1,I=r;I!=null&&++g<S;){var D=jt(s[g]),O=c;if(D==="__proto__"||D==="constructor"||D==="prototype")return r;if(g!=x){var k=I[D];O=m?m(k,D,I):n,O===n&&(O=He(k)?k:ln(s[g+1])?[]:{})}jr(I,D,O),I=I[D]}return r}o(Xr,"baseSet");var yu=Gi?function(r,s){return Gi.set(r,s),r}:mt,yg=Bi?function(r,s){return Bi(r,"toString",{configurable:!0,enumerable:!1,value:$a(s),writable:!0})}:mt;function Eg(r){return ss(pr(r))}o(Eg,"baseShuffle");function Nt(r,s,c){var m=-1,g=r.length;s<0&&(s=-s>g?0:g+s),c=c>g?g:c,c<0&&(c+=g),g=s>c?0:c-s>>>0,s>>>=0;for(var S=N(g);++m<g;)S[m]=r[m+s];return S}o(Nt,"baseSlice");function bg(r,s){var c;return En(r,function(m,g,S){return c=s(m,g,S),!c}),!!c}o(bg,"baseSome");function Qi(r,s,c){var m=0,g=r==null?m:r.length;if(typeof s=="number"&&s===s&&g<=P){for(;m<g;){var S=m+g>>>1,x=r[S];x!==null&&!St(x)&&(c?x<=s:x<s)?m=S+1:g=S}return g}return ya(r,s,mt,c)}o(Qi,"baseSortedIndex");function ya(r,s,c,m){var g=0,S=r==null?0:r.length;if(S===0)return 0;s=c(s);for(var x=s!==s,I=s===null,D=St(s),O=s===n;g<S;){var k=Ui((g+S)/2),H=c(r[k]),q=H!==n,Z=H===null,re=H===H,fe=St(H);if(x)var ie=m||re;else O?ie=re&&(m||q):I?ie=re&&q&&(m||!Z):D?ie=re&&q&&!Z&&(m||!fe):Z||fe?ie=!1:ie=m?H<=s:H<s;ie?g=k+1:S=k}return tt(S,B)}o(ya,"baseSortedIndexBy");function Eu(r,s){for(var c=-1,m=r.length,g=0,S=[];++c<m;){var x=r[c],I=s?s(x):x;if(!c||!Ht(I,D)){var D=I;S[g++]=x===0?0:x}}return S}o(Eu,"baseSortedUniq");function bu(r){return typeof r=="number"?r:St(r)?et:+r}o(bu,"baseToNumber");function bt(r){if(typeof r=="string")return r;if(ue(r))return Fe(r,bt)+"";if(St(r))return Zc?Zc.call(r):"";var s=r+"";return s=="0"&&1/r==-z?"-0":s}o(bt,"baseToString");function bn(r,s,c){var m=-1,g=Ai,S=r.length,x=!0,I=[],D=I;if(c)x=!1,g=jo;else if(S>=t){var O=s?null:Dg(r);if(O)return Di(O);x=!1,g=Vr,D=new Pn}else D=s?[]:I;e:for(;++m<S;){var k=r[m],H=s?s(k):k;if(k=c||k!==0?k:0,x&&H===H){for(var q=D.length;q--;)if(D[q]===H)continue e;s&&D.push(H),I.push(k)}else g(D,H,c)||(D!==I&&D.push(H),I.push(k))}return I}o(bn,"baseUniq");function Ea(r,s){return s=Sn(s,r),r=Ku(r,s),r==null||delete r[jt(Lt(s))]}o(Ea,"baseUnset");function Su(r,s,c,m){return Xr(r,s,c(Wn(r,s)),m)}o(Su,"baseUpdate");function Xi(r,s,c,m){for(var g=r.length,S=m?g:-1;(m?S--:++S<g)&&s(r[S],S,r););return c?Nt(r,m?0:S,m?S+1:g):Nt(r,m?S+1:0,m?g:S)}o(Xi,"baseWhile");function wu(r,s){var c=r;return c instanceof ye&&(c=c.value()),Ko(s,function(m,g){return g.func.apply(g.thisArg,pn([m],g.args))},c)}o(wu,"baseWrapperValue");function ba(r,s,c){var m=r.length;if(m<2)return m?bn(r[0]):[];for(var g=-1,S=N(m);++g<m;)for(var x=r[g],I=-1;++I<m;)I!=g&&(S[g]=Kr(S[g]||x,r[I],s,c));return bn(Ze(S,1),s,c)}o(ba,"baseXor");function Mu(r,s,c){for(var m=-1,g=r.length,S=s.length,x={};++m<g;){var I=m<S?s[m]:n;c(x,r[m],I)}return x}o(Mu,"baseZipObject");function Sa(r){return $e(r)?r:[]}o(Sa,"castArrayLikeObject");function wa(r){return typeof r=="function"?r:mt}o(wa,"castFunction");function Sn(r,s){return ue(r)?r:Da(r,s)?[r]:Zu(Ie(r))}o(Sn,"castPath");var Sg=me;function wn(r,s,c){var m=r.length;return c=c===n?m:c,!s&&c>=m?r:Nt(r,s,c)}o(wn,"castSlice");var xu=lp||function(r){return Ye.clearTimeout(r)};function Tu(r,s){if(s)return r.slice();var c=r.length,m=zc?zc(c):new r.constructor(c);return r.copy(m),m}o(Tu,"cloneBuffer");function Ma(r){var s=new r.constructor(r.byteLength);return new Pi(s).set(new Pi(r)),s}o(Ma,"cloneArrayBuffer");function wg(r,s){var c=s?Ma(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.byteLength)}o(wg,"cloneDataView");function Mg(r){var s=new r.constructor(r.source,lc.exec(r));return s.lastIndex=r.lastIndex,s}o(Mg,"cloneRegExp");function xg(r){return zr?Ae(zr.call(r)):{}}o(xg,"cloneSymbol");function Iu(r,s){var c=s?Ma(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.length)}o(Iu,"cloneTypedArray");function Cu(r,s){if(r!==s){var c=r!==n,m=r===null,g=r===r,S=St(r),x=s!==n,I=s===null,D=s===s,O=St(s);if(!I&&!O&&!S&&r>s||S&&x&&D&&!I&&!O||m&&x&&D||!c&&D||!g)return 1;if(!m&&!S&&!O&&r<s||O&&c&&g&&!m&&!S||I&&c&&g||!x&&g||!D)return-1}return 0}o(Cu,"compareAscending");function Tg(r,s,c){for(var m=-1,g=r.criteria,S=s.criteria,x=g.length,I=c.length;++m<x;){var D=Cu(g[m],S[m]);if(D){if(m>=I)return D;var O=c[m];return D*(O=="desc"?-1:1)}}return r.index-s.index}o(Tg,"compareMultiple");function Ru(r,s,c,m){for(var g=-1,S=r.length,x=c.length,I=-1,D=s.length,O=Ke(S-x,0),k=N(D+O),H=!m;++I<D;)k[I]=s[I];for(;++g<x;)(H||g<S)&&(k[c[g]]=r[g]);for(;O--;)k[I++]=r[g++];return k}o(Ru,"composeArgs");function Au(r,s,c,m){for(var g=-1,S=r.length,x=-1,I=c.length,D=-1,O=s.length,k=Ke(S-I,0),H=N(k+O),q=!m;++g<k;)H[g]=r[g];for(var Z=g;++D<O;)H[Z+D]=s[D];for(;++x<I;)(q||g<S)&&(H[Z+c[x]]=r[g++]);return H}o(Au,"composeArgsRight");function dt(r,s){var c=-1,m=r.length;for(s||(s=N(m));++c<m;)s[c]=r[c];return s}o(dt,"copyArray");function zt(r,s,c,m){var g=!c;c||(c={});for(var S=-1,x=s.length;++S<x;){var I=s[S],D=m?m(c[I],r[I],I,c,r):n;D===n&&(D=r[I]),g?sn(c,I,D):jr(c,I,D)}return c}o(zt,"copyObject");function Ig(r,s){return zt(r,_a(r),s)}o(Ig,"copySymbols");function Cg(r,s){return zt(r,Uu(r),s)}o(Cg,"copySymbolsIn");function Zi(r,s){return function(c,m){var g=ue(c)?Nm:Yp,S=s?s():{};return g(c,r,ne(m,2),S)}}o(Zi,"createAggregator");function dr(r){return me(function(s,c){var m=-1,g=c.length,S=g>1?c[g-1]:n,x=g>2?c[2]:n;for(S=r.length>3&&typeof S=="function"?(g--,S):n,x&&ot(c[0],c[1],x)&&(S=g<3?n:S,g=1),s=Ae(s);++m<g;){var I=c[m];I&&r(s,I,m,S)}return s})}o(dr,"createAssigner");function _u(r,s){return function(c,m){if(c==null)return c;if(!ft(c))return r(c,m);for(var g=c.length,S=s?g:-1,x=Ae(c);(s?S--:++S<g)&&m(x[S],S,x)!==!1;);return c}}o(_u,"createBaseEach");function Du(r){return function(s,c,m){for(var g=-1,S=Ae(s),x=m(s),I=x.length;I--;){var D=x[r?I:++g];if(c(S[D],D,S)===!1)break}return s}}o(Du,"createBaseFor");function Rg(r,s,c){var m=s&M,g=Zr(r);function S(){var x=this&&this!==Ye&&this instanceof S?g:r;return x.apply(m?c:this,arguments)}return o(S,"wrapper"),S}o(Rg,"createBind");function Nu(r){return function(s){s=Ie(s);var c=sr(s)?Ft(s):n,m=c?c[0]:s.charAt(0),g=c?wn(c,1).join(""):s.slice(1);return m[r]()+g}}o(Nu,"createCaseFirst");function fr(r){return function(s){return Ko(_d(Ad(s).replace(ym,"")),r,"")}}o(fr,"createCompounder");function Zr(r){return function(){var s=arguments;switch(s.length){case 0:return new r;case 1:return new r(s[0]);case 2:return new r(s[0],s[1]);case 3:return new r(s[0],s[1],s[2]);case 4:return new r(s[0],s[1],s[2],s[3]);case 5:return new r(s[0],s[1],s[2],s[3],s[4]);case 6:return new r(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new r(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var c=ur(r.prototype),m=r.apply(c,s);return He(m)?m:c}}o(Zr,"createCtor");function Ag(r,s,c){var m=Zr(r);function g(){for(var S=arguments.length,x=N(S),I=S,D=hr(g);I--;)x[I]=arguments[I];var O=S<3&&x[0]!==D&&x[S-1]!==D?[]:gn(x,D);if(S-=O.length,S<c)return Pu(r,s,Ji,g.placeholder,n,x,O,n,n,c-S);var k=this&&this!==Ye&&this instanceof g?m:r;return yt(k,this,x)}return o(g,"wrapper"),g}o(Ag,"createCurry");function Lu(r){return function(s,c,m){var g=Ae(s);if(!ft(s)){var S=ne(c,3);s=Qe(s),c=o(function(I){return S(g[I],I,g)},"predicate")}var x=r(s,c,m);return x>-1?g[S?s[x]:x]:n}}o(Lu,"createFind");function Ou(r){return an(function(s){var c=s.length,m=c,g=_t.prototype.thru;for(r&&s.reverse();m--;){var S=s[m];if(typeof S!="function")throw new At(a);if(g&&!x&&rs(S)=="wrapper")var x=new _t([],!0)}for(m=x?m:c;++m<c;){S=s[m];var I=rs(S),D=I=="wrapper"?Ra(S):n;D&&Na(D[0])&&D[1]==(G|T|C|Q)&&!D[4].length&&D[9]==1?x=x[rs(D[0])].apply(x,D[3]):x=S.length==1&&Na(S)?x[I]():x.thru(S)}return function(){var O=arguments,k=O[0];if(x&&O.length==1&&ue(k))return x.plant(k).value();for(var H=0,q=c?s[H].apply(this,O):k;++H<c;)q=s[H].call(this,q);return q}})}o(Ou,"createFlow");function Ji(r,s,c,m,g,S,x,I,D,O){var k=s&G,H=s&M,q=s&b,Z=s&(T|_),re=s&le,fe=q?n:Zr(r);function ie(){for(var ge=arguments.length,Se=N(ge),wt=ge;wt--;)Se[wt]=arguments[wt];if(Z)var at=hr(ie),Mt=Vm(Se,at);if(m&&(Se=Ru(Se,m,g,Z)),S&&(Se=Au(Se,S,x,Z)),ge-=Mt,Z&&ge<O){var qe=gn(Se,at);return Pu(r,s,Ji,ie.placeholder,c,Se,qe,I,D,O-ge)}var Wt=H?c:this,dn=q?Wt[r]:r;return ge=Se.length,I?Se=Yg(Se,I):re&&ge>1&&Se.reverse(),k&&D<ge&&(Se.length=D),this&&this!==Ye&&this instanceof ie&&(dn=fe||Zr(dn)),dn.apply(Wt,Se)}return o(ie,"wrapper"),ie}o(Ji,"createHybrid");function ku(r,s){return function(c,m){return rg(c,r,s(m),{})}}o(ku,"createInverter");function es(r,s){return function(c,m){var g;if(c===n&&m===n)return s;if(c!==n&&(g=c),m!==n){if(g===n)return m;typeof c=="string"||typeof m=="string"?(c=bt(c),m=bt(m)):(c=bu(c),m=bu(m)),g=r(c,m)}return g}}o(es,"createMathOperation");function xa(r){return an(function(s){return s=Fe(s,Et(ne())),me(function(c){var m=this;return r(s,function(g){return yt(g,m,c)})})})}o(xa,"createOver");function ts(r,s){s=s===n?" ":bt(s);var c=s.length;if(c<2)return c?va(s,r):s;var m=va(s,Vi(r/or(s)));return sr(s)?wn(Ft(m),0,r).join(""):m.slice(0,r)}o(ts,"createPadding");function _g(r,s,c,m){var g=s&M,S=Zr(r);function x(){for(var I=-1,D=arguments.length,O=-1,k=m.length,H=N(k+D),q=this&&this!==Ye&&this instanceof x?S:r;++O<k;)H[O]=m[O];for(;D--;)H[O++]=arguments[++I];return yt(q,g?c:this,H)}return o(x,"wrapper"),x}o(_g,"createPartial");function Fu(r){return function(s,c,m){return m&&typeof m!="number"&&ot(s,c,m)&&(c=m=n),s=un(s),c===n?(c=s,s=0):c=un(c),m=m===n?s<c?1:-1:un(m),pg(s,c,m,r)}}o(Fu,"createRange");function ns(r){return function(s,c){return typeof s=="string"&&typeof c=="string"||(s=Ot(s),c=Ot(c)),r(s,c)}}o(ns,"createRelationalOperation");function Pu(r,s,c,m,g,S,x,I,D,O){var k=s&T,H=k?x:n,q=k?n:x,Z=k?S:n,re=k?n:S;s|=k?C:F,s&=~(k?F:C),s&R||(s&=~(M|b));var fe=[r,s,g,Z,H,re,q,I,D,O],ie=c.apply(n,fe);return Na(r)&&Yu(ie,fe),ie.placeholder=m,Qu(ie,r,s)}o(Pu,"createRecurry");function Ta(r){var s=je[r];return function(c,m){if(c=Ot(c),m=m==null?0:tt(de(m),292),m&&Qc(c)){var g=(Ie(c)+"e").split("e"),S=s(g[0]+"e"+(+g[1]+m));return g=(Ie(S)+"e").split("e"),+(g[0]+"e"+(+g[1]-m))}return s(c)}}o(Ta,"createRound");var Dg=lr&&1/Di(new lr([,-0]))[1]==z?function(r){return new lr(r)}:ja;function Hu(r){return function(s){var c=nt(s);return c==Pe?ta(s):c==kt?Km(s):Bm(s,r(s))}}o(Hu,"createToPairs");function on(r,s,c,m,g,S,x,I){var D=s&b;if(!D&&typeof r!="function")throw new At(a);var O=m?m.length:0;if(O||(s&=~(C|F),m=g=n),x=x===n?x:Ke(de(x),0),I=I===n?I:de(I),O-=g?g.length:0,s&F){var k=m,H=g;m=g=n}var q=D?n:Ra(r),Z=[r,s,c,m,g,k,H,S,x,I];if(q&&zg(Z,q),r=Z[0],s=Z[1],c=Z[2],m=Z[3],g=Z[4],I=Z[9]=Z[9]===n?D?0:r.length:Ke(Z[9]-O,0),!I&&s&(T|_)&&(s&=~(T|_)),!s||s==M)var re=Rg(r,s,c);else s==T||s==_?re=Ag(r,s,I):(s==C||s==(M|C))&&!g.length?re=_g(r,s,c,m):re=Ji.apply(n,Z);var fe=q?yu:Yu;return Qu(fe(re,Z),r,s)}o(on,"createWrap");function Wu(r,s,c,m){return r===n||Ht(r,ar[c])&&!Re.call(m,c)?s:r}o(Wu,"customDefaultsAssignIn");function Bu(r,s,c,m,g,S){return He(r)&&He(s)&&(S.set(s,r),Yi(r,s,n,Bu,S),S.delete(s)),r}o(Bu,"customDefaultsMerge");function Ng(r){return ti(r)?n:r}o(Ng,"customOmitClone");function Vu(r,s,c,m,g,S){var x=c&y,I=r.length,D=s.length;if(I!=D&&!(x&&D>I))return!1;var O=S.get(r),k=S.get(s);if(O&&k)return O==s&&k==r;var H=-1,q=!0,Z=c&w?new Pn:n;for(S.set(r,s),S.set(s,r);++H<I;){var re=r[H],fe=s[H];if(m)var ie=x?m(fe,re,H,s,r,S):m(re,fe,H,r,s,S);if(ie!==n){if(ie)continue;q=!1;break}if(Z){if(!Yo(s,function(ge,Se){if(!Vr(Z,Se)&&(re===ge||g(re,ge,c,m,S)))return Z.push(Se)})){q=!1;break}}else if(!(re===fe||g(re,fe,c,m,S))){q=!1;break}}return S.delete(r),S.delete(s),q}o(Vu,"equalArrays");function Lg(r,s,c,m,g,S,x){switch(c){case nr:if(r.byteLength!=s.byteLength||r.byteOffset!=s.byteOffset)return!1;r=r.buffer,s=s.buffer;case Br:return!(r.byteLength!=s.byteLength||!S(new Pi(r),new Pi(s)));case Xe:case it:case Ce:return Ht(+r,+s);case hn:return r.name==s.name&&r.message==s.message;case Pr:case Hr:return r==s+"";case Pe:var I=ta;case kt:var D=m&y;if(I||(I=Di),r.size!=s.size&&!D)return!1;var O=x.get(r);if(O)return O==s;m|=w,x.set(r,s);var k=Vu(I(r),I(s),m,g,S,x);return x.delete(r),k;case Ti:if(zr)return zr.call(r)==zr.call(s)}return!1}o(Lg,"equalByTag");function Og(r,s,c,m,g,S){var x=c&y,I=Ia(r),D=I.length,O=Ia(s),k=O.length;if(D!=k&&!x)return!1;for(var H=D;H--;){var q=I[H];if(!(x?q in s:Re.call(s,q)))return!1}var Z=S.get(r),re=S.get(s);if(Z&&re)return Z==s&&re==r;var fe=!0;S.set(r,s),S.set(s,r);for(var ie=x;++H<D;){q=I[H];var ge=r[q],Se=s[q];if(m)var wt=x?m(Se,ge,q,s,r,S):m(ge,Se,q,r,s,S);if(!(wt===n?ge===Se||g(ge,Se,c,m,S):wt)){fe=!1;break}ie||(ie=q=="constructor")}if(fe&&!ie){var at=r.constructor,Mt=s.constructor;at!=Mt&&"constructor"in r&&"constructor"in s&&!(typeof at=="function"&&at instanceof at&&typeof Mt=="function"&&Mt instanceof Mt)&&(fe=!1)}return S.delete(r),S.delete(s),fe}o(Og,"equalObjects");function an(r){return Oa(ju(r,n,nd),r+"")}o(an,"flatRest");function Ia(r){return au(r,Qe,_a)}o(Ia,"getAllKeys");function Ca(r){return au(r,ht,Uu)}o(Ca,"getAllKeysIn");var Ra=Gi?function(r){return Gi.get(r)}:ja;function rs(r){for(var s=r.name+"",c=cr[s],m=Re.call(cr,s)?c.length:0;m--;){var g=c[m],S=g.func;if(S==null||S==r)return g.name}return s}o(rs,"getFuncName");function hr(r){var s=Re.call(E,"placeholder")?E:r;return s.placeholder}o(hr,"getHolder");function ne(){var r=E.iteratee||qa;return r=r===qa?uu:r,arguments.length?r(arguments[0],arguments[1]):r}o(ne,"getIteratee");function is(r,s){var c=r.__data__;return Ug(s)?c[typeof s=="string"?"string":"hash"]:c.map}o(is,"getMapData");function Aa(r){for(var s=Qe(r),c=s.length;c--;){var m=s[c],g=r[m];s[c]=[m,g,qu(g)]}return s}o(Aa,"getMatchData");function Bn(r,s){var c=qm(r,s);return cu(c)?c:n}o(Bn,"getNative");function kg(r){var s=Re.call(r,kn),c=r[kn];try{r[kn]=n;var m=!0}catch{}var g=ki.call(r);return m&&(s?r[kn]=c:delete r[kn]),g}o(kg,"getRawTag");var _a=ra?function(r){return r==null?[]:(r=Ae(r),mn(ra(r),function(s){return Kc.call(r,s)}))}:Ka,Uu=ra?function(r){for(var s=[];r;)pn(s,_a(r)),r=Hi(r);return s}:Ka,nt=st;(ia&&nt(new ia(new ArrayBuffer(1)))!=nr||Gr&&nt(new Gr)!=Pe||sa&&nt(sa.resolve())!=Te||lr&&nt(new lr)!=kt||$r&&nt(new $r)!=Wr)&&(nt=o(function(r){var s=st(r),c=s==Ge?r.constructor:n,m=c?Vn(c):"";if(m)switch(m){case vp:return nr;case yp:return Pe;case Ep:return Te;case bp:return kt;case Sp:return Wr}return s},"getTag"));function Fg(r,s,c){for(var m=-1,g=c.length;++m<g;){var S=c[m],x=S.size;switch(S.type){case"drop":r+=x;break;case"dropRight":s-=x;break;case"take":s=tt(s,r+x);break;case"takeRight":r=Ke(r,s-x);break}}return{start:r,end:s}}o(Fg,"getView");function Pg(r){var s=r.match(Gh);return s?s[1].split($h):[]}o(Pg,"getWrapDetails");function Gu(r,s,c){s=Sn(s,r);for(var m=-1,g=s.length,S=!1;++m<g;){var x=jt(s[m]);if(!(S=r!=null&&c(r,x)))break;r=r[x]}return S||++m!=g?S:(g=r==null?0:r.length,!!g&&ds(g)&&ln(x,g)&&(ue(r)||Un(r)))}o(Gu,"hasPath");function Hg(r){var s=r.length,c=new r.constructor(s);return s&&typeof r[0]=="string"&&Re.call(r,"index")&&(c.index=r.index,c.input=r.input),c}o(Hg,"initCloneArray");function $u(r){return typeof r.constructor=="function"&&!Jr(r)?ur(Hi(r)):{}}o($u,"initCloneObject");function Wg(r,s,c){var m=r.constructor;switch(s){case Br:return Ma(r);case Xe:case it:return new m(+r);case nr:return wg(r,c);case Ao:case _o:case Do:case No:case Lo:case Oo:case ko:case Fo:case Po:return Iu(r,c);case Pe:return new m;case Ce:case Hr:return new m(r);case Pr:return Mg(r);case kt:return new m;case Ti:return xg(r)}}o(Wg,"initCloneByTag");function Bg(r,s){var c=s.length;if(!c)return r;var m=c-1;return s[m]=(c>1?"& ":"")+s[m],s=s.join(c>2?", ":" "),r.replace(Uh,`{
3
+ /* [wrapped with `+s+`] */
4
+ `)}o(Bg,"insertWrapDetails");function Vg(r){return ue(r)||Un(r)||!!(Yc&&r&&r[Yc])}o(Vg,"isFlattenable");function ln(r,s){var c=typeof r;return s=s??J,!!s&&(c=="number"||c!="symbol"&&Jh.test(r))&&r>-1&&r%1==0&&r<s}o(ln,"isIndex");function ot(r,s,c){if(!He(c))return!1;var m=typeof s;return(m=="number"?ft(c)&&ln(s,c.length):m=="string"&&s in c)?Ht(c[s],r):!1}o(ot,"isIterateeCall");function Da(r,s){if(ue(r))return!1;var c=typeof r;return c=="number"||c=="symbol"||c=="boolean"||r==null||St(r)?!0:Hh.test(r)||!Ph.test(r)||s!=null&&r in Ae(s)}o(Da,"isKey");function Ug(r){var s=typeof r;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?r!=="__proto__":r===null}o(Ug,"isKeyable");function Na(r){var s=rs(r),c=E[s];if(typeof c!="function"||!(s in ye.prototype))return!1;if(r===c)return!0;var m=Ra(c);return!!m&&r===m[0]}o(Na,"isLaziable");function Gg(r){return!!qc&&qc in r}o(Gg,"isMasked");var $g=Li?cn:Ya;function Jr(r){var s=r&&r.constructor,c=typeof s=="function"&&s.prototype||ar;return r===c}o(Jr,"isPrototype");function qu(r){return r===r&&!He(r)}o(qu,"isStrictComparable");function zu(r,s){return function(c){return c==null?!1:c[r]===s&&(s!==n||r in Ae(c))}}o(zu,"matchesStrictComparable");function qg(r){var s=cs(r,function(m){return c.size===d&&c.clear(),m}),c=s.cache;return s}o(qg,"memoizeCapped");function zg(r,s){var c=r[1],m=s[1],g=c|m,S=g<(M|b|G),x=m==G&&c==T||m==G&&c==Q&&r[7].length<=s[8]||m==(G|Q)&&s[7].length<=s[8]&&c==T;if(!(S||x))return r;m&M&&(r[2]=s[2],g|=c&M?0:R);var I=s[3];if(I){var D=r[3];r[3]=D?Ru(D,I,s[4]):I,r[4]=D?gn(r[3],f):s[4]}return I=s[5],I&&(D=r[5],r[5]=D?Au(D,I,s[6]):I,r[6]=D?gn(r[5],f):s[6]),I=s[7],I&&(r[7]=I),m&G&&(r[8]=r[8]==null?s[8]:tt(r[8],s[8])),r[9]==null&&(r[9]=s[9]),r[0]=s[0],r[1]=g,r}o(zg,"mergeData");function jg(r){var s=[];if(r!=null)for(var c in Ae(r))s.push(c);return s}o(jg,"nativeKeysIn");function Kg(r){return ki.call(r)}o(Kg,"objectToString");function ju(r,s,c){return s=Ke(s===n?r.length-1:s,0),function(){for(var m=arguments,g=-1,S=Ke(m.length-s,0),x=N(S);++g<S;)x[g]=m[s+g];g=-1;for(var I=N(s+1);++g<s;)I[g]=m[g];return I[s]=c(x),yt(r,this,I)}}o(ju,"overRest");function Ku(r,s){return s.length<2?r:Wn(r,Nt(s,0,-1))}o(Ku,"parent");function Yg(r,s){for(var c=r.length,m=tt(s.length,c),g=dt(r);m--;){var S=s[m];r[m]=ln(S,c)?g[S]:n}return r}o(Yg,"reorder");function La(r,s){if(!(s==="constructor"&&typeof r[s]=="function")&&s!="__proto__")return r[s]}o(La,"safeGet");var Yu=Xu(yu),ei=up||function(r,s){return Ye.setTimeout(r,s)},Oa=Xu(yg);function Qu(r,s,c){var m=s+"";return Oa(r,Bg(m,Qg(Pg(m),c)))}o(Qu,"setWrapToString");function Xu(r){var s=0,c=0;return function(){var m=mp(),g=V-(m-c);if(c=m,g>0){if(++s>=he)return arguments[0]}else s=0;return r.apply(n,arguments)}}o(Xu,"shortOut");function ss(r,s){var c=-1,m=r.length,g=m-1;for(s=s===n?m:s;++c<s;){var S=ga(c,g),x=r[S];r[S]=r[c],r[c]=x}return r.length=s,r}o(ss,"shuffleSelf");var Zu=qg(function(r){var s=[];return r.charCodeAt(0)===46&&s.push(""),r.replace(Wh,function(c,m,g,S){s.push(g?S.replace(jh,"$1"):m||c)}),s});function jt(r){if(typeof r=="string"||St(r))return r;var s=r+"";return s=="0"&&1/r==-z?"-0":s}o(jt,"toKey");function Vn(r){if(r!=null){try{return Oi.call(r)}catch{}try{return r+""}catch{}}return""}o(Vn,"toSource");function Qg(r,s){return Rt(te,function(c){var m="_."+c[0];s&c[1]&&!Ai(r,m)&&r.push(m)}),r.sort()}o(Qg,"updateWrapDetails");function Ju(r){if(r instanceof ye)return r.clone();var s=new _t(r.__wrapped__,r.__chain__);return s.__actions__=dt(r.__actions__),s.__index__=r.__index__,s.__values__=r.__values__,s}o(Ju,"wrapperClone");function Xg(r,s,c){(c?ot(r,s,c):s===n)?s=1:s=Ke(de(s),0);var m=r==null?0:r.length;if(!m||s<1)return[];for(var g=0,S=0,x=N(Vi(m/s));g<m;)x[S++]=Nt(r,g,g+=s);return x}o(Xg,"chunk");function Zg(r){for(var s=-1,c=r==null?0:r.length,m=0,g=[];++s<c;){var S=r[s];S&&(g[m++]=S)}return g}o(Zg,"compact");function Jg(){var r=arguments.length;if(!r)return[];for(var s=N(r-1),c=arguments[0],m=r;m--;)s[m-1]=arguments[m];return pn(ue(c)?dt(c):[c],Ze(s,1))}o(Jg,"concat");var ev=me(function(r,s){return $e(r)?Kr(r,Ze(s,1,$e,!0)):[]}),tv=me(function(r,s){var c=Lt(s);return $e(c)&&(c=n),$e(r)?Kr(r,Ze(s,1,$e,!0),ne(c,2)):[]}),nv=me(function(r,s){var c=Lt(s);return $e(c)&&(c=n),$e(r)?Kr(r,Ze(s,1,$e,!0),n,c):[]});function rv(r,s,c){var m=r==null?0:r.length;return m?(s=c||s===n?1:de(s),Nt(r,s<0?0:s,m)):[]}o(rv,"drop");function iv(r,s,c){var m=r==null?0:r.length;return m?(s=c||s===n?1:de(s),s=m-s,Nt(r,0,s<0?0:s)):[]}o(iv,"dropRight");function sv(r,s){return r&&r.length?Xi(r,ne(s,3),!0,!0):[]}o(sv,"dropRightWhile");function ov(r,s){return r&&r.length?Xi(r,ne(s,3),!0):[]}o(ov,"dropWhile");function av(r,s,c,m){var g=r==null?0:r.length;return g?(c&&typeof c!="number"&&ot(r,s,c)&&(c=0,m=g),Jp(r,s,c,m)):[]}o(av,"fill");function ed(r,s,c){var m=r==null?0:r.length;if(!m)return-1;var g=c==null?0:de(c);return g<0&&(g=Ke(m+g,0)),_i(r,ne(s,3),g)}o(ed,"findIndex");function td(r,s,c){var m=r==null?0:r.length;if(!m)return-1;var g=m-1;return c!==n&&(g=de(c),g=c<0?Ke(m+g,0):tt(g,m-1)),_i(r,ne(s,3),g,!0)}o(td,"findLastIndex");function nd(r){var s=r==null?0:r.length;return s?Ze(r,1):[]}o(nd,"flatten");function lv(r){var s=r==null?0:r.length;return s?Ze(r,z):[]}o(lv,"flattenDeep");function cv(r,s){var c=r==null?0:r.length;return c?(s=s===n?1:de(s),Ze(r,s)):[]}o(cv,"flattenDepth");function uv(r){for(var s=-1,c=r==null?0:r.length,m={};++s<c;){var g=r[s];m[g[0]]=g[1]}return m}o(uv,"fromPairs");function rd(r){return r&&r.length?r[0]:n}o(rd,"head");function dv(r,s,c){var m=r==null?0:r.length;if(!m)return-1;var g=c==null?0:de(c);return g<0&&(g=Ke(m+g,0)),ir(r,s,g)}o(dv,"indexOf");function fv(r){var s=r==null?0:r.length;return s?Nt(r,0,-1):[]}o(fv,"initial");var hv=me(function(r){var s=Fe(r,Sa);return s.length&&s[0]===r[0]?da(s):[]}),mv=me(function(r){var s=Lt(r),c=Fe(r,Sa);return s===Lt(c)?s=n:c.pop(),c.length&&c[0]===r[0]?da(c,ne(s,2)):[]}),pv=me(function(r){var s=Lt(r),c=Fe(r,Sa);return s=typeof s=="function"?s:n,s&&c.pop(),c.length&&c[0]===r[0]?da(c,n,s):[]});function gv(r,s){return r==null?"":fp.call(r,s)}o(gv,"join");function Lt(r){var s=r==null?0:r.length;return s?r[s-1]:n}o(Lt,"last");function vv(r,s,c){var m=r==null?0:r.length;if(!m)return-1;var g=m;return c!==n&&(g=de(c),g=g<0?Ke(m+g,0):tt(g,m-1)),s===s?Qm(r,s,g):_i(r,Pc,g,!0)}o(vv,"lastIndexOf");function yv(r,s){return r&&r.length?mu(r,de(s)):n}o(yv,"nth");var Ev=me(id);function id(r,s){return r&&r.length&&s&&s.length?pa(r,s):r}o(id,"pullAll");function bv(r,s,c){return r&&r.length&&s&&s.length?pa(r,s,ne(c,2)):r}o(bv,"pullAllBy");function Sv(r,s,c){return r&&r.length&&s&&s.length?pa(r,s,n,c):r}o(Sv,"pullAllWith");var wv=an(function(r,s){var c=r==null?0:r.length,m=aa(r,s);return vu(r,Fe(s,function(g){return ln(g,c)?+g:g}).sort(Cu)),m});function Mv(r,s){var c=[];if(!(r&&r.length))return c;var m=-1,g=[],S=r.length;for(s=ne(s,3);++m<S;){var x=r[m];s(x,m,r)&&(c.push(x),g.push(m))}return vu(r,g),c}o(Mv,"remove");function ka(r){return r==null?r:gp.call(r)}o(ka,"reverse");function xv(r,s,c){var m=r==null?0:r.length;return m?(c&&typeof c!="number"&&ot(r,s,c)?(s=0,c=m):(s=s==null?0:de(s),c=c===n?m:de(c)),Nt(r,s,c)):[]}o(xv,"slice");function Tv(r,s){return Qi(r,s)}o(Tv,"sortedIndex");function Iv(r,s,c){return ya(r,s,ne(c,2))}o(Iv,"sortedIndexBy");function Cv(r,s){var c=r==null?0:r.length;if(c){var m=Qi(r,s);if(m<c&&Ht(r[m],s))return m}return-1}o(Cv,"sortedIndexOf");function Rv(r,s){return Qi(r,s,!0)}o(Rv,"sortedLastIndex");function Av(r,s,c){return ya(r,s,ne(c,2),!0)}o(Av,"sortedLastIndexBy");function _v(r,s){var c=r==null?0:r.length;if(c){var m=Qi(r,s,!0)-1;if(Ht(r[m],s))return m}return-1}o(_v,"sortedLastIndexOf");function Dv(r){return r&&r.length?Eu(r):[]}o(Dv,"sortedUniq");function Nv(r,s){return r&&r.length?Eu(r,ne(s,2)):[]}o(Nv,"sortedUniqBy");function Lv(r){var s=r==null?0:r.length;return s?Nt(r,1,s):[]}o(Lv,"tail");function Ov(r,s,c){return r&&r.length?(s=c||s===n?1:de(s),Nt(r,0,s<0?0:s)):[]}o(Ov,"take");function kv(r,s,c){var m=r==null?0:r.length;return m?(s=c||s===n?1:de(s),s=m-s,Nt(r,s<0?0:s,m)):[]}o(kv,"takeRight");function Fv(r,s){return r&&r.length?Xi(r,ne(s,3),!1,!0):[]}o(Fv,"takeRightWhile");function Pv(r,s){return r&&r.length?Xi(r,ne(s,3)):[]}o(Pv,"takeWhile");var Hv=me(function(r){return bn(Ze(r,1,$e,!0))}),Wv=me(function(r){var s=Lt(r);return $e(s)&&(s=n),bn(Ze(r,1,$e,!0),ne(s,2))}),Bv=me(function(r){var s=Lt(r);return s=typeof s=="function"?s:n,bn(Ze(r,1,$e,!0),n,s)});function Vv(r){return r&&r.length?bn(r):[]}o(Vv,"uniq");function Uv(r,s){return r&&r.length?bn(r,ne(s,2)):[]}o(Uv,"uniqBy");function Gv(r,s){return s=typeof s=="function"?s:n,r&&r.length?bn(r,n,s):[]}o(Gv,"uniqWith");function Fa(r){if(!(r&&r.length))return[];var s=0;return r=mn(r,function(c){if($e(c))return s=Ke(c.length,s),!0}),Jo(s,function(c){return Fe(r,Qo(c))})}o(Fa,"unzip");function sd(r,s){if(!(r&&r.length))return[];var c=Fa(r);return s==null?c:Fe(c,function(m){return yt(s,n,m)})}o(sd,"unzipWith");var $v=me(function(r,s){return $e(r)?Kr(r,s):[]}),qv=me(function(r){return ba(mn(r,$e))}),zv=me(function(r){var s=Lt(r);return $e(s)&&(s=n),ba(mn(r,$e),ne(s,2))}),jv=me(function(r){var s=Lt(r);return s=typeof s=="function"?s:n,ba(mn(r,$e),n,s)}),Kv=me(Fa);function Yv(r,s){return Mu(r||[],s||[],jr)}o(Yv,"zipObject");function Qv(r,s){return Mu(r||[],s||[],Xr)}o(Qv,"zipObjectDeep");var Xv=me(function(r){var s=r.length,c=s>1?r[s-1]:n;return c=typeof c=="function"?(r.pop(),c):n,sd(r,c)});function od(r){var s=E(r);return s.__chain__=!0,s}o(od,"chain");function Zv(r,s){return s(r),r}o(Zv,"tap");function os(r,s){return s(r)}o(os,"thru");var Jv=an(function(r){var s=r.length,c=s?r[0]:0,m=this.__wrapped__,g=o(function(S){return aa(S,r)},"interceptor");return s>1||this.__actions__.length||!(m instanceof ye)||!ln(c)?this.thru(g):(m=m.slice(c,+c+(s?1:0)),m.__actions__.push({func:os,args:[g],thisArg:n}),new _t(m,this.__chain__).thru(function(S){return s&&!S.length&&S.push(n),S}))});function ey(){return od(this)}o(ey,"wrapperChain");function ty(){return new _t(this.value(),this.__chain__)}o(ty,"wrapperCommit");function ny(){this.__values__===n&&(this.__values__=bd(this.value()));var r=this.__index__>=this.__values__.length,s=r?n:this.__values__[this.__index__++];return{done:r,value:s}}o(ny,"wrapperNext");function ry(){return this}o(ry,"wrapperToIterator");function iy(r){for(var s,c=this;c instanceof qi;){var m=Ju(c);m.__index__=0,m.__values__=n,s?g.__wrapped__=m:s=m;var g=m;c=c.__wrapped__}return g.__wrapped__=r,s}o(iy,"wrapperPlant");function sy(){var r=this.__wrapped__;if(r instanceof ye){var s=r;return this.__actions__.length&&(s=new ye(this)),s=s.reverse(),s.__actions__.push({func:os,args:[ka],thisArg:n}),new _t(s,this.__chain__)}return this.thru(ka)}o(sy,"wrapperReverse");function oy(){return wu(this.__wrapped__,this.__actions__)}o(oy,"wrapperValue");var ay=Zi(function(r,s,c){Re.call(r,c)?++r[c]:sn(r,c,1)});function ly(r,s,c){var m=ue(r)?kc:Zp;return c&&ot(r,s,c)&&(s=n),m(r,ne(s,3))}o(ly,"every");function cy(r,s){var c=ue(r)?mn:su;return c(r,ne(s,3))}o(cy,"filter");var uy=Lu(ed),dy=Lu(td);function fy(r,s){return Ze(as(r,s),1)}o(fy,"flatMap");function hy(r,s){return Ze(as(r,s),z)}o(hy,"flatMapDeep");function my(r,s,c){return c=c===n?1:de(c),Ze(as(r,s),c)}o(my,"flatMapDepth");function ad(r,s){var c=ue(r)?Rt:En;return c(r,ne(s,3))}o(ad,"forEach");function ld(r,s){var c=ue(r)?Lm:iu;return c(r,ne(s,3))}o(ld,"forEachRight");var py=Zi(function(r,s,c){Re.call(r,c)?r[c].push(s):sn(r,c,[s])});function gy(r,s,c,m){r=ft(r)?r:pr(r),c=c&&!m?de(c):0;var g=r.length;return c<0&&(c=Ke(g+c,0)),fs(r)?c<=g&&r.indexOf(s,c)>-1:!!g&&ir(r,s,c)>-1}o(gy,"includes");var vy=me(function(r,s,c){var m=-1,g=typeof s=="function",S=ft(r)?N(r.length):[];return En(r,function(x){S[++m]=g?yt(s,x,c):Yr(x,s,c)}),S}),yy=Zi(function(r,s,c){sn(r,c,s)});function as(r,s){var c=ue(r)?Fe:du;return c(r,ne(s,3))}o(as,"map");function Ey(r,s,c,m){return r==null?[]:(ue(s)||(s=s==null?[]:[s]),c=m?n:c,ue(c)||(c=c==null?[]:[c]),pu(r,s,c))}o(Ey,"orderBy");var by=Zi(function(r,s,c){r[c?0:1].push(s)},function(){return[[],[]]});function Sy(r,s,c){var m=ue(r)?Ko:Wc,g=arguments.length<3;return m(r,ne(s,4),c,g,En)}o(Sy,"reduce");function wy(r,s,c){var m=ue(r)?Om:Wc,g=arguments.length<3;return m(r,ne(s,4),c,g,iu)}o(wy,"reduceRight");function My(r,s){var c=ue(r)?mn:su;return c(r,us(ne(s,3)))}o(My,"reject");function xy(r){var s=ue(r)?eu:gg;return s(r)}o(xy,"sample");function Ty(r,s,c){(c?ot(r,s,c):s===n)?s=1:s=de(s);var m=ue(r)?jp:vg;return m(r,s)}o(Ty,"sampleSize");function Iy(r){var s=ue(r)?Kp:Eg;return s(r)}o(Iy,"shuffle");function Cy(r){if(r==null)return 0;if(ft(r))return fs(r)?or(r):r.length;var s=nt(r);return s==Pe||s==kt?r.size:ha(r).length}o(Cy,"size");function Ry(r,s,c){var m=ue(r)?Yo:bg;return c&&ot(r,s,c)&&(s=n),m(r,ne(s,3))}o(Ry,"some");var Ay=me(function(r,s){if(r==null)return[];var c=s.length;return c>1&&ot(r,s[0],s[1])?s=[]:c>2&&ot(s[0],s[1],s[2])&&(s=[s[0]]),pu(r,Ze(s,1),[])}),ls=cp||function(){return Ye.Date.now()};function _y(r,s){if(typeof s!="function")throw new At(a);return r=de(r),function(){if(--r<1)return s.apply(this,arguments)}}o(_y,"after");function cd(r,s,c){return s=c?n:s,s=r&&s==null?r.length:s,on(r,G,n,n,n,n,s)}o(cd,"ary");function ud(r,s){var c;if(typeof s!="function")throw new At(a);return r=de(r),function(){return--r>0&&(c=s.apply(this,arguments)),r<=1&&(s=n),c}}o(ud,"before");var Pa=me(function(r,s,c){var m=M;if(c.length){var g=gn(c,hr(Pa));m|=C}return on(r,m,s,c,g)}),dd=me(function(r,s,c){var m=M|b;if(c.length){var g=gn(c,hr(dd));m|=C}return on(s,m,r,c,g)});function fd(r,s,c){s=c?n:s;var m=on(r,T,n,n,n,n,n,s);return m.placeholder=fd.placeholder,m}o(fd,"curry");function hd(r,s,c){s=c?n:s;var m=on(r,_,n,n,n,n,n,s);return m.placeholder=hd.placeholder,m}o(hd,"curryRight");function md(r,s,c){var m,g,S,x,I,D,O=0,k=!1,H=!1,q=!0;if(typeof r!="function")throw new At(a);s=Ot(s)||0,He(c)&&(k=!!c.leading,H="maxWait"in c,S=H?Ke(Ot(c.maxWait)||0,s):S,q="trailing"in c?!!c.trailing:q);function Z(qe){var Wt=m,dn=g;return m=g=n,O=qe,x=r.apply(dn,Wt),x}o(Z,"invokeFunc");function re(qe){return O=qe,I=ei(ge,s),k?Z(qe):x}o(re,"leadingEdge");function fe(qe){var Wt=qe-D,dn=qe-O,Ld=s-Wt;return H?tt(Ld,S-dn):Ld}o(fe,"remainingWait");function ie(qe){var Wt=qe-D,dn=qe-O;return D===n||Wt>=s||Wt<0||H&&dn>=S}o(ie,"shouldInvoke");function ge(){var qe=ls();if(ie(qe))return Se(qe);I=ei(ge,fe(qe))}o(ge,"timerExpired");function Se(qe){return I=n,q&&m?Z(qe):(m=g=n,x)}o(Se,"trailingEdge");function wt(){I!==n&&xu(I),O=0,m=D=g=I=n}o(wt,"cancel");function at(){return I===n?x:Se(ls())}o(at,"flush");function Mt(){var qe=ls(),Wt=ie(qe);if(m=arguments,g=this,D=qe,Wt){if(I===n)return re(D);if(H)return xu(I),I=ei(ge,s),Z(D)}return I===n&&(I=ei(ge,s)),x}return o(Mt,"debounced"),Mt.cancel=wt,Mt.flush=at,Mt}o(md,"debounce");var Dy=me(function(r,s){return ru(r,1,s)}),Ny=me(function(r,s,c){return ru(r,Ot(s)||0,c)});function Ly(r){return on(r,le)}o(Ly,"flip");function cs(r,s){if(typeof r!="function"||s!=null&&typeof s!="function")throw new At(a);var c=o(function(){var m=arguments,g=s?s.apply(this,m):m[0],S=c.cache;if(S.has(g))return S.get(g);var x=r.apply(this,m);return c.cache=S.set(g,x)||S,x},"memoized");return c.cache=new(cs.Cache||rn),c}o(cs,"memoize"),cs.Cache=rn;function us(r){if(typeof r!="function")throw new At(a);return function(){var s=arguments;switch(s.length){case 0:return!r.call(this);case 1:return!r.call(this,s[0]);case 2:return!r.call(this,s[0],s[1]);case 3:return!r.call(this,s[0],s[1],s[2])}return!r.apply(this,s)}}o(us,"negate");function Oy(r){return ud(2,r)}o(Oy,"once");var ky=Sg(function(r,s){s=s.length==1&&ue(s[0])?Fe(s[0],Et(ne())):Fe(Ze(s,1),Et(ne()));var c=s.length;return me(function(m){for(var g=-1,S=tt(m.length,c);++g<S;)m[g]=s[g].call(this,m[g]);return yt(r,this,m)})}),Ha=me(function(r,s){var c=gn(s,hr(Ha));return on(r,C,n,s,c)}),pd=me(function(r,s){var c=gn(s,hr(pd));return on(r,F,n,s,c)}),Fy=an(function(r,s){return on(r,Q,n,n,n,s)});function Py(r,s){if(typeof r!="function")throw new At(a);return s=s===n?s:de(s),me(r,s)}o(Py,"rest");function Hy(r,s){if(typeof r!="function")throw new At(a);return s=s==null?0:Ke(de(s),0),me(function(c){var m=c[s],g=wn(c,0,s);return m&&pn(g,m),yt(r,this,g)})}o(Hy,"spread");function Wy(r,s,c){var m=!0,g=!0;if(typeof r!="function")throw new At(a);return He(c)&&(m="leading"in c?!!c.leading:m,g="trailing"in c?!!c.trailing:g),md(r,s,{leading:m,maxWait:s,trailing:g})}o(Wy,"throttle");function By(r){return cd(r,1)}o(By,"unary");function Vy(r,s){return Ha(wa(s),r)}o(Vy,"wrap");function Uy(){if(!arguments.length)return[];var r=arguments[0];return ue(r)?r:[r]}o(Uy,"castArray");function Gy(r){return Dt(r,v)}o(Gy,"clone");function $y(r,s){return s=typeof s=="function"?s:n,Dt(r,v,s)}o($y,"cloneWith");function qy(r){return Dt(r,h|v)}o(qy,"cloneDeep");function zy(r,s){return s=typeof s=="function"?s:n,Dt(r,h|v,s)}o(zy,"cloneDeepWith");function jy(r,s){return s==null||nu(r,s,Qe(s))}o(jy,"conformsTo");function Ht(r,s){return r===s||r!==r&&s!==s}o(Ht,"eq");var Ky=ns(ua),Yy=ns(function(r,s){return r>=s}),Un=lu(function(){return arguments}())?lu:function(r){return We(r)&&Re.call(r,"callee")&&!Kc.call(r,"callee")},ue=N.isArray,Qy=Ac?Et(Ac):ig;function ft(r){return r!=null&&ds(r.length)&&!cn(r)}o(ft,"isArrayLike");function $e(r){return We(r)&&ft(r)}o($e,"isArrayLikeObject");function Xy(r){return r===!0||r===!1||We(r)&&st(r)==Xe}o(Xy,"isBoolean");var Mn=dp||Ya,Zy=_c?Et(_c):sg;function Jy(r){return We(r)&&r.nodeType===1&&!ti(r)}o(Jy,"isElement");function eE(r){if(r==null)return!0;if(ft(r)&&(ue(r)||typeof r=="string"||typeof r.splice=="function"||Mn(r)||mr(r)||Un(r)))return!r.length;var s=nt(r);if(s==Pe||s==kt)return!r.size;if(Jr(r))return!ha(r).length;for(var c in r)if(Re.call(r,c))return!1;return!0}o(eE,"isEmpty");function tE(r,s){return Qr(r,s)}o(tE,"isEqual");function nE(r,s,c){c=typeof c=="function"?c:n;var m=c?c(r,s):n;return m===n?Qr(r,s,n,c):!!m}o(nE,"isEqualWith");function Wa(r){if(!We(r))return!1;var s=st(r);return s==hn||s==en||typeof r.message=="string"&&typeof r.name=="string"&&!ti(r)}o(Wa,"isError");function rE(r){return typeof r=="number"&&Qc(r)}o(rE,"isFinite");function cn(r){if(!He(r))return!1;var s=st(r);return s==tn||s==Me||s==ut||s==Fr}o(cn,"isFunction");function gd(r){return typeof r=="number"&&r==de(r)}o(gd,"isInteger");function ds(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=J}o(ds,"isLength");function He(r){var s=typeof r;return r!=null&&(s=="object"||s=="function")}o(He,"isObject");function We(r){return r!=null&&typeof r=="object"}o(We,"isObjectLike");var vd=Dc?Et(Dc):ag;function iE(r,s){return r===s||fa(r,s,Aa(s))}o(iE,"isMatch");function sE(r,s,c){return c=typeof c=="function"?c:n,fa(r,s,Aa(s),c)}o(sE,"isMatchWith");function oE(r){return yd(r)&&r!=+r}o(oE,"isNaN");function aE(r){if($g(r))throw new ce(i);return cu(r)}o(aE,"isNative");function lE(r){return r===null}o(lE,"isNull");function cE(r){return r==null}o(cE,"isNil");function yd(r){return typeof r=="number"||We(r)&&st(r)==Ce}o(yd,"isNumber");function ti(r){if(!We(r)||st(r)!=Ge)return!1;var s=Hi(r);if(s===null)return!0;var c=Re.call(s,"constructor")&&s.constructor;return typeof c=="function"&&c instanceof c&&Oi.call(c)==sp}o(ti,"isPlainObject");var Ba=Nc?Et(Nc):lg;function uE(r){return gd(r)&&r>=-J&&r<=J}o(uE,"isSafeInteger");var Ed=Lc?Et(Lc):cg;function fs(r){return typeof r=="string"||!ue(r)&&We(r)&&st(r)==Hr}o(fs,"isString");function St(r){return typeof r=="symbol"||We(r)&&st(r)==Ti}o(St,"isSymbol");var mr=Oc?Et(Oc):ug;function dE(r){return r===n}o(dE,"isUndefined");function fE(r){return We(r)&&nt(r)==Wr}o(fE,"isWeakMap");function hE(r){return We(r)&&st(r)==Ah}o(hE,"isWeakSet");var mE=ns(ma),pE=ns(function(r,s){return r<=s});function bd(r){if(!r)return[];if(ft(r))return fs(r)?Ft(r):dt(r);if(Ur&&r[Ur])return jm(r[Ur]());var s=nt(r),c=s==Pe?ta:s==kt?Di:pr;return c(r)}o(bd,"toArray");function un(r){if(!r)return r===0?r:0;if(r=Ot(r),r===z||r===-z){var s=r<0?-1:1;return s*ve}return r===r?r:0}o(un,"toFinite");function de(r){var s=un(r),c=s%1;return s===s?c?s-c:s:0}o(de,"toInteger");function Sd(r){return r?Hn(de(r),0,Ue):0}o(Sd,"toLength");function Ot(r){if(typeof r=="number")return r;if(St(r))return et;if(He(r)){var s=typeof r.valueOf=="function"?r.valueOf():r;r=He(s)?s+"":s}if(typeof r!="string")return r===0?r:+r;r=Bc(r);var c=Qh.test(r);return c||Zh.test(r)?_m(r.slice(2),c?2:8):Yh.test(r)?et:+r}o(Ot,"toNumber");function wd(r){return zt(r,ht(r))}o(wd,"toPlainObject");function gE(r){return r?Hn(de(r),-J,J):r===0?r:0}o(gE,"toSafeInteger");function Ie(r){return r==null?"":bt(r)}o(Ie,"toString");var vE=dr(function(r,s){if(Jr(s)||ft(s)){zt(s,Qe(s),r);return}for(var c in s)Re.call(s,c)&&jr(r,c,s[c])}),Md=dr(function(r,s){zt(s,ht(s),r)}),hs=dr(function(r,s,c,m){zt(s,ht(s),r,m)}),yE=dr(function(r,s,c,m){zt(s,Qe(s),r,m)}),EE=an(aa);function bE(r,s){var c=ur(r);return s==null?c:tu(c,s)}o(bE,"create");var SE=me(function(r,s){r=Ae(r);var c=-1,m=s.length,g=m>2?s[2]:n;for(g&&ot(s[0],s[1],g)&&(m=1);++c<m;)for(var S=s[c],x=ht(S),I=-1,D=x.length;++I<D;){var O=x[I],k=r[O];(k===n||Ht(k,ar[O])&&!Re.call(r,O))&&(r[O]=S[O])}return r}),wE=me(function(r){return r.push(n,Bu),yt(xd,n,r)});function ME(r,s){return Fc(r,ne(s,3),qt)}o(ME,"findKey");function xE(r,s){return Fc(r,ne(s,3),ca)}o(xE,"findLastKey");function TE(r,s){return r==null?r:la(r,ne(s,3),ht)}o(TE,"forIn");function IE(r,s){return r==null?r:ou(r,ne(s,3),ht)}o(IE,"forInRight");function CE(r,s){return r&&qt(r,ne(s,3))}o(CE,"forOwn");function RE(r,s){return r&&ca(r,ne(s,3))}o(RE,"forOwnRight");function AE(r){return r==null?[]:Ki(r,Qe(r))}o(AE,"functions");function _E(r){return r==null?[]:Ki(r,ht(r))}o(_E,"functionsIn");function Va(r,s,c){var m=r==null?n:Wn(r,s);return m===n?c:m}o(Va,"get");function DE(r,s){return r!=null&&Gu(r,s,eg)}o(DE,"has");function Ua(r,s){return r!=null&&Gu(r,s,tg)}o(Ua,"hasIn");var NE=ku(function(r,s,c){s!=null&&typeof s.toString!="function"&&(s=ki.call(s)),r[s]=c},$a(mt)),LE=ku(function(r,s,c){s!=null&&typeof s.toString!="function"&&(s=ki.call(s)),Re.call(r,s)?r[s].push(c):r[s]=[c]},ne),OE=me(Yr);function Qe(r){return ft(r)?Jc(r):ha(r)}o(Qe,"keys");function ht(r){return ft(r)?Jc(r,!0):dg(r)}o(ht,"keysIn");function kE(r,s){var c={};return s=ne(s,3),qt(r,function(m,g,S){sn(c,s(m,g,S),m)}),c}o(kE,"mapKeys");function FE(r,s){var c={};return s=ne(s,3),qt(r,function(m,g,S){sn(c,g,s(m,g,S))}),c}o(FE,"mapValues");var PE=dr(function(r,s,c){Yi(r,s,c)}),xd=dr(function(r,s,c,m){Yi(r,s,c,m)}),HE=an(function(r,s){var c={};if(r==null)return c;var m=!1;s=Fe(s,function(S){return S=Sn(S,r),m||(m=S.length>1),S}),zt(r,Ca(r),c),m&&(c=Dt(c,h|p|v,Ng));for(var g=s.length;g--;)Ea(c,s[g]);return c});function WE(r,s){return Td(r,us(ne(s)))}o(WE,"omitBy");var BE=an(function(r,s){return r==null?{}:hg(r,s)});function Td(r,s){if(r==null)return{};var c=Fe(Ca(r),function(m){return[m]});return s=ne(s),gu(r,c,function(m,g){return s(m,g[0])})}o(Td,"pickBy");function VE(r,s,c){s=Sn(s,r);var m=-1,g=s.length;for(g||(g=1,r=n);++m<g;){var S=r==null?n:r[jt(s[m])];S===n&&(m=g,S=c),r=cn(S)?S.call(r):S}return r}o(VE,"result");function UE(r,s,c){return r==null?r:Xr(r,s,c)}o(UE,"set");function GE(r,s,c,m){return m=typeof m=="function"?m:n,r==null?r:Xr(r,s,c,m)}o(GE,"setWith");var Id=Hu(Qe),Cd=Hu(ht);function $E(r,s,c){var m=ue(r),g=m||Mn(r)||mr(r);if(s=ne(s,4),c==null){var S=r&&r.constructor;g?c=m?new S:[]:He(r)?c=cn(S)?ur(Hi(r)):{}:c={}}return(g?Rt:qt)(r,function(x,I,D){return s(c,x,I,D)}),c}o($E,"transform");function qE(r,s){return r==null?!0:Ea(r,s)}o(qE,"unset");function zE(r,s,c){return r==null?r:Su(r,s,wa(c))}o(zE,"update");function jE(r,s,c,m){return m=typeof m=="function"?m:n,r==null?r:Su(r,s,wa(c),m)}o(jE,"updateWith");function pr(r){return r==null?[]:ea(r,Qe(r))}o(pr,"values");function KE(r){return r==null?[]:ea(r,ht(r))}o(KE,"valuesIn");function YE(r,s,c){return c===n&&(c=s,s=n),c!==n&&(c=Ot(c),c=c===c?c:0),s!==n&&(s=Ot(s),s=s===s?s:0),Hn(Ot(r),s,c)}o(YE,"clamp");function QE(r,s,c){return s=un(s),c===n?(c=s,s=0):c=un(c),r=Ot(r),ng(r,s,c)}o(QE,"inRange");function XE(r,s,c){if(c&&typeof c!="boolean"&&ot(r,s,c)&&(s=c=n),c===n&&(typeof s=="boolean"?(c=s,s=n):typeof r=="boolean"&&(c=r,r=n)),r===n&&s===n?(r=0,s=1):(r=un(r),s===n?(s=r,r=0):s=un(s)),r>s){var m=r;r=s,s=m}if(c||r%1||s%1){var g=Xc();return tt(r+g*(s-r+Am("1e-"+((g+"").length-1))),s)}return ga(r,s)}o(XE,"random");var ZE=fr(function(r,s,c){return s=s.toLowerCase(),r+(c?Rd(s):s)});function Rd(r){return Ga(Ie(r).toLowerCase())}o(Rd,"capitalize");function Ad(r){return r=Ie(r),r&&r.replace(em,Um).replace(Em,"")}o(Ad,"deburr");function JE(r,s,c){r=Ie(r),s=bt(s);var m=r.length;c=c===n?m:Hn(de(c),0,m);var g=c;return c-=s.length,c>=0&&r.slice(c,g)==s}o(JE,"endsWith");function eb(r){return r=Ie(r),r&&Oh.test(r)?r.replace(oc,Gm):r}o(eb,"escape");function tb(r){return r=Ie(r),r&&Bh.test(r)?r.replace(Ho,"\\$&"):r}o(tb,"escapeRegExp");var nb=fr(function(r,s,c){return r+(c?"-":"")+s.toLowerCase()}),rb=fr(function(r,s,c){return r+(c?" ":"")+s.toLowerCase()}),ib=Nu("toLowerCase");function sb(r,s,c){r=Ie(r),s=de(s);var m=s?or(r):0;if(!s||m>=s)return r;var g=(s-m)/2;return ts(Ui(g),c)+r+ts(Vi(g),c)}o(sb,"pad");function ob(r,s,c){r=Ie(r),s=de(s);var m=s?or(r):0;return s&&m<s?r+ts(s-m,c):r}o(ob,"padEnd");function ab(r,s,c){r=Ie(r),s=de(s);var m=s?or(r):0;return s&&m<s?ts(s-m,c)+r:r}o(ab,"padStart");function lb(r,s,c){return c||s==null?s=0:s&&(s=+s),pp(Ie(r).replace(Wo,""),s||0)}o(lb,"parseInt");function cb(r,s,c){return(c?ot(r,s,c):s===n)?s=1:s=de(s),va(Ie(r),s)}o(cb,"repeat");function ub(){var r=arguments,s=Ie(r[0]);return r.length<3?s:s.replace(r[1],r[2])}o(ub,"replace");var db=fr(function(r,s,c){return r+(c?"_":"")+s.toLowerCase()});function fb(r,s,c){return c&&typeof c!="number"&&ot(r,s,c)&&(s=c=n),c=c===n?Ue:c>>>0,c?(r=Ie(r),r&&(typeof s=="string"||s!=null&&!Ba(s))&&(s=bt(s),!s&&sr(r))?wn(Ft(r),0,c):r.split(s,c)):[]}o(fb,"split");var hb=fr(function(r,s,c){return r+(c?" ":"")+Ga(s)});function mb(r,s,c){return r=Ie(r),c=c==null?0:Hn(de(c),0,r.length),s=bt(s),r.slice(c,c+s.length)==s}o(mb,"startsWith");function pb(r,s,c){var m=E.templateSettings;c&&ot(r,s,c)&&(s=n),r=Ie(r),s=hs({},s,m,Wu);var g=hs({},s.imports,m.imports,Wu),S=Qe(g),x=ea(g,S),I,D,O=0,k=s.interpolate||Ii,H="__p += '",q=na((s.escape||Ii).source+"|"+k.source+"|"+(k===ac?Kh:Ii).source+"|"+(s.evaluate||Ii).source+"|$","g"),Z="//# sourceURL="+(Re.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++xm+"]")+`
5
+ `;r.replace(q,function(ie,ge,Se,wt,at,Mt){return Se||(Se=wt),H+=r.slice(O,Mt).replace(tm,$m),ge&&(I=!0,H+=`' +
6
+ __e(`+ge+`) +
7
+ '`),at&&(D=!0,H+=`';
8
+ `+at+`;
9
+ __p += '`),Se&&(H+=`' +
10
+ ((__t = (`+Se+`)) == null ? '' : __t) +
11
+ '`),O=Mt+ie.length,ie}),H+=`';
12
+ `;var re=Re.call(s,"variable")&&s.variable;if(!re)H=`with (obj) {
13
+ `+H+`
14
+ }
15
+ `;else if(zh.test(re))throw new ce(l);H=(D?H.replace(_h,""):H).replace(Dh,"$1").replace(Nh,"$1;"),H="function("+(re||"obj")+`) {
16
+ `+(re?"":`obj || (obj = {});
17
+ `)+"var __t, __p = ''"+(I?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
18
+ function print() { __p += __j.call(arguments, '') }
19
+ `:`;
20
+ `)+H+`return __p
21
+ }`;var fe=Dd(function(){return xe(S,Z+"return "+H).apply(n,x)});if(fe.source=H,Wa(fe))throw fe;return fe}o(pb,"template");function gb(r){return Ie(r).toLowerCase()}o(gb,"toLower");function vb(r){return Ie(r).toUpperCase()}o(vb,"toUpper");function yb(r,s,c){if(r=Ie(r),r&&(c||s===n))return Bc(r);if(!r||!(s=bt(s)))return r;var m=Ft(r),g=Ft(s),S=Vc(m,g),x=Uc(m,g)+1;return wn(m,S,x).join("")}o(yb,"trim");function Eb(r,s,c){if(r=Ie(r),r&&(c||s===n))return r.slice(0,$c(r)+1);if(!r||!(s=bt(s)))return r;var m=Ft(r),g=Uc(m,Ft(s))+1;return wn(m,0,g).join("")}o(Eb,"trimEnd");function bb(r,s,c){if(r=Ie(r),r&&(c||s===n))return r.replace(Wo,"");if(!r||!(s=bt(s)))return r;var m=Ft(r),g=Vc(m,Ft(s));return wn(m,g).join("")}o(bb,"trimStart");function Sb(r,s){var c=X,m=se;if(He(s)){var g="separator"in s?s.separator:g;c="length"in s?de(s.length):c,m="omission"in s?bt(s.omission):m}r=Ie(r);var S=r.length;if(sr(r)){var x=Ft(r);S=x.length}if(c>=S)return r;var I=c-or(m);if(I<1)return m;var D=x?wn(x,0,I).join(""):r.slice(0,I);if(g===n)return D+m;if(x&&(I+=D.length-I),Ba(g)){if(r.slice(I).search(g)){var O,k=D;for(g.global||(g=na(g.source,Ie(lc.exec(g))+"g")),g.lastIndex=0;O=g.exec(k);)var H=O.index;D=D.slice(0,H===n?I:H)}}else if(r.indexOf(bt(g),I)!=I){var q=D.lastIndexOf(g);q>-1&&(D=D.slice(0,q))}return D+m}o(Sb,"truncate");function wb(r){return r=Ie(r),r&&Lh.test(r)?r.replace(sc,Xm):r}o(wb,"unescape");var Mb=fr(function(r,s,c){return r+(c?" ":"")+s.toUpperCase()}),Ga=Nu("toUpperCase");function _d(r,s,c){return r=Ie(r),s=c?n:s,s===n?zm(r)?ep(r):Pm(r):r.match(s)||[]}o(_d,"words");var Dd=me(function(r,s){try{return yt(r,n,s)}catch(c){return Wa(c)?c:new ce(c)}}),xb=an(function(r,s){return Rt(s,function(c){c=jt(c),sn(r,c,Pa(r[c],r))}),r});function Tb(r){var s=r==null?0:r.length,c=ne();return r=s?Fe(r,function(m){if(typeof m[1]!="function")throw new At(a);return[c(m[0]),m[1]]}):[],me(function(m){for(var g=-1;++g<s;){var S=r[g];if(yt(S[0],this,m))return yt(S[1],this,m)}})}o(Tb,"cond");function Ib(r){return Xp(Dt(r,h))}o(Ib,"conforms");function $a(r){return function(){return r}}o($a,"constant");function Cb(r,s){return r==null||r!==r?s:r}o(Cb,"defaultTo");var Rb=Ou(),Ab=Ou(!0);function mt(r){return r}o(mt,"identity");function qa(r){return uu(typeof r=="function"?r:Dt(r,h))}o(qa,"iteratee");function _b(r){return fu(Dt(r,h))}o(_b,"matches");function Db(r,s){return hu(r,Dt(s,h))}o(Db,"matchesProperty");var Nb=me(function(r,s){return function(c){return Yr(c,r,s)}}),Lb=me(function(r,s){return function(c){return Yr(r,c,s)}});function za(r,s,c){var m=Qe(s),g=Ki(s,m);c==null&&!(He(s)&&(g.length||!m.length))&&(c=s,s=r,r=this,g=Ki(s,Qe(s)));var S=!(He(c)&&"chain"in c)||!!c.chain,x=cn(r);return Rt(g,function(I){var D=s[I];r[I]=D,x&&(r.prototype[I]=function(){var O=this.__chain__;if(S||O){var k=r(this.__wrapped__),H=k.__actions__=dt(this.__actions__);return H.push({func:D,args:arguments,thisArg:r}),k.__chain__=O,k}return D.apply(r,pn([this.value()],arguments))})}),r}o(za,"mixin");function Ob(){return Ye._===this&&(Ye._=op),this}o(Ob,"noConflict");function ja(){}o(ja,"noop");function kb(r){return r=de(r),me(function(s){return mu(s,r)})}o(kb,"nthArg");var Fb=xa(Fe),Pb=xa(kc),Hb=xa(Yo);function Nd(r){return Da(r)?Qo(jt(r)):mg(r)}o(Nd,"property");function Wb(r){return function(s){return r==null?n:Wn(r,s)}}o(Wb,"propertyOf");var Bb=Fu(),Vb=Fu(!0);function Ka(){return[]}o(Ka,"stubArray");function Ya(){return!1}o(Ya,"stubFalse");function Ub(){return{}}o(Ub,"stubObject");function Gb(){return""}o(Gb,"stubString");function $b(){return!0}o($b,"stubTrue");function qb(r,s){if(r=de(r),r<1||r>J)return[];var c=Ue,m=tt(r,Ue);s=ne(s),r-=Ue;for(var g=Jo(m,s);++c<r;)s(c);return g}o(qb,"times");function zb(r){return ue(r)?Fe(r,jt):St(r)?[r]:dt(Zu(Ie(r)))}o(zb,"toPath");function jb(r){var s=++ip;return Ie(r)+s}o(jb,"uniqueId");var Kb=es(function(r,s){return r+s},0),Yb=Ta("ceil"),Qb=es(function(r,s){return r/s},1),Xb=Ta("floor");function Zb(r){return r&&r.length?ji(r,mt,ua):n}o(Zb,"max");function Jb(r,s){return r&&r.length?ji(r,ne(s,2),ua):n}o(Jb,"maxBy");function eS(r){return Hc(r,mt)}o(eS,"mean");function tS(r,s){return Hc(r,ne(s,2))}o(tS,"meanBy");function nS(r){return r&&r.length?ji(r,mt,ma):n}o(nS,"min");function rS(r,s){return r&&r.length?ji(r,ne(s,2),ma):n}o(rS,"minBy");var iS=es(function(r,s){return r*s},1),sS=Ta("round"),oS=es(function(r,s){return r-s},0);function aS(r){return r&&r.length?Zo(r,mt):0}o(aS,"sum");function lS(r,s){return r&&r.length?Zo(r,ne(s,2)):0}return o(lS,"sumBy"),E.after=_y,E.ary=cd,E.assign=vE,E.assignIn=Md,E.assignInWith=hs,E.assignWith=yE,E.at=EE,E.before=ud,E.bind=Pa,E.bindAll=xb,E.bindKey=dd,E.castArray=Uy,E.chain=od,E.chunk=Xg,E.compact=Zg,E.concat=Jg,E.cond=Tb,E.conforms=Ib,E.constant=$a,E.countBy=ay,E.create=bE,E.curry=fd,E.curryRight=hd,E.debounce=md,E.defaults=SE,E.defaultsDeep=wE,E.defer=Dy,E.delay=Ny,E.difference=ev,E.differenceBy=tv,E.differenceWith=nv,E.drop=rv,E.dropRight=iv,E.dropRightWhile=sv,E.dropWhile=ov,E.fill=av,E.filter=cy,E.flatMap=fy,E.flatMapDeep=hy,E.flatMapDepth=my,E.flatten=nd,E.flattenDeep=lv,E.flattenDepth=cv,E.flip=Ly,E.flow=Rb,E.flowRight=Ab,E.fromPairs=uv,E.functions=AE,E.functionsIn=_E,E.groupBy=py,E.initial=fv,E.intersection=hv,E.intersectionBy=mv,E.intersectionWith=pv,E.invert=NE,E.invertBy=LE,E.invokeMap=vy,E.iteratee=qa,E.keyBy=yy,E.keys=Qe,E.keysIn=ht,E.map=as,E.mapKeys=kE,E.mapValues=FE,E.matches=_b,E.matchesProperty=Db,E.memoize=cs,E.merge=PE,E.mergeWith=xd,E.method=Nb,E.methodOf=Lb,E.mixin=za,E.negate=us,E.nthArg=kb,E.omit=HE,E.omitBy=WE,E.once=Oy,E.orderBy=Ey,E.over=Fb,E.overArgs=ky,E.overEvery=Pb,E.overSome=Hb,E.partial=Ha,E.partialRight=pd,E.partition=by,E.pick=BE,E.pickBy=Td,E.property=Nd,E.propertyOf=Wb,E.pull=Ev,E.pullAll=id,E.pullAllBy=bv,E.pullAllWith=Sv,E.pullAt=wv,E.range=Bb,E.rangeRight=Vb,E.rearg=Fy,E.reject=My,E.remove=Mv,E.rest=Py,E.reverse=ka,E.sampleSize=Ty,E.set=UE,E.setWith=GE,E.shuffle=Iy,E.slice=xv,E.sortBy=Ay,E.sortedUniq=Dv,E.sortedUniqBy=Nv,E.split=fb,E.spread=Hy,E.tail=Lv,E.take=Ov,E.takeRight=kv,E.takeRightWhile=Fv,E.takeWhile=Pv,E.tap=Zv,E.throttle=Wy,E.thru=os,E.toArray=bd,E.toPairs=Id,E.toPairsIn=Cd,E.toPath=zb,E.toPlainObject=wd,E.transform=$E,E.unary=By,E.union=Hv,E.unionBy=Wv,E.unionWith=Bv,E.uniq=Vv,E.uniqBy=Uv,E.uniqWith=Gv,E.unset=qE,E.unzip=Fa,E.unzipWith=sd,E.update=zE,E.updateWith=jE,E.values=pr,E.valuesIn=KE,E.without=$v,E.words=_d,E.wrap=Vy,E.xor=qv,E.xorBy=zv,E.xorWith=jv,E.zip=Kv,E.zipObject=Yv,E.zipObjectDeep=Qv,E.zipWith=Xv,E.entries=Id,E.entriesIn=Cd,E.extend=Md,E.extendWith=hs,za(E,E),E.add=Kb,E.attempt=Dd,E.camelCase=ZE,E.capitalize=Rd,E.ceil=Yb,E.clamp=YE,E.clone=Gy,E.cloneDeep=qy,E.cloneDeepWith=zy,E.cloneWith=$y,E.conformsTo=jy,E.deburr=Ad,E.defaultTo=Cb,E.divide=Qb,E.endsWith=JE,E.eq=Ht,E.escape=eb,E.escapeRegExp=tb,E.every=ly,E.find=uy,E.findIndex=ed,E.findKey=ME,E.findLast=dy,E.findLastIndex=td,E.findLastKey=xE,E.floor=Xb,E.forEach=ad,E.forEachRight=ld,E.forIn=TE,E.forInRight=IE,E.forOwn=CE,E.forOwnRight=RE,E.get=Va,E.gt=Ky,E.gte=Yy,E.has=DE,E.hasIn=Ua,E.head=rd,E.identity=mt,E.includes=gy,E.indexOf=dv,E.inRange=QE,E.invoke=OE,E.isArguments=Un,E.isArray=ue,E.isArrayBuffer=Qy,E.isArrayLike=ft,E.isArrayLikeObject=$e,E.isBoolean=Xy,E.isBuffer=Mn,E.isDate=Zy,E.isElement=Jy,E.isEmpty=eE,E.isEqual=tE,E.isEqualWith=nE,E.isError=Wa,E.isFinite=rE,E.isFunction=cn,E.isInteger=gd,E.isLength=ds,E.isMap=vd,E.isMatch=iE,E.isMatchWith=sE,E.isNaN=oE,E.isNative=aE,E.isNil=cE,E.isNull=lE,E.isNumber=yd,E.isObject=He,E.isObjectLike=We,E.isPlainObject=ti,E.isRegExp=Ba,E.isSafeInteger=uE,E.isSet=Ed,E.isString=fs,E.isSymbol=St,E.isTypedArray=mr,E.isUndefined=dE,E.isWeakMap=fE,E.isWeakSet=hE,E.join=gv,E.kebabCase=nb,E.last=Lt,E.lastIndexOf=vv,E.lowerCase=rb,E.lowerFirst=ib,E.lt=mE,E.lte=pE,E.max=Zb,E.maxBy=Jb,E.mean=eS,E.meanBy=tS,E.min=nS,E.minBy=rS,E.stubArray=Ka,E.stubFalse=Ya,E.stubObject=Ub,E.stubString=Gb,E.stubTrue=$b,E.multiply=iS,E.nth=yv,E.noConflict=Ob,E.noop=ja,E.now=ls,E.pad=sb,E.padEnd=ob,E.padStart=ab,E.parseInt=lb,E.random=XE,E.reduce=Sy,E.reduceRight=wy,E.repeat=cb,E.replace=ub,E.result=VE,E.round=sS,E.runInContext=A,E.sample=xy,E.size=Cy,E.snakeCase=db,E.some=Ry,E.sortedIndex=Tv,E.sortedIndexBy=Iv,E.sortedIndexOf=Cv,E.sortedLastIndex=Rv,E.sortedLastIndexBy=Av,E.sortedLastIndexOf=_v,E.startCase=hb,E.startsWith=mb,E.subtract=oS,E.sum=aS,E.sumBy=lS,E.template=pb,E.times=qb,E.toFinite=un,E.toInteger=de,E.toLength=Sd,E.toLower=gb,E.toNumber=Ot,E.toSafeInteger=gE,E.toString=Ie,E.toUpper=vb,E.trim=yb,E.trimEnd=Eb,E.trimStart=bb,E.truncate=Sb,E.unescape=wb,E.uniqueId=jb,E.upperCase=Mb,E.upperFirst=Ga,E.each=ad,E.eachRight=ld,E.first=rd,za(E,function(){var r={};return qt(E,function(s,c){Re.call(E.prototype,c)||(r[c]=s)}),r}(),{chain:!1}),E.VERSION=e,Rt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){E[r].placeholder=E}),Rt(["drop","take"],function(r,s){ye.prototype[r]=function(c){c=c===n?1:Ke(de(c),0);var m=this.__filtered__&&!s?new ye(this):this.clone();return m.__filtered__?m.__takeCount__=tt(c,m.__takeCount__):m.__views__.push({size:tt(c,Ue),type:r+(m.__dir__<0?"Right":"")}),m},ye.prototype[r+"Right"]=function(c){return this.reverse()[r](c).reverse()}}),Rt(["filter","map","takeWhile"],function(r,s){var c=s+1,m=c==W||c==Y;ye.prototype[r]=function(g){var S=this.clone();return S.__iteratees__.push({iteratee:ne(g,3),type:c}),S.__filtered__=S.__filtered__||m,S}}),Rt(["head","last"],function(r,s){var c="take"+(s?"Right":"");ye.prototype[r]=function(){return this[c](1).value()[0]}}),Rt(["initial","tail"],function(r,s){var c="drop"+(s?"":"Right");ye.prototype[r]=function(){return this.__filtered__?new ye(this):this[c](1)}}),ye.prototype.compact=function(){return this.filter(mt)},ye.prototype.find=function(r){return this.filter(r).head()},ye.prototype.findLast=function(r){return this.reverse().find(r)},ye.prototype.invokeMap=me(function(r,s){return typeof r=="function"?new ye(this):this.map(function(c){return Yr(c,r,s)})}),ye.prototype.reject=function(r){return this.filter(us(ne(r)))},ye.prototype.slice=function(r,s){r=de(r);var c=this;return c.__filtered__&&(r>0||s<0)?new ye(c):(r<0?c=c.takeRight(-r):r&&(c=c.drop(r)),s!==n&&(s=de(s),c=s<0?c.dropRight(-s):c.take(s-r)),c)},ye.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},ye.prototype.toArray=function(){return this.take(Ue)},qt(ye.prototype,function(r,s){var c=/^(?:filter|find|map|reject)|While$/.test(s),m=/^(?:head|last)$/.test(s),g=E[m?"take"+(s=="last"?"Right":""):s],S=m||/^find/.test(s);g&&(E.prototype[s]=function(){var x=this.__wrapped__,I=m?[1]:arguments,D=x instanceof ye,O=I[0],k=D||ue(x),H=o(function(ge){var Se=g.apply(E,pn([ge],I));return m&&q?Se[0]:Se},"interceptor");k&&c&&typeof O=="function"&&O.length!=1&&(D=k=!1);var q=this.__chain__,Z=!!this.__actions__.length,re=S&&!q,fe=D&&!Z;if(!S&&k){x=fe?x:new ye(this);var ie=r.apply(x,I);return ie.__actions__.push({func:os,args:[H],thisArg:n}),new _t(ie,q)}return re&&fe?r.apply(this,I):(ie=this.thru(H),re?m?ie.value()[0]:ie.value():ie)})}),Rt(["pop","push","shift","sort","splice","unshift"],function(r){var s=Ni[r],c=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);E.prototype[r]=function(){var g=arguments;if(m&&!this.__chain__){var S=this.value();return s.apply(ue(S)?S:[],g)}return this[c](function(x){return s.apply(ue(x)?x:[],g)})}}),qt(ye.prototype,function(r,s){var c=E[s];if(c){var m=c.name+"";Re.call(cr,m)||(cr[m]=[]),cr[m].push({name:s,func:c})}}),cr[Ji(n,b).name]=[{name:"wrapper",func:n}],ye.prototype.clone=wp,ye.prototype.reverse=Mp,ye.prototype.value=xp,E.prototype.at=Jv,E.prototype.chain=ey,E.prototype.commit=ty,E.prototype.next=ny,E.prototype.plant=iy,E.prototype.reverse=sy,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=oy,E.prototype.first=E.prototype.head,Ur&&(E.prototype[Ur]=ry),E},"runInContext"),vn=tp();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Ye._=vn,define(function(){return vn})):On?((On.exports=vn)._=vn,qo._=vn):Ye._=vn}).call(Or)});var vh=ps(er=>{var ho=gh();function Mi(n){return n.reduce(function(e,t,i,a){return e+t})}o(Mi,"sum");function Jt(n){if(ho.isArray(n))return n;if(typeof n=="string")return n.split("");throw Error("Parameter must be a string or array.")}o(Jt,"ensureArr");er.jarowinkler=function(n,e,Q){n=Jt(n),e=Jt(e);var i,a;n.length>e.length?(i=n,a=e):(i=e,a=n);var l=Q||.7,u=.1,d=Math.floor(Math.max(i.length/2-1,0)),f=[],h=[],p,v,y,w,M=0;for(p=0;p<a.length;p++)for(w=a[p],v=Math.max(p-d,0),y=Math.min(p+d+1,i.length);v<y;v++)if(!h[v]&&w===i[v]){f[p]=v,h[v]=!0,M++;break}var b=[],R=[],T,_,C=0,F=0;for(T=0,_=0;T<a.length;T++)f[T]>-1&&(b[_]=a[T],_++);for(T=0,_=0;T<i.length;T++)h[T]&&(R[_]=i[T],_++);for(p=0;p<b.length;p++)b[p]!==R[p]&&C++;for(p=0;p<a.length&&n[p]===e[p];p++)F++;var G=M,Q=C/2;if(G){var le=(G/n.length+G/e.length+(G-Q)/G)/3,X=le<l?le:le+Math.min(u,1/i.length)*F*(1-le);return X}else return 0};er.levenshtein=function(n,e,t){if(n=Jt(n),e=Jt(e),n.length===0)return e.length;if(e.length===0)return n.length;var i=t||{d:1,i:1,s:1},a=[],l=[],u=e.length+1,d,f,h,p;for(d=0;d<u;d++)a[d]=d;for(d=0;d<n.length;d++){for(l[0]=d+1,f=0;f<e.length;f++)h=n[d]===e[f]?0:i.s,l[f+1]=Math.min(l[f]+i.d,a[f+1]+i.i,a[f]+h);for(f=0;f<u;f++)a[f]=l[f]}return p=Math.max(n.length,e.length),(p-l[e.length])/p};er.ngram=function(n,e,t){n=Jt(n),e=Jt(e);var i=n.length,a=e.length,l=t||2,u,d,f,h,p,v,y,w=[],M=[],b=[],R=[],T=[],_=i+1;if(i===0||a===0)return i===a?1:0;if(u=0,i<l||a<l){for(d=0,h=Math.min(i,a);d<h;d++)n[d]===e[d]&&u++;return u/Math.max(i,a)}for(d=0;d<i+l-1;d++)d<l-1?w[d]=0:w[d]=n[d-l+1];for(d=0;d<=i;d++)M[d]=d;for(f=1;f<=a;f++){if(f<l){for(p=0;p<l-f;p++)T[p]=0;for(p=l-f;p<l;p++)T[p]=e[p-(l-f)]}else T=e.slice(f-l,f);for(b[0]=f,d=1;d<=i;d++){for(u=0,v=l,h=0;h<l;h++)w[d-1+h]!==T[h]?u++:w[d-1+h]===0&&v--;y=u/v,b[d]=Math.min(Math.min(b[d-1]+1,M[d]+1),M[d-1]+y)}R=M,M=b,b=R}return 1-M[i]/Math.max(i,a)};er.pearson=function(n,e){var t=[];Object.keys(n).forEach(function(v){e[v]&&t.push(v)});var i=t.length;if(i===0)return 0;var a=Mi(t.map(function(v){return n[v]})),l=Mi(t.map(function(v){return e[v]})),u=Mi(t.map(function(v){return Math.pow(n[v],2)})),d=Mi(t.map(function(v){return Math.pow(e[v],2)})),f=Mi(t.map(function(v){return n[v]*e[v]})),h=f-a*l/i,p=Math.sqrt((u-Math.pow(a,2)/i)*(d-Math.pow(l,2)/i));return p===0?0:h/p};er.jaccard=function(n,e){return n=Jt(n),e=Jt(e),ho.intersection(n,e).length/ho.union(n,e).length};er.tanimoto=function(n,e){n=Jt(n),e=Jt(e);var t=ho.intersection(n,e).length;return t/(n.length+e.length-t)}});var Od={examinedAttributes:["class","src","placeholder","href","checked","disabled","contenteditable","draggable","hidden","inputmode","role","title","name","type","readonly","size","required","multiple","min","max","step","maxlength","alt","loop","controls","poster"]};var gr={attributesToExtract:Od.examinedAttributes,structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}};var ri=(a=>(a[a.Query=0]="Query",a[a.Intersection=1]="Intersection",a[a.Interactables=2]="Interactables",a[a.All=3]="All",a))(ri||{});var gs={rect:["width","height"],circle:["cx","cy","r"],ellipse:["cx","cy","rx","ry"],line:["x1","y1","x2","y2"],polygon:["points"],polyline:["points"],path:["d"],text:["x","y"]},vr=class{constructor(e){this.document=e;this.limit=5;this.extractSVG=o(e=>Array.from(e.children).map(t=>{let i=gs[t.tagName.toLowerCase()];if(!i)return null;let a=i.reduce((u,d)=>{let f=t.getAttribute(d);return{...u,[d]:f}},{});return{tagName:t.tagName.toLowerCase(),attributes:a}}).filter(t=>!!t),"extractSVG")}static{o(this,"SVGsExtractor")}extract(e){let t=e.matches("svg")?[e]:e.querySelectorAll("svg");if(!(!t.length||t.length>this.limit))return Array.from(t).map(this.extractSVG)}};function vs(n){if(!n)return!1;let e=n.getBoundingClientRect();return e.top<=window.innerHeight&&e.left<=window.innerWidth&&e.bottom>=0&&e.right>=0}o(vs,"isElementInViewport");function ys(n,e=!0){let t=window.getComputedStyle(n),i=t.opacity==="0";return{visible:t.visibility!=="hidden"&&t.display!=="none"&&(!e||!i),isTransparent:i}}o(ys,"isElementVisibleByStyles");function kd(n,e,t=!0,i=!0){let a=n.getBoundingClientRect(),l=e.getBoundingClientRect(),u=a.left<l.right&&a.right>l.left,d=a.top<l.bottom&&a.bottom>l.top;return(!t||u)&&(!i||d)}o(kd,"elementsOverlap");function Fd(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;if(!t)return null;let i=n.ownerDocument,a={top:0,left:0,right:t.innerWidth||i.documentElement.clientWidth,bottom:t.innerHeight||i.documentElement.clientHeight},l={top:Math.max(e.top,a.top),left:Math.max(e.left,a.left),right:Math.min(e.right,a.right),bottom:Math.min(e.bottom,a.bottom),height:0,width:0};return l.width=l.right-l.left,l.height=l.bottom-l.top,l.width>0&&l.height>0?l:null}o(Fd,"getOverlappingRectangleWithViewport");function Qa(n){try{return getComputedStyle(n).position==="fixed"?!0:!n.parentElement||n.parentElement===document.body?!1:Qa(n.parentElement)}catch(e){return console.error("isAncestorOrSelfFixed",e),!1}}o(Qa,"isAncestorOrSelfFixed");function Xa(n){let{top:e}=n.getBoundingClientRect();return e<0?-e:0}o(Xa,"getHeightOfCroppedElementAboveViewport");function Za(n){let{bottom:e}=n.getBoundingClientRect(),t=window.innerHeight;return e>t?e-t:0}o(Za,"getHeightsOfCroppedElementBelowViewport");function Pd(n){if(!n.src)return!0;let e=window.location.origin;try{let t=new URL(n.src).origin;return e!==t}catch{return!1}}o(Pd,"isCrossOriginIframe");var we=o((n,e=document,{excludeCrossOriginIframes:t=!1,includeHTML:i=!1}={})=>{let a=[],l=o(d=>{d.querySelectorAll(n).forEach(f=>a.push(f))},"queryElement"),u=o(d=>{l(d);let f=[],h=o(p=>{p.shadowRoot&&f.push(p.shadowRoot),p.childNodes?.forEach(v=>h(v))},"findShadowRoots");h(d),f.forEach(p=>u(p)),d.querySelectorAll("iframe").forEach(p=>{if(!(t&&Pd(p)))try{let v=p.contentDocument;v&&u(v)}catch{return}})},"queryNode");return u(e),i&&e instanceof Document&&e.documentElement.matches(n)&&a.push(e.documentElement),a},"querySelectorAllExtended"),Gn=o((n,e)=>{if(n.matches(e))return n;let t=n.slot;if(t){let l=n.parentElement;for(;l;){if(l.shadowRoot){let u=l.shadowRoot.querySelector(`slot[name="${t}"]`);if(u)return Gn(u,e)}l=l.parentElement}return null}let i=n.closest(e);if(i)return i;let a=n.getRootNode();return a.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Gn(a.host,e):null},"closestExtended"),yr=o((n,{flattenShadowRootChildren:e=!1}={})=>{let t=Array.from(n.childNodes);if(n.nodeType===Node.ELEMENT_NODE){let i=n;i.shadowRoot&&(t=t.filter(a=>!a.assignedSlot),e?t=t.concat(Array.from(i.shadowRoot.childNodes)):t.push(i.shadowRoot)),i.tagName.toLowerCase()==="slot"&&t.push(...i.assignedNodes())}return t},"childNodesExtended"),Hd=o(n=>{let e=Array.from(n.children);return n.shadowRoot&&(e=e.filter(t=>!t.assignedSlot),e.push(...Array.from(n.shadowRoot.children))),n.tagName.toLowerCase()==="slot"&&e.push(...n.assignedElements()),e},"childrenExtended");var fn=o(n=>{let e=n.parentElement;if(e)return e;switch(n.nodeType){case Node.ELEMENT_NODE:let i=n;if(i.assignedSlot)return i.assignedSlot;break;case Node.DOCUMENT_FRAGMENT_NODE:return n.host}let t=n.parentNode;if(t)switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return t.host;case Node.DOCUMENT_NODE:if(window.document===t)return null;let a=Array.from(window.document.querySelectorAll("iframe")).find(l=>l.contentDocument===t);if(a)return a}return null},"parentElementExtended");var Kt=class{static{o(this,"ScrollHelper")}constructor(e){this.element=e,this.elRect=this.element.getBoundingClientRect()}scrollIntoView(){if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!vs(this.element))for(let e of this.initialScrollPositions){let t=e.element.getBoundingClientRect();if(this.elRect.top<t.top||this.elRect.bottom>t.bottom){let i=this.elRect.top-t.top+e.element.scrollTop;e.element.scrollTop=i}}return this}restore(){this.initialScrollPositions.forEach(({element:e,top:t,left:i})=>{try{e.scroll(i,t)}catch(a){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:e,top:t,left:i},a)}})}getScrollableParentsPositions(){this.initialScrollPositions=[];let e=fn(this.element);for(;e!=null;)(e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&this.initialScrollPositions.push({element:e,top:e.scrollTop,left:e.scrollLeft}),e=fn(e)}};var pt=class n{constructor({target:e=document,disabled:t=!1,log:i=!0,name:a,monitorInput:l=!1}){this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid"];this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"];this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"];this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(",");this.shouldIgnoreMutationRecord=o(e=>{try{if(e.type==="attributes"&&this.ignoreMutationsWithAttributes.includes(e.attributeName)||e.type==="attributes"&&this.ignoreMutationsWithAttributeRegexPatterns.some(i=>new RegExp("^"+i+"$").test(e.attributeName)))return!0;if(e.type==="attributes"&&e.attributeName==="class"){let i=o(a=>a?a.split(" ").filter(l=>![":hover","rrweb-paused"].includes(l)).sort().join(" "):"","standardizeClassName");return i(e.oldValue)===i(e.target.className)}let t=o(i=>this.ignoreElementsWithClasses.some(a=>i.classList.contains(a)),"doesElementHaveIgnoredClass");if(e.type==="childList"&&Array.from(e.addedNodes).every(i=>t(i))&&Array.from(e.removedNodes).every(i=>t(i)))return!0}catch{}return!1},"shouldIgnoreMutationRecord");this.monitoredTextElements=[];this.monitorInputEnabledElement=o(e=>{e.addEventListener("input",t=>{this.invalidate()})},"monitorInputEnabledElement");this.target=e,this.name=a,this.disabled=t,this.logActivity=i,this.monitorInput=l,this.startObserver()}static{o(this,"DOMMutationDependentCache")}static{this.instances={}}static getInstance(e,t){let i=this.makeNameForCache(e,t?.flags);n.instances[i]||(n.instances[i]=new n({...t,name:t?.name??e}),t?.initialValue&&n.instances[i].set(t?.initialValue));let a=n.instances[i];return t?.invalidate&&a.invalidate(),a}static invalidateAll(){Object.values(n.instances).forEach(e=>e.invalidate())}static makeNameForCache(e,t){return`${e}${t?JSON.stringify(t):""}`}startObserver(){this.observer=new MutationObserver(e=>{e.every(this.shouldIgnoreMutationRecord)||(this.invalidate(),this.monitorInput&&e.forEach(t=>{t.addedNodes.forEach(i=>{if(i.nodeType===Node.ELEMENT_NODE&&i.nodeType===Node.ELEMENT_NODE){let a=i;a.matches(this.inputEnabledSelectors)||a.isContentEditable?this.monitorInputEnabledElement(a):Array.from(a.querySelectorAll("*")).filter(l=>l.matches&&l.matches(this.inputEnabledSelectors)||l.isContentEditable).forEach(this.monitorInputEnabledElement)}})}))}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.monitorInput&&this.startInputMonitoring()}startInputMonitoring(){this.monitoredTextElements=we(this.inputEnabledSelectors),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}get(){return this.log("get","has cache:",!!this.cache),this.cache}set(e){this.disabled||(this.cache=e)}hasCache(){return this.log("hasCache",!!this.cache),!!this.cache}invalidate(){this.set(void 0)}log(...e){this.logActivity&&console.log(`[DOMMutationDependentCache] ${this.name?`[${this.name}]`:""}:`,...e)}};function gt(n,e){try{if(!n.ownerDocument)return!1;let t=n.ownerDocument.defaultView;return t?n instanceof t[e]||n instanceof t.top?.[e]:!1}catch{}return!1}o(gt,"isNodeInstanceOf");function Er(n,e){return e??n?.ownerDocument?.defaultView??window}o(Er,"getElementWindow");function rt(n,e={}){let{markTransparentElementsAsHidden:t=!0,markElementsHiddenByTransparentElementAsVisible:i=!1,scrollIntoView:a=!0,useCache:l=!1}=e;if(l){let y=gS(n,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:i,scrollIntoView:a});if(y)return y}let u,d={isHidden:!0},f=o((y,w=!0)=>(w&&u&&u.restore(),l&&vS(n,y,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:i}),{...d,...y}),"prepareResult");if(!n)return f({isHidden:!0});n=n.tagName==="OPTION"&&(n.closest("select")||n.closest("datalist"))||n;let{visible:h,isTransparent:p}=ys(n,t);if(d.isTransparent=p,!h)return f({isHidden:!0});if(yS(n,{scrollIntoView:a}))return f({isHidden:!0});try{let M=function(C){let F=C;for(;F;){if(F.nodeType===11)return[F,F.ownerDocument.defaultView];F=F.parentNode}};var v=M;o(M,"findShadowDocument"),a&&(u=new Kt(n).scrollIntoView());let y=Fd(n);if(!y)return f({isHidden:!0});let w=[[y.width/2,y.height/2,!0],[Math.max(y.width*.01,1),Math.max(y.height*.01,1)],[Math.min(y.width*.99,y.width-1),Math.max(y.height*.01,1)],[Math.max(y.width*.01,1),Math.min(y.height*.99,y.height-1)],[Math.min(y.width*.99,y.width-1),Math.min(y.height*.99,y.height-1)]],[b,R]=M(n)??[n.ownerDocument,n.ownerDocument.defaultView],T,_=Er(n);if(_&&n instanceof _.HTMLInputElement&&n.id&&n.type&&["checkbox","radio"].includes(n.type)){let C=we(`label[for="${n.id}"]`,b);C.length&&(T=C[0])}for(let[C,F,G]of w){let Q=y.left+C>=0&&y.left+C<=R.innerWidth?y.left+C:C,le=y.top+F>=0&&y.top+F<=R.innerHeight?y.top+F:F,X=b.elementFromPoint(Q,le);if(X===n)return f({isHidden:!1,clickOffset:G?void 0:{x:C,y:F}});if(!X)continue;if(G===!0&&X.shadowRoot)return f(rt(X,e));let se=X;for(;se;){if(se===n||T&&T===se)return f({isHidden:!1,clickOffset:G?void 0:{x:C,y:F}});se=fn(se)}if(i)try{let he=b.elementsFromPoint(Q,le);for(let V of he){if(V===n)return f({isHidden:!1,clickOffset:G?void 0:{x:C,y:F},isBehindTransparentElement:!0});let W=R.getComputedStyle(V),K=V.getBoundingClientRect();if(!(W.opacity==="0"||W.visibility==="hidden"||/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(W.backgroundColor))||K.width>y.width*1.2||K.height>y.height*1.2)break}}catch(he){console.error("Error while checking transparent elements over interactable",he)}}return u&&(u.restore(),u=void 0),T?rt(T,e):f({isHidden:!0})}catch(y){throw y}}o(rt,"isElementHidden");var Wd=o(n=>{let e=pt.getInstance("isElementHidden",{log:!1,flags:n}),t=e.get();return t||(t=new Map,e.set(t)),t},"getIsHiddenMapFromCache");function gS(n,e={}){let t=Wd(e);return t.has(n)?t.get(n):void 0}o(gS,"getIsElementHiddenFromCache");var vS=o((n,e,t={})=>{Wd(t).set(n,e)},"setIsElemenetHiddenInCache");function yS(n,{scrollIntoView:e=!0}={}){let t=n.parentElement,i=window.getComputedStyle(n);if(i.position==="absolute"||i.position==="fixed")return!1;let a;e&&(a=new Kt(n).scrollIntoView());let l=o(d=>(a&&a.restore(),d),"restoreAndReturn"),u=Er(n);if(!u)return l(!1);for(;t;){if(!(t instanceof u.Element))return l(!1);let d=window.getComputedStyle(t);if(d.position==="absolute"||d.position==="fixed")return l(!1);let f=d.overflowX==="hidden",h=d.overflowY==="hidden";if((f||h)&&!kd(t,n,f,h))return l(!0);t=t.parentElement}return l(!1)}o(yS,"isHiddenByOverflow");var $n=o(n=>rt(n,{useCache:!0}).isHidden,"getIsElementHidden"),Es=o((n,e)=>{let t=n.tagName.toLowerCase();switch(t){case"img":case"video":case"audio":return{type:0,tag:t,src:n.getAttribute("src"),size:{width:n.clientWidth,height:n.clientHeight},screenSize:{width:window.innerWidth,height:window.innerHeight},isRoot:e,isHidden:$n(n)};case"svg":return{type:6,tag:t,components:new vr(document).extract(n)[0],isRoot:e,isHidden:$n(n)};case"a":return{type:2,tag:t,href:n.getAttribute("href"),text:n.innerText,isRoot:e,isHidden:$n(n)};case"button":return{type:3,tag:t,text:n.innerText,buttonType:n.getAttribute("type")||"button",isRoot:e,isHidden:$n(n)};case"input":return{type:4,tag:t,inputType:n.getAttribute("type"),placeholder:n.getAttribute("placeholder"),isRoot:e,isHidden:$n(n)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:1,tag:t,isRoot:e,isHidden:$n(n)}}if(n.innerHTML.trim()===n.innerText&&n.innerHTML.length)return{type:5,tag:t,text:ES(n.innerHTML),isRoot:e,isHidden:$n(n)}},"extractFeatureFromElement"),ES=o(n=>n.length>256?n.substring(0,256)+"...":n,"shortenText");var ii=o(n=>Object.keys(n||{}).reduce((e,t)=>{let i=n[t];return i&&(e[t]=i),e},{}),"sanitizeStaticMetadata"),Bd=o((n,e)=>{let t=ii(n),i=ii(e),a=o(d=>!d||Object.keys(d).length===0,"isEmpty");if(a(t)&&a(i))return!0;if(a(t)||a(i))return!1;let l=Object.keys(t).sort(),u=Object.keys(i).sort();if(l.length!==u.length||!l.every((d,f)=>d===u[f]))return!1;for(let d in t)if(t[d]!==i[d])return!1;return!0},"staticDataMatch"),bs=o(n=>{let e=ii(n);return!(!e||!Object.keys(e).length)},"hasStaticData");var Vd=o((n,e,{contains:t=!1,matchWholeWord:i=!1}={})=>(e=e.replaceAll(`
22
+ `,"\\A ").replaceAll('"','\\"'),t?i?`[${n}="${e}"],[${n}*="${e} "],[${n}*=" ${e} "],[${n}*=" ${e}"]`:`[${n}*="${e}"]`:`[${n}="${e}"]`),"buildAttributeEqualityQuerySelector"),el=o((n,e,{contains:t=!1,matchWholeWord:i=!1}={})=>t?i?n===e||n.startsWith(e)||n.includes(` ${e} `)||n.endsWith(e):n.includes(e):n===e,"checkStringEquality");var br=class{constructor(e){this.document=e;this.elementsByQueryCache={}}static{o(this,"AttributesExtractor")}getElementsByQuery(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=we(e,this.document)),this.elementsByQueryCache[e]}extract({element:e,setClass:t,setAttribute:i,getElementsInStructuralVicinity:a,getElementsInVisualVicinity:l}){for(let u=0;u<e.attributes.length;++u){let{name:d,value:f}=e.attributes[u];if(gr.attributesToExtract.includes(d)&&typeof f=="string"){if(d==="class"){f.split(" ").forEach(h=>{h.length&&t(h,this.processAttribute({element:e,getElementsInStructuralVicinity:a,getElementsInVisualVicinity:l},d,h,{contains:!0,matchWholeWord:!0}))});continue}i(d,this.processAttribute({element:e,getElementsInStructuralVicinity:a,getElementsInVisualVicinity:l},d,f))}}}processAttribute({element:e,getElementsInStructuralVicinity:t,getElementsInVisualVicinity:i},a,l,u={}){let d=this.getElementsByQuery("*"),f=Vd(a,l,u),h=this.getElementsByQuery(f),p=this.getElementsByQuery(`${e.tagName.toLowerCase()}`),v=h.filter(R=>R.tagName===e.tagName),y=t?t():[],w=y.filter(R=>R.element.attributes[a]&&el(R.element.attributes[a].value,l,u)),M=i?i():[],b=M.filter(R=>R.element.attributes[a]&&el(R.element.attributes[a].value,l,u));return{value:l,globalUniqueness:1-h.length/d.length,tagUniqueness:1-v.length/p.length,structuralVicinityUniqueness:t?1-w.length/y.length:void 0,visualVicinityUniqueness:i?1-b.length/M.length:void 0}}};var Ud=o((n,{tag:e="*"}={})=>we(e).filter(t=>t.innerText?.trim()===n.trim()),"findElementsWithText");function Yt(n){let e=n.getRootNode();switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return bS(n,e);default:return n.innerText}}o(Yt,"getInnerText");function bS(n,e){let t=n.querySelectorAll("slot");if(!t.length)return n.innerText;let i=n.cloneNode(!0),a=i.querySelectorAll("slot");return t.forEach((l,u)=>{let d=l.assignedNodes();a[u].innerText=d.map(f=>{switch(f.nodeType){case Node.TEXT_NODE:return f.textContent;case Node.ELEMENT_NODE:return f.innerText}}).filter(f=>!!f).join(`
23
+ `)}),i.innerText.trim()}o(bS,"extractInnerTextForElementInShadowDOM");var Ss=class{constructor(e){this.el=null;this.serializedElement="";this.attributes={};this.classes={};this.getElementsInStructuralVicinity=o(()=>this.structuralVicinityData.elementsInStructuralVicinity,"getElementsInStructuralVicinity");this.setElementStructuralVicinityData=o(e=>{this.structuralVicinityData=e},"setElementStructuralVicinityData");this.setElementVisualVicinityData=o(e=>{this.visualVicinityData=e},"setElementVisualVicinityData");this.getElementsInVisualVicinity=o(()=>this.visualVicinityData,"getElementsInVisualVicinity");this.setSerializedElement=o(e=>{this.serializedElement=e},"setSerializedElement");this.setAttribute=o((e,t)=>{this.attributes[e]=t},"setAttribute");this.setClass=o((e,t)=>{this.classes[e]=t},"setClass");this.setInnerText=o(e=>{this.innerText=e},"setInnerText");this.setStyle=o(e=>{this.style=e},"setStyle");this.setTag=o(e=>{this.tag=e},"setTag");this.setReact=o(e=>{this.react=e},"setReact");this.setInnerFeatures=o(e=>{this.innerFeatures=e},"setInnerFeatures");this.setPositioning=o(e=>{this.positioning=e},"setPositioning");this.setSVGs=o(e=>{this.svgs=e},"setSVGs");this.el=e,this.attributesExtractor=new br(this.el.ownerDocument)}static{o(this,"ESRAElementMetadataBuilder")}serialize(){}getSerializedElement(){return this.serializedElement}get element(){return this.el}getAttributes(){return this.attributes}getClasses(){return this.classes}getStyle(){return this.style}getInlineStyle(){return this.style.inline}getComputedStyle(){return this.style.computed}getTag(){return this.tag}getInnerFeatures(){return this.innerFeatures}getInnerText(){return this.innerText}getSVGs(){return this.svgs}toMetadata(){return{structuralVicinity:this.makeStructuralVicinityMetadata(),visualVicinity:this.makeVisualVicinityMetadata(),serializedElement:this.getSerializedElement(),attributes:this.getAttributes(),classes:this.getClasses(),innerText:this.getInnerText(),tag:this.getTag(),style:this.getStyle(),innerFeatures:this.getInnerFeatures(),staticCandidates:this.extractStaticCandidates(),positioning:this.positioning,svgs:this.getSVGs()}}extractStaticCandidates(){return ii({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}makeVicinityMetadata(e,t){return e.reduce((i,a)=>{let{qualified:l,feature:u}=this.isVicinityQualifiedElement(a.element);if(!l)return i;let d={},f={};this.attributesExtractor.extract({element:a.element,setClass:o((p,v)=>d[p]=v,"setClass"),setAttribute:o((p,v)=>f[p]=v,"setAttribute")});let h={tag:a.element.tagName.toLowerCase(),classes:d,attributes:f,text:this.extractTextForMetadata(a.element),feature:u,relativePosition:this.element.compareDocumentPosition(a.element),...t(a)};return i.push(h),i},[])}makeStructuralVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInStructuralVicinity(),e=>({position:e.position}))}makeVisualVicinityMetadata(){return this.makeVicinityMetadata(this.getElementsInVisualVicinity(),e=>({position:[e.position],distance:e.distance}))}isVicinityQualifiedElement(e){if(e===this.element)return{qualified:!1};if(!gr.vicinityFeatureElementsOnly)return{qualified:!0};let t=Es(e);return{qualified:!!t,feature:t}}extractTextForMetadata(e){if(e.innerHTML!==e.innerText)return;let t=e.innerHTML;return t.length>256?t.substring(0,256)+"...":t}extractStaticTextCandidate(){switch(this.tag){case"input":case"textarea":return this.attributes?.placeholder?.value;default:return this.innerText?.content}}extractLabeling(){if(this.element.tagName.toLowerCase()==="label")return Yt(this.element);let e=Gn(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return Yt(e);try{if(this.element.id&&this.element.id.length&&we(`[aria-labelledby="${this.element.id}"]`).length)return Yt(this.element)}catch(t){console.error("extractLabeling error",t)}}extractLabeled(){let e=this.element.getAttribute("aria-label");if(this.attributeExists(e))return e;let t=Gn(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return Yt(t);if(this.element.id&&this.element.id.length)try{let a=we(`label[for=${this.element.id}]`);if(a.length)return Yt(a[0])}catch{return}let i=this.element.getAttribute("aria-labelledby");if(this.attributeExists(i)){let a=we(i.split(" ").map(l=>`#${l}`).join(","));if(a.length)return Yt(a[0])}}extractSVGTitle(){try{if(this.element.tagName.toLowerCase()!=="svg")return;let e=this.element.querySelector("title");return e?Yt(e):void 0}catch(e){console.error("extractSVGTitle error",e)}}attributeExists(e){return e&&e.length>0}};var ws=class{constructor(e,t){this.structuralVicinityData={elementsInStructuralVicinity:[],html:""};this.element=e,this.config=t}static{o(this,"StructuralVicinityExtractor")}getInitialLimit(){switch(this.config.type){case"ratio":return document.querySelectorAll("*").length*this.config.value;case"fixed":return this.config.value}}calculate(){let e=Date.now().toString();return this.structuralVicinityData.html=this.populateStructuralVicinity(this.element,["element"],{runId:e,step:0,limit:this.getInitialLimit()}),this.structuralVicinityData.elementsInStructuralVicinity.forEach(t=>t.element.attributes.removeNamedItem(`checksum-radial-traverse-${e}`)),this.structuralVicinityData}populateStructuralVicinity(e,t,i){let{runId:a,step:l,limit:u}=i;if(!e||l>u||e.attributes[`checksum-radial-traverse-${a}`]!==void 0)return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute(`checksum-radial-traverse-${a}`,l.toString());let h={runId:a,step:l+1,limit:this.config.useDecayingLimit?u-1:u},p=this.populateStructuralVicinity(fn(e),[...t,"parent"],h),v=this.populateStructuralVicinity(e.previousElementSibling,[...t,"left-sibling"],h),y=this.populateStructuralVicinity(e.nextElementSibling,[...t,"right-sibling"],h),w=[];Hd(e).map((b,R)=>w.push(this.populateStructuralVicinity(b,[...t,"child"],h)));let M=v+e.outerHTML.replace(e.innerHTML,w.join(""))+y;return p&&!p.includes(e.outerHTML)?p.replace("></",`>${M}</`):p?p.replace(e.outerHTML,M):M}};var si=class{constructor(e,t){this.document=e;this.config=t;this.debug=!1;this.sampleBoxColors={0:"green",1:"orange",2:"red",3:"blue"}}static{o(this,"VisualVicinityExtractor")}calculate(e){let t=[],i=this.config.radius,a=this.config.scanStep,l=e.getBoundingClientRect();for(let u=l.left-i;u<l.left+l.width+i;u+=a)for(let d=l.top-i;d<l.top+l.height+i;d+=a){let f=u+a/2,h=d+a/2;if(this.doesRectContain(l,{left:u,top:d,right:u+a,bottom:d+a})){this.addTrace(f,h,a,3);continue}let p=this.document.elementFromPoint(f,h);if(!p)continue;let v=p.getBoundingClientRect();if(v.width>i*2&&v.height>i*2||this.doesRectContain(v,l)){this.addTrace(f,h,a,2);continue}if(!!t.find(({element:b})=>b===p)){this.addTrace(f,h,a,1);continue}let{position:w,distance:M}=this.getPosition(l,v);t.push({element:p,position:w,distance:M}),this.addTrace(f,h,a,0)}return t}getPosition(e,t){let{x:i,y:a}=this.getCenter(t),{x:l,y:u}=this.getCenter(e),d=o(()=>{let h=i-l,p=a-u;return h<0&&p<0?"top-left":h>0&&p<0?"top-right":h<0&&p>0?"bottom-left":h>0&&p>0?"bottom-right":h===0&&p<0?"top":h===0&&p>0?"bottom":h<0&&p===0?"left":h>0&&p===0?"right":"center"},"calcPosition");return{distance:o(()=>Number(Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2)).toFixed(2)),"calcDistance")(),position:d()}}getCenter(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}addTrace(e,t,i,a){if(!this.debug)return;let l=this.document.createElement("xdiv");l.setAttribute("style",`position: absolute; width: ${i}px; height: ${i}px; top: ${t}px; left: ${e}px; background: ${this.sampleBoxColors[a]}; z-index: 999999999999;opacity:0.4`),this.document.getElementsByTagName("body")[0].prepend(l)}doesRectContain(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}doRectsOverlap(e,t){let i=e.right<t.left,a=e.left>t.right,l=e.top>t.bottom,u=e.top<t.top;return!(i||a||l||u)}};window.vve=new si({radius:50,scanStep:10});var oi=ni(Gd());window.resq$=oi.resq$;window.resq$$=oi.resq$$;var nl=class{static{o(this,"Provider")}extract(e){let t=this.findParentComponent(e,{ignoreBaseElement:!0});return{component:t,parentComponent:this.findParentComponent(t.node)}}findParentComponent(e,{ignoreBaseElement:t=!1,baseElement:i=void 0}={}){let a=(0,oi.resq$$)("*",e.parentElement).find(l=>l.children.length===1&&l.children[0].node===e);return i=i??e,a&&(t||a.node!==i)?this.parseRESQresult(a):this.findParentComponent(e.parentElement,{baseElement:i,ignoreBaseElement:t})}parseRESQresult(e){if(!e)return;let t=o(i=>{switch(typeof i){case"string":return[i];case"object":return Array.isArray(i)?i.map(t):Object.keys(i)}},"parseState");return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:t(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}},$d=new nl;var rl=class{static{o(this,"Provider")}extract(e){return{component:void 0,parentComponent:void 0}}},b0=new rl;var xs=class{constructor(e,t){this.provider=$d;this.element=e,this.config=t}static{o(this,"ReactMetadataExtractor")}extract(){return this.provider.extract(this.element)}};var Ts=class{constructor(e){this.document=e;this.tagBaseComputedStyle={}}static{o(this,"StyleExtractor")}extract({element:e,setStyle:t}){let i=e.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[i]){let a=this.document.createElement(i);this.document.getElementsByTagName("body")[0].prepend(a),this.tagBaseComputedStyle[i]=this.sanitzieStyle(window.getComputedStyle(a)),a.remove()}}catch(a){if(console.error("Failed to extract style for tag",i,a),!this.tagBaseComputedStyle[i])return}t({inline:this.sanitzieStyle(e.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[i],this.sanitzieStyle(window.getComputedStyle(e)))})}diffComputedStyle(e,t){return o((l,u)=>Object.keys(u).reduce((d,f)=>l[f]===u[f]?d:{...d,[f]:u[f]},{}),"oneWayDiff")(e,t)}sanitzieStyle(e,{acceptEmptyValue:t=!0}={}){return Object.keys(e).reduce((i,a)=>{if(!isNaN(a))return i;let l=e[a];return!t&&!l||(i[a]=l),i},{})}};var ai=class{constructor(e){this.document=e;this.makeFeatureNode=o((e,t=void 0)=>{let i=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:i?e.tagName.toLowerCase():void 0,feature:i?Es(e,t):void 0,children:[],isRoot:t}},"makeFeatureNode");this.includeRootElements=!0;this.rootElementsTypeExceptions=[5];this.cache=pt.getInstance("innerFeaturesExtractor",{log:!1})}static{o(this,"InnerFeaturesExtractor")}extract(e){let t=[],i=this.makeFeatureNode(e,!0);return this.walk(e,i,t),t}getMapFromCache(){let e=this.cache.get();return e||(e=new Map,this.cache.set(e)),e}getFeatureNodeFromCache(e){let t=this.getMapFromCache();return t.has(e)?t.get(e):void 0}addFeatureNodeToCache(e,t){let i=this.getMapFromCache();i.set(e,t),this.cache.set(i)}walk(e,t,i){let a=!1;yr(e).forEach(u=>{let d=this.getFeatureNodeFromCache(u)??this.makeFeatureNode(u),f=this.walk(u,d,i);f&&t.children.push(d),a||=f});let l=!!t.feature;return l&&(!t.isRoot||this.shouldIncludeRootNode(t))&&i.push(t.feature),this.addFeatureNodeToCache(e,t),l||a}shouldIncludeRootNode(e){return!(!this.includeRootElements||this.rootElementsTypeExceptions.includes(e.type))}};window.inner_features_extractor=new ai;var Is=class{constructor(e){this.document=e}static{o(this,"InnerTextExtractor")}extract(e){return{content:Yt(e)??void 0}}};var Cs=class{constructor(e){this.document=e}static{o(this,"PositioningExtractor")}extract(e){let{top:t,bottom:i,left:a,right:l}=e.getBoundingClientRect(),u=document.documentElement.scrollHeight,d=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(t,window.innerHeight),bottom:this.normalize(i,window.innerHeight),left:this.normalize(a,window.innerWidth),right:this.normalize(l,window.innerWidth)}},document:{size:{height:u,width:d},element:{top:this.normalize(t+window.scrollY,u),bottom:this.normalize(i+window.scrollY,u),left:this.normalize(a+window.scrollX,d),right:this.normalize(l+window.scrollX,d)}}}}normalize(e,t){return e/t}};var lt=class{constructor(e,t){this.stats={serializeElement:0,populateElementsInStructuralVicinity:0,populateElementsInVisualVicinity:0,extractAttributes:0,extractInnerText:0,extractStyle:0,extractTag:0,extractInnerFeatures:0,extractPositioning:0,extractSVGComponents:0,final:0};this.xmlSerializer=new XMLSerializer,this.document=e,this.config=t??gr,this.visualVicinityExtractor=new si(this.document,this.config.visualVicinity),this.styleExtractor=new Ts(this.document),this.innerFeaturesExtractor=new ai(this.document),this.innerTextExtractor=new Is(this.document),this.positioningExtractor=new Cs(this.document)}static{o(this,"ESRAElementMetadataExtractor")}isSameDocument(e){return this.document===e}extract(e){let t=new Kt(e).scrollIntoView(),i=Date.now(),a=new Ss(e);return this.serializeElement(a),this.stats.serializeElement+=Date.now()-i,i=Date.now(),this.populateElementsInStructuralVicinity(a),this.stats.populateElementsInStructuralVicinity+=Date.now()-i,i=Date.now(),this.populateElementsInVisualVicinity(a),this.stats.populateElementsInVisualVicinity+=Date.now()-i,i=Date.now(),this.extractAttributes(a),this.stats.extractAttributes+=Date.now()-i,i=Date.now(),this.extractInnerText(a),this.stats.extractInnerText+=Date.now()-i,i=Date.now(),this.extractStyle(a),this.stats.extractStyle+=Date.now()-i,i=Date.now(),this.extractTag(a),this.stats.extractTag+=Date.now()-i,i=Date.now(),this.extractInnerFeatures(a),this.stats.extractInnerFeatures+=Date.now()-i,i=Date.now(),this.extractPositioning(a),this.stats.extractPositioning+=Date.now()-i,i=Date.now(),this.extractSVGComponents(a),this.stats.extractSVGComponents+=Date.now()-i,i=Date.now(),t.restore(),this.stats.final+=Date.now()-i,a}extractReact({element:e,setReact:t}){t(new xs(e,this.config.react).extract())}extractTag({element:e,setTag:t}){t(e.tagName.toLowerCase())}extractPositioning({element:e,setPositioning:t}){t(this.positioningExtractor.extract(e))}extractSVGComponents({element:e,setSVGs:t}){t(new vr(this.document).extract(e))}serializeElement({element:e,setSerializedElement:t}){}extractAttributes({element:e,setClass:t,setAttribute:i,getElementsInStructuralVicinity:a,getElementsInVisualVicinity:l}){return new br(this.document).extract({element:e,setClass:t,setAttribute:i,getElementsInStructuralVicinity:a,getElementsInVisualVicinity:l})}populateElementsInStructuralVicinity({element:e,setElementStructuralVicinityData:t}){t(new ws(e,this.config.structuralVicinity).calculate())}populateElementsInVisualVicinity({element:e,setElementVisualVicinityData:t}){t(this.visualVicinityExtractor.calculate(e))}extractInnerText({element:e,setInnerText:t}){t(this.innerTextExtractor.extract(e))}extractStyle({element:e,setStyle:t}){return this.styleExtractor.extract({element:e,setStyle:t})}extractInnerFeatures({element:e,setInnerFeatures:t}){t(this.innerFeaturesExtractor.extract(e))}};var xt=class{static{o(this,"PlaywrightElementSelectorGenerator")}async injectSelectorsAndLocators(e,{testIdSelector:t,searchParentFrames:i=!0}={}){let a=e.map(l=>({container:l,removedAttributes:this.stripNodeAttributes(l.element)}));return a=await Promise.all(a.map(async l=>{let{selector:u,locator:d,parentFramesSelectors:f}=await this.getSelectorAndLocator(l.container.element,{testIdSelector:t,searchParentFrames:i,stripAttributes:!0});return{...l,selector:u,locator:d,parentFramesSelectors:f}})),a=await Promise.all(a.map(async l=>{if(!l.removedAttributes.id&&!l.removedAttributes.originalClasses||(this.restoreNodeAttributes(l.container.element,l.removedAttributes),window.playwright.$(l.selector)!==void 0))return l;let u=await this.getSelectorAndLocator(l.container.element,{testIdSelector:t,searchParentFrames:i,stripAttributes:!1});return console.log(`Selector ${l.selector} is not valid, generated new one: ${u.selector}`),Object.assign(l,u),l})),a.map(l=>{let{container:u,selector:d,locator:f,parentFramesSelectors:h}=l;return{...u,selector:d,locator:f,parentFramesSelectors:h}})}stripNodeAttributes(e){let t=e,i,a;t.id&&(i=t.id,t.removeAttribute("id"));try{if(a=t.getAttribute("class"),a&&typeof a=="string"){let l=a.split(" ").filter(u=>!u.startsWith("css-")&&!u.startsWith("jss-")).join(" ");t.setAttribute("class",l)}else a=void 0}catch(l){return console.warn("[playwright selector generator] error with class filtering",l),{}}return{id:i,originalClasses:a}}restoreNodeAttributes(e,t){let i=e,{id:a,originalClasses:l}=t;a&&i.setAttribute("id",a),l&&i.setAttribute("class",l)}getElementWindowPlaywright(e){let t=e.ownerDocument.defaultView;return t!==window&&!t.playwright&&(t.playwright=window.playwright),t.playwright}async safeGetSelectorAndLocator(e){try{return await this.getElementWindowPlaywright(e).generateSelectorAndLocator(e)}catch(t){return console.log("get selector and locator error",e.nodeType,e,`
24
+ `,t),{selector:"",locator:""}}}async getSelectorAndLocator(e,{testIdSelector:t,searchParentFrames:i=!0,stripAttributes:a=!0,ignoredIframesSelectors:l=[]}={}){if(!e)return null;let u=this.getIframes({ignoredIframesSelectors:l}),d=i?await this.getParentFramesSelectors(e,u):[],f=e,h=this.getTestAttributeSelector(f,t);if(h)return{selector:h,locator:`locator("${h}")`,parentFramesSelectors:d};let p;a&&(p=this.stripNodeAttributes(e));let{selector:v,locator:y}=await this.safeGetSelectorAndLocator(f);return p&&(this.restoreNodeAttributes(e,p),await this.getElementWindowPlaywright(e).$(v)!==e&&(console.log(`Selector ${v} is not valid, trying to generate new one`),{selector:v,locator:y}=await this.safeGetSelectorAndLocator(f))),y&&d&&d.length>0&&(y=d.map(w=>`frameLocator('${this.escapeSingleQuotes(this.escapeBackslash(w))}')`).join(".")+`.${y}`),{selector:v,locator:y,parentFramesSelectors:d}}async findIframeWindowByParentFrameSelectors(e=[]){let t=window.top;if(e&&e.length>0)for(let i of e)t=(await t.playwright.$(i)).contentWindow;return t}async selector(e,t){let i;try{i=await(await this.findIframeWindowByParentFrameSelectors(t)).playwright.$(e)}catch(a){console.log("selector error",e,a)}return i??this.selectFromFirstIframe(e)}async getParentFramesSelectors(e,t){if(!t.length)return[];let i=e.ownerDocument;if(i===document)return[];let a=t.find(u=>u.contentDocument===i);if(!a)return[];let l=await this.getSelectorAndLocator(a,{searchParentFrames:!1});return[...await this.getParentFramesSelectors(a,t),l.selector]}getIframes({ignoredIframesSelectors:e=[]}={}){let t=o(l=>l.filter(u=>!e.some(d=>u.matches(d))),"makeReturnValue"),i=pt.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1});if(i.hasCache())return t(i.get());let a=we("iframe");return i.set(a),t(a)}getFirstIframeContentWindow(){let e=document.querySelector("iframe");if(!e)return;let t=e.contentWindow;return t.playwright||(t.playwright=window.playwright),t}async selectFromFirstIframe(e){let t=this.getFirstIframeContentWindow();if(t)try{return await t.playwright.$(e)}catch{console.log("selector error",e)}}getTestAttributeSelector(e,t){let i=["data-cy","data-testid","data-test-id","data-test"];for(let l of[t,...i])if(l&&e.getAttribute(l)){let u=`[${l}='${e.getAttribute(l)}']`;if(we(u).length===1)return u;if(we(u).length>1){let f=Array.from(we(u)).indexOf(e);return`${u} >> nth=${f}`}}}replaceAll(e,t,i){return e&&e.replace(new RegExp(t,"g"),i)}escapeSingleQuotes(e){return this.replaceAll(e,"'","\\'")}escapeBackslash(e){return e.replace(/\\/g,"\\\\")}};var qd=[{selector:'path[d="M17.5 13V15.6667C17.5 16.0203 17.3361 16.3594 17.0444 16.6095C16.7527 16.8595 16.357 17 15.9444 17H5.05556C4.643 17 4.24733 16.8595 3.95561 16.6095C3.66389 16.3594 3.5 16.0203 3.5 15.6667V13"] + path[d="M14.6673 6.92057L10.5007 2.75391L6.33398 6.92057"] + path[d="M10.5 2.75391V12.7539"]',description:"export button"},{selector:'path[d="M16.0893 13.1868C16.6838 12.7754 17.1321 12.1858 17.3697 11.503C17.6072 10.8202 17.6216 10.0796 17.4107 9.38816C17.1999 8.69667 16.7748 8.09007 16.1968 7.65594C15.6187 7.2218 14.9177 6.9826 14.1948 6.97285H12.8308C12.6017 6.20011 12.1996 5.48973 11.6549 4.89565C11.1102 4.30157 10.4374 3.83943 9.68735 3.54431C8.93734 3.24918 8.12995 3.12885 7.32648 3.19244C6.52301 3.25603 5.7446 3.50187 5.05036 3.9113C4.35612 4.32072 3.7643 4.88297 3.31985 5.55533C2.8754 6.22769 2.59001 6.99248 2.48535 7.79164C2.38068 8.59079 2.4595 9.40329 2.71582 10.1674C2.97214 10.9316 3.39921 11.6272 3.96461 12.2016"] + path[d="M10.0273 10.0039V16.8241"] + path[d="M13.0585 13.0351L10.0273 10.0039L6.99609 13.0351"]',description:"import button"},{selector:'path[d="M20.4696 21.5303C20.7625 21.8232 21.2373 21.8232 21.5302 21.5303C21.8231 21.2374 21.8231 20.7626 21.5302 20.4697L20.4696 21.5303ZM17.1802 16.1197C16.8873 15.8268 16.4125 15.8268 16.1196 16.1197C15.8267 16.4126 15.8267 16.8874 16.1196 17.1803L17.1802 16.1197ZM18.25 11C18.25 15.0041 15.0041 18.25 11 18.25V19.75C15.8325 19.75 19.75 15.8325 19.75 11H18.25ZM11 18.25C6.99594 18.25 3.75 15.0041 3.75 11H2.25C2.25 15.8325 6.16751 19.75 11 19.75V18.25ZM3.75 11C3.75 6.99594 6.99594 3.75 11 3.75V2.25C6.16751 2.25 2.25 6.16751 2.25 11H3.75ZM11 3.75C15.0041 3.75 18.25 6.99594 18.25 11H19.75C19.75 6.16751 15.8325 2.25 11 2.25V3.75ZM21.5302 20.4697L17.1802 16.1197L16.1196 17.1803L20.4696 21.5303L21.5302 20.4697Z"]',description:"search"},{selector:'path[d="M3.75 10H16.875"] + path[d="M8.125 5L3.125 10L8.125 15"]',description:"back"},{selector:'path[d="M3.33301 8H12.6663"] + path[d="M8 3.33331L12.6667 7.99998L8 12.6666"]',description:"forward"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"new or Add button"},{selector:'path[d="M10 10.75C10.4142 10.75 10.75 10.4142 10.75 10C10.75 9.58579 10.4142 9.25 10 9.25C9.58579 9.25 9.25 9.58579 9.25 10C9.25 10.4142 9.58579 10.75 10 10.75Z"] + path[d="M15.833 10.75C16.2472 10.75 16.583 10.4142 16.583 10C16.583 9.58579 16.2472 9.25 15.833 9.25C15.4188 9.25 15.083 9.58579 15.083 10C15.083 10.4142 15.4188 10.75 15.833 10.75Z"] + path[d="M4.16699 10.75C4.58121 10.75 4.91699 10.4142 4.91699 10C4.91699 9.58579 4.58121 9.25 4.16699 9.25C3.75278 9.25 3.41699 9.58579 3.41699 10C3.41699 10.4142 3.75278 10.75 4.16699 10.75Z"]',description:"open menu"},{selector:'path[d="M10 4.16667V15.8333"] + path[d="M4.16699 10H15.8337"]',description:"add filter"},{selector:'path[d="M15 5L5 15"] + path[d="M5 5L15 15"]',description:"close or remove"},{selector:'path[d="M4 6L8 10L12 6"]',description:"open or close dropdown"},{selector:'path[d="M10 17.5C14.1421 17.5 17.5 14.1421 17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5Z"] + path[d="M12.5 7.5L7.5 12.5"] + path[d="M7.5 7.5L12.5 12.5"]',description:"clear input"},{selector:'path[d="M3.33301 5.49054H4.81449H16.6663"] + path[d="M7.14286 5.49999V3.99999C7.14286 3.60216 7.29337 3.22063 7.56128 2.93932C7.82919 2.65802 8.19255 2.49998 8.57143 2.49998H11.4286C11.8075 2.49998 12.1708 2.65802 12.4387 2.93932C12.7066 3.22063 12.8571 3.60216 12.8571 3.99999V5.49999M15 5.49999V16C15 16.3978 14.8495 16.7793 14.5816 17.0607C14.3137 17.342 13.9503 17.5 13.5714 17.5H6.42857C6.04969 17.5 5.68633 17.342 5.41842 17.0607C5.15051 16.7793 5 16.3978 5 16V5.49999H15Z"] + path[d="M8.33203 9.23726V13.4039"] + path[d="M11.666 9.23726V13.4039"]',description:"delete"},{selector:'path[d="M13.3334 4L6.00008 11.3333L2.66675 8"]',description:"checked"},{selector:'path[d="M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"]',description:"downward-pointing arrow"},{selector:'path[d="M18.0893 3.08926C18.4147 2.76382 18.4147 2.23618 18.0893 1.91074C17.7638 1.58531 17.2362 1.58531 16.9107 1.91074L18.0893 3.08926ZM9.41074 9.41074L8.82149 10L10 11.1785L10.5893 10.5893L9.41074 9.41074ZM16.9107 1.91074L9.41074 9.41074L10.5893 10.5893L18.0893 3.08926L16.9107 1.91074Z"] + path[d="M17.5 2.5L12.25 17.5L9.25 10.75L2.5 7.75L17.5 2.5Z"]',description:"send"}];var SS=5*60*1e3,Rs=class{constructor(){this.flashingTextElements=[]}static{o(this,"FlashingElementsDetector")}start(){this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.length>0&&t.addedNodes.forEach(i=>{i instanceof HTMLElement&&this.includeElement(i)&&setTimeout(()=>{this.flashingTextElements.push(this.processTextElements(i))},1e3)})})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout(()=>{this.stop()},SS)}stop(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}get(){let e=this.flashingTextElements.map(i=>i.filter(a=>!a.isConnected||rt(a.parentElement).isHidden)).filter(i=>i.length).map(i=>`<span>${i.map(a=>a.textContent).join("</span><span>")}</span>`),t=new Set(e);return Array.from(t)}stopAndGet(){return this.stop(),this.get()}includeElement(e){return!(e.getElementsByTagName("*").length>50||e.outerHTML.length>5e3)}processTextElements(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null),i,a=[];for(;i=t.nextNode();)rt(i.parentNode).isHidden||a.push(i);return a}};var As=class{static{o(this,"AlphaNumericCounter")}constructor(e){this.counter=e??"0"}increment(){let e=this.counter.length-1;for(;e>=0;){let t=this.counter[e];if(t==="9"){this.counter=this.replaceAt(this.counter,e,"a");return}else if(t==="z"){if(this.counter=this.replaceAt(this.counter,e,"0"),e===0){this.counter="1"+this.counter;return}e--}else{this.counter=this.replaceAt(this.counter,e,String.fromCharCode(t.charCodeAt(0)+1));return}}}get(){return this.counter}incrementAndGet(){return this.increment(),this.get()}getAndIncrement(){let e=this.get();return this.increment(),e}replaceAt(e,t,i){return e.substr(0,t)+i+e.substr(t+i.length)}static compare(e,t){let i=e.length,a=t.length;if(i!==a)return i-a;for(let l=0;l<i;l++){let u=e.charCodeAt(l),d=t.charCodeAt(l);if(u!==d)return u-d}return 0}};var li="checksum-ignore",Ds="checksum-get-more-items",zd=20,wS=.7,_s,jd,MS=0,Kd=o((n,{forceIncludeAttribute:e,forceIncludeFileInput:t,forceIncludeElements:i,limit:a})=>{n.excludedElements?.forEach(w=>{w.removeAttribute(li)}),n.excludedElements=new Set;let l=n.element,u=a??Math.min(Math.ceil(l.children.length*.5),l.children.length-zd),d=o(w=>e&&(w.hasAttribute(e)||Array.from(w.querySelectorAll(`[${e}]`)).length>0)||t&&w.tagName.toLowerCase()==="input"&&w.type==="file"?!0:i.includes(w),"isForceIncluded"),f=o(w=>{let M=0;if(n.elementsToKeep.includes(w))return M;let b=il(w);b.length>=n.attributes.length&&M++;let R=b.filter(C=>n.attributes.includes(C)).length;R===n.attributes.length?M+=3:R>0&&M++;let _=sl(w).filter(C=>n.classes.includes(C)).length;return _===n.classes.length?M+=2:_>0&&M++,M},"scoreElement"),h=Array.from(l.children).filter(w=>w.tagName===n.tagName&&!d(w)).map(w=>({element:w,score:f(w)})).sort((w,M)=>M.score-w.score),{inViewportElements:p,outOfViewportElements:v}=h.reduce((w,M)=>{let{element:b}=M;return vs(gt(b,"Element")?b:b?.parentElement)?w.inViewportElements.push(b):w.outOfViewportElements.push(b),w},{inViewportElements:[],outOfViewportElements:[]}),y=o(w=>{for(let M of w)if(n.excludedElements.add(M),n.excludedElements.size===u)return!0},"excludeElements");return y(v)||y(p),xS(n),Array.from(n.excludedElements)},"viewportReducer");function xS(n){let{excludedElements:e,element:t}=n;e.forEach(i=>{i.setAttribute(li,"")}),t._getmoreitemsid||(t._getmoreitemsid="gm"+MS++),n.id=t._getmoreitemsid,t.setAttribute(Ds,n.id)}o(xS,"markTemplateElements");function il(n){return Array.from(n.attributes).filter(e=>!e.name.startsWith("checksum")).map(e=>e.name.replace(/[0-9]/g,""))}o(il,"mapAttributes");function sl(n){return n.className?.split(" ").filter(e=>e)??[]}o(sl,"getElementClasses");function ol(n=document.body,{nodeRepetitionsThreshold:e=zd}={}){try{return console.time("bettertemplatize"),_s=new Set,Yd(n,e),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(_s)),Array.from(_s)}catch(t){return console.error("[bettertemplatize] failed during template processing:",t.message),[]}}o(ol,"bettertemplatize");function Yd(n,e){Array.from(n.children).forEach(t=>{if(t instanceof SVGElement)return;let i=t.children.length;if(i>=e){let a=Array.from(t.children),l=Math.ceil(i*wS);for(let u=0;u<i;u++){let d=0,f=a.slice(0,u);for(let h=u+1;h<i&&d+i-h>=l;h++)try{if(Qd(a[u],a[h])){if(d++,d>=l){_s.add({element:t,...jd,elementsToKeep:f});return}}else f.push(a[h])}catch{return}}}Yd(t,e)})}o(Yd,"traverse");var TS=.8,IS=.5,CS=.8,RS=5;function Qd(n,e,t=1){let i,a,l=o(b=>(b&&(jd={attributes:i,classes:a,tagName:n.nodeName}),b),"response");if(n.nodeType!==e.nodeType||n instanceof SVGElement||e instanceof SVGElement)return l(!1);if(n.nodeType===Node.TEXT_NODE)return l(!0);if(n.nodeType!==Node.ELEMENT_NODE)return l(!1);let u=n,d=e;if(u.tagName.toLowerCase()!==d.tagName.toLowerCase())return l(!1);let f=il(u),h=il(d);if(i=f.filter(b=>h.includes(b)),i.length/Math.max(f.length,h.length)<TS)return l(!1);let p=sl(u),v=sl(d);if(a=p.filter(b=>v.includes(b)),a.length/Math.max(p.length,v.length)<IS)return l(!1);if(t>=RS)return l(!0);if(u.shadowRoot&&!d.shadowRoot||!u.shadowRoot&&d.shadowRoot)return l(!1);let y=Array.from(u.shadowRoot?u.shadowRoot.children:u.children),w=Array.from(d.shadowRoot?d.shadowRoot.children:d.children);if(y.length===0&&w.length===0)return l(!0);let M=0;for(let b=0;b<Math.min(y.length,w.length);b++)Qd(y[b],w[b],t+1)&&M++;return M/Math.max(y.length,w.length)<CS?l(!1):l(!0)}o(Qd,"areSimilar");var xn=o(n=>{},"consoleTime"),Tn=o(n=>{},"consoleTimeEnd");var ci=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]"],Xd=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],Zd=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],al=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"];var qn=o((n,e=[])=>{if(!n)return n;let t=window.getComputedStyle(n).cursor,i=o((l,u=()=>!1)=>{let d=l;for(;d;){let f=d.parentElement;if(!f||f.nodeType!==Node.ELEMENT_NODE)return d;if(u(f))break;if(window.getComputedStyle(f).cursor!==t)return d;d=f}},"getClosestElementWithCursor"),a=o(l=>{try{if(l.matches("label[for]")&&!l.matches(ci.concat(e).filter(u=>!!u&&u!=="label[for]").join(","))){let u=l.getAttribute("for");if(!u)return!1;let d=document.getElementById(u);if(!d)return!1;let f=d.getAttribute("type");return f?d.tagName.toLowerCase()==="input"&&["checkbox","radio"].includes(f):!1}}catch(u){console.error("interactableParentIsValid",l,u)}return!0},"interactableParentIsValid");try{if("isContentEditable"in n&&n.isContentEditable)return n;if("closest"in n){let u=Gn(n,ci.concat(e).filter(d=>!!d).join(","));if(u&&a(u)){if(u===n)return n;let d=i(n,f=>f===u);return d||u}}if(["auto","default","context-menu","help","progress","wait"].includes(t))return n;let l=i(n);return l||n}catch(l){return console.error("getCompoundInteractableRootElement",n,l),n}},"getCompoundInteractableRootElement");var Bt=o((n=document,e={},{allowDisabled:t=!1,useDataVisibleAttributes:i=!0,excludeCrossOriginIframes:a=!1,includeCompoundInnerElements:l=!0}={})=>{let u=pt.getInstance("getAllInteractableHTMLElements",{target:n,log:!1}),d=Date.now(),f=o(w=>{let M=w.reduce((b,R)=>!t&&R.state.disabled?b:[...b,R.element],[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-d,"ms"),M},"makeResponse");if(u.hasCache())return f(u.get());let h=we("*",n,{excludeCrossOriginIframes:a});xn("[getAllInteractableHTMLElements] items");let p=h.reduce((w,M)=>{let b="disabled"in M&&!!M.disabled;return M.matches(ci.concat(e.appSpecificInteractableElementsSelectors||[]).filter(T=>!!T).join(","))||Xd.includes(window.getComputedStyle(M).cursor)||M.isContentEditable&&!M.parentElement?.isContentEditable||!e.ignoreEventListenersWhenDeterminingInteractability&&(al.some(T=>M[T])||_S(M))?[...w,{element:M,disabled:b}]:w},[]);Tn("[getAllInteractableHTMLElements] items"),xn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");let v=p.reduce((w,M)=>{let b=qn(M.element,e.appSpecificInteractableElementsSelectors||[]),R=w.find(T=>T.element===b);return R?!M.disabled&&R.state.disabled&&(R.state.disabled=!1):w.push({element:b,state:{disabled:M.disabled}}),l&&M.element!==b&&AS(M.element)&&w.push({...M,state:{disabled:M.disabled}}),w},[]);Tn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),xn("[getAllInteractableHTMLElements] isElementHidden");let y=v.filter(({element:w})=>{if(i){if(!w)return!1;if(w.getAttribute("checksum-data-visible")){let b=w.getAttribute("checksum-data-visible-under-transparent-element")==="true",R=w.getAttribute("checksum-data-transparently-visible")==="true";return!b||R}}return!rt(w,{markTransparentElementsAsHidden:!1}).isHidden});return Tn("[getAllInteractableHTMLElements] isElementHidden"),u.set(y),f(y)},"getAllInteractableHTMLElements"),AS=o(n=>["img","video","audio","a","svg","button"].includes(n.tagName.toLowerCase())?!0:Array.from(n.childNodes).filter(e=>e.nodeType===Node.TEXT_NODE&&e.textContent.trim()).length>0,"hasUniqueFeatures"),_S=o(n=>{if(n._checksum_eventListenerList){let i=n._checksum_eventListenerList;if(al.some(a=>i[a.slice(2)]))return!0}let e=Object.keys(n).find(i=>i.startsWith("__reactFiber")),t=e?n[e]:void 0;return!t||!t.memoizedProps?!1:Zd.some(i=>t.memoizedProps[i])},"hasFrameworkInteractionListener");var Jd=16e3;var DS=!0,ll={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Sr=class{constructor(){this.checksumIdToRRwebIdMap={};this.flashingElementsDetector=new Rs;this.forceIncludeElements=[];this.preMapReducedHTMLSelectors=!1;this.excludedNodes=0;this.reducePercentage=50;this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],initialChecksumId:void 0,forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:"aria-label",includeFlashingElements:!0,onForceIncludeElement:o(()=>{},"onForceIncludeElement"),limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0}}static{o(this,"HTMLReducer")}preprocessDocument(e=document){xn("[preprocessDocument] querySelectorAllExtended");let t=we("*",e,{includeHTML:!0});Tn("[preprocessDocument] querySelectorAllExtended"),xn("[preprocessDocument] isElementHidden");for(let i of t){if(this.shouldIgnoreElement(i))continue;let a=rt(i,ll);i.setAttribute("checksum-data-visible",!a.isHidden&&!a.isTransparent?"true":"false"),!a.isHidden&&a.isTransparent&&i.setAttribute("checksum-data-transparently-visible","true"),a.isBehindTransparentElement&&i.setAttribute("checksum-data-visible-under-transparent-element","true"),a.clickOffset&&i.setAttribute("checksum-data-click-offset",`${a.clickOffset.x};${a.clickOffset.y}`)}Tn("[preprocessDocument] isElementHidden")}setSessionRecorder(e){this.sessionRecorder=e}markInteractableElements(e,t=document,{forceIncludeAttribute:i,forceIncludeFileInput:a}={}){xn("[markInteractableElements]"),this.interactableElements=[];let l=Bt(t,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),u=o((h,p)=>(h._checksumid||(h._checksumid=p??this.checksumIdCounter.getAndIncrement()),h.setAttribute("checksumid",h._checksumid),h.setAttribute("checksuminteractable","true"),h._checksumid),"setChecksumIdForElement"),d=o((h,p=!1,v)=>{if(this.shouldIgnoreElement(h))return;let y=h.getAttribute("checksum-data-click-offset")?.split(";"),w=y&&{x:parseInt(y[0]),y:parseInt(y[1])},M=u(h,v);this.interactableElements.push({checksumId:M,element:h,forced:p,clickOffset:w})},"handleInteractableElement");l.forEach(h=>d(h));let f=o(h=>{we(h,t,{includeHTML:!0}).forEach(p=>d(p,!0))},"forceIncludeSelector");i&&f(`[${i}]`),a&&f("input[type='file']"),this.forceIncludeElements.filter(({element:h})=>h?.isConnected).forEach(({element:h,checksumid:p})=>d(h,!0,p)),console.log(`Marked ${this.interactableElements.length} interactable elements`),Tn("[markInteractableElements]")}truthyFilter(e){return!!e}shouldIgnoreElement(e){return e.hasAttribute(li)}generateSimplifiedDom(e,t,{extraAllowedAttributes:i=[],checkElementInstanceType:a=!0,forceIncludeAttribute:l=void 0,forceIncludeFileInput:u=!1,svgIntegration:d="aria-label",onForceIncludeElement:f=void 0,contentWindow:h=window,assignChecksumIdsToAllElements:p=!0,assignRrwebIdsToAllElements:v=!0}={}){if(!e)return null;let y=o((B,P=B)=>{if(B._originalNode=P,!gt(B,"Element")||!gt(P,"Element"))return B;let te=B,ee=P;return p&&!ee.hasAttribute("checksumid")&&(ee._checksumid||(ee._checksumid=this.checksumIdCounter.getAndIncrement()),te.setAttribute("checksumid",ee._checksumid),this.nonInteractableElementsFromSimplifiedDom.push({checksumId:ee._checksumid,element:ee})),v&&this.sessionRecorder&&(ee._rrwebid||(ee._rrwebid=this.sessionRecorder.getMeta(ee)?.id?.toString()??""),te.setAttribute("rrwebid",ee._rrwebid)),this.checksumIdToRRwebIdMap[ee._checksumid]=parseInt(ee._rrwebid),B},"processSimplifiedDOMNode"),w=o((B,P=e)=>y(document.createTextNode(B),P),"createTextNode"),M=o((B,P=e)=>y(document.createElement(B),P),"createElementNode");if(e.nodeType===Node.ELEMENT_NODE){let B=e;if(B.tagName.toLowerCase()==="head"||this.shouldIgnoreElement(B))return null}if(e.nodeType===Node.TEXT_NODE)return!e.parentElement||e.parentElement.getAttribute("checksum-data-visible")==="false"&&!e.parentElement.hasAttribute("checksumid")||e.parentElement.tagName.toLowerCase()==="body"?null:e.textContent?.trim()?w(e.textContent+" "):null;if(e.nodeType!==Node.ELEMENT_NODE||a&&!(gt(e,"HTMLElement")||gt(e,"SVGElement")))return null;let b=e,R=b.tagName.toLowerCase()==="iframe"&&b.contentDocument,T=yr(R?b.contentDocument.documentElement:b,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(B=>{b.matches(B.selector)&&T.length>B.limit&&T.splice(B.limit)});let _=T.map(B=>this.generateSimplifiedDom(B,t,{extraAllowedAttributes:i,checkElementInstanceType:a,forceIncludeAttribute:l,forceIncludeFileInput:u,svgIntegration:d,onForceIncludeElement:f,contentWindow:R?b.contentWindow:h,assignChecksumIdsToAllElements:p,assignRrwebIdsToAllElements:v})).filter(this.truthyFilter),C=b.getAttribute("checksum-data-visible")!=="false",F=b.hasAttribute("checksumid"),G=b.hasAttribute("role"),{customDescription:Q,customDescriptionTarget:le}=this.getElementCustomDescription(b,{enableSVGCustomDescription:!!d}),X=!!Q,se=b.hasAttribute("aria-label")||b.hasAttribute("name")||b.hasAttribute("alt"),he=b.hasAttribute(Ds)||this.forceIncludeElements.map(B=>B.element).includes(b)||!!l&&b.hasAttribute(l)||u&&b.tagName.toLowerCase()==="input"&&b.getAttribute("type")==="file",V=["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"],W=F||C&&(G||se||X||b.matches(V.join(",")));if(!(W||he)){if(!_.length)return null;if(_.length===1&&!gt(_[0],"Text"))return _[0]}!W&&he&&f?.(b);let Y=o(()=>{if(X)switch(le){case"svg":switch(d){case"aria-label":let P=M("svg");return P.setAttribute("aria-label",Q),{simplifiedNode:P,appendChildren:!1};case"text":if(b.hasAttribute("checksumid")){let ee=M("div");return ee.innerText=Q,{simplifiedNode:ee,appendChildren:!1}}return{simplifiedNode:w(` [${Q}] `),appendChildren:!1}}}let B=b.tagName.toLowerCase()==="body"&&b.ownerDocument!==document?"div":b.tagName;return{simplifiedNode:M(B)}},"makeSimplifiedNode"),{simplifiedNode:z,appendChildren:J=!0}=Y();if(!gt(z,"Element"))return z;let ve=z,et=["aria-.+","data-name","name","type","placeholder","content","value","role","icon","title","checksumid","checksuminteractable","checksum-get-more-items","checked","disabled","selected","label","required","inputmode","min","max","step","minlength","maxlength","alt","hidden","draggable","ondrop","ondragover","contenteditable","href","(data-)?test(-)?id"].concat(i),Ue=b.attributes;for(let B of Ue)for(let P of et)new RegExp("^"+P+"$").test(B.name)&&ve.setAttribute(B.name,B.value??!0);if(b.isContentEditable?ve.setAttribute("contenteditable","true"):!["TEXTAREA","INPUT","SELECT"].includes(b.tagName)&&window.getComputedStyle(b).cursor==="text"&&ve.setAttribute("contenteditable","cursor-text"),gt(b,"HTMLInputElement")&&b.getAttribute("type")==="checkbox")b.checked&&ve.setAttribute("checked","true");else if(gt(b,"HTMLInputElement")||gt(b,"HTMLSelectElement"))ve.setAttribute("value",b.value);else if(gt(b,"HTMLTextAreaElement")&&!b.childNodes.length&&b.value){let B=w(b.value);ve.appendChild(B)}return J&&_.forEach(B=>ve.appendChild(B)),ve}getElementCustomDescription(e,{enableSVGCustomDescription:t=!0}={}){return(gt(e,"SVGElement")||e.tagName.toLowerCase()==="svg")&&t?{customDescriptionTarget:"svg",customDescription:this.getSVGDescriptionForElement(e)}:{}}getSVGDescriptionForElement(e){let t=this.findSvgElementDescriptionFromBank(e);if(t)return t;let i=e.querySelector("title");if(i)return i.textContent}findSvgElementDescriptionFromBank(e){return this.getSvgBank().find(t=>e.matches(`svg:has(${t.selector})`))?.description}getSvgBank(){return qd}restoreDom(e=document){we("*",e).forEach(i=>{i.removeAttribute("checksum-data-visible"),i.removeAttribute("checksum-data-transparently-visible"),i.removeAttribute("checksum-data-visible-under-transparent-element"),i.removeAttribute("checksumid"),i.removeAttribute("checksuminteractable"),i.removeAttribute("checksum-data-click-offset"),i.removeAttribute(li),i.removeAttribute(Ds)})}removeAttribute(e){we("*",document).forEach(i=>{i.removeAttribute(e)})}async mapAndStoreSelectors(){let e={},t=new xt;for(let{checksumId:i,element:a,clickOffset:l,selector:u,locator:d,parentFramesSelectors:f}of await t.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom)){if(!u){console.warn("Unable to get selector for element",a);continue}let h=a;e[i]={element:h,selector:u,locator:d,clickOffset:l,parentFramesSelectors:f,innerText:h.innerText,rrwebId:this.checksumIdToRRwebIdMap[i]}}return e}shouldFurtherReduce(e){return e?e.outerHTML.length>Jd:!0}async reduceHTML(e,t={},i=document){console.time("reduceHTML");let{initialChecksumId:a,forceIncludeAttribute:l,forceIncludeFileInput:u,invalidateCache:d,includeFlashingElements:f,limitNodeRepetitions:h,stopFlashingElementsDetection:p}=this.lastReduceHTMLOptions={...this.defaultReduceHTMLOptions,...t},v=pt.getInstance("reduce",{target:i,monitorInput:!0,invalidate:d,log:!1});if(v.hasCache())return v.get();let y=f?this.flashingElementsDetector.get():void 0;p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=h,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0;let w=o(T=>Kd(T,{forceIncludeAttribute:l,forceIncludeFileInput:u,forceIncludeElements:this.forceIncludeElements.map(_=>_.element),limit:Math.min(Math.ceil(T.element.children.length*(this.reducePercentage/100)),T.element.children.length-6)}),"templateReducer");console.log("Running pre-templatize"),this.templatize(w),console.log("Preprocessing document..."),this.preprocessDocument(i);let M;for((a||!this.checksumIdCounter)&&(this.checksumIdCounter=new As(a??"0")),console.log("Marking interactable elements..."),this.markInteractableElements(e,i,{forceIncludeAttribute:l,forceIncludeFileInput:u});;){if(console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],M=this.generateSimplifiedDom(i.documentElement,e,this.lastReduceHTMLOptions),!M)throw new Error("Unable to get simplified DOM");if(this.shouldFurtherReduce(M)){if(console.log(`Will further reduce (${M.outerHTML.length})...`),!this.templatize(w)){console.log(`Exceeded maximum html reduction, stopping (html size: ${M.outerHTML.length})`);break}}else break}console.log("Simplified DOM generated, length:",M.outerHTML.length);let b=new Set(Array.from(M.querySelectorAll("[checksumid]")).map(T=>T.getAttribute("checksumid")));this.interactableElementsFromSimplifiedDom=this.interactableElements.filter(T=>b.has(T.checksumId)),console.log(`Found ${this.interactableElementsFromSimplifiedDom.length} interactable elements in simplified DOM vs ${this.interactableElements.length} in original DOM`),console.log("Restoring DOM..."),this.restoreDom(i),this.preMapReducedHTMLSelectors=DS?!1:!!e.preMapReducedHTMLSelectors,this.preMapReducedHTMLSelectors?(console.log("Mapping selectors..."),this.selectors=await this.mapAndStoreSelectors(),console.log("Done mapping selectors")):this.selectors={},this.elementsInSimplifiedDomByChecksumId=[...this.interactableElementsFromSimplifiedDom,...this.nonInteractableElementsFromSimplifiedDom].reduce((T,_)=>(T[_.checksumId]=_,T),{});let R={reducedDomHTMLElement:M,reducedHTML:M.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:y};return v.set(R),console.timeEnd("reduceHTML"),R}templatize(e){let t=this.excludedNodes,i=o(()=>Array.from(this.templateNodes).reduce((a,l)=>a+e(l).length,0),"calcExculdedNodes");if(!this.templateNodes)this.templateNodes=ol(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=i();else do{if(this.reducePercentage<98)this.reducePercentage=Math.min(this.reducePercentage+20,98),console.log("Increasing reduce percentage to",this.reducePercentage);else{if(this.nodeRepetitionsThreshold<=20)return!1;this.reducePercentage=50,this.nodeRepetitionsThreshold-=10,console.log("Reducing node repetitions threshold to",this.nodeRepetitionsThreshold),this.templateNodes=ol(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=i()}while(t===this.excludedNodes);return console.log(`[templatize] ${this.excludedNodes} elements marked to ignore for ${this.templateNodes.length} templates`),!0}getMoreElementsFromTemplate(e,t){try{let i=this.templateNodes.find(h=>h.id===e);if(!i)throw new Error("Template not found");let{element:a,excludedElements:l}=i;console.log("Preprocessing template node..."),this.preprocessDocument(a),console.log("Marking template interactable elements..."),this.markInteractableElements(t,a,this.lastReduceHTMLOptions);let u=[],d=o(()=>u.map(h=>h.outerHTML).join(""),"getElementsHTML"),f=l.values();for(;d().length<Jd*.5;){let h=f.next().value;if(!h)break;let p=Array.from(h.querySelectorAll("[checksumid]")).concat(h._checksumid?[h]:[]);this.interactableElements.filter(v=>p.includes(v.element)).forEach(v=>{this.elementsInSimplifiedDomByChecksumId[v.element._checksumid]=v}),u.push(this.generateSimplifiedDom(h,t,this.lastReduceHTMLOptions)),l.delete(h)}return this.restoreDom(a),{items:d(),hasMoreItems:l.size>0}}catch(i){console.error("[getMoreElementsFromTemplate] error",i);return}}async getSelectorForChecksumId(e,{forceGenerate:t=!1}={}){let i=o(h=>({selector:e,element:h?h.element:null,locator:"",parentFramesSelectors:[],invalid:!0,rrwebId:this.checksumIdToRRwebIdMap[e],clickOffset:h?.clickOffset,innerText:h?h.element.innerText:""}),"makeDefaultResult"),a=new xt,l=this.elementsInSimplifiedDomByChecksumId[e];if(!l||!l.element.isConnected)return this.preMapReducedHTMLSelectors&&this.selectors[e]?this.selectors[e]:i(l);let{selector:u,locator:d,parentFramesSelectors:f}=await a.getSelectorAndLocator(l.element);return{...i(l),selector:u,locator:d,parentFramesSelectors:f,invalid:!1}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]?.element}hasInnerTextByChecksumId(e,{maxLength:t=void 0,minLength:i=void 0}={}){if(!this.preMapReducedHTMLSelectors){let l=this.elementsInSimplifiedDomByChecksumId[e]?.element?.innerText;return!(!l||i&&l.length<i||t&&l.length>t)}return!!this.selectors[e]?.innerText}getInteractableElements(){return this.interactableElements}getInteractableElementsInReducedHTML(){return this.interactableElementsFromSimplifiedDom}startFlashingElementsDetection(){return this.flashingElementsDetector.start()}addForceIncludeElement(e){this.forceIncludeElements.push(e),e.element._checksumid=e.checksumid}};var NS=!0,wr=class{constructor(){this.esraExtractors=[];this.playwrightSelector=new xt;this.defaultModulesState={extractReducedHtmlAndSelector:!1,inspectInteractableElements:!1,extractEsraMetadata:!0,extractPlaywrightSelector:!0};this.previousTargetNodeForReducedHTML=void 0;this.currentReducedHTMLChecksumIdAllocationCount="0";this.htmlReducer=new Sr}static{o(this,"SessionDigesterSelector")}async getSelector(e,{extractPlaywrightSelector:t=!0,extractEsraMetadata:i=this.defaultModulesState.extractEsraMetadata,extractReducedHtmlAndSelector:a=this.defaultModulesState.extractReducedHtmlAndSelector,inspectInteractableElements:l=this.defaultModulesState.inspectInteractableElements}={}){if(!e)return null;console.log("[SessionDigesterSelector] generating for node",e);let u={};if(i){console.log("extracting ESRA metadata...");let d=this.getESRAExtractor(e).extract(e);u.esraMetadata=d.toMetadata(),console.log("ESRA metadata extraction complete")}if(t){console.log("extracting playwright selector...");let{selector:d,locator:f,parentFramesSelectors:h}=await this.playwrightSelector.getSelectorAndLocator(e);u.playwrightSelector=d,u.playwrightLocator=f,u.playwrightParentFramesSelectors=h,console.log("Playwright selector extraction complete")}return a&&(console.log("extracting reduced HTML..."),u.reducedHTML=await this.getReducedHTMLAndTargetNodeSelector(e),console.log("Reduced HTML extraction complete")),l&&(console.log("extracting element inspection..."),u.interactionFoundOnInspection=await this.isElementInteractable(e),console.log("Element inspection extraction complete")),console.log("[SessionDigesterSelector] complete",u),u}async selector(e){return this.playwrightSelector.selector(e)}setAppRules(e){this.appSpecificRules=e}setOptions({defaultExtractReducedHtmlAndSelector:e,defaultInspectInteractableElements:t,defaultExtractEsraMetadata:i}){this.defaultModulesState.extractReducedHtmlAndSelector=e,this.defaultModulesState.inspectInteractableElements=t,this.defaultModulesState.extractEsraMetadata=i}async getReducedHTMLAndTargetNodeSelector(e){let t="checksum-target-node";e.setAttribute(t,"true");let i=this.previousTargetNodeForReducedHTML&&this.previousTargetNodeForReducedHTML!==e;this.previousTargetNodeForReducedHTML=e;let a=!1,l=o(v=>{v.hasAttribute(t)&&(a=!0)},"onForceIncludeElement"),{reducedDomHTMLElement:u,reducedHTML:d,currentChecksumId:f}=await this.htmlReducer.reduceHTML({...this.appSpecificRules,preMapReducedHTMLSelectors:!1},{initialChecksumId:this.currentReducedHTMLChecksumIdAllocationCount,extraAllowedAttributes:[t],checkElementInstanceType:!1,forceIncludeAttribute:NS?t:void 0,invalidateCache:i,onForceIncludeElement:l},e.ownerDocument);e.removeAttribute(t),this.currentReducedHTMLChecksumIdAllocationCount=f;let h=u.matches(`[${t}=true]`)?u:u.querySelector(`[${t}=true]`),p=h?h.getAttribute("checksumid"):void 0;return{html:d,selector:p,targetForceIncluded:a}}getESRAExtractor(e){let t=this.esraExtractors.find(a=>a.isSameDocument(e.ownerDocument));if(t)return t;let i=new lt(e.ownerDocument);return this.esraExtractors.push(i),i}async isElementInteractable(e){let t=this.htmlReducer.getInteractableElements();return t&&t.length?t.some(a=>a.element===e&&!a.forced):(await Bt(e.ownerDocument,this.appSpecificRules)).includes(e)}};var oe;(function(n){n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment"})(oe||(oe={}));function lf(n){return n.nodeType===n.ELEMENT_NODE}o(lf,"isElement");function Yn(n){let e=n?.host;return e?.shadowRoot===n}o(Yn,"isShadowRoot");function jn(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}o(jn,"isNativeShadowDom");function LS(n){return n.includes(" background-clip: text;")&&!n.includes(" -webkit-background-clip: text;")&&(n=n.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),n}o(LS,"fixBrowserCompatibilityIssuesInCSS");function OS(n){let{cssText:e}=n;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(n.href)})`];return n.layerName===""?t.push("layer"):n.layerName&&t.push(`layer(${n.layerName})`),n.supportsText&&t.push(`supports(${n.supportsText})`),n.media.length&&t.push(n.media.mediaText),t.join(" ")+";"}o(OS,"escapeImportStatement");function Ns(n){try{let e=n.rules||n.cssRules;return e?LS(Array.from(e,ul).join("")):null}catch{return null}}o(Ns,"stringifyStylesheet");function ul(n){let e;if(FS(n))try{e=Ns(n.styleSheet)||OS(n)}catch{}else if(PS(n)&&n.selectorText.includes(":"))return kS(n.cssText);return e||n.cssText}o(ul,"stringifyRule");function kS(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}o(kS,"fixSafariColons");function FS(n){return"styleSheet"in n}o(FS,"isCSSImportRule");function PS(n){return"selectorText"in n}o(PS,"isCSSStyleRule");var ui=class{static{o(this,"Mirror")}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return-1;let i=(t=this.getMeta(e))===null||t===void 0?void 0:t.id;return i??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(t,a)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Os(){return new ui}o(Os,"createMirror");function fi({element:n,maskInputOptions:e,tagName:t,type:i,value:a,maskInputFn:l}){let u=a||"",d=i&&Vt(i);return(e[t.toLowerCase()]||d&&e[d])&&(l?u=l(u,n):u="*".repeat(u.length)),u}o(fi,"maskInputValue");function Vt(n){return n.toLowerCase()}o(Vt,"toLowerCase");var ef="__rrweb_original__";function HS(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let i=0;i<n.width;i+=t)for(let a=0;a<n.height;a+=t){let l=e.getImageData,u=ef in l?l[ef]:l;if(new Uint32Array(u.call(e,i,a,Math.min(t,n.width-i),Math.min(t,n.height-a)).data.buffer).some(f=>f!==0))return!1}return!0}o(HS,"is2DCanvasBlank");function WS(n,e){return!n||!e||n.type!==e.type?!1:n.type===oe.Document?n.compatMode===e.compatMode:n.type===oe.DocumentType?n.name===e.name&&n.publicId===e.publicId&&n.systemId===e.systemId:n.type===oe.Comment||n.type===oe.Text||n.type===oe.CDATA?n.textContent===e.textContent:n.type===oe.Element?n.tagName===e.tagName&&JSON.stringify(n.attributes)===JSON.stringify(e.attributes)&&n.isSVG===e.isSVG&&n.needBlock===e.needBlock:!1}o(WS,"isNodeMetaEqual");function hi(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?Vt(e):null}o(hi,"getInputType");function cf(n,e){var t;let i;try{i=new URL(n,e??window.location.href)}catch{return null}let a=/\.([0-9a-z]+)(?:$)/i,l=i.pathname.match(a);return(t=l?.[1])!==null&&t!==void 0?t:null}o(cf,"extractFileExtension");var BS=1,VS=new RegExp("[^a-z0-9-_:]"),Kn=-2;function dl(){return BS++}o(dl,"genId");function US(n){if(n instanceof HTMLFormElement)return"form";let e=Vt(n.tagName);return VS.test(e)?"div":e}o(US,"getValidTagName");function GS(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}o(GS,"extractOrigin");var Mr,tf,$S=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qS=/^(?:[a-z+]+:)?\/\//i,zS=/^www\..*/i,jS=/^(data:)([^,]*),(.*)/i;function Ls(n,e){return(n||"").replace($S,(t,i,a,l,u,d)=>{let f=a||u||d,h=i||l||"";if(!f)return t;if(qS.test(f)||zS.test(f))return`url(${h}${f}${h})`;if(jS.test(f))return`url(${h}${f}${h})`;if(f[0]==="/")return`url(${h}${GS(e)+f}${h})`;let p=e.split("/"),v=f.split("/");p.pop();for(let y of v)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${h}${p.join("/")}${h})`})}o(Ls,"absoluteToStylesheet");var KS=/^[^ \t\n\r\u000c]+/,YS=/^[, \t\n\r\u000c]+/;function QS(n,e){if(e.trim()==="")return e;let t=0;function i(l){let u,d=l.exec(e.substring(t));return d?(u=d[0],t+=u.length,u):""}o(i,"collectCharacters");let a=[];for(;i(YS),!(t>=e.length);){let l=i(KS);if(l.slice(-1)===",")l=xr(n,l.substring(0,l.length-1)),a.push(l);else{let u="";l=xr(n,l);let d=!1;for(;;){let f=e.charAt(t);if(f===""){a.push((l+u).trim());break}else if(d)f===")"&&(d=!1);else if(f===","){t+=1,a.push((l+u).trim());break}else f==="("&&(d=!0);u+=f,t+=1}}}return a.join(", ")}o(QS,"getAbsoluteSrcsetString");var nf=new WeakMap;function xr(n,e){return!e||e.trim()===""?e:ks(n,e)}o(xr,"absoluteToDoc");function XS(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}o(XS,"isSVGElement");function ks(n,e){let t=nf.get(n);if(t||(t=n.createElement("a"),nf.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}o(ks,"getHref");function fl(n,e,t,i){return i&&(t==="src"||t==="href"&&!(e==="use"&&i[0]==="#")||t==="xlink:href"&&i[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?xr(n,i):t==="srcset"?QS(n,i):t==="style"?Ls(i,ks(n)):e==="object"&&t==="data"?xr(n,i):i)}o(fl,"transformAttribute");function hl(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}o(hl,"ignoreAttribute");function ZS(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let i=n.classList.length;i--;){let a=n.classList[i];if(e.test(a))return!0}if(t)return n.matches(t)}catch{}return!1}o(ZS,"_isBlockedElement");function di(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?di(n.parentNode,e,t):!1;for(let i=n.classList.length;i--;){let a=n.classList[i];if(e.test(a))return!0}return t?di(n.parentNode,e,t):!1}o(di,"classMatchesRegex");function ml(n,e,t,i){try{let a=n.nodeType===n.ELEMENT_NODE?n:n.parentElement;if(a===null)return!1;if(typeof e=="string"){if(i){if(a.closest(`.${e}`))return!0}else if(a.classList.contains(e))return!0}else if(di(a,e,i))return!0;if(t){if(i){if(a.closest(t))return!0}else if(a.matches(t))return!0}}catch{}return!1}o(ml,"needMaskingText");function JS(n,e,t){let i=n.contentWindow;if(!i)return;let a=!1,l;try{l=i.document.readyState}catch{return}if(l!=="complete"){let d=setTimeout(()=>{a||(e(),a=!0)},t);n.addEventListener("load",()=>{clearTimeout(d),a=!0,e()});return}let u="about:blank";if(i.location.href!==u||n.src===u||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}o(JS,"onceIframeLoaded");function ew(n,e,t){let i=!1,a;try{a=n.sheet}catch{return}if(a)return;let l=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(l),i=!0,e()})}o(ew,"onceStylesheetLoaded");function tw(n,e){let{doc:t,mirror:i,blockClass:a,blockSelector:l,needsMask:u,inlineStylesheet:d,maskInputOptions:f={},maskTextFn:h,maskInputFn:p,dataURLOptions:v={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:M,newlyAddedElement:b=!1}=e,R=nw(t,i);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:oe.Document,childNodes:[],compatMode:n.compatMode}:{type:oe.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:oe.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:R};case n.ELEMENT_NODE:return iw(n,{doc:t,blockClass:a,blockSelector:l,inlineStylesheet:d,maskInputOptions:f,maskInputFn:p,dataURLOptions:v,inlineImages:y,recordCanvas:w,keepIframeSrcFn:M,newlyAddedElement:b,rootId:R});case n.TEXT_NODE:return rw(n,{doc:t,needsMask:u,maskTextFn:h,rootId:R});case n.CDATA_SECTION_NODE:return{type:oe.CDATA,textContent:"",rootId:R};case n.COMMENT_NODE:return{type:oe.Comment,textContent:n.textContent||"",rootId:R};default:return!1}}o(tw,"serializeNode");function nw(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}o(nw,"getRootId");function rw(n,e){var t;let{needsMask:i,maskTextFn:a,rootId:l}=e,u=n.parentNode&&n.parentNode.tagName,d=n.textContent,f=u==="STYLE"?!0:void 0,h=u==="SCRIPT"?!0:void 0;if(f&&d){try{n.nextSibling||n.previousSibling||!((t=n.parentNode.sheet)===null||t===void 0)&&t.cssRules&&(d=Ns(n.parentNode.sheet))}catch(p){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${p}`,n)}d=Ls(d,ks(e.doc))}return h&&(d="SCRIPT_PLACEHOLDER"),!f&&!h&&d&&i&&(d=a?a(d,n.parentElement):d.replace(/[\S]/g,"*")),{type:oe.Text,textContent:d||"",isStyle:f,rootId:l}}o(rw,"serializeTextNode");function iw(n,e){let{doc:t,blockClass:i,blockSelector:a,inlineStylesheet:l,maskInputOptions:u={},maskInputFn:d,dataURLOptions:f={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:v,newlyAddedElement:y=!1,rootId:w}=e,M=ZS(n,i,a),b=US(n),R={},T=n.attributes.length;for(let C=0;C<T;C++){let F=n.attributes[C];hl(b,F.name,F.value)||(R[F.name]=fl(t,b,Vt(F.name),F.value))}if(b==="link"&&l){let C=Array.from(t.styleSheets).find(G=>G.href===n.href),F=null;C&&(F=Ns(C)),F&&(delete R.rel,delete R.href,R._cssText=Ls(F,C.href))}if(b==="style"&&n.sheet&&!(n.innerText||n.textContent||"").trim().length){let C=Ns(n.sheet);C&&(R._cssText=Ls(C,ks(t)))}if(b==="input"||b==="textarea"||b==="select"){let C=n.value,F=n.checked;R.type!=="radio"&&R.type!=="checkbox"&&R.type!=="submit"&&R.type!=="button"&&C?R.value=fi({element:n,type:hi(n),tagName:b,value:C,maskInputOptions:u,maskInputFn:d}):F&&(R.checked=F)}if(b==="option"&&(n.selected&&!u.select?R.selected=!0:delete R.selected),b==="canvas"&&p){if(n.__context==="2d")HS(n)||(R.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let C=n.toDataURL(f.type,f.quality),F=document.createElement("canvas");F.width=n.width,F.height=n.height;let G=F.toDataURL(f.type,f.quality);C!==G&&(R.rr_dataURL=C)}}if(b==="img"&&h){Mr||(Mr=t.createElement("canvas"),tf=Mr.getContext("2d"));let C=n,F=C.crossOrigin;C.crossOrigin="anonymous";let G=o(()=>{C.removeEventListener("load",G);try{Mr.width=C.naturalWidth,Mr.height=C.naturalHeight,tf.drawImage(C,0,0),R.rr_dataURL=Mr.toDataURL(f.type,f.quality)}catch(Q){console.warn(`Cannot inline img src=${C.currentSrc}! Error: ${Q}`)}F?R.crossOrigin=F:C.removeAttribute("crossorigin")},"recordInlineImage");C.complete&&C.naturalWidth!==0?G():C.addEventListener("load",G)}if(b==="audio"||b==="video"){let C=R;C.rr_mediaState=n.paused?"paused":"played",C.rr_mediaCurrentTime=n.currentTime,C.rr_mediaPlaybackRate=n.playbackRate,C.rr_mediaMuted=n.muted,C.rr_mediaLoop=n.loop,C.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(R.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(R.rr_scrollTop=n.scrollTop)),M){let{width:C,height:F}=n.getBoundingClientRect();R={class:R.class,rr_width:`${C}px`,rr_height:`${F}px`}}b==="iframe"&&!v(R.src)&&(n.contentDocument||(R.rr_src=R.src),delete R.src);let _;try{customElements.get(b)&&(_=!0)}catch{}return{type:oe.Element,tagName:b,attributes:R,childNodes:[],isSVG:XS(n)||void 0,needBlock:M,rootId:w,isCustom:_}}o(iw,"serializeElementNode");function De(n){return n==null?"":n.toLowerCase()}o(De,"lowerIfExists");function sw(n,e){if(e.comment&&n.type===oe.Comment)return!0;if(n.type===oe.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"||n.attributes.rel==="modulepreload")&&n.attributes.as==="script"||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&cf(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(De(n.attributes.name).match(/^msapplication-tile(image|color)$/)||De(n.attributes.name)==="application-name"||De(n.attributes.rel)==="icon"||De(n.attributes.rel)==="apple-touch-icon"||De(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&De(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(De(n.attributes.property).match(/^(og|twitter|fb):/)||De(n.attributes.name).match(/^(og|twitter):/)||De(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(De(n.attributes.name)==="robots"||De(n.attributes.name)==="googlebot"||De(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(De(n.attributes.name)==="author"||De(n.attributes.name)==="generator"||De(n.attributes.name)==="framework"||De(n.attributes.name)==="publisher"||De(n.attributes.name)==="progid"||De(n.attributes.property).match(/^article:/)||De(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(De(n.attributes.name)==="google-site-verification"||De(n.attributes.name)==="yandex-verification"||De(n.attributes.name)==="csrf-token"||De(n.attributes.name)==="p:domain_verify"||De(n.attributes.name)==="verify-v1"||De(n.attributes.name)==="verification"||De(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}o(sw,"slimDOMExcluded");function zn(n,e){let{doc:t,mirror:i,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:d,skipChild:f=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:v,maskInputFn:y,slimDOMOptions:w,dataURLOptions:M={},inlineImages:b=!1,recordCanvas:R=!1,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C=5e3,onStylesheetLoad:F,stylesheetLoadTimeout:G=5e3,keepIframeSrcFn:Q=o(()=>!1,"keepIframeSrcFn"),newlyAddedElement:le=!1}=e,{needsMask:X}=e,{preserveWhiteSpace:se=!0}=e;!X&&n.childNodes&&(X=ml(n,u,d,X===void 0));let he=tw(n,{doc:t,mirror:i,blockClass:a,blockSelector:l,needsMask:X,inlineStylesheet:h,maskInputOptions:p,maskTextFn:v,maskInputFn:y,dataURLOptions:M,inlineImages:b,recordCanvas:R,keepIframeSrcFn:Q,newlyAddedElement:le});if(!he)return console.warn(n,"not serialized"),null;let V;i.hasNode(n)?V=i.getId(n):sw(he,w)||!se&&he.type===oe.Text&&!he.isStyle&&!he.textContent.replace(/^\s+|\s+$/gm,"").length?V=Kn:V=dl();let W=Object.assign(he,{id:V});if(i.add(n,W),V===Kn)return null;T&&T(n);let K=!f;if(W.type===oe.Element){K=K&&!W.needBlock,delete W.needBlock;let Y=n.shadowRoot;Y&&jn(Y)&&(W.isShadowHost=!0)}if((W.type===oe.Document||W.type===oe.Element)&&K){w.headWhitespace&&W.type===oe.Element&&W.tagName==="head"&&(se=!1);let Y={doc:t,mirror:i,blockClass:a,blockSelector:l,needsMask:X,maskTextClass:u,maskTextSelector:d,skipChild:f,inlineStylesheet:h,maskInputOptions:p,maskTextFn:v,maskInputFn:y,slimDOMOptions:w,dataURLOptions:M,inlineImages:b,recordCanvas:R,preserveWhiteSpace:se,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:Q};if(!(W.type===oe.Element&&W.tagName==="textarea"&&W.attributes.value!==void 0))for(let z of Array.from(n.childNodes)){let J=zn(z,Y);J&&W.childNodes.push(J)}if(lf(n)&&n.shadowRoot)for(let z of Array.from(n.shadowRoot.childNodes)){let J=zn(z,Y);J&&(jn(n.shadowRoot)&&(J.isShadow=!0),W.childNodes.push(J))}}return n.parentNode&&Yn(n.parentNode)&&jn(n.parentNode)&&(W.isShadow=!0),W.type===oe.Element&&W.tagName==="iframe"&&JS(n,()=>{let Y=n.contentDocument;if(Y&&_){let z=zn(Y,{doc:Y,mirror:i,blockClass:a,blockSelector:l,needsMask:X,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:v,maskInputFn:y,slimDOMOptions:w,dataURLOptions:M,inlineImages:b,recordCanvas:R,preserveWhiteSpace:se,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:Q});z&&_(n,z)}},C),W.type===oe.Element&&W.tagName==="link"&&typeof W.attributes.rel=="string"&&(W.attributes.rel==="stylesheet"||W.attributes.rel==="preload"&&typeof W.attributes.href=="string"&&cf(W.attributes.href)==="css")&&ew(n,()=>{if(F){let Y=zn(n,{doc:t,mirror:i,blockClass:a,blockSelector:l,needsMask:X,maskTextClass:u,maskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:v,maskInputFn:y,slimDOMOptions:w,dataURLOptions:M,inlineImages:b,recordCanvas:R,preserveWhiteSpace:se,onSerialize:T,onIframeLoad:_,iframeLoadTimeout:C,onStylesheetLoad:F,stylesheetLoadTimeout:G,keepIframeSrcFn:Q});Y&&F(n,Y)}},G),W}o(zn,"serializeNodeWithId");function uf(n,e){let{mirror:t=new ui,blockClass:i="rr-block",blockSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:h=!1,maskAllInputs:p=!1,maskTextFn:v,maskInputFn:y,slimDOM:w=!1,dataURLOptions:M,preserveWhiteSpace:b,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:C,stylesheetLoadTimeout:F,keepIframeSrcFn:G=o(()=>!1,"keepIframeSrcFn")}=e||{};return zn(n,{doc:n,mirror:t,blockClass:i,blockSelector:a,maskTextClass:l,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p===!1?{password:!0}:p,maskTextFn:v,maskInputFn:y,slimDOMOptions:w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:w==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:w===!1?{}:w,dataURLOptions:M,inlineImages:f,recordCanvas:h,preserveWhiteSpace:b,onSerialize:R,onIframeLoad:T,iframeLoadTimeout:_,onStylesheetLoad:C,stylesheetLoadTimeout:F,keepIframeSrcFn:G,newlyAddedElement:!1})}o(uf,"snapshot");var rf=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;function ow(n,e={}){let t=1,i=1;function a(B){let P=B.match(/\n/g);P&&(t+=P.length);let te=B.lastIndexOf(`
25
+ `);i=te===-1?i+B.length:B.length-te}o(a,"updatePosition");function l(){let B={line:t,column:i};return P=>(P.position=new u(B),M(),P)}o(l,"position");class u{static{o(this,"Position")}constructor(P){this.start=P,this.end={line:t,column:i},this.source=e.source}}u.prototype.content=n;let d=[];function f(B){let P=new Error(`${e.source||""}:${t}:${i}: ${B}`);if(P.reason=B,P.filename=e.source,P.line=t,P.column=i,P.source=n,e.silent)d.push(P);else throw P}o(f,"error");function h(){let B=y();return{type:"stylesheet",stylesheet:{source:e.source,rules:B,parsingErrors:d}}}o(h,"stylesheet");function p(){return w(/^{\s*/)}o(p,"open");function v(){return w(/^}/)}o(v,"close");function y(){let B,P=[];for(M(),b(P);n.length&&n.charAt(0)!=="}"&&(B=et()||Ue());)B&&(P.push(B),b(P));return P}o(y,"rules");function w(B){let P=B.exec(n);if(!P)return;let te=P[0];return a(te),n=n.slice(te.length),P}o(w,"match");function M(){w(/^\s*/)}o(M,"whitespace");function b(B=[]){let P;for(;P=R();)P&&B.push(P),P=R();return B}o(b,"comments");function R(){let B=l();if(n.charAt(0)!=="/"||n.charAt(1)!=="*")return;let P=2;for(;n.charAt(P)!==""&&(n.charAt(P)!=="*"||n.charAt(P+1)!=="/");)++P;if(P+=2,n.charAt(P-1)==="")return f("End of comment missing");let te=n.slice(2,P-2);return i+=2,a(te),n=n.slice(P),i+=2,B({type:"comment",comment:te})}o(R,"comment");function T(){for(M();n[0]=="}";)f("extra closing bracket"),n=n.slice(1),M();let B=w(/^(((?<!\\)"(?:\\"|[^"])*"|(?<!\\)'(?:\\'|[^'])*'|[^{])+)/);if(!B)return;let P=B[0].trim().replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,te=>te.replace(/,/g,"\u200C"));return _(P).map(te=>te.replace(/\u200C/g,",").trim())}o(T,"selector");function _(B){let P=[],te="",ee=0,Oe=0,ut=null;for(let Xe of B){let it=te.endsWith("\\");ut?ut===Xe&&!it&&(ut=null):Xe==="("?ee++:Xe===")"?ee--:Xe==="["?Oe++:Xe==="]"?Oe--:`'"`.includes(Xe)&&(ut=Xe),Xe===","&&ee===0&&Oe===0?(P.push(te),te=""):te+=Xe}return te&&P.push(te),P}o(_,"customSplit");function C(){let B=l(),P=w(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(!P)return;let te=In(P[0]);if(!w(/^:\s*/))return f("property missing ':'");let ee=w(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),Oe=B({type:"declaration",property:te.replace(rf,""),value:ee?In(ee[0]).replace(rf,""):""});return w(/^[;\s]*/),Oe}o(C,"declaration");function F(){let B=[];if(!p())return f("missing '{'");b(B);let P;for(;P=C();)P!==!1&&(B.push(P),b(B)),P=C();return v()?B:f("missing '}'")}o(F,"declarations");function G(){let B,P=[],te=l();for(;B=w(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)P.push(B[1]),w(/^,\s*/);if(P.length)return te({type:"keyframe",values:P,declarations:F()})}o(G,"keyframe");function Q(){let B=l(),P=w(/^@([-\w]+)?keyframes\s*/);if(!P)return;let te=P[1];if(P=w(/^([-\w]+)\s*/),!P)return f("@keyframes missing name");let ee=P[1];if(!p())return f("@keyframes missing '{'");let Oe,ut=b();for(;Oe=G();)ut.push(Oe),ut=ut.concat(b());return v()?B({type:"keyframes",name:ee,vendor:te,keyframes:ut}):f("@keyframes missing '}'")}o(Q,"atkeyframes");function le(){let B=l(),P=w(/^@supports *([^{]+)/);if(!P)return;let te=In(P[1]);if(!p())return f("@supports missing '{'");let ee=b().concat(y());return v()?B({type:"supports",supports:te,rules:ee}):f("@supports missing '}'")}o(le,"atsupports");function X(){let B=l();if(!w(/^@host\s*/))return;if(!p())return f("@host missing '{'");let te=b().concat(y());return v()?B({type:"host",rules:te}):f("@host missing '}'")}o(X,"athost");function se(){let B=l(),P=w(/^@media *([^{]+)/);if(!P)return;let te=In(P[1]);if(!p())return f("@media missing '{'");let ee=b().concat(y());return v()?B({type:"media",media:te,rules:ee}):f("@media missing '}'")}o(se,"atmedia");function he(){let B=l(),P=w(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(P)return B({type:"custom-media",name:In(P[1]),media:In(P[2])})}o(he,"atcustommedia");function V(){let B=l();if(!w(/^@page */))return;let te=T()||[];if(!p())return f("@page missing '{'");let ee=b(),Oe;for(;Oe=C();)ee.push(Oe),ee=ee.concat(b());return v()?B({type:"page",selectors:te,declarations:ee}):f("@page missing '}'")}o(V,"atpage");function W(){let B=l(),P=w(/^@([-\w]+)?document *([^{]+)/);if(!P)return;let te=In(P[1]),ee=In(P[2]);if(!p())return f("@document missing '{'");let Oe=b().concat(y());return v()?B({type:"document",document:ee,vendor:te,rules:Oe}):f("@document missing '}'")}o(W,"atdocument");function K(){let B=l();if(!w(/^@font-face\s*/))return;if(!p())return f("@font-face missing '{'");let te=b(),ee;for(;ee=C();)te.push(ee),te=te.concat(b());return v()?B({type:"font-face",declarations:te}):f("@font-face missing '}'")}o(K,"atfontface");let Y=ve("import"),z=ve("charset"),J=ve("namespace");function ve(B){let P=new RegExp("^@"+B+"\\s*((?:"+['(?<!\\\\)"(?:\\\\"|[^"])*"',"(?<!\\\\)'(?:\\\\'|[^'])*'","[^;]"].join("|")+")+);");return()=>{let te=l(),ee=w(P);if(!ee)return;let Oe={type:B};return Oe[B]=ee[1].trim(),te(Oe)}}o(ve,"_compileAtrule");function et(){if(n[0]==="@")return Q()||se()||he()||le()||Y()||z()||J()||W()||V()||X()||K()}o(et,"atrule");function Ue(){let B=l(),P=T();return P?(b(),B({type:"rule",selectors:P,declarations:F()})):f("selector missing")}return o(Ue,"rule"),cl(h())}o(ow,"parse");function In(n){return n?n.replace(/^\s+|\s+$/g,""):""}o(In,"trim");function cl(n,e){let t=n&&typeof n.type=="string",i=t?n:e;for(let a of Object.keys(n)){let l=n[a];Array.isArray(l)?l.forEach(u=>{cl(u,i)}):l&&typeof l=="object"&&cl(l,i)}return t&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:e||null}),n}o(cl,"addParent");var sf={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 aw(n){let e=sf[n.tagName]?sf[n.tagName]:n.tagName;return e==="link"&&n.attributes._cssText&&(e="style"),e}o(aw,"getTagName");function of(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}o(of,"escapeRegExp");var df=/(max|min)-device-(width|height)/,lw=new RegExp(df.source,"g"),ff=/([^\\]):hover/,cw=new RegExp(ff.source,"g");function af(n,e){let t=e?.stylesWithHoverClass.get(n);if(t)return t;let i=ow(n,{silent:!0});if(!i.stylesheet)return n;let a=[],l=[];function u(f){"selectors"in f&&f.selectors&&f.selectors.forEach(h=>{ff.test(h)&&a.push(h)}),"media"in f&&f.media&&df.test(f.media)&&l.push(f.media),"rules"in f&&f.rules&&f.rules.forEach(u)}o(u,"getSelectors"),u(i.stylesheet);let d=n;if(a.length>0){let f=new RegExp(a.filter((h,p)=>a.indexOf(h)===p).sort((h,p)=>p.length-h.length).map(h=>of(h)).join("|"),"g");d=d.replace(f,h=>{let p=h.replace(cw,"$1.\\:hover");return`${h}, ${p}`})}if(l.length>0){let f=new RegExp(l.filter((h,p)=>l.indexOf(h)===p).sort((h,p)=>p.length-h.length).map(h=>of(h)).join("|"),"g");d=d.replace(f,h=>h.replace(lw,"$1-$2"))}return e?.stylesWithHoverClass.set(n,d),d}o(af,"adaptCssForReplay");function pl(){return{stylesWithHoverClass:new Map}}o(pl,"createCache");function uw(n,e){var t;let{doc:i,hackCss:a,cache:l}=e;switch(n.type){case oe.Document:return i.implementation.createDocument(null,"",null);case oe.DocumentType:return i.implementation.createDocumentType(n.name||"html",n.publicId,n.systemId);case oe.Element:{let u=aw(n),d;n.isSVG?d=i.createElementNS("http://www.w3.org/2000/svg",u):(n.isCustom&&(!((t=i.defaultView)===null||t===void 0)&&t.customElements)&&!i.defaultView.customElements.get(n.tagName)&&i.defaultView.customElements.define(n.tagName,class extends i.defaultView.HTMLElement{}),d=i.createElement(u));let f={};for(let h in n.attributes){if(!Object.prototype.hasOwnProperty.call(n.attributes,h))continue;let p=n.attributes[h];if(u==="option"&&h==="selected"&&p===!1||p===null)continue;if(p===!0&&(p=""),h.startsWith("rr_")){f[h]=p;continue}let v=u==="textarea"&&h==="value",y=u==="style"&&h==="_cssText";if(y&&a&&typeof p=="string"&&(p=af(p,l)),(v||y)&&typeof p=="string"){d.appendChild(i.createTextNode(p)),n.childNodes=[];continue}try{if(n.isSVG&&h==="xlink:href")d.setAttributeNS("http://www.w3.org/1999/xlink",h,p.toString());else if(h==="onload"||h==="onclick"||h.substring(0,7)==="onmouse")d.setAttribute("_"+h,p.toString());else if(u==="meta"&&n.attributes["http-equiv"]==="Content-Security-Policy"&&h==="content"){d.setAttribute("csp-content",p.toString());continue}else u==="link"&&(n.attributes.rel==="preload"||n.attributes.rel==="modulepreload")&&n.attributes.as==="script"||u==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&n.attributes.href.endsWith(".js")||(u==="img"&&n.attributes.srcset&&n.attributes.rr_dataURL?d.setAttribute("rrweb-original-srcset",n.attributes.srcset):d.setAttribute(h,p.toString()))}catch{}}for(let h in f){let p=f[h];if(u==="canvas"&&h==="rr_dataURL"){let v=document.createElement("img");v.onload=()=>{let y=d.getContext("2d");y&&y.drawImage(v,0,0,v.width,v.height)},v.src=p.toString(),d.RRNodeType&&(d.rr_dataURL=p.toString())}else if(u==="img"&&h==="rr_dataURL"){let v=d;v.currentSrc.startsWith("data:")||(v.setAttribute("rrweb-original-src",n.attributes.src),v.src=p.toString())}if(h==="rr_width")d.style.width=p.toString();else if(h==="rr_height")d.style.height=p.toString();else if(h==="rr_mediaCurrentTime"&&typeof p=="number")d.currentTime=p;else if(h==="rr_mediaState")switch(p){case"played":d.play().catch(v=>console.warn("media playback error",v));break;case"paused":d.pause();break}else h==="rr_mediaPlaybackRate"&&typeof p=="number"?d.playbackRate=p:h==="rr_mediaMuted"&&typeof p=="boolean"?d.muted=p:h==="rr_mediaLoop"&&typeof p=="boolean"?d.loop=p:h==="rr_mediaVolume"&&typeof p=="number"&&(d.volume=p)}if(n.isShadowHost)if(!d.shadowRoot)d.attachShadow({mode:"open"});else for(;d.shadowRoot.firstChild;)d.shadowRoot.removeChild(d.shadowRoot.firstChild);return d}case oe.Text:return i.createTextNode(n.isStyle&&a?af(n.textContent,l):n.textContent);case oe.CDATA:return i.createCDATASection(n.textContent);case oe.Comment:return i.createComment(n.textContent);default:return null}}o(uw,"buildNode");function Tr(n,e){let{doc:t,mirror:i,skipChild:a=!1,hackCss:l=!0,afterAppend:u,cache:d}=e;if(i.has(n.id)){let h=i.getNode(n.id),p=i.getMeta(h);if(WS(p,n))return i.getNode(n.id)}let f=uw(n,{doc:t,hackCss:l,cache:d});if(!f)return null;if(n.rootId&&i.getNode(n.rootId)!==t&&i.replace(n.rootId,t),n.type===oe.Document&&(t.close(),t.open(),n.compatMode==="BackCompat"&&n.childNodes&&n.childNodes[0].type!==oe.DocumentType&&(n.childNodes[0].type===oe.Element&&"xmlns"in n.childNodes[0].attributes&&n.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),f=t),i.add(f,n),(n.type===oe.Document||n.type===oe.Element)&&!a)for(let h of n.childNodes){let p=Tr(h,{doc:t,mirror:i,skipChild:!1,hackCss:l,afterAppend:u,cache:d});if(!p){console.warn("Failed to rebuild",h);continue}if(h.isShadow&&lf(f)&&f.shadowRoot)f.shadowRoot.appendChild(p);else if(n.type===oe.Document&&h.type==oe.Element){let v=p,y=null;v.childNodes.forEach(w=>{w.nodeName==="BODY"&&(y=w)}),y?(v.removeChild(y),f.appendChild(p),v.appendChild(y)):f.appendChild(p)}else f.appendChild(p);u&&u(p,h.id)}return f}o(Tr,"buildNodeWithSN");function dw(n,e){function t(i){e(i)}o(t,"walk");for(let i of n.getIds())n.has(i)&&t(n.getNode(i))}o(dw,"visit");function fw(n,e){let t=e.getMeta(n);if(t?.type!==oe.Element)return;let i=n;for(let a in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,a)&&a.startsWith("rr_")))continue;let l=t.attributes[a];a==="rr_scrollLeft"&&(i.scrollLeft=l),a==="rr_scrollTop"&&(i.scrollTop=l)}}o(fw,"handleScroll");function hf(n,e){let{doc:t,onVisit:i,hackCss:a=!0,afterAppend:l,cache:u,mirror:d=new ui}=e,f=Tr(n,{doc:t,mirror:d,skipChild:!1,hackCss:a,afterAppend:l,cache:u});return dw(d,h=>{i&&i(h),fw(h,d)}),f}o(hf,"rebuild");function Je(n,e,t=document){let i={capture:!0,passive:!0};return t.addEventListener(n,e,i),()=>t.removeEventListener(n,e,i)}o(Je,"on");var Ir=`Please stop import mirror directly. Instead of that,\r
26
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
27
+ or you can use record.mirror to access the mirror instance during recording.`,mf={map:{},getId(){return console.error(Ir),-1},getNode(){return console.error(Ir),null},removeNodeFromMap(){console.error(Ir)},has(){return console.error(Ir),!1},reset(){console.error(Ir)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(mf=new Proxy(mf,{get(n,e,t){return e==="map"&&console.error(Ir),Reflect.get(n,e,t)}}));function Rr(n,e,t={}){let i=null,a=0;return function(...l){let u=Date.now();!a&&t.leading===!1&&(a=u);let d=e-(u-a),f=this;d<=0||d>e?(i&&(clearTimeout(i),i=null),a=u,n.apply(f,l)):!i&&t.trailing!==!1&&(i=setTimeout(()=>{a=t.leading===!1?0:Date.now(),i=null,n.apply(f,l)},d))}}o(Rr,"throttle");function Qn(n,e,t,i,a=window){let l=a.Object.getOwnPropertyDescriptor(n,e);return a.Object.defineProperty(n,e,i?t:{set(u){setTimeout(()=>{t.set.call(this,u)},0),l&&l.set&&l.set.call(this,u)}}),()=>Qn(n,e,l||{},!0)}o(Qn,"hookSetter");function Ut(n,e,t){try{if(!(e in n))return()=>{};let i=n[e],a=t(i);return typeof a=="function"&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:i}})),n[e]=a,()=>{n[e]=i}}catch{return()=>{}}}o(Ut,"patch");var Ar=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Ar=o(()=>new Date().getTime(),"nowTimestamp"));function Fs(n){var e,t,i,a,l,u;let d=n.document;return{left:d.scrollingElement?d.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:d?.documentElement.scrollLeft||((t=(e=d?.body)===null||e===void 0?void 0:e.parentElement)===null||t===void 0?void 0:t.scrollLeft)||((i=d?.body)===null||i===void 0?void 0:i.scrollLeft)||0,top:d.scrollingElement?d.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:d?.documentElement.scrollTop||((l=(a=d?.body)===null||a===void 0?void 0:a.parentElement)===null||l===void 0?void 0:l.scrollTop)||((u=d?.body)===null||u===void 0?void 0:u.scrollTop)||0}}o(Fs,"getWindowScroll");function Ps(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}o(Ps,"getWindowHeight");function Hs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}o(Hs,"getWindowWidth");function gl(n){return n?n.nodeType===n.ELEMENT_NODE?n:n.parentElement:null}o(gl,"closestElementOfNode");function ze(n,e,t,i){if(!n)return!1;let a=gl(n);if(!a)return!1;try{if(typeof e=="string"){if(a.classList.contains(e)||i&&a.closest("."+e)!==null)return!0}else if(di(a,e,i))return!0}catch{}return!!(t&&(a.matches(t)||i&&a.closest(t)!==null))}o(ze,"isBlocked");function pf(n,e){return e.getId(n)!==-1}o(pf,"isSerialized");function Ws(n,e){return e.getId(n)===Kn}o(Ws,"isIgnored");function vl(n,e){if(Yn(n))return!1;let t=e.getId(n);return e.has(t)?n.parentNode&&n.parentNode.nodeType===n.DOCUMENT_NODE?!1:n.parentNode?vl(n.parentNode,e):!0:!0}o(vl,"isAncestorRemoved");function Bs(n){return!!n.changedTouches}o(Bs,"legacy_isTouchEvent");function Vs(n=window){"NodeList"in n&&!n.NodeList.prototype.forEach&&(n.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in n&&!n.DOMTokenList.prototype.forEach&&(n.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===t)return!0;while(t=t&&t.parentNode);return!1})}o(Vs,"polyfill");function gf(n){let e={},t=o((a,l)=>{let u={value:a,parent:l,children:[]};return e[a.node.id]=u,u},"putIntoMap"),i=[];for(let a of n){let{nextId:l,parentId:u}=a;if(l&&l in e){let d=e[l];if(d.parent){let f=d.parent.children.indexOf(d);d.parent.children.splice(f,0,t(a,d.parent))}else{let f=i.indexOf(d);i.splice(f,0,t(a,null))}continue}if(u in e){let d=e[u];d.children.push(t(a,d));continue}i.push(t(a,null))}return i}o(gf,"queueToResolveTrees");function yl(n,e){e(n.value);for(let t=n.children.length-1;t>=0;t--)yl(n.children[t],e)}o(yl,"iterateResolveTree");function Cn(n,e){return!!(n.nodeName==="IFRAME"&&e.getMeta(n))}o(Cn,"isSerializedIframe");function Us(n,e){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}o(Us,"isSerializedStylesheet");function El(n,e){var t,i;let a=(i=(t=n.ownerDocument)===null||t===void 0?void 0:t.defaultView)===null||i===void 0?void 0:i.frameElement;if(!a||a===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let l=a.getBoundingClientRect(),u=El(a,e),d=l.height/a.clientHeight;return{x:l.x*u.relativeScale+u.x,y:l.y*u.relativeScale+u.y,relativeScale:d,absoluteScale:u.absoluteScale*d}}o(El,"getBaseDimension");function Qt(n){return!!n?.shadowRoot}o(Qt,"hasShadowRoot");function _r(n,e){let t=n[e[0]];return e.length===1?t:_r(t.cssRules[e[1]].cssRules,e.slice(2))}o(_r,"getNestedRule");function bl(n){let e=[...n],t=e.pop();return{positions:e,index:t}}o(bl,"getPositionsAndIndex");function vf(n){let e=new Set,t=[];for(let i=n.length;i--;){let a=n[i];e.has(a.id)||(t.push(a),e.add(a.id))}return t}o(vf,"uniqueTextMutations");var Cr=class{static{o(this,"StyleSheetMirror")}constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){var t;return(t=this.styleIDMap.get(e))!==null&&t!==void 0?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let i;return t===void 0?i=this.id++:i=t,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Sl(n){var e,t;let i=null;return((t=(e=n.getRootNode)===null||e===void 0?void 0:e.call(n))===null||t===void 0?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&n.getRootNode().host&&(i=n.getRootNode().host),i}o(Sl,"getShadowHost");function hw(n){let e=n,t;for(;t=Sl(e);)e=t;return e}o(hw,"getRootShadowHost");function mw(n){let e=n.ownerDocument;if(!e)return!1;let t=hw(n);return e.contains(t)}o(mw,"shadowHostInDom");function Gs(n){let e=n.ownerDocument;return e?e.contains(n)||mw(n):!1}o(Gs,"inDom");var $=(n=>(n[n.DomContentLoaded=0]="DomContentLoaded",n[n.Load=1]="Load",n[n.FullSnapshot=2]="FullSnapshot",n[n.IncrementalSnapshot=3]="IncrementalSnapshot",n[n.Meta=4]="Meta",n[n.Custom=5]="Custom",n[n.Plugin=6]="Plugin",n))($||{}),U=(n=>(n[n.Mutation=0]="Mutation",n[n.MouseMove=1]="MouseMove",n[n.MouseInteraction=2]="MouseInteraction",n[n.Scroll=3]="Scroll",n[n.ViewportResize=4]="ViewportResize",n[n.Input=5]="Input",n[n.TouchMove=6]="TouchMove",n[n.MediaInteraction=7]="MediaInteraction",n[n.StyleSheetRule=8]="StyleSheetRule",n[n.CanvasMutation=9]="CanvasMutation",n[n.Font=10]="Font",n[n.Log=11]="Log",n[n.Drag=12]="Drag",n[n.StyleDeclaration=13]="StyleDeclaration",n[n.Selection=14]="Selection",n[n.AdoptedStyleSheet=15]="AdoptedStyleSheet",n[n.CustomElement=16]="CustomElement",n))(U||{}),ae=(n=>(n[n.MouseUp=0]="MouseUp",n[n.MouseDown=1]="MouseDown",n[n.Click=2]="Click",n[n.ContextMenu=3]="ContextMenu",n[n.DblClick=4]="DblClick",n[n.Focus=5]="Focus",n[n.Blur=6]="Blur",n[n.TouchStart=7]="TouchStart",n[n.TouchMove_Departed=8]="TouchMove_Departed",n[n.TouchEnd=9]="TouchEnd",n[n.TouchCancel=10]="TouchCancel",n))(ae||{}),Xt=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(Xt||{}),vt=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(vt||{}),pe=(n=>(n.Start="start",n.Pause="pause",n.Resume="resume",n.Resize="resize",n.Finish="finish",n.FullsnapshotRebuilded="fullsnapshot-rebuilded",n.LoadStylesheetStart="load-stylesheet-start",n.LoadStylesheetEnd="load-stylesheet-end",n.SkipStart="skip-start",n.SkipEnd="skip-end",n.MouseInteraction="mouse-interaction",n.EventCast="event-cast",n.CustomEvent="custom-event",n.Flush="flush",n.StateChange="state-change",n.PlayBack="play-back",n.Destroy="destroy",n))(pe||{});function yf(n){return"__ln"in n}o(yf,"isNodeInLinkedList");var wl=class{static{o(this,"DoubleLinkedList")}constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let i=0;i<e;i++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&yf(e.previousSibling)){let i=e.previousSibling.__ln.next;t.next=i,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,i&&(i.previous=t)}else if(e.nextSibling&&yf(e.nextSibling)&&e.nextSibling.__ln.previous){let i=e.nextSibling.__ln.previous;t.previous=i,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,i&&(i.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},Ef=o((n,e)=>`${n}@${e}`,"moveKey"),$s=class{static{o(this,"MutationBuffer")}constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,i=new wl,a=o(f=>{let h=f,p=Kn;for(;p===Kn;)h=h&&h.nextSibling,p=h&&this.mirror.getId(h);return p},"getNextId"),l=o(f=>{if(!f.parentNode||!Gs(f)||f.parentNode.tagName==="TEXTAREA")return;let h=Yn(f.parentNode)?this.mirror.getId(Sl(f)):this.mirror.getId(f.parentNode),p=a(f);if(h===-1||p===-1)return i.addNode(f);let v=zn(f,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:o(y=>{Cn(y,this.mirror)&&this.iframeManager.addIframe(y),Us(y,this.mirror)&&this.stylesheetManager.trackLinkElement(y),Qt(f)&&this.shadowDomManager.addShadowRoot(f.shadowRoot,this.doc)},"onSerialize"),onIframeLoad:o((y,w)=>{this.iframeManager.attachIframe(y,w),this.shadowDomManager.observeAttachShadow(y)},"onIframeLoad"),onStylesheetLoad:o((y,w)=>{this.stylesheetManager.attachLinkElement(y,w)},"onStylesheetLoad")});v&&(e.push({parentId:h,nextId:p,node:v}),t.add(v.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let f of this.movedSet)bf(this.removes,f,this.mirror)&&!this.movedSet.has(f.parentNode)||l(f);for(let f of this.addedSet)!Sf(this.droppedSet,f)&&!bf(this.removes,f,this.mirror)||Sf(this.movedSet,f)?l(f):this.droppedSet.add(f);let u=null;for(;i.length;){let f=null;if(u){let h=this.mirror.getId(u.value.parentNode),p=a(u.value);h!==-1&&p!==-1&&(f=u)}if(!f){let h=i.tail;for(;h;){let p=h;if(h=h.previous,p){let v=this.mirror.getId(p.value.parentNode);if(a(p.value)===-1)continue;if(v!==-1){f=p;break}else{let w=p.value;if(w.parentNode&&w.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let M=w.parentNode.host;if(this.mirror.getId(M)!==-1){f=p;break}}}}}}if(!f){for(;i.head;)i.removeNode(i.head.value);break}u=f.previous,i.removeNode(f.value),l(f.value)}let d={texts:this.texts.map(f=>{let h=f.node;return h.parentNode&&h.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h.parentNode),{id:this.mirror.getId(h),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{let{attributes:h}=f;if(typeof h.style=="string"){let p=JSON.stringify(f.styleDiff),v=JSON.stringify(f._unchangedStyles);p.length<h.style.length&&(p+v).split("var(").length===h.style.split("var(").length&&(h.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:h}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!d.texts.length&&!d.attributes.length&&!d.removes.length&&!d.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(d))},this.genTextAreaValueMutation=e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(e.childNodes,i=>i.textContent||"").join("")},this.processMutation=e=>{if(!Ws(e.target,this.mirror))switch(e.type){case"characterData":{let t=e.target.textContent;!ze(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:ml(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,gl(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,i=e.attributeName,a=e.target.getAttribute(i);if(i==="value"){let u=hi(t);a=fi({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:u,value:a,maskInputFn:this.maskInputFn})}if(ze(e.target,this.blockClass,this.blockSelector,!1)||a===e.oldValue)return;let l=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&i==="src"&&!this.keepIframeSrcFn(a))if(!t.contentDocument)i="rr_src";else return;if(l||(l={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(l),this.attributeMap.set(e.target,l)),i==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!hl(t.tagName,i)&&(l.attributes[i]=fl(this.doc,Vt(t.tagName),Vt(i),a),i==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let u=this.unattachedDoc.createElement("span");e.oldValue&&u.setAttribute("style",e.oldValue);for(let d of Array.from(t.style)){let f=t.style.getPropertyValue(d),h=t.style.getPropertyPriority(d);f!==u.style.getPropertyValue(d)||h!==u.style.getPropertyPriority(d)?h===""?l.styleDiff[d]=f:l.styleDiff[d]=[f,h]:l._unchangedStyles[d]=[f,h]}for(let d of Array.from(u.style))t.style.getPropertyValue(d)===""&&(l.styleDiff[d]=!1)}break}case"childList":{if(ze(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let i=this.mirror.getId(t),a=Yn(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);ze(e.target,this.blockClass,this.blockSelector,!1)||Ws(t,this.mirror)||!pf(t,this.mirror)||(this.addedSet.has(t)?(Ml(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&i===-1||vl(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Ef(i,a)]?Ml(this.movedSet,t):this.removes.push({parentId:a,id:i,isShadow:Yn(e.target)&&jn(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Ws(e,this.mirror))return;this.movedSet.add(e);let i=null;t&&this.mirror.hasNode(t)&&(i=this.mirror.getId(t)),i&&i!==-1&&(this.movedMap[Ef(this.mirror.getId(e),i)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);ze(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach(i=>this.genAdds(i)),Qt(e)&&e.shadowRoot.childNodes.forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,e)}))}}}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Ml(n,e){n.delete(e),e.childNodes.forEach(t=>Ml(n,t))}o(Ml,"deepDelete");function bf(n,e,t){return n.length===0?!1:wf(n,e,t)}o(bf,"isParentRemoved");function wf(n,e,t){let{parentNode:i}=e;if(!i)return!1;let a=t.getId(i);return n.some(l=>l.id===a)?!0:wf(n,i,t)}o(wf,"_isParentRemoved");function Sf(n,e){return n.size===0?!1:Mf(n,e)}o(Sf,"isAncestorInSet");function Mf(n,e){let{parentNode:t}=e;return t?n.has(t)?!0:Mf(n,t):!1}o(Mf,"_isAncestorInSet");var mi;function xf(n){mi=n}o(xf,"registerErrorHandler");function Tf(){mi=void 0}o(Tf,"unregisterErrorHandler");var Ee=o(n=>mi?o((...t)=>{try{return n(...t)}catch(i){if(mi&&mi(i)===!0)return;throw i}},"rrwebWrapped"):n,"callbackWrapper");var An=[];function pi(n){try{if("composedPath"in n){let e=n.composedPath();if(e.length)return e[0]}else if("path"in n&&n.path.length)return n.path[0]}catch{}return n&&n.target}o(pi,"getEventTarget");function xl(n,e){var t,i;let a=new $s;An.push(a),a.init(n);let l=window.MutationObserver||window.__rrMutationObserver,u=(i=(t=window?.Zone)===null||t===void 0?void 0:t.__symbol__)===null||i===void 0?void 0:i.call(t,"MutationObserver");u&&window[u]&&(l=window[u]);let d=new l(Ee(a.processMutations.bind(a)));return d.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),d}o(xl,"initMutationObserver");function pw({mousemoveCb:n,sampling:e,doc:t,mirror:i}){if(e.mousemove===!1)return()=>{};let a=typeof e.mousemove=="number"?e.mousemove:50,l=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,u=[],d,f=Rr(Ee(v=>{let y=Date.now()-d;n(u.map(w=>(w.timeOffset-=y,w)),v),u=[],d=null}),l),h=Ee(Rr(Ee(v=>{let y=pi(v),{clientX:w,clientY:M}=Bs(v)?v.changedTouches[0]:v;d||(d=Ar()),u.push({x:w,y:M,id:i.getId(y),timeOffset:Ar()-d}),f(typeof DragEvent<"u"&&v instanceof DragEvent?U.Drag:v instanceof MouseEvent?U.MouseMove:U.TouchMove)}),a,{trailing:!1})),p=[Je("mousemove",h,t),Je("touchmove",h,t),Je("drag",h,t)];return Ee(()=>{p.forEach(v=>v())})}o(pw,"initMoveObserver");function gw({mouseInteractionCb:n,doc:e,mirror:t,blockClass:i,blockSelector:a,sampling:l}){if(l.mouseInteraction===!1)return()=>{};let u=l.mouseInteraction===!0||l.mouseInteraction===void 0?{}:l.mouseInteraction,d=[],f=null,h=o(p=>v=>{let y=pi(v);if(ze(y,i,a,!0))return;let w=null,M=p;if("pointerType"in v){switch(v.pointerType){case"mouse":w=Xt.Mouse;break;case"touch":w=Xt.Touch;break;case"pen":w=Xt.Pen;break}w===Xt.Touch?ae[p]===ae.MouseDown?M="TouchStart":ae[p]===ae.MouseUp&&(M="TouchEnd"):Xt.Pen}else Bs(v)&&(w=Xt.Touch);w!==null?(f=w,(M.startsWith("Touch")&&w===Xt.Touch||M.startsWith("Mouse")&&w===Xt.Mouse)&&(w=null)):ae[p]===ae.Click&&(w=f,f=null);let b=Bs(v)?v.changedTouches[0]:v;if(!b)return;let R=t.getId(y),{clientX:T,clientY:_}=b;Ee(n)(Object.assign({type:ae[M],id:R,x:T,y:_},w!==null&&{pointerType:w}))},"getHandler");return Object.keys(ae).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&u[p]!==!1).forEach(p=>{let v=Vt(p),y=h(p);if(window.PointerEvent)switch(ae[p]){case ae.MouseDown:case ae.MouseUp:v=v.replace("mouse","pointer");break;case ae.TouchStart:case ae.TouchEnd:return}d.push(Je(v,y,e))}),Ee(()=>{d.forEach(p=>p())})}o(gw,"initMouseInteractionObserver");function Tl({scrollCb:n,doc:e,mirror:t,blockClass:i,blockSelector:a,sampling:l}){let u=Ee(Rr(Ee(d=>{let f=pi(d);if(!f||ze(f,i,a,!0))return;let h=t.getId(f);if(f===e&&e.defaultView){let p=Fs(e.defaultView);n({id:h,x:p.left,y:p.top})}else n({id:h,x:f.scrollLeft,y:f.scrollTop})}),l.scroll||100));return Je("scroll",u,e)}o(Tl,"initScrollObserver");function vw({viewportResizeCb:n},{win:e}){let t=-1,i=-1,a=Ee(Rr(Ee(()=>{let l=Ps(),u=Hs();(t!==l||i!==u)&&(n({width:Number(u),height:Number(l)}),t=l,i=u)}),200));return Je("resize",a,e)}o(vw,"initViewportResizeObserver");var yw=["INPUT","TEXTAREA","SELECT"],If=new WeakMap;function Ew({inputCb:n,doc:e,mirror:t,blockClass:i,blockSelector:a,ignoreClass:l,ignoreSelector:u,maskInputOptions:d,maskInputFn:f,sampling:h,userTriggeredOnInput:p}){function v(_){let C=pi(_),F=_.isTrusted,G=C&&C.tagName;if(C&&G==="OPTION"&&(C=C.parentElement),!C||!G||yw.indexOf(G)<0||ze(C,i,a,!0)||C.classList.contains(l)||u&&C.matches(u))return;let Q=C.value,le=!1,X=hi(C)||"";X==="radio"||X==="checkbox"?le=C.checked:(d[G.toLowerCase()]||d[X])&&(Q=fi({element:C,maskInputOptions:d,tagName:G,type:X,value:Q,maskInputFn:f})),y(C,p?{text:Q,isChecked:le,userTriggered:F}:{text:Q,isChecked:le});let se=C.name;X==="radio"&&se&&le&&e.querySelectorAll(`input[type="radio"][name="${se}"]`).forEach(he=>{if(he!==C){let V=he.value;y(he,p?{text:V,isChecked:!le,userTriggered:!1}:{text:V,isChecked:!le})}})}o(v,"eventHandler");function y(_,C){let F=If.get(_);if(!F||F.text!==C.text||F.isChecked!==C.isChecked){If.set(_,C);let G=t.getId(_);Ee(n)(Object.assign(Object.assign({},C),{id:G}))}}o(y,"cbWithDedup");let M=(h.input==="last"?["change"]:["input","change"]).map(_=>Je(_,Ee(v),e)),b=e.defaultView;if(!b)return()=>{M.forEach(_=>_())};let R=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),T=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return R&&R.set&&M.push(...T.map(_=>Qn(_[0],_[1],{set(){Ee(v)({target:this,isTrusted:!1})}},!1,b))),Ee(()=>{M.forEach(_=>_())})}o(Ew,"initInputObserver");function js(n){let e=[];function t(i,a){if(qs("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||qs("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||qs("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||qs("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let u=Array.from(i.parentRule.cssRules).indexOf(i);a.unshift(u)}else if(i.parentStyleSheet){let u=Array.from(i.parentStyleSheet.cssRules).indexOf(i);a.unshift(u)}return a}return o(t,"recurse"),t(n,e)}o(js,"getNestedCSSRulePositions");function Rn(n,e,t){let i,a;return n?(n.ownerNode?i=e.getId(n.ownerNode):a=t.getId(n),{styleId:a,id:i}):{}}o(Rn,"getIdAndStyleId");function bw({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return()=>{};let a=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Ee((p,v,y)=>{let[w,M]=y,{id:b,styleId:R}=Rn(v,e,t.styleMirror);return(b&&b!==-1||R&&R!==-1)&&n({id:b,styleId:R,adds:[{rule:w,index:M}]}),p.apply(v,y)})});let l=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Ee((p,v,y)=>{let[w]=y,{id:M,styleId:b}=Rn(v,e,t.styleMirror);return(M&&M!==-1||b&&b!==-1)&&n({id:M,styleId:b,removes:[{index:w}]}),p.apply(v,y)})});let u;i.CSSStyleSheet.prototype.replace&&(u=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(u,{apply:Ee((p,v,y)=>{let[w]=y,{id:M,styleId:b}=Rn(v,e,t.styleMirror);return(M&&M!==-1||b&&b!==-1)&&n({id:M,styleId:b,replace:w}),p.apply(v,y)})}));let d;i.CSSStyleSheet.prototype.replaceSync&&(d=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(d,{apply:Ee((p,v,y)=>{let[w]=y,{id:M,styleId:b}=Rn(v,e,t.styleMirror);return(M&&M!==-1||b&&b!==-1)&&n({id:M,styleId:b,replaceSync:w}),p.apply(v,y)})}));let f={};zs("CSSGroupingRule")?f.CSSGroupingRule=i.CSSGroupingRule:(zs("CSSMediaRule")&&(f.CSSMediaRule=i.CSSMediaRule),zs("CSSConditionRule")&&(f.CSSConditionRule=i.CSSConditionRule),zs("CSSSupportsRule")&&(f.CSSSupportsRule=i.CSSSupportsRule));let h={};return Object.entries(f).forEach(([p,v])=>{h[p]={insertRule:v.prototype.insertRule,deleteRule:v.prototype.deleteRule},v.prototype.insertRule=new Proxy(h[p].insertRule,{apply:Ee((y,w,M)=>{let[b,R]=M,{id:T,styleId:_}=Rn(w.parentStyleSheet,e,t.styleMirror);return(T&&T!==-1||_&&_!==-1)&&n({id:T,styleId:_,adds:[{rule:b,index:[...js(w),R||0]}]}),y.apply(w,M)})}),v.prototype.deleteRule=new Proxy(h[p].deleteRule,{apply:Ee((y,w,M)=>{let[b]=M,{id:R,styleId:T}=Rn(w.parentStyleSheet,e,t.styleMirror);return(R&&R!==-1||T&&T!==-1)&&n({id:R,styleId:T,removes:[{index:[...js(w),b]}]}),y.apply(w,M)})})}),Ee(()=>{i.CSSStyleSheet.prototype.insertRule=a,i.CSSStyleSheet.prototype.deleteRule=l,u&&(i.CSSStyleSheet.prototype.replace=u),d&&(i.CSSStyleSheet.prototype.replaceSync=d),Object.entries(f).forEach(([p,v])=>{v.prototype.insertRule=h[p].insertRule,v.prototype.deleteRule=h[p].deleteRule})})}o(bw,"initStyleSheetObserver");function Il({mirror:n,stylesheetManager:e},t){var i,a,l;let u=null;t.nodeName==="#document"?u=n.getId(t):u=n.getId(t.host);let d=t.nodeName==="#document"?(i=t.defaultView)===null||i===void 0?void 0:i.Document:(l=(a=t.ownerDocument)===null||a===void 0?void 0:a.defaultView)===null||l===void 0?void 0:l.ShadowRoot,f=d?.prototype?Object.getOwnPropertyDescriptor(d?.prototype,"adoptedStyleSheets"):void 0;return u===null||u===-1||!d||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var h;return(h=f.get)===null||h===void 0?void 0:h.call(this)},set(h){var p;let v=(p=f.set)===null||p===void 0?void 0:p.call(this,h);if(u!==null&&u!==-1)try{e.adoptStyleSheets(h,u)}catch{}return v}}),Ee(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}o(Il,"initAdoptedStyleSheetObserver");function Sw({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:i},{win:a}){let l=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(l,{apply:Ee((d,f,h)=>{var p;let[v,y,w]=h;if(t.has(v))return l.apply(f,[v,y,w]);let{id:M,styleId:b}=Rn((p=f.parentRule)===null||p===void 0?void 0:p.parentStyleSheet,e,i.styleMirror);return(M&&M!==-1||b&&b!==-1)&&n({id:M,styleId:b,set:{property:v,value:y,priority:w},index:js(f.parentRule)}),d.apply(f,h)})});let u=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Ee((d,f,h)=>{var p;let[v]=h;if(t.has(v))return u.apply(f,[v]);let{id:y,styleId:w}=Rn((p=f.parentRule)===null||p===void 0?void 0:p.parentStyleSheet,e,i.styleMirror);return(y&&y!==-1||w&&w!==-1)&&n({id:y,styleId:w,remove:{property:v},index:js(f.parentRule)}),d.apply(f,h)})}),Ee(()=>{a.CSSStyleDeclaration.prototype.setProperty=l,a.CSSStyleDeclaration.prototype.removeProperty=u})}o(Sw,"initStyleDeclarationObserver");function ww({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:i,sampling:a,doc:l}){let u=Ee(f=>Rr(Ee(h=>{let p=pi(h);if(!p||ze(p,e,t,!0))return;let{currentTime:v,volume:y,muted:w,playbackRate:M,loop:b}=p;n({type:f,id:i.getId(p),currentTime:v,volume:y,muted:w,playbackRate:M,loop:b})}),a.media||500)),d=[Je("play",u(0),l),Je("pause",u(1),l),Je("seeked",u(2),l),Je("volumechange",u(3),l),Je("ratechange",u(4),l)];return Ee(()=>{d.forEach(f=>f())})}o(ww,"initMediaInteractionObserver");function Mw({fontCb:n,doc:e}){let t=e.defaultView;if(!t)return()=>{};let i=[],a=new WeakMap,l=t.FontFace;t.FontFace=o(function(f,h,p){let v=new l(f,h,p);return a.set(v,{family:f,buffer:typeof h!="string",descriptors:p,fontSource:typeof h=="string"?h:JSON.stringify(Array.from(new Uint8Array(h)))}),v},"FontFace");let u=Ut(e.fonts,"add",function(d){return function(f){return setTimeout(Ee(()=>{let h=a.get(f);h&&(n(h),a.delete(f))}),0),d.apply(this,[f])}});return i.push(()=>{t.FontFace=l}),i.push(u),Ee(()=>{i.forEach(d=>d())})}o(Mw,"initFontObserver");function xw(n){let{doc:e,mirror:t,blockClass:i,blockSelector:a,selectionCb:l}=n,u=!0,d=Ee(()=>{let f=e.getSelection();if(!f||u&&f?.isCollapsed)return;u=f.isCollapsed||!1;let h=[],p=f.rangeCount||0;for(let v=0;v<p;v++){let y=f.getRangeAt(v),{startContainer:w,startOffset:M,endContainer:b,endOffset:R}=y;ze(w,i,a,!0)||ze(b,i,a,!0)||h.push({start:t.getId(w),startOffset:M,end:t.getId(b),endOffset:R})}l({ranges:h})});return d(),Je("selectionchange",d)}o(xw,"initSelectionObserver");function Tw({doc:n,customElementCb:e}){let t=n.defaultView;return!t||!t.customElements?()=>{}:Ut(t.customElements,"define",function(a){return function(l,u,d){try{e({define:{name:l}})}catch{console.warn(`Custom element callback failed for ${l}`)}return a.apply(this,[l,u,d])}})}o(Tw,"initCustomElementObserver");function Iw(n,e){let{mutationCb:t,mousemoveCb:i,mouseInteractionCb:a,scrollCb:l,viewportResizeCb:u,inputCb:d,mediaInteractionCb:f,styleSheetRuleCb:h,styleDeclarationCb:p,canvasMutationCb:v,fontCb:y,selectionCb:w,customElementCb:M}=n;n.mutationCb=(...b)=>{e.mutation&&e.mutation(...b),t(...b)},n.mousemoveCb=(...b)=>{e.mousemove&&e.mousemove(...b),i(...b)},n.mouseInteractionCb=(...b)=>{e.mouseInteraction&&e.mouseInteraction(...b),a(...b)},n.scrollCb=(...b)=>{e.scroll&&e.scroll(...b),l(...b)},n.viewportResizeCb=(...b)=>{e.viewportResize&&e.viewportResize(...b),u(...b)},n.inputCb=(...b)=>{e.input&&e.input(...b),d(...b)},n.mediaInteractionCb=(...b)=>{e.mediaInteaction&&e.mediaInteaction(...b),f(...b)},n.styleSheetRuleCb=(...b)=>{e.styleSheetRule&&e.styleSheetRule(...b),h(...b)},n.styleDeclarationCb=(...b)=>{e.styleDeclaration&&e.styleDeclaration(...b),p(...b)},n.canvasMutationCb=(...b)=>{e.canvasMutation&&e.canvasMutation(...b),v(...b)},n.fontCb=(...b)=>{e.font&&e.font(...b),y(...b)},n.selectionCb=(...b)=>{e.selection&&e.selection(...b),w(...b)},n.customElementCb=(...b)=>{e.customElement&&e.customElement(...b),M(...b)}}o(Iw,"mergeHooks");function Cf(n,e={}){let t=n.doc.defaultView;if(!t)return()=>{};Iw(n,e);let i;n.recordDOM&&(i=xl(n,n.doc));let a=pw(n),l=gw(n),u=Tl(n),d=vw(n,{win:t}),f=Ew(n),h=ww(n),p=o(()=>{},"styleSheetObserver"),v=o(()=>{},"adoptedStyleSheetObserver"),y=o(()=>{},"styleDeclarationObserver"),w=o(()=>{},"fontObserver");n.recordDOM&&(p=bw(n,{win:t}),v=Il(n,n.doc),y=Sw(n,{win:t}),n.collectFonts&&(w=Mw(n)));let M=xw(n),b=Tw(n),R=[];for(let T of n.plugins)R.push(T.observer(T.callback,t,T.options));return Ee(()=>{An.forEach(T=>T.reset()),i?.disconnect(),a(),l(),u(),d(),f(),h(),p(),v(),y(),w(),M(),b(),R.forEach(T=>T())})}o(Cf,"initObservers");function qs(n){return typeof window[n]<"u"}o(qs,"hasNestedCSSRule");function zs(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}o(zs,"canMonkeyPatchNestedCSSRule");var gi=class{static{o(this,"CrossOriginIframeMirror")}constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,i,a){let l=i||this.getIdToRemoteIdMap(e),u=a||this.getRemoteIdToIdMap(e),d=l.get(t);return d||(d=this.generateIdFn(),l.set(t,d),u.set(d,t)),d}getIds(e,t){let i=this.getIdToRemoteIdMap(e),a=this.getRemoteIdToIdMap(e);return t.map(l=>this.getId(e,l,i,a))}getRemoteId(e,t,i){let a=i||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let l=a.get(t);return l||-1}getRemoteIds(e,t){let i=this.getRemoteIdToIdMap(e);return t.map(a=>this.getRemoteId(e,a,i))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}};var Ks=class{static{o(this,"IframeManager")}constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new gi(dl),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new gi(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(i=this.loadListener)===null||i===void 0||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let a=this.crossOriginIframeMap.get(e.source);if(!a)return;let l=this.transformCrossOriginEvent(a,t.data.event);l&&this.wrappedEmit(l,t.data.isCheckout)}transformCrossOriginEvent(e,t){var i;switch(t.type){case $.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let a=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,a),this.patchRootIdOnNode(t.data.node,a),{timestamp:t.timestamp,type:$.IncrementalSnapshot,data:{source:U.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $.Meta:case $.Load:case $.DomContentLoaded:return!1;case $.Plugin:return t;case $.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case $.IncrementalSnapshot:switch(t.data.source){case U.Mutation:return t.data.adds.forEach(a=>{this.replaceIds(a,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,e);let l=this.crossOriginIframeRootIdMap.get(e);l&&this.patchRootIdOnNode(a.node,l)}),t.data.removes.forEach(a=>{this.replaceIds(a,e,["parentId","id"])}),t.data.attributes.forEach(a=>{this.replaceIds(a,e,["id"])}),t.data.texts.forEach(a=>{this.replaceIds(a,e,["id"])}),t;case U.Drag:case U.TouchMove:case U.MouseMove:return t.data.positions.forEach(a=>{this.replaceIds(a,e,["id"])}),t;case U.ViewportResize:return!1;case U.MediaInteraction:case U.MouseInteraction:case U.Scroll:case U.CanvasMutation:case U.Input:return this.replaceIds(t.data,e,["id"]),t;case U.StyleSheetRule:case U.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case U.Font:return t;case U.Selection:return t.data.ranges.forEach(a=>{this.replaceIds(a,e,["start","end"])}),t;case U.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(i=t.data.styles)===null||i===void 0||i.forEach(a=>{this.replaceStyleIds(a,e,["styleId"])}),t}}return!1}replace(e,t,i,a){for(let l of a)!Array.isArray(t[l])&&typeof t[l]!="number"||(Array.isArray(t[l])?t[l]=e.getIds(i,t[l]):t[l]=e.getId(i,t[l]));return t}replaceIds(e,t,i){return this.replace(this.crossOriginIframeMirror,e,t,i)}replaceStyleIds(e,t,i){return this.replace(this.crossOriginIframeStyleMirror,e,t,i)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(i=>{this.replaceIdOnNode(i,t)})}patchRootIdOnNode(e,t){e.type!==oe.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(i=>{this.patchRootIdOnNode(i,t)})}};var Ys=class{static{o(this,"ShadowDomManager")}constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!jn(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let i=xl(Object.assign(Object.assign({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Tl(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Il({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let i=this;this.restoreHandlers.push(Ut(e.prototype,"attachShadow",function(a){return function(l){let u=a.call(this,l);return this.shadowRoot&&Gs(this)&&i.addShadowRoot(this.shadowRoot,t),u}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}};function Rf(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]]);return t}o(Rf,"__rest");function ct(n,e,t,i){function a(l){return l instanceof t?l:new t(function(u){u(l)})}return o(a,"adopt"),new(t||(t=Promise))(function(l,u){function d(p){try{h(i.next(p))}catch(v){u(v)}}o(d,"fulfilled");function f(p){try{h(i.throw(p))}catch(v){u(v)}}o(f,"rejected");function h(p){p.done?l(p.value):a(p.value).then(d,f)}o(h,"step"),h((i=i.apply(n,e||[])).next())})}o(ct,"__awaiter");var Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(vi=0;vi<Dr.length;vi++)yi[Dr.charCodeAt(vi)]=vi;var vi,Af=o(function(n){var e=new Uint8Array(n),t,i=e.length,a="";for(t=0;t<i;t+=3)a+=Dr[e[t]>>2],a+=Dr[(e[t]&3)<<4|e[t+1]>>4],a+=Dr[(e[t+1]&15)<<2|e[t+2]>>6],a+=Dr[e[t+2]&63];return i%3===2?a=a.substring(0,a.length-1)+"=":i%3===1&&(a=a.substring(0,a.length-2)+"=="),a},"encode"),_f=o(function(n){var e=n.length*.75,t=n.length,i,a=0,l,u,d,f;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);var h=new ArrayBuffer(e),p=new Uint8Array(h);for(i=0;i<t;i+=4)l=yi[n.charCodeAt(i)],u=yi[n.charCodeAt(i+1)],d=yi[n.charCodeAt(i+2)],f=yi[n.charCodeAt(i+3)],p[a++]=l<<2|u>>4,p[a++]=(u&15)<<4|d>>2,p[a++]=(d&3)<<6|f&63;return h},"decode");var Df=new Map;function Cw(n,e){let t=Df.get(n);return t||(t=new Map,Df.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}o(Cw,"variableListFor");var Cl=o((n,e,t)=>{if(!n||!(Nf(n,e)||typeof n=="object"))return;let i=n.constructor.name,a=Cw(t,i),l=a.indexOf(n);return l===-1&&(l=a.length,a.push(n)),l},"saveWebGLVar");function Qs(n,e,t){if(n instanceof Array)return n.map(i=>Qs(i,e,t));if(n===null)return n;if(n instanceof Float32Array||n instanceof Float64Array||n instanceof Int32Array||n instanceof Uint32Array||n instanceof Uint8Array||n instanceof Uint16Array||n instanceof Int16Array||n instanceof Int8Array||n instanceof Uint8ClampedArray)return{rr_type:n.constructor.name,args:[Object.values(n)]};if(n instanceof ArrayBuffer){let i=n.constructor.name,a=Af(n);return{rr_type:i,base64:a}}else{if(n instanceof DataView)return{rr_type:n.constructor.name,args:[Qs(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){let i=n.constructor.name,{src:a}=n;return{rr_type:i,src:a}}else if(n instanceof HTMLCanvasElement){let i="HTMLImageElement",a=n.toDataURL();return{rr_type:i,src:a}}else{if(n instanceof ImageData)return{rr_type:n.constructor.name,args:[Qs(n.data,e,t),n.width,n.height]};if(Nf(n,e)||typeof n=="object"){let i=n.constructor.name,a=Cl(n,e,t);return{rr_type:i,index:a}}}}return n}o(Qs,"serializeArg");var Xs=o((n,e,t)=>n.map(i=>Qs(i,e,t)),"serializeArgs"),Nf=o((n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(a=>typeof e[a]=="function").find(a=>n instanceof e[a]),"isInstanceOfWebGLObject");function Lf(n,e,t,i){let a=[],l=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let u of l)try{if(typeof e.CanvasRenderingContext2D.prototype[u]!="function")continue;let d=Ut(e.CanvasRenderingContext2D.prototype,u,function(f){return function(...h){return ze(this.canvas,t,i,!0)||setTimeout(()=>{let p=Xs(h,e,this);n(this.canvas,{type:vt["2D"],property:u,args:p})},0),f.apply(this,h)}});a.push(d)}catch{let f=Qn(e.CanvasRenderingContext2D.prototype,u,{set(h){n(this.canvas,{type:vt["2D"],property:u,args:[h],setter:!0})}});a.push(f)}return()=>{a.forEach(u=>u())}}o(Lf,"initCanvas2DMutationObserver");function Rw(n){return n==="experimental-webgl"?"webgl":n}o(Rw,"getNormalizedContextName");function Rl(n,e,t,i){let a=[];try{let l=Ut(n.HTMLCanvasElement.prototype,"getContext",function(u){return function(d,...f){if(!ze(this,e,t,!0)){let h=Rw(d);if("__context"in this||(this.__context=h),i&&["webgl","webgl2"].includes(h))if(f[0]&&typeof f[0]=="object"){let p=f[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return u.apply(this,[d,...f])}});a.push(l)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{a.forEach(l=>l())}}o(Rl,"initCanvasContextObserver");function Of(n,e,t,i,a,l,u){let d=[],f=Object.getOwnPropertyNames(n);for(let h of f)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))try{if(typeof n[h]!="function")continue;let p=Ut(n,h,function(v){return function(...y){let w=v.apply(this,y);if(Cl(w,u,this),"tagName"in this.canvas&&!ze(this.canvas,i,a,!0)){let M=Xs(y,u,this),b={type:e,property:h,args:M};t(this.canvas,b)}return w}});d.push(p)}catch{let v=Qn(n,h,{set(y){t(this.canvas,{type:e,property:h,args:[y],setter:!0})}});d.push(v)}return d}o(Of,"patchGLPrototype");function kf(n,e,t,i,a){let l=[];return l.push(...Of(e.WebGLRenderingContext.prototype,vt.WebGL,n,t,i,a,e)),typeof e.WebGL2RenderingContext<"u"&&l.push(...Of(e.WebGL2RenderingContext.prototype,vt.WebGL2,n,t,i,a,e)),()=>{l.forEach(u=>u())}}o(kf,"initCanvasWebGLMutationObserver");function Ff(n,e){var t=e===void 0?null:e,i=n.toString(),a=i.split(`
28
+ `);a.pop(),a.shift();for(var l=a[0].search(/\S/),u=/(['"])__worker_loader_strict__(['"])/g,d=0,f=a.length;d<f;++d)a[d]=a[d].substring(l).replace(u,"$1use strict$2")+`
29
+ `;return t&&a.push("//# sourceMappingURL="+t+`
30
+ `),a}o(Ff,"funcToSource");function Aw(n,e){var t=Ff(n,e),i=new Blob(t,{type:"application/javascript"});return URL.createObjectURL(i)}o(Aw,"createURL");function Pf(n,e){var t;return o(function(a){return t=t||Aw(n,e),new Worker(t,a)},"WorkerFactory")}o(Pf,"createInlineWorkerFactory");var Hf=Pf(function(){(function(){"__worker_loader_strict__";function n(h,p,v,y){function w(M){return M instanceof v?M:new v(function(b){b(M)})}return o(w,"adopt"),new(v||(v=Promise))(function(M,b){function R(C){try{_(y.next(C))}catch(F){b(F)}}o(R,"fulfilled");function T(C){try{_(y.throw(C))}catch(F){b(F)}}o(T,"rejected");function _(C){C.done?M(C.value):w(C.value).then(R,T)}o(_,"step"),_((y=y.apply(h,p||[])).next())})}o(n,"__awaiter");for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=typeof Uint8Array>"u"?[]:new Uint8Array(256),i=0;i<e.length;i++)t[e.charCodeAt(i)]=i;var a=o(function(h){var p=new Uint8Array(h),v,y=p.length,w="";for(v=0;v<y;v+=3)w+=e[p[v]>>2],w+=e[(p[v]&3)<<4|p[v+1]>>4],w+=e[(p[v+1]&15)<<2|p[v+2]>>6],w+=e[p[v+2]&63];return y%3===2?w=w.substring(0,w.length-1)+"=":y%3===1&&(w=w.substring(0,w.length-2)+"=="),w},"encode");let l=new Map,u=new Map;function d(h,p,v){return n(this,void 0,void 0,function*(){let y=`${h}-${p}`;if("OffscreenCanvas"in globalThis){if(u.has(y))return u.get(y);let w=new OffscreenCanvas(h,p);w.getContext("2d");let b=yield(yield w.convertToBlob(v)).arrayBuffer(),R=a(b);return u.set(y,R),R}else return""})}o(d,"getTransparentBlobFor");let f=self;f.onmessage=function(h){return n(this,void 0,void 0,function*(){if("OffscreenCanvas"in globalThis){let{id:p,bitmap:v,width:y,height:w,dataURLOptions:M}=h.data,b=d(y,w,M),R=new OffscreenCanvas(y,w);R.getContext("2d").drawImage(v,0,0),v.close();let _=yield R.convertToBlob(M),C=_.type,F=yield _.arrayBuffer(),G=a(F);if(!l.has(p)&&(yield b)===G)return l.set(p,G),f.postMessage({id:p});if(l.get(p)===G)return f.postMessage({id:p});f.postMessage({id:p,type:C,base64:G,width:y,height:w}),l.set(p,G)}else return f.postMessage({id:h.data.id})})}})()},null);var Zs=class{static{o(this,"CanvasManager")}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(f,h)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(f)||this.pendingCanvasMutations.set(f,[]),this.pendingCanvasMutations.get(f).push(h)};let{sampling:t="all",win:i,blockClass:a,blockSelector:l,recordCanvas:u,dataURLOptions:d}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,u&&t==="all"&&this.initCanvasMutationObserver(i,a,l),u&&typeof t=="number"&&this.initCanvasFPSObserver(t,i,a,l,{dataURLOptions:d})}initCanvasFPSObserver(e,t,i,a,l){let u=Rl(t,i,a,!0),d=new Map,f=new Hf;f.onmessage=M=>{let{id:b}=M.data;if(d.set(b,!1),!("base64"in M.data))return;let{base64:R,type:T,width:_,height:C}=M.data;this.mutationCb({id:b,type:vt["2D"],commands:[{property:"clearRect",args:[0,0,_,C]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:R}],type:T}]},0,0]}]})};let h=1e3/e,p=0,v,y=o(()=>{let M=[];return t.document.querySelectorAll("canvas").forEach(b=>{ze(b,i,a,!0)||M.push(b)}),M},"getCanvas"),w=o(M=>{if(p&&M-p<h){v=requestAnimationFrame(w);return}p=M,y().forEach(b=>ct(this,void 0,void 0,function*(){var R;let T=this.mirror.getId(b);if(d.get(T)||b.width===0||b.height===0)return;if(d.set(T,!0),["webgl","webgl2"].includes(b.__context)){let C=b.getContext(b.__context);((R=C?.getContextAttributes())===null||R===void 0?void 0:R.preserveDrawingBuffer)===!1&&C.clear(C.COLOR_BUFFER_BIT)}let _=yield createImageBitmap(b);f.postMessage({id:T,bitmap:_,width:b.width,height:b.height,dataURLOptions:l.dataURLOptions},[_])})),v=requestAnimationFrame(w)},"takeCanvasSnapshots");v=requestAnimationFrame(w),this.resetObservers=()=>{u(),cancelAnimationFrame(v)}}initCanvasMutationObserver(e,t,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let a=Rl(e,t,i,!1),l=Lf(this.processMutation.bind(this),e,t,i),u=kf(this.processMutation.bind(this),e,t,i,this.mirror);this.resetObservers=()=>{a(),l(),u()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=o(t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)},"setLatestRAFTimestamp");requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let i=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,i)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(e);if(!i||t===-1)return;let a=i.map(u=>Rf(u,["type"])),{type:l}=i[0];this.mutationCb({id:t,type:l,commands:a}),this.pendingCanvasMutations.delete(e)}};var Js=class{static{o(this,"StylesheetManager")}constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Cr,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let i={id:t,styleIds:[]},a=[];for(let l of e){let u;this.styleMirror.has(l)?u=this.styleMirror.getId(l):(u=this.styleMirror.add(l),a.push({styleId:u,rules:Array.from(l.rules||CSSRule,(d,f)=>({rule:ul(d),index:f}))})),i.styleIds.push(u)}a.length>0&&(i.styles=a),this.adoptedStyleSheetCb(i)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}};var eo=class{static{o(this,"ProcessedNodeManager")}constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(e,t){let i=this.nodeMap.get(e);return i&&Array.from(i).some(a=>a!==t)}add(e,t){this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}};var Al,Be,to,_l,no=!1;try{if(Array.from([1],n=>n*2)[0]!==2){let n=document.createElement("iframe");document.body.appendChild(n),Array.from=((Al=n.contentWindow)===null||Al===void 0?void 0:Al.Array.from)||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}var Gt=Os();function Zt(n={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:i,blockClass:a="rr-block",blockSelector:l=null,ignoreClass:u="rr-ignore",ignoreSelector:d=null,maskTextClass:f="rr-mask",maskTextSelector:h=null,inlineStylesheet:p=!0,maskAllInputs:v,maskInputOptions:y,slimDOMOptions:w,maskInputFn:M,maskTextFn:b,hooks:R,packFn:T,sampling:_={},dataURLOptions:C={},mousemoveWait:F,recordDOM:G=!0,recordCanvas:Q=!1,recordCrossOriginIframes:le=!1,recordAfter:X=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:se=!1,collectFonts:he=!1,inlineImages:V=!1,plugins:W,keepIframeSrcFn:K=o(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:Y=new Set([]),errorHandler:z}=n;xf(z);let J=le?window.parent===window:!0,ve=!1;if(!J)try{window.parent.document&&(ve=!1)}catch{ve=!0}if(J&&!e)throw new Error("emit function is required");F!==void 0&&_.mousemove===void 0&&(_.mousemove=F),Gt.reset();let et=v===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:y!==void 0?y:{password:!0},Ue=w===!0||w==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:w==="all",headMetaDescKeywords:w==="all"}:w||{};Vs();let B,P=0,te=o(Me=>{for(let Pe of W||[])Pe.eventProcessor&&(Me=Pe.eventProcessor(Me));return T&&!ve&&(Me=T(Me)),Me},"eventProcessor");Be=o((Me,Pe)=>{var Ce;let ke=Me;if(ke.timestamp=Ar(),!((Ce=An[0])===null||Ce===void 0)&&Ce.isFrozen()&&ke.type!==$.FullSnapshot&&!(ke.type===$.IncrementalSnapshot&&ke.data.source===U.Mutation)&&An.forEach(Ge=>Ge.unfreeze()),J)e?.(te(ke),Pe);else if(ve){let Ge={type:"rrweb",event:te(ke),origin:window.location.origin,isCheckout:Pe};window.parent.postMessage(Ge,"*")}if(ke.type===$.FullSnapshot)B=ke,P=0;else if(ke.type===$.IncrementalSnapshot){if(ke.data.source===U.Mutation&&ke.data.isAttachIframe)return;P++;let Ge=i&&P>=i,Te=t&&ke.timestamp-B.timestamp>t;(Ge||Te)&&to(!0)}},"wrappedEmit");let ee=o(Me=>{Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.Mutation},Me)})},"wrappedMutationEmit"),Oe=o(Me=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.Scroll},Me)}),"wrappedScrollEmit"),ut=o(Me=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.CanvasMutation},Me)}),"wrappedCanvasMutationEmit"),Xe=o(Me=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.AdoptedStyleSheet},Me)}),"wrappedAdoptedStyleSheetEmit"),it=new Js({mutationCb:ee,adoptedStyleSheetCb:Xe}),en=new Ks({mirror:Gt,mutationCb:ee,stylesheetManager:it,recordCrossOriginIframes:le,wrappedEmit:Be});for(let Me of W||[])Me.getMirror&&Me.getMirror({nodeMirror:Gt,crossOriginIframeMirror:en.crossOriginIframeMirror,crossOriginIframeStyleMirror:en.crossOriginIframeStyleMirror});let hn=new eo;_l=new Zs({recordCanvas:Q,mutationCb:ut,win:window,blockClass:a,blockSelector:l,mirror:Gt,sampling:_.canvas,dataURLOptions:C});let tn=new Ys({mutationCb:ee,scrollCb:Oe,bypassOptions:{blockClass:a,blockSelector:l,maskTextClass:f,maskTextSelector:h,inlineStylesheet:p,maskInputOptions:et,dataURLOptions:C,maskTextFn:b,maskInputFn:M,recordCanvas:Q,inlineImages:V,sampling:_,slimDOMOptions:Ue,iframeManager:en,stylesheetManager:it,canvasManager:_l,keepIframeSrcFn:K,processedNodeManager:hn},mirror:Gt});to=o((Me=!1)=>{if(!G)return;Be({type:$.Meta,data:{href:window.location.href,width:Hs(),height:Ps()}},Me),it.reset(),tn.init(),An.forEach(Ce=>Ce.lock());let Pe=uf(document,{mirror:Gt,blockClass:a,blockSelector:l,maskTextClass:f,maskTextSelector:h,inlineStylesheet:p,maskAllInputs:et,maskTextFn:b,slimDOM:Ue,dataURLOptions:C,recordCanvas:Q,inlineImages:V,onSerialize:o(Ce=>{Cn(Ce,Gt)&&en.addIframe(Ce),Us(Ce,Gt)&&it.trackLinkElement(Ce),Qt(Ce)&&tn.addShadowRoot(Ce.shadowRoot,document)},"onSerialize"),onIframeLoad:o((Ce,ke)=>{en.attachIframe(Ce,ke),tn.observeAttachShadow(Ce)},"onIframeLoad"),onStylesheetLoad:o((Ce,ke)=>{it.attachLinkElement(Ce,ke)},"onStylesheetLoad"),keepIframeSrcFn:K});if(!Pe)return console.warn("Failed to snapshot the document");Be({type:$.FullSnapshot,data:{node:Pe,initialOffset:Fs(window)}},Me),An.forEach(Ce=>Ce.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&it.adoptStyleSheets(document.adoptedStyleSheets,Gt.getId(document))},"takeFullSnapshot");try{let Me=[],Pe=o(ke=>{var Ge;return Ee(Cf)({mutationCb:ee,mousemoveCb:o((Te,Fr)=>Be({type:$.IncrementalSnapshot,data:{source:Fr,positions:Te}}),"mousemoveCb"),mouseInteractionCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.MouseInteraction},Te)}),"mouseInteractionCb"),scrollCb:Oe,viewportResizeCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.ViewportResize},Te)}),"viewportResizeCb"),inputCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.Input},Te)}),"inputCb"),mediaInteractionCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.MediaInteraction},Te)}),"mediaInteractionCb"),styleSheetRuleCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.StyleSheetRule},Te)}),"styleSheetRuleCb"),styleDeclarationCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.StyleDeclaration},Te)}),"styleDeclarationCb"),canvasMutationCb:ut,fontCb:o(Te=>Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.Font},Te)}),"fontCb"),selectionCb:o(Te=>{Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.Selection},Te)})},"selectionCb"),customElementCb:o(Te=>{Be({type:$.IncrementalSnapshot,data:Object.assign({source:U.CustomElement},Te)})},"customElementCb"),blockClass:a,ignoreClass:u,ignoreSelector:d,maskTextClass:f,maskTextSelector:h,maskInputOptions:et,inlineStylesheet:p,sampling:_,recordDOM:G,recordCanvas:Q,inlineImages:V,userTriggeredOnInput:se,collectFonts:he,doc:ke,maskInputFn:M,maskTextFn:b,keepIframeSrcFn:K,blockSelector:l,slimDOMOptions:Ue,dataURLOptions:C,mirror:Gt,iframeManager:en,stylesheetManager:it,shadowDomManager:tn,processedNodeManager:hn,canvasManager:_l,ignoreCSSAttributes:Y,plugins:((Ge=W?.filter(Te=>Te.observer))===null||Ge===void 0?void 0:Ge.map(Te=>({observer:Te.observer,options:Te.options,callback:o(Fr=>Be({type:$.Plugin,data:{plugin:Te.name,payload:Fr}}),"callback")})))||[]},R)},"observe");en.addLoadListener(ke=>{try{Me.push(Pe(ke.contentDocument))}catch(Ge){console.warn(Ge)}});let Ce=o(()=>{to(),Me.push(Pe(document)),no=!0},"init");return document.readyState==="interactive"||document.readyState==="complete"?Ce():(Me.push(Je("DOMContentLoaded",()=>{Be({type:$.DomContentLoaded,data:{}}),X==="DOMContentLoaded"&&Ce()})),Me.push(Je("load",()=>{Be({type:$.Load,data:{}}),X==="load"&&Ce()},window))),()=>{Me.forEach(ke=>ke()),hn.destroy(),no=!1,Tf()}}catch(Me){console.warn(Me)}}o(Zt,"record");Zt.addCustomEvent=(n,e)=>{if(!no)throw new Error("please add custom event after start recording");Be({type:$.Custom,data:{tag:n,payload:e}})};Zt.freezePage=()=>{An.forEach(n=>n.freeze())};Zt.takeFullSnapshot=n=>{if(!no)throw new Error("please take full snapshot after start recording");to(n)};Zt.mirror=Gt;var be;(function(n){n[n.Document=0]="Document",n[n.DocumentType=1]="DocumentType",n[n.Element=2]="Element",n[n.Text=3]="Text",n[n.CDATA=4]="CDATA",n[n.Comment=5]="Comment"})(be||(be={}));var Dl=class{static{o(this,"Mirror$1")}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return-1;let i=(t=this.getMeta(e))===null||t===void 0?void 0:t.id;return i??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(t,a)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function _w(){return new Dl}o(_w,"createMirror$1");function Dw(n){let e={},t=/;(?![^(]*\))/g,i=/:(.+)/,a=/\/\*.*?\*\//g;return n.replace(a,"").split(t).forEach(function(l){if(l){let u=l.split(i);u.length>1&&(e[Nl(u[0].trim())]=u[1].trim())}}),e}o(Dw,"parseCSSText");function Wf(n){let e=[];for(let t in n){let i=n[t];if(typeof i!="string")continue;let a=kw(t);e.push(`${a}: ${i};`)}return e.join(" ")}o(Wf,"toCSSText");var Nw=/-([a-z])/g,Lw=/^--[a-zA-Z0-9-]+$/,Nl=o(n=>Lw.test(n)?n:n.replace(Nw,(e,t)=>t?t.toUpperCase():""),"camelize"),Ow=/\B([A-Z])/g,kw=o(n=>n.replace(Ow,"-$1").toLowerCase(),"hyphenate"),It=class n{static{o(this,"BaseRRNode")}constructor(...e){this.parentElement=null,this.parentNode=null,this.firstChild=null,this.lastChild=null,this.previousSibling=null,this.nextSibling=null,this.ELEMENT_NODE=Ve.ELEMENT_NODE,this.TEXT_NODE=Ve.TEXT_NODE}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof n){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};function Fw(n){return class Bf extends n{static{o(this,"BaseRRDocument")}constructor(...t){super(t),this.nodeType=Ve.DOCUMENT_NODE,this.nodeName="#document",this.compatMode="CSS1Compat",this.RRNodeType=be.Document,this.textContent=null,this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===be.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)===null||t===void 0?void 0:t.childNodes.find(i=>i.RRNodeType===be.Element&&i.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)===null||t===void 0?void 0:t.childNodes.find(i=>i.RRNodeType===be.Element&&i.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let i=t.RRNodeType;if((i===be.Element||i===be.DocumentType)&&this.childNodes.some(l=>l.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${i===be.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let a=Bl(this,t);return a.parentElement=null,a}insertBefore(t,i){let a=t.RRNodeType;if((a===be.Element||a===be.DocumentType)&&this.childNodes.some(u=>u.RRNodeType===a))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${a===be.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let l=zf(this,t,i);return l.parentElement=null,l}removeChild(t){return jf(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let i;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?i="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(i="-//W3C//DTD HTML 4.0 Transitional//EN"),i){let a=this.createDocumentType("html",i,"");this.open(),this.appendChild(a)}}createDocument(t,i,a){return new Bf}createDocumentType(t,i,a){let l=new(Vf(It))(t,i,a);return l.ownerDocument=this,l}createElement(t){let i=new(Uf(It))(t);return i.ownerDocument=this,i}createElementNS(t,i){return this.createElement(i)}createTextNode(t){let i=new(Gf(It))(t);return i.ownerDocument=this,i}createComment(t){let i=new($f(It))(t);return i.ownerDocument=this,i}createCDATASection(t){let i=new(qf(It))(t);return i.ownerDocument=this,i}toString(){return"RRDocument"}}}o(Fw,"BaseRRDocumentImpl");function Vf(n){return class extends n{static{o(this,"BaseRRDocumentType")}constructor(t,i,a){super(),this.nodeType=Ve.DOCUMENT_TYPE_NODE,this.RRNodeType=be.DocumentType,this.name=t,this.publicId=i,this.systemId=a,this.nodeName=t,this.textContent=null}toString(){return"RRDocumentType"}}}o(Vf,"BaseRRDocumentTypeImpl");function Uf(n){return class extends n{static{o(this,"BaseRRElement")}constructor(t){super(),this.nodeType=Ve.ELEMENT_NODE,this.RRNodeType=be.Element,this.attributes={},this.shadowRoot=null,this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(i=>t+=i.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Ll(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?Dw(this.attributes.style):{},i=/\B([A-Z])/g;return t.setProperty=(a,l,u)=>{if(i.test(a))return;let d=Nl(a);l?t[d]=l:delete t[d],u==="important"&&(t[d]+=" !important"),this.attributes.style=Wf(t)},t.removeProperty=a=>{if(i.test(a))return"";let l=Nl(a),u=t[l]||"";return delete t[l],this.attributes.style=Wf(t),u},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,i){this.attributes[t]=i}setAttributeNS(t,i,a){this.setAttribute(i,a)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Bl(this,t)}insertBefore(t,i){return zf(this,t,i)}removeChild(t){return jf(this,t)}attachShadow(t){let i=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=i,i}dispatchEvent(t){return!0}toString(){let t="";for(let i in this.attributes)t+=`${i}="${this.attributes[i]}" `;return`${this.tagName} ${t}`}}}o(Uf,"BaseRRElementImpl");function Pw(n){return class extends n{static{o(this,"BaseRRMediaElement")}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}}}o(Pw,"BaseRRMediaElementImpl");function Gf(n){return class extends n{static{o(this,"BaseRRText")}constructor(t){super(),this.nodeType=Ve.TEXT_NODE,this.nodeName="#text",this.RRNodeType=be.Text,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}}o(Gf,"BaseRRTextImpl");function $f(n){return class extends n{static{o(this,"BaseRRComment")}constructor(t){super(),this.nodeType=Ve.COMMENT_NODE,this.nodeName="#comment",this.RRNodeType=be.Comment,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}}o($f,"BaseRRCommentImpl");function qf(n){return class extends n{static{o(this,"BaseRRCDATASection")}constructor(t){super(),this.nodeName="#cdata-section",this.nodeType=Ve.CDATA_SECTION_NODE,this.RRNodeType=be.CDATA,this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}}o(qf,"BaseRRCDATASectionImpl");var Ll=class{static{o(this,"ClassList")}constructor(e,t){if(this.classes=[],this.add=(...i)=>{for(let a of i){let l=String(a);this.classes.indexOf(l)>=0||this.classes.push(l)}this.onChange&&this.onChange(this.classes.join(" "))},this.remove=(...i)=>{this.classes=this.classes.filter(a=>i.indexOf(a)===-1),this.onChange&&this.onChange(this.classes.join(" "))},e){let i=e.trim().split(/\s+/);this.classes.push(...i)}this.onChange=t}};function Bl(n,e){return e.parentNode&&e.parentNode.removeChild(e),n.lastChild?(n.lastChild.nextSibling=e,e.previousSibling=n.lastChild):(n.firstChild=e,e.previousSibling=null),n.lastChild=e,e.nextSibling=null,e.parentNode=n,e.parentElement=n,e.ownerDocument=n.ownerDocument,e}o(Bl,"appendChild");function zf(n,e,t){if(!t)return Bl(n,e);if(t.parentNode!==n)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 e===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:n.firstChild=e,e.parentElement=n,e.parentNode=n,e.ownerDocument=n.ownerDocument),e}o(zf,"insertBefore");function jf(n,e){if(e.parentNode!==n)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:n.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:n.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}o(jf,"removeChild");var Ve;(function(n){n[n.PLACEHOLDER=0]="PLACEHOLDER",n[n.ELEMENT_NODE=1]="ELEMENT_NODE",n[n.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",n[n.TEXT_NODE=3]="TEXT_NODE",n[n.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",n[n.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",n[n.ENTITY_NODE=6]="ENTITY_NODE",n[n.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",n[n.COMMENT_NODE=8]="COMMENT_NODE",n[n.DOCUMENT_NODE=9]="DOCUMENT_NODE",n[n.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",n[n.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"})(Ve||(Ve={}));var Ol={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Hw={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"},Tt=null;function bi(n,e,t,i=e.mirror||e.ownerDocument.mirror){n=Ww(n,e,t,i),Kf(n,e,t,i),Bw(n,e,t)}o(bi,"diff");function Ww(n,e,t,i){var a;if(t.afterAppend&&!Tt&&(Tt=new WeakSet,setTimeout(()=>{Tt=null},0)),!Vl(n,e)){let l=Ei(e,t.mirror,i);(a=n.parentNode)===null||a===void 0||a.replaceChild(l,n),n=l}switch(e.RRNodeType){case be.Document:{if(!Nr(n,e,t.mirror,i)){let l=i.getMeta(e);l&&(t.mirror.removeNodeFromMap(n),n.close(),n.open(),t.mirror.add(n,l),Tt?.add(n))}break}case be.Element:{let l=n,u=e;switch(u.tagName){case"IFRAME":{let d=n.contentDocument;if(!d)break;bi(d,e.contentDocument,t,i);break}}u.shadowRoot&&(l.shadowRoot||l.attachShadow({mode:"open"}),Kf(l.shadowRoot,u.shadowRoot,t,i)),Vw(l,u,i);break}}return n}o(Ww,"diffBeforeUpdatingChildren");function Bw(n,e,t){var i;switch(e.RRNodeType){case be.Document:{let a=e.scrollData;a&&t.applyScroll(a,!0);break}case be.Element:{let a=n,l=e;switch(l.scrollData&&t.applyScroll(l.scrollData,!0),l.inputData&&t.applyInput(l.inputData),l.tagName){case"AUDIO":case"VIDEO":{let u=n,d=l;d.paused!==void 0&&(d.paused?u.pause():u.play()),d.muted!==void 0&&(u.muted=d.muted),d.volume!==void 0&&(u.volume=d.volume),d.currentTime!==void 0&&(u.currentTime=d.currentTime),d.playbackRate!==void 0&&(u.playbackRate=d.playbackRate),d.loop!==void 0&&(u.loop=d.loop);break}case"CANVAS":{let u=e;if(u.rr_dataURL!==null){let d=document.createElement("img");d.onload=()=>{let f=a.getContext("2d");f&&f.drawImage(d,0,0,d.width,d.height)},d.src=u.rr_dataURL}u.canvasMutations.forEach(d=>t.applyCanvas(d.event,d.mutation,n));break}case"STYLE":{let u=a.sheet;u&&e.rules.forEach(d=>t.applyStyleSheetMutation(d,u));break}}break}case be.Text:case be.Comment:case be.CDATA:{n.textContent!==e.data&&(n.textContent=e.data);break}}Tt?.has(n)&&(Tt.delete(n),(i=t.afterAppend)===null||i===void 0||i.call(t,n,t.mirror.getId(n)))}o(Bw,"diffAfterUpdatingChildren");function Vw(n,e,t){let i=n.attributes,a=e.attributes;for(let l in a){let u=a[l],d=t.getMeta(e);if(d?.isSVG&&Ol[l])n.setAttributeNS(Ol[l],l,u);else if(e.tagName==="CANVAS"&&l==="rr_dataURL"){let f=document.createElement("img");f.src=u,f.onload=()=>{let h=n.getContext("2d");h&&h.drawImage(f,0,0,f.width,f.height)}}else{if(e.tagName==="IFRAME"&&l==="srcdoc")continue;n.setAttribute(l,u)}}for(let{name:l}of Array.from(i))l in a||n.removeAttribute(l);e.scrollLeft&&(n.scrollLeft=e.scrollLeft),e.scrollTop&&(n.scrollTop=e.scrollTop)}o(Vw,"diffProps");function Kf(n,e,t,i){let a=Array.from(n.childNodes),l=e.childNodes;if(a.length===0&&l.length===0)return;let u=0,d=a.length-1,f=0,h=l.length-1,p=a[u],v=a[d],y=l[f],w=l[h],M,b;for(;u<=d&&f<=h;)if(p===void 0)p=a[++u];else if(v===void 0)v=a[--d];else if(Nr(p,y,t.mirror,i))p=a[++u],y=l[++f];else if(Nr(v,w,t.mirror,i))v=a[--d],w=l[--h];else if(Nr(p,w,t.mirror,i)){try{n.insertBefore(p,v.nextSibling)}catch(_){console.warn(_)}p=a[++u],w=l[--h]}else if(Nr(v,y,t.mirror,i)){try{n.insertBefore(v,p)}catch(_){console.warn(_)}v=a[--d],y=l[++f]}else{if(!M){M={};for(let C=u;C<=d;C++){let F=a[C];F&&t.mirror.hasNode(F)&&(M[t.mirror.getId(F)]=C)}}b=M[i.getId(y)];let _=a[b];if(b!==void 0&&_&&Nr(_,y,t.mirror,i)){try{n.insertBefore(_,p)}catch(C){console.warn(C)}a[b]=void 0}else{let C=Ei(y,t.mirror,i);n.nodeName==="#document"&&p&&(C.nodeType===C.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||C.nodeType===C.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(n.removeChild(p),t.mirror.removeNodeFromMap(p),p=a[++u]);try{n.insertBefore(C,p||null)}catch(F){console.warn(F)}}y=l[++f]}if(u>d){let _=l[h+1],C=null;for(_&&(C=t.mirror.getNode(i.getId(_)));f<=h;++f){let F=Ei(l[f],t.mirror,i);try{n.insertBefore(F,C)}catch(G){console.warn(G)}}}else if(f>h)for(;u<=d;u++){let _=a[u];if(!(!_||_.parentNode!==n))try{n.removeChild(_),t.mirror.removeNodeFromMap(_)}catch(C){console.warn(C)}}let R=n.firstChild,T=e.firstChild;for(;R!==null&&T!==null;)bi(R,T,t,i),R=R.nextSibling,T=T.nextSibling}o(Kf,"diffChildren");function Ei(n,e,t){let i=t.getId(n),a=t.getMeta(n),l=null;if(i>-1&&(l=e.getNode(i)),l!==null&&Vl(l,n))return l;switch(n.RRNodeType){case be.Document:l=new Document;break;case be.DocumentType:l=document.implementation.createDocumentType(n.name,n.publicId,n.systemId);break;case be.Element:{let u=n.tagName.toLowerCase();u=Hw[u]||u,a&&"isSVG"in a&&a?.isSVG?l=document.createElementNS(Ol.svg,u):l=document.createElement(n.tagName);break}case be.Text:l=document.createTextNode(n.data);break;case be.Comment:l=document.createComment(n.data);break;case be.CDATA:l=document.createCDATASection(n.data);break}a&&e.add(l,Object.assign({},a));try{Tt?.add(l)}catch{}return l}o(Ei,"createOrGetNode");function Vl(n,e){return n.nodeType!==e.nodeType?!1:n.nodeType!==n.ELEMENT_NODE||n.tagName.toUpperCase()===e.tagName}o(Vl,"sameNodeType");function Nr(n,e,t,i){let a=t.getId(n),l=i.getId(e);return a===-1||a!==l?!1:Vl(n,e)}o(Nr,"nodeMatching");var Xn=class n extends Fw(It){static{o(this,"RRDocument")}get unserializedId(){return this._unserializedId--}constructor(e){super(),this.UNSERIALIZED_STARTING_ID=-2,this._unserializedId=this.UNSERIALIZED_STARTING_ID,this.mirror=jw(),this.scrollData=null,e&&(this.mirror=e)}createDocument(e,t,i){return new n}createDocumentType(e,t,i){let a=new Uw(e,t,i);return a.ownerDocument=this,a}createElement(e){let t=e.toUpperCase(),i;switch(t){case"AUDIO":case"VIDEO":i=new kl(t);break;case"IFRAME":i=new Hl(t,this.mirror);break;case"CANVAS":i=new Fl(t);break;case"STYLE":i=new Pl(t);break;default:i=new Zn(t);break}return i.ownerDocument=this,i}createComment(e){let t=new $w(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new qw(e);return t.ownerDocument=this,t}createTextNode(e){let t=new Gw(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},Uw=Vf(It),Zn=class extends Uf(It){static{o(this,"RRElement")}constructor(){super(...arguments),this.inputData=null,this.scrollData=null}},kl=class extends Pw(Zn){static{o(this,"RRMediaElement")}},Fl=class extends Zn{static{o(this,"RRCanvasElement")}constructor(){super(...arguments),this.rr_dataURL=null,this.canvasMutations=[]}getContext(){return null}},Pl=class extends Zn{static{o(this,"RRStyleElement")}constructor(){super(...arguments),this.rules=[]}},Hl=class extends Zn{static{o(this,"RRIFrameElement")}constructor(e,t){super(e),this.contentDocument=new Xn,this.contentDocument.mirror=t}},Gw=Gf(It),$w=$f(It),qw=qf(It);function zw(n){return n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}o(zw,"getValidTagName");function Ul(n,e,t,i){let a;switch(n.nodeType){case Ve.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?a=i.contentDocument:(a=e,a.compatMode=n.compatMode);break;case Ve.DOCUMENT_TYPE_NODE:{let u=n;a=e.createDocumentType(u.name,u.publicId,u.systemId);break}case Ve.ELEMENT_NODE:{let u=n,d=zw(u);a=e.createElement(d);let f=a;for(let{name:h,value:p}of Array.from(u.attributes))f.attributes[h]=p;u.scrollLeft&&(f.scrollLeft=u.scrollLeft),u.scrollTop&&(f.scrollTop=u.scrollTop);break}case Ve.TEXT_NODE:a=e.createTextNode(n.textContent||"");break;case Ve.CDATA_SECTION_NODE:a=e.createCDATASection(n.data);break;case Ve.COMMENT_NODE:a=e.createComment(n.textContent||"");break;case Ve.DOCUMENT_FRAGMENT_NODE:a=i.attachShadow({mode:"open"});break;default:return null}let l=t.getMeta(n);return e instanceof Xn&&(l||(l=Gl(a,e.unserializedId),t.add(n,l)),e.mirror.add(a,Object.assign({},l))),a}o(Ul,"buildFromNode");function Yf(n,e=_w(),t=new Xn){function i(a,l){let u=Ul(a,t,e,l);if(u!==null)if(l?.nodeName!=="IFRAME"&&a.nodeType!==Ve.DOCUMENT_FRAGMENT_NODE&&(l?.appendChild(u),u.parentNode=l,u.parentElement=l),a.nodeName==="IFRAME"){let d=a.contentDocument;d&&i(d,u)}else(a.nodeType===Ve.DOCUMENT_NODE||a.nodeType===Ve.ELEMENT_NODE||a.nodeType===Ve.DOCUMENT_FRAGMENT_NODE)&&(a.nodeType===Ve.ELEMENT_NODE&&a.shadowRoot&&i(a.shadowRoot,u),a.childNodes.forEach(d=>i(d,u)))}return o(i,"walk"),i(n,null),t}o(Yf,"buildFromDom");function jw(){return new Wl}o(jw,"createMirror");var Wl=class{static{o(this,"Mirror")}constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){var t;if(!e)return-1;let i=(t=this.getMeta(e))===null||t===void 0?void 0:t.id;return i??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){let i=this.getNode(e);if(i){let a=this.nodeMetaMap.get(i);a&&this.nodeMetaMap.set(t,a)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Gl(n,e){switch(n.RRNodeType){case be.Document:return{id:e,type:n.RRNodeType,childNodes:[]};case be.DocumentType:{let t=n;return{id:e,type:n.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case be.Element:return{id:e,type:n.RRNodeType,tagName:n.tagName.toLowerCase(),attributes:{},childNodes:[]};case be.Text:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case be.Comment:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case be.CDATA:return{id:e,type:n.RRNodeType,textContent:""}}}o(Gl,"getDefaultSN");var Qf=new Map;function $l(n,e){let t=Qf.get(n);return t||(t=new Map,Qf.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}o($l,"variableListFor");function $t(n,e,t){return i=>ct(this,void 0,void 0,function*(){if(i&&typeof i=="object"&&"rr_type"in i)if(t&&(t.isUnchanged=!1),i.rr_type==="ImageBitmap"&&"args"in i){let a=yield $t(n,e,t)(i.args);return yield createImageBitmap.apply(null,a)}else if("index"in i){if(t||e===null)return i;let{rr_type:a,index:l}=i;return $l(e,a)[l]}else if("args"in i){let{rr_type:a,args:l}=i,u=window[a];return new u(...yield Promise.all(l.map($t(n,e,t))))}else{if("base64"in i)return _f(i.base64);if("src"in i){let a=n.get(i.src);if(a)return a;{let l=new Image;return l.src=i.src,n.set(i.src,l),l}}else if("data"in i&&i.rr_type==="Blob"){let a=yield Promise.all(i.data.map($t(n,e,t)));return new Blob(a,{type:i.type})}}else if(Array.isArray(i))return yield Promise.all(i.map($t(n,e,t)));return i})}o($t,"deserializeArg");function Kw(n,e){try{return e===vt.WebGL?n.getContext("webgl")||n.getContext("experimental-webgl"):n.getContext("webgl2")}catch{return null}}o(Kw,"getContext");var Yw=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Qw(n,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!Yw.includes(t))return;let i=$l(n,t);i.includes(e)||i.push(e)}o(Qw,"saveToWebGLVarMap");function Xf({mutation:n,target:e,type:t,imageMap:i,errorHandler:a}){return ct(this,void 0,void 0,function*(){try{let l=Kw(e,t);if(!l)return;if(n.setter){l[n.property]=n.args[0];return}let u=l[n.property],d=yield Promise.all(n.args.map($t(i,l))),f=u.apply(l,d);Qw(l,f);let h=!1}catch(l){a(n,l)}})}o(Xf,"webglMutation");function Zf({event:n,mutations:e,target:t,imageMap:i,errorHandler:a}){return ct(this,void 0,void 0,function*(){let l=t.getContext("2d");if(!l){a(e[0],new Error("Canvas context is null"));return}let u=e.map(f=>ct(this,void 0,void 0,function*(){return Promise.all(f.args.map($t(i,l)))}));(yield Promise.all(u)).forEach((f,h)=>{let p=e[h];try{if(p.setter){l[p.property]=p.args[0];return}let v=l[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(i.get(n),v.apply(l,p.args)):v.apply(l,f)}catch(v){a(p,v)}})})}o(Zf,"canvasMutation");function ql({event:n,mutation:e,target:t,imageMap:i,canvasEventMap:a,errorHandler:l}){return ct(this,void 0,void 0,function*(){try{let u=a.get(n)||e,d="commands"in u?u.commands:[u];if([vt.WebGL,vt.WebGL2].includes(e.type)){for(let f=0;f<d.length;f++){let h=d[f];yield Xf({mutation:h,type:e.type,target:t,imageMap:i,errorHandler:l})}return}yield Zf({event:n,mutations:d,target:t,imageMap:i,errorHandler:l})}catch(u){l(e,u)}})}o(ql,"canvasMutation");var jl={};mS(jl,{default:()=>zl});function zl(n){return{all:n=n||new Map,on:o(function(e,t){var i=n.get(e);i?i.push(t):n.set(e,[t])},"on"),off:o(function(e,t){var i=n.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):n.set(e,[]))},"off"),emit:o(function(e,t){var i=n.get(e);i&&i.slice().map(function(a){a(t)}),(i=n.get("*"))&&i.slice().map(function(a){a(e,t)})},"emit")}}o(zl,"mitt");function Jf(n=window,e=document){if("scrollBehavior"in e.documentElement.style&&n.__forceSmoothScrollPolyfill__!==!0)return;let t=n.HTMLElement||n.Element,i=468,a={scroll:n.scroll||n.scrollTo,scrollBy:n.scrollBy,elementScroll:t.prototype.scroll||f,scrollIntoView:t.prototype.scrollIntoView},l=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now;function u(T){let _=["MSIE ","Trident/","Edge/"];return new RegExp(_.join("|")).test(T)}o(u,"isMicrosoftBrowser");let d=u(n.navigator.userAgent)?1:0;function f(T,_){this.scrollLeft=T,this.scrollTop=_}o(f,"scrollElement");function h(T){return .5*(1-Math.cos(Math.PI*T))}o(h,"ease");function p(T){if(T===null||typeof T!="object"||T.behavior===void 0||T.behavior==="auto"||T.behavior==="instant")return!0;if(typeof T=="object"&&T.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+T.behavior+" is not a valid value for enumeration ScrollBehavior.")}o(p,"shouldBailOut");function v(T,_){if(_==="Y")return T.clientHeight+d<T.scrollHeight;if(_==="X")return T.clientWidth+d<T.scrollWidth}o(v,"hasScrollableSpace");function y(T,_){let C=n.getComputedStyle(T,null)["overflow"+_];return C==="auto"||C==="scroll"}o(y,"canOverflow");function w(T){let _=v(T,"Y")&&y(T,"Y"),C=v(T,"X")&&y(T,"X");return _||C}o(w,"isScrollable");function M(T){for(;T!==e.body&&w(T)===!1;)T=T.parentNode||T.host;return T}o(M,"findScrollableParent");function b(T){let _=l(),C,F,G,Q=(_-T.startTime)/i;Q=Q>1?1:Q,C=h(Q),F=T.startX+(T.x-T.startX)*C,G=T.startY+(T.y-T.startY)*C,T.method.call(T.scrollable,F,G),(F!==T.x||G!==T.y)&&n.requestAnimationFrame(b.bind(n,T))}o(b,"step");function R(T,_,C){let F,G,Q,le,X=l();T===e.body?(F=n,G=n.scrollX||n.pageXOffset,Q=n.scrollY||n.pageYOffset,le=a.scroll):(F=T,G=T.scrollLeft,Q=T.scrollTop,le=f),b({scrollable:F,method:le,startTime:X,startX:G,startY:Q,x:_,y:C})}o(R,"smoothScroll"),n.scroll=n.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.scroll.call(n,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:n.scrollX||n.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:n.scrollY||n.pageYOffset);return}R.call(n,e.body,arguments[0].left!==void 0?~~arguments[0].left:n.scrollX||n.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:n.scrollY||n.pageYOffset)}},n.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])){a.scrollBy.call(n,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}R.call(n,e.body,~~arguments[0].left+(n.scrollX||n.pageXOffset),~~arguments[0].top+(n.scrollY||n.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(p(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");a.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 T=arguments[0].left,_=arguments[0].top;R.call(this,this,typeof T>"u"?this.scrollLeft:~~T,typeof _>"u"?this.scrollTop:~~_)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){a.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})}},t.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){a.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let T=M(this),_=T.getBoundingClientRect(),C=this.getBoundingClientRect();T!==e.body?(R.call(this,T,T.scrollLeft+C.left-_.left,T.scrollTop+C.top-_.top),n.getComputedStyle(T).position!=="fixed"&&n.scrollBy({left:_.left,top:_.top,behavior:"smooth"})):n.scrollBy({left:C.left,top:C.top,behavior:"smooth"})}}o(Jf,"polyfill");var ro=class{static{o(this,"Timer")}constructor(e=[],t){this.timeOffset=0,this.raf=null,this.actions=e,this.speed=t.speed}addAction(e){let t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{let i=this.findActionIndex(e);this.actions.splice(i,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){let e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){let t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,i=this.actions.length-1;for(;t<=i;){let a=Math.floor((t+i)/2);if(this.actions[a].delay<e.delay)t=a+1;else if(this.actions[a].delay>e.delay)i=a-1;else return a+1}return t}};function Kl(n,e){if(n.type===$.IncrementalSnapshot&&n.data.source===U.MouseMove&&n.data.positions&&n.data.positions.length){let t=n.data.positions[0].timeOffset,i=n.timestamp+t;return n.delay=i-e,i-e}return n.delay=n.timestamp-e,n.delay}o(Kl,"addDelay");function eh(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var i,a,l=t.call(n),u=[];try{for(;(e===void 0||e-- >0)&&!(i=l.next()).done;)u.push(i.value)}catch(d){a={error:d}}finally{try{i&&!i.done&&(t=l.return)&&t.call(l)}finally{if(a)throw a.error}}return u}o(eh,"t");var Lr;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(Lr||(Lr={}));var sh={type:"xstate.init"};function Yl(n){return n===void 0?[]:[].concat(n)}o(Yl,"r");function Jn(n){return{type:"xstate.assign",assignment:n}}o(Jn,"o");function th(n,e){return typeof(n=typeof n=="string"&&e&&e[n]?e[n]:n)=="string"?{type:n}:typeof n=="function"?{type:n.name,exec:n}:n}o(th,"i");function io(n){return function(e){return n===e}}o(io,"a");function oh(n){return typeof n=="string"?{type:n}:n}o(oh,"u");function nh(n,e){return{value:n,context:e,actions:[],changed:!1,matches:io(n)}}o(nh,"c");function rh(n,e,t){var i=e,a=!1;return[n.filter(function(l){if(l.type==="xstate.assign"){a=!0;var u=Object.assign({},i);return typeof l.assignment=="function"?u=l.assignment(i,t):Object.keys(l.assignment).forEach(function(d){u[d]=typeof l.assignment[d]=="function"?l.assignment[d](i,t):l.assignment[d]}),i=u,!1}return!0}),i,a]}o(rh,"f");function Ql(n,e){e===void 0&&(e={});var t=eh(rh(Yl(n.states[n.initial].entry).map(function(u){return th(u,e.actions)}),n.context,sh),2),i=t[0],a=t[1],l={config:n,_options:e,initialState:{value:n.initial,actions:i,context:a,matches:io(n.initial)},transition:o(function(u,d){var f,h,p=typeof u=="string"?{value:u,context:n.context}:u,v=p.value,y=p.context,w=oh(d),M=n.states[v];if(M.on){var b=Yl(M.on[w.type]);try{for(var R=function(ve){var et=typeof Symbol=="function"&&Symbol.iterator,Ue=et&&ve[et],B=0;if(Ue)return Ue.call(ve);if(ve&&typeof ve.length=="number")return{next:o(function(){return ve&&B>=ve.length&&(ve=void 0),{value:ve&&ve[B++],done:!ve}},"next")};throw new TypeError(et?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),T=R.next();!T.done;T=R.next()){var _=T.value;if(_===void 0)return nh(v,y);var C=typeof _=="string"?{target:_}:_,F=C.target,G=C.actions,Q=G===void 0?[]:G,le=C.cond,X=le===void 0?function(){return!0}:le,se=F===void 0,he=F??v,V=n.states[he];if(X(y,w)){var W=eh(rh((se?Yl(Q):[].concat(M.exit,Q,V.entry).filter(function(ve){return ve})).map(function(ve){return th(ve,l._options.actions)}),y,w),3),K=W[0],Y=W[1],z=W[2],J=F??v;return{value:J,context:Y,actions:K,changed:F!==v||K.length>0||z,matches:io(J)}}}}catch(ve){f={error:ve}}finally{try{T&&!T.done&&(h=R.return)&&h.call(R)}finally{if(f)throw f.error}}}return nh(v,y)},"transition")};return l}o(Ql,"s");var ih=o(function(n,e){return n.actions.forEach(function(t){var i=t.exec;return i&&i(n.context,e)})},"l");function Xl(n){var e=n.initialState,t=Lr.NotStarted,i=new Set,a={_machine:n,send:o(function(l){t===Lr.Running&&(e=n.transition(e,l),ih(e,oh(l)),i.forEach(function(u){return u(e)}))},"send"),subscribe:o(function(l){return i.add(l),l(e),{unsubscribe:o(function(){return i.delete(l)},"unsubscribe")}},"subscribe"),start:o(function(l){if(l){var u=typeof l=="object"?l:{context:n.config.context,value:l};e={value:u.value,actions:[],context:u.context,matches:io(u.value)}}return t=Lr.Running,ih(e,sh),a},"start"),stop:o(function(){return t=Lr.Stopped,i.clear(),a},"stop"),get state(){return e},get status(){return t}};return a}o(Xl,"v");function Xw(n,e){for(let t=n.length-1;t>=0;t--){let i=n[t];if(i.type===$.Meta&&i.timestamp<=e)return n.slice(t)}return n}o(Xw,"discardPriorSnapshots");function ah(n,{getCastFn:e,applyEventsSynchronously:t,emitter:i}){let a=Ql({id:"player",context:n,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:Jn({lastPlayedEvent:o((l,u)=>u.type==="CAST_EVENT"?u.payload.event:l.lastPlayedEvent,"lastPlayedEvent")}),recordTimeOffset:Jn((l,u)=>{let d=l.timeOffset;return"payload"in u&&"timeOffset"in u.payload&&(d=u.payload.timeOffset),Object.assign(Object.assign({},l),{timeOffset:d,baselineTime:l.events[0].timestamp+d})}),play(l){var u;let{timer:d,events:f,baselineTime:h,lastPlayedEvent:p}=l;d.clear();for(let M of f)Kl(M,h);let v=Xw(f,h),y=p?.timestamp;p?.type===$.IncrementalSnapshot&&p.data.source===U.MouseMove&&(y=p.timestamp+((u=p.data.positions[0])===null||u===void 0?void 0:u.timeOffset)),h<(y||0)&&i.emit(pe.PlayBack);let w=new Array;for(let M of v)if(!(y&&y<h&&(M.timestamp<=y||M===p)))if(M.timestamp<h)w.push(M);else{let b=e(M,!1);d.addAction({doAction:o(()=>{b()},"doAction"),delay:M.delay})}t(w),i.emit(pe.Flush),d.start()},pause(l){l.timer.clear()},resetLastPlayedEvent:Jn(l=>Object.assign(Object.assign({},l),{lastPlayedEvent:null})),startLive:Jn({baselineTime:o((l,u)=>(l.timer.start(),u.type==="TO_LIVE"&&u.payload.baselineTime?u.payload.baselineTime:Date.now()),"baselineTime")}),addEvent:Jn((l,u)=>{let{baselineTime:d,timer:f,events:h}=l;if(u.type==="ADD_EVENT"){let{event:p}=u.payload;Kl(p,d);let v=h.length-1;if(!h[v]||h[v].timestamp<=p.timestamp)h.push(p);else{let M=-1,b=0;for(;b<=v;){let R=Math.floor((b+v)/2);h[R].timestamp<=p.timestamp?b=R+1:v=R-1}M===-1&&(M=b),h.splice(M,0,p)}let y=p.timestamp<d,w=e(p,y);y?w():f.isActive()&&f.addAction({doAction:o(()=>{w()},"doAction"),delay:p.delay})}return Object.assign(Object.assign({},l),{events:h})})}});return Xl(a)}o(ah,"createPlayerService");function lh(n){let e=Ql({id:"speed",context:n,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:o((t,i)=>{"payload"in i&&t.timer.setSpeed(i.payload.speed)},"setSpeed"),recordSpeed:Jn({normalSpeed:o(t=>t.timer.speed,"normalSpeed")}),restoreSpeed:o(t=>{t.timer.setSpeed(t.normalSpeed)},"restoreSpeed")}});return Xl(e)}o(lh,"createSpeedService");var ch=o(n=>[`.${n} { background: currentColor }`,"noscript { display: none !important; }"],"rules");var so=class{static{o(this,"MediaManager")}constructor(e){this.mediaMap=new Map,this.metadataCallbackMap=new Map,this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(pe.Start,this.start.bind(this)),this.emitter.on(pe.SkipStart,this.start.bind(this)),this.emitter.on(pe.Pause,this.pause.bind(this)),this.emitter.on(pe.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,i)=>{this.syncTargetWithState(i),e.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:i}){if(i.isPlaying){let l=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,u="duration"in t&&t.duration;if(Number.isNaN(u)){this.waitForMetadata(t);return}let d=i.currentTimeAtLastInteraction+l;t.loop&&u!==!1&&(d=d%u),t.currentTime=d}else t.pause(),t.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=o(()=>{this.metadataCallbackMap.delete(e);let i=this.mediaMap.get(e);i&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:i})},"onLoadedMetadata");this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:i}){var a,l,u,d,f;let h=this.mediaMap.get(e),{type:p,playbackRate:v,currentTime:y,muted:w,volume:M,loop:b}=i;return{isPlaying:p===0||p!==1&&(h?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(a=y??h?.currentTimeAtLastInteraction)!==null&&a!==void 0?a:0,lastInteractionTimeOffset:t,playbackRate:(l=v??h?.playbackRate)!==null&&l!==void 0?l:1,volume:(u=M??h?.volume)!==null&&u!==void 0?u:1,muted:(d=w??h?.muted)!==null&&d!==void 0?d:e.getAttribute("muted")===null,loop:(f=b??h?.loop)!==null&&f!==void 0?f:e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:i,loop:a,volume:l,isPlaying:u}=t,d=this.service.state.matches("paused"),f=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==l&&(e.volume=l),e.muted=i,e.loop=a,e.playbackRate!==f&&(e.playbackRate=f),u&&!d?e.play():e.pause()}catch(h){this.warn(`Failed to replay media interactions: ${h.message||h}`)}}addMediaElements(e,t,i){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let a=e,l=i.getMeta(a);if(!l||!("attributes"in l))return;let u=this.service.state.matches("paused"),d=l.attributes,f=!1;d.rr_mediaState?f=d.rr_mediaState==="played":f=a.getAttribute("autoplay")!==null,f&&u&&a.pause();let h=1;typeof d.rr_mediaPlaybackRate=="number"&&(h=d.rr_mediaPlaybackRate);let p=!1;typeof d.rr_mediaMuted=="boolean"?p=d.rr_mediaMuted:p=a.getAttribute("muted")!==null;let v=!1;typeof d.rr_mediaLoop=="boolean"?v=d.rr_mediaLoop:v=a.getAttribute("loop")!==null;let y=1;typeof d.rr_mediaVolume=="number"&&(y=d.rr_mediaVolume);let w=0;typeof d.rr_mediaCurrentTime=="number"&&(w=d.rr_mediaCurrentTime),this.mediaMap.set(a,{isPlaying:f,currentTimeAtLastInteraction:w,lastInteractionTimeOffset:t,playbackRate:h,volume:y,muted:p,loop:v}),this.syncTargetWithState(a)}mediaMutation({target:e,timeOffset:t,mutation:i}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:i})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};var Zw=5*1e3,Jw=zl||jl,uh="[replayer]",Zl={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function dh(n){return n.type==$.IncrementalSnapshot&&(n.data.source==U.TouchMove||n.data.source==U.MouseInteraction&&n.data.type==ae.TouchStart)}o(dh,"indicatesTouchDevice");var Si=class{static{o(this,"Replayer")}get timer(){return this.service.state.context.timer}constructor(e,t){if(this.usingVirtualDom=!1,this.virtualDom=new Xn,this.mouseTail=null,this.tailPositions=[],this.emitter=Jw(),this.legacy_missingNodeRetryMap={},this.cache=pl(),this.imageMap=new Map,this.canvasEventMap=new Map,this.mirror=Os(),this.styleMirror=new Cr,this.firstFullSnapshot=null,this.newDocumentQueue=[],this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[],this.handleResize=d=>{this.iframe.style.display="inherit";for(let f of[this.mouseTail,this.iframe])f&&(f.setAttribute("width",String(d.width)),f.setAttribute("height",String(d.height)))},this.applyEventsSynchronously=d=>{for(let f of d){switch(f.type){case $.DomContentLoaded:case $.Load:case $.Custom:continue;case $.FullSnapshot:case $.Meta:case $.Plugin:case $.IncrementalSnapshot:break}this.getCastFn(f,!0)()}},this.getCastFn=(d,f=!1)=>{let h;switch(d.type){case $.DomContentLoaded:case $.Load:break;case $.Custom:h=o(()=>{this.emitter.emit(pe.CustomEvent,d)},"castFn");break;case $.Meta:h=o(()=>this.emitter.emit(pe.Resize,{width:d.data.width,height:d.data.height}),"castFn");break;case $.FullSnapshot:h=o(()=>{var v;if(this.firstFullSnapshot){if(this.firstFullSnapshot===d){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(d,f),(v=this.iframe.contentWindow)===null||v===void 0||v.scrollTo(d.data.initialOffset)},"castFn");break;case $.IncrementalSnapshot:h=o(()=>{if(this.applyIncremental(d,f),!f&&(d===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let v of this.service.state.context.events)if(!(v.timestamp<=d.timestamp)&&this.isUserInteraction(v)){v.delay-d.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=v);break}if(this.nextUserInteractionEvent){let v=this.nextUserInteractionEvent.delay-d.delay,y={speed:Math.min(Math.round(v/Zw),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:y}),this.emitter.emit(pe.SkipStart,y)}}},"castFn");break}return o(()=>{h&&h();for(let y of this.config.plugins||[])y.handler&&y.handler(d,f,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:d}});let v=this.service.state.context.events.length-1;if(!this.config.liveMode&&d===this.service.state.context.events[v]){let y=o(()=>{v<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(pe.Finish))},"finish"),w=50;d.type===$.IncrementalSnapshot&&d.data.source===U.MouseMove&&d.data.positions.length&&(w+=Math.max(0,-d.data.positions[0].timeOffset)),setTimeout(y,w)}this.emitter.emit(pe.EventCast,d)},"wrappedCastFn")},!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let i={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:Zl,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(pe.Resize,this.handleResize),this.setupDom();for(let d of this.config.plugins||[])d.getMirror&&d.getMirror({nodeMirror:this.mirror});this.emitter.on(pe.Flush,()=>{if(this.usingVirtualDom){let d={mirror:this.mirror,applyCanvas:o((f,h,p)=>{ql({event:f,mutation:h,target:p,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},"applyCanvas"),applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:o((f,h)=>{f.source===U.StyleSheetRule?this.applyStyleSheetRule(f,h):f.source===U.StyleDeclaration&&this.applyStyleDeclaration(f,h)},"applyStyleSheetMutation"),afterAppend:o((f,h)=>{for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:h,replayer:this})},"afterAppend")};if(this.iframe.contentDocument)try{bi(this.iframe.contentDocument,this.virtualDom,d,this.virtualDom.mirror)}catch(f){console.warn(f)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let f in this.legacy_missingNodeRetryMap)try{let h=this.legacy_missingNodeRetryMap[f],p=Ei(h.node,this.mirror,this.virtualDom.mirror);bi(p,h.node,d,this.virtualDom.mirror),h.node=p}catch(h){this.warn(h)}this.constructedStyleMutations.forEach(f=>{this.applyStyleSheetMutation(f)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(f=>{this.applyAdoptedStyleSheet(f)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){let[d,f]=this.lastMouseDownEvent;d.dispatchEvent(f)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(pe.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let a=new ro([],{speed:this.config.speed});this.service=ah({events:e.map(d=>t&&t.unpackFn?t.unpackFn(d):d).sort((d,f)=>d.timestamp-f.timestamp),timer:a,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(d=>{this.emitter.emit(pe.StateChange,{player:d})}),this.speedService=lh({normalSpeed:-1,timer:a}),this.speedService.start(),this.speedService.subscribe(d=>{this.emitter.emit(pe.StateChange,{speed:d})}),this.mediaManager=new so({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let l=this.service.state.context.events.find(d=>d.type===$.Meta),u=this.service.state.context.events.find(d=>d.type===$.FullSnapshot);if(l){let{width:d,height:f}=l.data;setTimeout(()=>{this.emitter.emit(pe.Resize,{width:d,height:f})},0)}u&&setTimeout(()=>{var d;this.firstFullSnapshot||(this.firstFullSnapshot=u,this.rebuildFullSnapshot(u),(d=this.iframe.contentWindow)===null||d===void 0||d.scrollTo(u.data.initialOffset))},1),this.service.state.context.events.find(dh)&&this.mouse.classList.add("touch-device")}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,i;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(i=(t=this.iframe.contentDocument)===null||t===void 0?void 0:t.getElementsByTagName("html")[0])===null||i===void 0||i.classList.remove("rrweb-paused"),this.emitter.emit(pe.Start)}pause(e){var t,i;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(i=(t=this.iframe.contentDocument)===null||t===void 0?void 0:t.getElementsByTagName("html")[0])===null||i===void 0||i.classList.add("rrweb-paused"),this.emitter.emit(pe.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(pe.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(pe.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;dh(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=pl()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");let e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Jf(this.iframe.contentWindow,this.iframe.contentDocument),Vs(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!this.iframe.contentDocument)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=[],a=o((d,f)=>{if(this.collectIframeAndAttachDocument(i,d),this.mediaManager.isSupportedMediaElement(d)){let{events:h}=this.service.state.context;this.mediaManager.addMediaElements(d,e.timestamp-h[0].timestamp,this.mirror)}for(let h of this.config.plugins||[])h.onBuild&&h.onBuild(d,{id:f,replayer:this})},"afterAppend");this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),hf(e.data.node,{doc:this.iframe.contentDocument,afterAppend:a,cache:this.cache,mirror:this.mirror}),a(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:d,builtNode:f}of i)this.attachDocumentToIframe(d,f),this.newDocumentQueue=this.newDocumentQueue.filter(h=>h!==d);let{documentElement:l,head:u}=this.iframe.contentDocument;this.insertStyleRules(l,u),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(pe.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var i;let a=ch(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&a.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){let l=this.virtualDom.createElement("style");this.virtualDom.mirror.add(l,Gl(l,this.virtualDom.unserializedId)),e.insertBefore(l,t),l.rules.push({source:U.StyleSheetRule,adds:a.map((u,d)=>({rule:u,index:d}))})}else{let l=document.createElement("style");e.insertBefore(l,t);for(let u=0;u<a.length;u++)(i=l.sheet)===null||i===void 0||i.insertRule(a[u],u)}}attachDocumentToIframe(e,t){let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,a=[],l=o((u,d)=>{this.collectIframeAndAttachDocument(a,u);let f=i.getMeta(u);if(f?.type===oe.Element&&f?.tagName.toUpperCase()==="HTML"){let{documentElement:h,head:p}=t.contentDocument;this.insertStyleRules(h,p)}if(!this.usingVirtualDom)for(let h of this.config.plugins||[])h.onBuild&&h.onBuild(u,{id:d,replayer:this})},"afterAppend");Tr(e.node,{doc:t.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:l,cache:this.cache}),l(t.contentDocument,e.node.id);for(let{mutationInQueue:u,builtNode:d}of a)this.attachDocumentToIframe(u,d),this.newDocumentQueue=this.newDocumentQueue.filter(f=>f!==u)}collectIframeAndAttachDocument(e,t){if(Cn(t,this.mirror)){let i=this.newDocumentQueue.find(a=>a.parentId===this.mirror.getId(t));i&&e.push({mutationInQueue:i,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)===null||e===void 0?void 0:e.head;if(t){let i=new Set,a,l=this.service.state,u=o(()=>{l=this.service.state},"stateHandler");this.emitter.on(pe.Start,u),this.emitter.on(pe.Pause,u);let d=o(()=>{this.emitter.off(pe.Start,u),this.emitter.off(pe.Pause,u)},"unsubscribe");t.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(i.add(f),f.addEventListener("load",()=>{i.delete(f),i.size===0&&a!==-1&&(l.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(pe.LoadStylesheetEnd),a&&clearTimeout(a),d())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(pe.LoadStylesheetStart),a=setTimeout(()=>{l.matches("playing")&&this.play(this.getCurrentTime()),a=-1,d()},this.config.loadTimeout))}}preloadAllImages(){return ct(this,void 0,void 0,function*(){this.service.state;let e=o(()=>{this.service.state},"stateHandler");this.emitter.on(pe.Start,e),this.emitter.on(pe.Pause,e);let t=[];for(let i of this.service.state.context.events)i.type===$.IncrementalSnapshot&&i.data.source===U.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(i.data,i)),("commands"in i.data?i.data.commands:[i.data]).forEach(l=>{this.preloadImages(l,i)}));return Promise.all(t)})}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let i=document.createElement("canvas"),a=i.getContext("2d"),l=a?.createImageData(i.width,i.height);l?.data,JSON.parse(e.args[0]),a?.putImageData(l,0,0)}}deserializeAndPreloadCanvasEvents(e,t){return ct(this,void 0,void 0,function*(){if(!this.canvasEventMap.has(t)){let i={isUnchanged:!0};if("commands"in e){let a=yield Promise.all(e.commands.map(l=>ct(this,void 0,void 0,function*(){let u=yield Promise.all(l.args.map($t(this.imageMap,null,i)));return Object.assign(Object.assign({},l),{args:u})})));i.isUnchanged===!1&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{commands:a}))}else{let a=yield Promise.all(e.args.map($t(this.imageMap,null,i)));i.isUnchanged===!1&&this.canvasEventMap.set(t,Object.assign(Object.assign({},e),{args:a}))}}})}applyIncremental(e,t){var i,a,l;let{data:u}=e;switch(u.source){case U.Mutation:{try{this.applyMutation(u,t)}catch(d){this.warn(`Exception in mutation ${d.message||d}`,u)}break}case U.Drag:case U.TouchMove:case U.MouseMove:if(t){let d=u.positions[u.positions.length-1];this.mousePos={x:d.x,y:d.y,id:d.id,debugData:u}}else u.positions.forEach(d=>{let f={doAction:o(()=>{this.moveAndHover(d.x,d.y,d.id,t,u)},"doAction"),delay:d.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:e.delay-((i=u.positions[0])===null||i===void 0?void 0:i.timeOffset)});break;case U.MouseInteraction:{if(u.id===-1)break;let d=new Event(Vt(ae[u.type])),f=this.mirror.getNode(u.id);if(!f)return this.debugNodeNotFound(u,u.id);this.emitter.emit(pe.MouseInteraction,{type:u.type,target:f});let{triggerFocus:h}=this.config;switch(u.type){case ae.Blur:"blur"in f&&f.blur();break;case ae.Focus:h&&f.focus&&f.focus({preventScroll:!0});break;case ae.Click:case ae.TouchStart:case ae.TouchEnd:case ae.MouseDown:case ae.MouseUp:t?(u.type===ae.TouchStart?this.touchActive=!0:u.type===ae.TouchEnd&&(this.touchActive=!1),u.type===ae.MouseDown?this.lastMouseDownEvent=[f,d]:u.type===ae.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:u.x||0,y:u.y||0,id:u.id,debugData:u}):(u.type===ae.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(u.x||0,u.y||0,u.id,t,u),u.type===ae.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):u.type===ae.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):u.type===ae.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(d));break;case ae.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(d)}break}case U.Scroll:{if(u.id===-1)break;if(this.usingVirtualDom){let d=this.virtualDom.mirror.getNode(u.id);if(!d)return this.debugNodeNotFound(u,u.id);d.scrollData=u;break}this.applyScroll(u,t);break}case U.ViewportResize:this.emitter.emit(pe.Resize,{width:u.width,height:u.height});break;case U.Input:{if(u.id===-1)break;if(this.usingVirtualDom){let d=this.virtualDom.mirror.getNode(u.id);if(!d)return this.debugNodeNotFound(u,u.id);d.inputData=u;break}this.applyInput(u);break}case U.MediaInteraction:{let d=this.usingVirtualDom?this.virtualDom.mirror.getNode(u.id):this.mirror.getNode(u.id);if(!d)return this.debugNodeNotFound(u,u.id);let f=d,{events:h}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:e.timestamp-h[0].timestamp,mutation:u});break}case U.StyleSheetRule:case U.StyleDeclaration:{this.usingVirtualDom?u.styleId?this.constructedStyleMutations.push(u):u.id&&((a=this.virtualDom.mirror.getNode(u.id))===null||a===void 0||a.rules.push(u)):this.applyStyleSheetMutation(u);break}case U.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let d=this.virtualDom.mirror.getNode(u.id);if(!d)return this.debugNodeNotFound(u,u.id);d.canvasMutations.push({event:e,mutation:u})}else{let d=this.mirror.getNode(u.id);if(!d)return this.debugNodeNotFound(u,u.id);ql({event:e,mutation:u,target:d,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case U.Font:{try{let d=new FontFace(u.family,u.buffer?new Uint8Array(JSON.parse(u.fontSource)):u.fontSource,u.descriptors);(l=this.iframe.contentDocument)===null||l===void 0||l.fonts.add(d)}catch(d){this.warn(d)}break}case U.Selection:{if(t){this.lastSelectionData=u;break}this.applySelection(u);break}case U.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(u):this.applyAdoptedStyleSheet(u);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,Yf(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let h in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[h],v=Ul(p.node,this.virtualDom,this.mirror);v&&(p.node=v)}catch(p){this.warn(p)}let i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(h=>i.getNode(h.id)?!0:(this.warnNodeNotFound(e,h.id),!1)),e.removes.forEach(h=>{var p;let v=i.getNode(h.id);if(!v)return;let y=i.getNode(h.parentId);if(!y)return this.warnNodeNotFound(e,h.parentId);if(h.isShadow&&Qt(y)&&(y=y.shadowRoot),i.removeNodeFromMap(v),y)try{y.removeChild(v),this.usingVirtualDom&&v.nodeName==="#text"&&y.nodeName==="STYLE"&&((p=y.rules)===null||p===void 0?void 0:p.length)>0&&(y.rules=[])}catch(w){if(w instanceof DOMException)this.warn("parent could not remove child in mutation",y,v,e);else throw w}});let a=Object.assign({},this.legacy_missingNodeRetryMap),l=[],u=o(h=>{let p=null;return h.nextId&&(p=i.getNode(h.nextId)),h.nextId!==null&&h.nextId!==void 0&&h.nextId!==-1&&!p},"nextNotInDOM"),d=o(h=>{var p,v;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let y=i.getNode(h.parentId);if(!y)return h.node.type===oe.Document?this.newDocumentQueue.push(h):l.push(h);h.node.isShadow&&(Qt(y)||y.attachShadow({mode:"open"}),y=y.shadowRoot);let w=null,M=null;if(h.previousId&&(w=i.getNode(h.previousId)),h.nextId&&(M=i.getNode(h.nextId)),u(h))return l.push(h);if(h.node.rootId&&!i.getNode(h.node.rootId))return;let b=h.node.rootId?i.getNode(h.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Cn(y,i)){this.attachDocumentToIframe(h,y);return}let R=o((C,F)=>{if(!this.usingVirtualDom)for(let G of this.config.plugins||[])G.onBuild&&G.onBuild(C,{id:F,replayer:this})},"afterAppend"),T=Tr(h.node,{doc:b,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:R});if(h.previousId===-1||h.nextId===-1){a[h.node.id]={node:T,mutation:h};return}let _=i.getMeta(y);if(_&&_.type===oe.Element&&_.tagName==="textarea"&&h.node.type===oe.Text){let C=Array.isArray(y.childNodes)?y.childNodes:Array.from(y.childNodes);for(let F of C)F.nodeType===y.TEXT_NODE&&y.removeChild(F)}else if(_?.type===oe.Document){let C=y;h.node.type===oe.DocumentType&&((p=C.childNodes[0])===null||p===void 0?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&C.removeChild(C.childNodes[0]),T.nodeName==="HTML"&&C.documentElement&&C.removeChild(C.documentElement)}if(w&&w.nextSibling&&w.nextSibling.parentNode?y.insertBefore(T,w.nextSibling):M&&M.parentNode?y.contains(M)?y.insertBefore(T,M):y.insertBefore(T,null):y.appendChild(T),R(T,h.node.id),this.usingVirtualDom&&T.nodeName==="#text"&&y.nodeName==="STYLE"&&((v=y.rules)===null||v===void 0?void 0:v.length)>0&&(y.rules=[]),Cn(T,this.mirror)){let C=this.mirror.getId(T),F=this.newDocumentQueue.find(G=>G.parentId===C);F&&(this.attachDocumentToIframe(F,T),this.newDocumentQueue=this.newDocumentQueue.filter(G=>G!==F))}(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(a,y,T,h)},"appendNode");e.adds.forEach(h=>{d(h)});let f=Date.now();for(;l.length;){let h=gf(l);if(l.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",h);break}for(let p of h)i.getNode(p.value.parentId)?yl(p,y=>{d(y)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(a).length&&Object.assign(this.legacy_missingNodeRetryMap,a),vf(e.texts).forEach(h=>{var p;let v=i.getNode(h.id);if(!v)return e.removes.find(y=>y.id===h.id)?void 0:this.warnNodeNotFound(e,h.id);if(v.textContent=h.value,this.usingVirtualDom){let y=v.parentNode;((p=y?.rules)===null||p===void 0?void 0:p.length)>0&&(y.rules=[])}}),e.attributes.forEach(h=>{var p;let v=i.getNode(h.id);if(!v)return e.removes.find(y=>y.id===h.id)?void 0:this.warnNodeNotFound(e,h.id);for(let y in h.attributes)if(typeof y=="string"){let w=h.attributes[y];if(w===null)v.removeAttribute(y);else if(typeof w=="string")try{if(y==="_cssText"&&(v.nodeName==="LINK"||v.nodeName==="STYLE"))try{let M=i.getMeta(v);Object.assign(M.attributes,h.attributes);let b=Tr(M,{doc:v.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache}),R=v.nextSibling,T=v.parentNode;if(b&&T){T.removeChild(v),T.insertBefore(b,R),i.replace(h.id,b);break}}catch{}if(y==="value"&&v.nodeName==="TEXTAREA"){let M=v;M.childNodes.forEach(R=>M.removeChild(R));let b=(p=v.ownerDocument)===null||p===void 0?void 0:p.createTextNode(w);b&&M.appendChild(b)}else v.setAttribute(y,w)}catch(M){this.warn("An error occurred may due to the checkout feature.",M)}else if(y==="style"){let M=w,b=v;for(let R in M)if(M[R]===!1)b.style.removeProperty(R);else if(M[R]instanceof Array){let T=M[R];b.style.setProperty(R,T[0],T[1])}else{let T=M[R];b.style.setProperty(R,T)}}}})}applyScroll(e,t){var i,a;let l=this.mirror.getNode(e.id);if(!l)return this.debugNodeNotFound(e,e.id);let u=this.mirror.getMeta(l);if(l===this.iframe.contentDocument)(i=this.iframe.contentWindow)===null||i===void 0||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(u?.type===oe.Document)(a=l.defaultView)===null||a===void 0||a.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{l.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){let t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{let t=new Set,i=e.ranges.map(({start:a,startOffset:l,end:u,endOffset:d})=>{let f=this.mirror.getNode(a),h=this.mirror.getNode(u);if(!f||!h)return;let p=new Range;p.setStart(f,l),p.setEnd(h,d);let v=f.ownerDocument,y=v?.getSelection();return y&&t.add(y),{range:p,selection:y}});t.forEach(a=>a.removeAllRanges()),i.forEach(a=>{var l;return a&&((l=a.selection)===null||l===void 0?void 0:l.addRange(a.range))})}catch{}}applyStyleSheetMutation(e){var t;let i=null;e.styleId?i=this.styleMirror.getStyle(e.styleId):e.id&&(i=((t=this.mirror.getNode(e.id))===null||t===void 0?void 0:t.sheet)||null),i&&(e.source===U.StyleSheetRule?this.applyStyleSheetRule(e,i):e.source===U.StyleDeclaration&&this.applyStyleDeclaration(e,i))}applyStyleSheetRule(e,t){var i,a,l,u;if((i=e.adds)===null||i===void 0||i.forEach(({rule:d,index:f})=>{try{if(Array.isArray(f)){let{positions:h,index:p}=bl(f);_r(t.cssRules,h).insertRule(d,p)}else{let h=f===void 0?void 0:Math.min(f,t.cssRules.length);t?.insertRule(d,h)}}catch{}}),(a=e.removes)===null||a===void 0||a.forEach(({index:d})=>{try{if(Array.isArray(d)){let{positions:f,index:h}=bl(d);_r(t.cssRules,f).deleteRule(h||0)}else t?.deleteRule(d)}catch{}}),e.replace)try{(l=t.replace)===null||l===void 0||l.call(t,e.replace)}catch{}if(e.replaceSync)try{(u=t.replaceSync)===null||u===void 0||u.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&_r(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&_r(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let i=this.mirror.getNode(e.id);if(!i)return;(t=e.styles)===null||t===void 0||t.forEach(d=>{var f;let h=null,p=null;if(Qt(i)?p=((f=i.ownerDocument)===null||f===void 0?void 0:f.defaultView)||null:i.nodeName==="#document"&&(p=i.defaultView),!!p)try{h=new p.CSSStyleSheet,this.styleMirror.add(h,d.styleId),this.applyStyleSheetRule({source:U.StyleSheetRule,adds:d.rules},h)}catch{}});let a=10,l=0,u=o((d,f)=>{let h=f.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);Qt(d)?d.shadowRoot.adoptedStyleSheets=h:d.nodeName==="#document"&&(d.adoptedStyleSheets=h),h.length!==f.length&&l<a&&(setTimeout(()=>u(d,f),0+100*l),l++)},"adoptStyleSheets");u(i,e.styleIds)}legacy_resolveMissingNode(e,t,i,a){let{previousId:l,nextId:u}=a,d=l&&e[l],f=u&&e[u];if(d){let{node:h,mutation:p}=d;t.insertBefore(h,i),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,h,p)}if(f){let{node:h,mutation:p}=f;t.insertBefore(h,i.nextSibling),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,h,p)}}moveAndHover(e,t,i,a,l){let u=this.mirror.getNode(i);if(!u)return this.debugNodeNotFound(l,i);let d=El(u,this.iframe),f=e*d.absoluteScale+d.x,h=t*d.absoluteScale+d.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${h}px`,a||this.drawMouseTail({x:f,y:h}),this.hoverElements(u)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:i,strokeStyle:a,duration:l}=this.config.mouseTail===!0?Zl:Object.assign({},Zl,this.config.mouseTail),u=o(()=>{if(!this.mouseTail)return;let d=this.mouseTail.getContext("2d");!d||!this.tailPositions.length||(d.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),d.beginPath(),d.lineWidth=i,d.lineCap=t,d.strokeStyle=a,d.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>d.lineTo(f.x,f.y)),d.stroke())},"draw");this.tailPositions.push(e),u(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(d=>d!==e),u()},l/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)===null||t===void 0||t.querySelectorAll(".\\:hover").forEach(a=>{a.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let i=e;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(e){return e.type!==$.IncrementalSnapshot?!1:e.data.source>U.Mutation&&e.data.source<=U.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(pe.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(uh,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(uh,...e)}};var _n=class{static{o(this,"EventHandlersBase")}setSessionReplayer(e){}skipEvents(e){}preCastEvent(e){}preEvent(e){}postEvent(e,t){return t}handleMeta(e,t){}handleViewportResize(e){}handleMutation(e,t){}handleInput(e,t){}handleClick(e,t){}handleDblClick(e,t){}handleMouseDown(e,t){}handleMouseUp(e,t){}handleMouseMove(e,t){}handleFocus(e,t){}handleBlur(e,t){}handleContentEditableInput(e,t){}handleKeyStroke(e,t){}handleURLChange(e,t){}};var mh=ni(oo());var ao=class extends _n{constructor({sessionMirror:t,elementSelector:i}){super();this.numberOfRetries=3;this.currentHref=void 0;this.previousMousePositionsNodeSelectors={};this.hasUndefinedFocusNode=!1;this.lastMouseUpTime=0;this.lastMouseDownExtract=void 0;this.allInteractableElementsMetadata={mouseMove:void 0,mouseDown:void 0};this.currentEventIndex=-1;this.enableRecordingAvailableInteractableElements=!0;this.useTextInputFastForward=!0;this.getBoundingBox=o(t=>{let i=qn(this.sessionMirror.getNodeById(t),this.appSpecificRules.appSpecificInteractableElementsSelectors);if(i)return i?.getBoundingClientRect()},"getBoundingBox");this.isPointWithinBoundingBox=o((t,i,a)=>t>=a.left&&t<=a.right&&i>=a.top&&i<=a.bottom,"isPointWithinBoundingBox");this.isPointWithinNodeBoundingBox=o((t,i,a)=>{let l=this.getBoundingBox(t);return l?i>=l.left&&i<=l.right&&a>=l.top&&a<=l.bottom:!1},"isPointWithinNodeBoundingBox");this.elementSelector=i,this.sessionMirror=t}static{o(this,"SessionDigesterEventHandlers")}setEvents(t){this.events=t}setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:i=!0}){this.enableRecordingAvailableInteractableElements=t,this.useTextInputFastForward=i}setAppRules(t){this.appSpecificRules=t}skipEvents(t){this.currentEventIndex+=t.length}preEvent(t){++this.currentEventIndex}async postEvent(t,i){return i&&(!i.availableInteractableElementsAtStart&&this.enableRecordingAvailableInteractableElements&&t.type===$.IncrementalSnapshot&&(t.data.source===U.MouseInteraction||t.data.source===U.Input||t.data.source===U.MediaInteraction)&&(i.availableInteractableElementsAtStart=await this.getInteractableElementsMetadata()),i)}handleMeta(t){if(t.href!==this.currentHref)return this.currentHref=t.href,{eventCode:"navigation",url:t.href}}getNextUserTriggeredInputEvent(t){for(let i=this.currentEventIndex+1;i<this.events.length;++i){let a=this.events[i];if(a.type===$.IncrementalSnapshot&&a.data.source===U.Input&&a.data.userTriggered)return a;if(a.timestamp>t)return}}async handleInput(t,i){if(!t.userTriggered)return;let a=await this.getNodeById(t.id),l=this.getInputEventCode(a,t);if(l==="input"&&this.useTextInputFastForward){this.textInputFastForwardInitialSelector||(this.textInputFastForwardInitialSelector=await this.elementSelector.getSelector(a));let d={eventCode:l,...this.textInputFastForwardInitialSelector};return await o(async()=>{let h=this.getNextUserTriggeredInputEvent(i.timestamp+2e3);if(h){let p=h.data,v=await this.getNodeById(p.id);return v!==a?!1:this.getInputEventCode(v,p)==="input"}return!1},"isNextInputEventForSameNode")()||(this.textInputFastForwardInitialSelector=void 0),d}let u=await this.elementSelector.getSelector(a);return{eventCode:l,...u}}async handleMouseMove(t){if(this.previousMousePositions=t.positions,this.previousMousePositionsNodeSelectors={},this.isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus()){this.previousMousePositionsNodeSelectors={};let i={};for(let a of this.previousMousePositions){let l=a.id;if(i[l])continue;i[l]=!0;let u=await this.getNodeById(l);try{this.previousMousePositionsNodeSelectors[l]=await this.elementSelector.getSelector(u)}catch(d){console.warn("error with extracting selector for node during previousMousePositionsNodeSelectors mapping",u,d)}}this.allInteractableElementsMetadata.mouseMove=await this.getInteractableElementsMetadata()}}isLastMouseMoveEventBeforeMouseDownOrUndefinedFocus(){for(let t=this.currentEventIndex+1;t<this.events.length;++t){let i=this.events[t];if(i.type===$.IncrementalSnapshot)switch(i.data.source){case U.MouseMove:return!1;case U.MouseInteraction:switch(i.data.type){case ae.Click:case ae.MouseDown:return!0;case ae.Focus:return i.data.id===-1}}}return!1}async handleMouseDown(t){let i=await this.getNodeById(t.id);try{this.lastMouseDownExtract={node:i,selector:await this.elementSelector.getSelector(i)},this.allInteractableElementsMetadata.mouseDown=await this.getInteractableElementsMetadata()}catch(a){console.warn("error with extracting selector for node during handleMouseDown",i,a)}this.previousMouseDownData=t}async handleMouseUp(t,i){this.lastMouseUpTime=i.timestamp}isLastMouseDownValidForClick(t){return!!this.lastMouseDownExtract&&t-this.lastMouseUpTime<10}invalidateLastMouseDown(){this.lastMouseUpTime=0,this.lastMouseDownExtract=void 0,this.allInteractableElementsMetadata.mouseDown=void 0}async handleFocus(t){this.hasUndefinedFocusNode=t.id===-1}async handleClick(t,i){if(t.x===void 0||t.y===void 0)return;let a=this.isLastMouseDownValidForClick(i.timestamp),u=await o(async()=>{if(a)return{...this.lastMouseDownExtract.selector,playwrightSelectorForSnapshot:(await this.elementSelector.getSelector(this.lastMouseDownExtract.node,{extractEsraMetadata:!1}))?.playwrightSelector,availableInteractableElementsAtStart:this.allInteractableElementsMetadata.mouseDown};let d=this.getNodeIdForClick(t,i),f=await this.getNodeById(d);return this.previousMousePositionsNodeSelectors[d]?{...this.previousMousePositionsNodeSelectors[d],playwrightSelectorForSnapshot:(await this.elementSelector.getSelector(f,{extractEsraMetadata:!1}))?.playwrightSelector,availableInteractableElementsAtStart:this.allInteractableElementsMetadata.mouseMove}:this.elementSelector.getSelector(f)},"getSelector")();return this.invalidateLastMouseDown(),{eventCode:"click",...u}}getNextMouseMoveEvent(){for(let t=this.currentEventIndex+1;t<this.events.length;++t){let i=this.events[t];if(i.type===$.IncrementalSnapshot&&i.data.source===U.MouseMove)return i}}getNodeIdForClick(t,i){if(this.hasUndefinedFocusNode&&this.previousMouseDownData&&this.previousMouseDownData.id!==t.id){let a=o(()=>{let v=this.getNextMouseMoveEvent();if(v){let w=[...v.data.positions].reverse().find(M=>v.timestamp+M.timeOffset<i.timestamp);if(w)return w.id}},"findByNextMousePosition"),l=o(()=>{if(this.previousMousePositions){let v=[...this.previousMousePositions].reverse().find(y=>!0);if(v)return v.id}},"findByPreviousMousePosition"),u=o(()=>{try{let v=this.sessionMirror.getNodeById(t.id),y=Array.from(yr(v)).filter(M=>window.getComputedStyle(M).pointerEvents==="none"),w=[];if(y.length){y.forEach(b=>{let R=b,T=R.getAttribute("style");w.push(T),R.setAttribute("style",T+";pointer-events:auto !important")});let M=document.querySelector("iframe").contentDocument.elementFromPoint(t.x,t.y);if(y.forEach((b,R)=>{b.setAttribute("style",w[R])}),M){let b=this.sessionMirror.getMeta(M);if(b)return b.id}}}catch(v){console.warn("element from point calc error",v)}},"findByElementFromPoint"),d={next:a(),previous:l(),point:u(),original:t.id},f=d.next||d.previous||t.id,h=o(()=>{if(f===d.point)return!1;let v=this.sessionMirror.getNodeById(f);return this.isPointWithinBoundingBox(t.x,t.y,v.getBoundingClientRect())},"isElementFromPointContainedInCandidate");return d.point&&h()?d.point:f}return t.id}async getNodeById(t,{retriesLeft:i=this.numberOfRetries,useCompoundInteractableDetection:a=!0}={}){if(!i)return console.error("no node"),null;let l=this.sessionMirror.getNodeById(t);return l?a?qn(l,this.appSpecificRules.appSpecificInteractableElementsSelectors):l:(await(0,mh.default)(100*(this.numberOfRetries-i+1)),this.getNodeById(t,{retriesLeft:i-1,useCompoundInteractableDetection:a}))}getInputEventCode(t,i){switch(t.getAttribute("type")){case"checkbox":case"radio":return i.isChecked?"check":"uncheck";case"text":default:return"input"}}async getInteractableElementsMetadata(){if(!this.enableRecordingAvailableInteractableElements)return[];let i=document.querySelector("iframe").contentWindow.document;console.log("Getting all interactable elements...");let a=Bt(i,this.appSpecificRules);console.log(`Got ${a.length} interactable elements`),console.log("Extracting ESRA metadata for all interactable elements...");let l=new lt(i),u=await Promise.all(a.map(async d=>({esraMetadata:l.extract(d).toMetadata()})));return console.log("Done processing all interactable elements..."),u}};var lo=class{constructor({eventHandlers:e}){this.preCastEvent=o(async e=>this.handlers.preCastEvent(e),"preCastEvent");this.processEvent=o(async(e,t=!0)=>{this.handlers.preEvent(e);let i=t?await this.handleEvent(e):void 0,a=await this.handlers.postEvent(e,i);return this.handlers.controlledReturn?this.handlers.getReturnValue():a},"processEvent");this.skipEvents=o(async e=>this.handlers.skipEvents(e),"skipEvents");this.handlers=e}static{o(this,"EventProcessor")}setHandlers(e){this.handlers=e}async handleEvent(e){switch(e.type){case $.Meta:return this.handlers.handleMeta(e.data,e);case $.IncrementalSnapshot:switch(e.data.source){case U.ViewportResize:return this.handlers.handleViewportResize(e.data,e);case U.Mutation:return this.handlers.handleMutation(e.data,e);case U.Input:return this.handlers.handleInput(e.data,e);case U.MouseInteraction:return this.handleMouseInteraction(e.data,e);case U.MouseMove:return this.handlers.handleMouseMove(e.data,e);default:break}break;case $.Custom:switch(e.data.tag){case"contenteditable-input":return this.handlers.handleContentEditableInput(e.data.payload,e);case"key-stroke":return this.handlers.handleKeyStroke(e.data.payload,e);case"url-change":return this.handlers.handleURLChange(e.data.payload,e)}break;default:break}}async handleMouseInteraction(e,t){switch(e.type){case ae.Click:return this.handlers.handleClick(e,t);case ae.DblClick:return this.handlers.handleDblClick(e,t);case ae.MouseDown:return this.handlers.handleMouseDown(e,t);case ae.MouseUp:return this.handlers.handleMouseUp(e,t);case ae.Focus:return this.handlers.handleFocus(e,t);case ae.Blur:return this.handlers.handleBlur(e,t);default:break}}};var Jl=ni(oo());var co=class{constructor(e={}){this.events=[];this.castedEvents=[];this.isLive=!0;this.currentTraveledTimestamp=void 0;this.config={enableInteract:!1};this.useTimestampCompression=!0;this.fastForward=o(async(e,t=!1)=>{if(!t&&!this.isLive){this.liveEvents.push(...e);return}let i=e.sort((l,u)=>l.timestamp-u.timestamp);if(this.useTimestampCompression){let l=Date.now();i=i.map((u,d)=>({...u,timestamp:l+d,originalTimestamp:this.getOriginalTimestamp(u)??u.timestamp}))}this.events=[...this.events,...i];let a=new Promise(l=>{this.onEventCast=u=>{this.castedEvents.push(u),this.castedEvents.length===this.events.length&&(this.onEventCast=void 0,l())}});for(let l of i)this.replayer.addEvent(l);return a},"fastForward");this.stop=o(()=>{this.replayer.destroy()},"stop");this.getOriginalTimestamp=o(e=>e.originalTimestamp,"getOriginalTimestamp");this.getNodeById=o(e=>this.replayer.getMirror().getNode(e),"getNodeById");this.getMeta=o(e=>this.replayer.getMirror().getMeta(e),"getMeta");this.config={...this.config,...e}}static{o(this,"SessionReplayer")}start(e){this.startOptions=e;let{firstEventTimestamp:t,speed:i=8,useTimestampCompression:a=!0}=e;this.replayer=new Si([],{mouseTail:!1,pauseAnimation:!1,speed:i,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0}),this.config.enableInteract?this.replayer.enableInteract():this.replayer.disableInteract(),this.useTimestampCompression=a,this.replayer.startLive(this.useTimestampCompression?Date.now():t),this.replayer.on("event-cast",l=>{this.onEventCast&&this.onEventCast(l)})}async goBack(e,{sleepAfter:t=1e3,beforeTimestamp:i=!1}={}){this.currentTraveledTimestamp!==e&&(this.currentTraveledTimestamp=e,this.isLive&&(this.liveEvents=this.events),this.stop(),this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!1,await this.fastForward(this.liveEvents.filter(a=>i?this.getOriginalTimestamp(a)<e:this.getOriginalTimestamp(a)<=e),!0),t&&await(0,Jl.default)(t))}async goLive(e=1e3){this.isLive||(this.stop(),this.currentTraveledTimestamp=void 0,this.events=[],this.castedEvents=[],this.start(this.startOptions),this.isLive=!0,await this.fastForward(this.liveEvents),e&&await(0,Jl.default)(e))}};var Dn=class{static{o(this,"Streamer")}constructor(e={}){this.sessionReplayer=new co(e),this.eventProcessor=new lo({eventHandlers:new _n})}setEventHandlers(e){e.setSessionReplayer(this.sessionReplayer),this.eventHandlers=e,this.eventProcessor.setHandlers(this.eventHandlers)}start(e){this.sessionReplayer.start(e)}async handleEvent(e){return await this.eventProcessor.preCastEvent(e),await this.sessionReplayer.fastForward([e]),await this.eventProcessor.processEvent(e)}async skipEvents(e){await this.eventProcessor.skipEvents(e),await this.sessionReplayer.fastForward(e)}stop(){this.sessionReplayer.stop()}};var uo=class extends Dn{constructor(){super({enableInteract:!0});this.elementSelector=new wr;this.setEventHandlers(new ao({sessionMirror:this.sessionReplayer,elementSelector:this.elementSelector}))}static{o(this,"ChecksumSessionDigester")}setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:i}){this.eventHandlers.setConfiguration({enableRecordingAvailableInteractableElements:t,useTextInputFastForward:i})}setEvents(t){this.eventHandlers.setEvents(t)}setOptions(t){this.elementSelector.setOptions({defaultExtractReducedHtmlAndSelector:t.extractReducedHTML,defaultInspectInteractableElements:t.inspectInteractables,defaultExtractEsraMetadata:t.extractESRAMetadata})}setAppRules(t){this.appSpecificRules=t,this.elementSelector.setAppRules(t),this.eventHandlers.setAppRules(t)}async handleEvent(t){return await super.handleEvent(t)}};var fo=class{constructor(e){this.attributes={};this.classes={};if(typeof e=="object")for(let t in e)this[t]=e[t];else if(typeof e=="string"){let t=JSON.parse(e);for(let i in t)this[i]=t[i]}}static{o(this,"ESRAElementMetadata")}serialize(){return JSON.stringify(this)}};var yh=ni(vh());var ec=class{constructor(){this.weightsSum=0;this.config={attributes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},classes:{qualification:{globalUniquenessThreshold:.99,tagUniquenessThreshold:.99},decisionWeight:this.makeWeight(2/5)},tagName:{decisionWeight:this.makeWeight(3/5)},style:{inlineWeight:.6,computedWeight:.4,decisionWeight:this.makeWeight(2/5)},innerText:{decisionWeight:this.makeWeight(3/5),qualification:{exactMatchMax:20,containsMatchMax:10,maxLength:256,minLength:1},ignoreSimilarityScoreBelow:.6},innerFeatures:{decisionWeight:this.makeWeight(4/5)},visualVicinity:{decisionWeight:this.makeWeight(1/5)},structuralVicinity:{decisionWeight:this.makeWeight(1/5)}}}static{o(this,"ESRASimilarityConfigClass")}makeWeight(e){return this.weightsSum+=e,e}get(){return this.config}weight(e){return e/this.weightsSum}},Le=new ec;var mo=class{constructor(e){this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.unqualifiedClasses=[];this.qualifiedInnerText=void 0;this.visualVicinityComparable=[];this.structuralVicinityComparable=[];this.innerFeaturesComparable=[];this.rank=o(e=>{if(this.isDealBreaker(e))return{score:0,scores:{}};let t=this.tagSimilarity(e),i=this.attributesSimilarity(e),a=this.classSimilarity(e),l=this.styleSimilarity(e),u=this.innerTextSimilarity(e),d=this.innerFeaturesSimilarity(e),f=this.visualVicinitySimilarity(e),h=this.structuralVicinitySimilarity(e),p=this.svgsSimilarity(e),v={tagScore:t,attributesScore:i,classesScore:a,styleScore:l,innerTextScore:u,innerFeaturesScore:d,visualVicinityScore:f,structuralVicinityScore:h,svgsScore:p},y={tagScore:Le.weight(Le.get().tagName.decisionWeight)*t,attributesScore:Le.weight(Le.get().attributes.decisionWeight)*i,classesScore:Le.weight(Le.get().classes.decisionWeight)*a,innerTextScore:Le.weight(Le.get().innerText.decisionWeight)*u,innerFeaturesScore:Le.weight(Le.get().innerFeatures.decisionWeight)*d,styleScore:Le.weight(Le.get().style.decisionWeight)*l,visualVicinityScore:Le.weight(Le.get().visualVicinity.decisionWeight)*f,structuralVicinityScore:Le.weight(Le.get().structuralVicinity.decisionWeight)*h};return{score:Object.values(y).reduce((M,b)=>M+b,0),scores:v}},"rank");this.targetElementESRAMetadata=e,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}static{o(this,"ESRASimilarity")}getQualifiedAttributes(){return this.qualifiedAttributes}getQualifiedClasses(){return this.qualifiedClasses}getQualifiedInnerText(){return this.qualifiedInnerText}setQualifiedAttributes(){let e=this.targetElementESRAMetadata.attributes,{qualifiedAttributes:t,qualifiedAttributesMap:i}=this.makeQualifiedAttributes(e);this.qualifiedAttributes=t,this.qualifiedAttributesMap=i}makeQualifiedAttributes(e,t){let i=Object.keys(e).filter(l=>{switch(t){case"input":if(l==="value")return!1;break}let u=e[l];for(let d in u)d.endsWith("Uniqenuess")&&(u[d.replace("Uniqenuess","Uniqueness")]=u[d]);return u.globalUniqueness>Le.get().attributes.qualification.globalUniquenessThreshold||u.tagUniqueness>Le.get().attributes.qualification.tagUniquenessThreshold}),a=i.reduce((l,u)=>(l[u]=e[u].value,l),{});return{qualifiedAttributes:i,qualifiedAttributesMap:a}}setQualifiedClasses(){this.qualifiedClasses=this.makeQualifiedClasses(this.targetElementESRAMetadata.classes),this.unqualifiedClasses=Object.keys(this.targetElementESRAMetadata.classes).filter(e=>!this.qualifiedClasses.includes(e))}isValidClass(e){return/^[A-Za-z_-][0-9A-Za-z_-]*$/.test(e)}makeQualifiedClasses(e){return Object.keys(e).filter(t=>{let i=e[t];return!this.isValidClass(t)||t.startsWith("jss")||t.startsWith("css-")||t===":hover"?!1:i.globalUniqueness>Le.get().classes.qualification.globalUniquenessThreshold||i.tagUniqueness>Le.get().classes.qualification.tagUniquenessThreshold})}setQualifiedInnerText(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}makeQualifiedInnerText(e){return e&&e.content?.length<=Le.get().innerText.qualification.maxLength&&e.content?.length>=Le.get().innerText.qualification.minLength?e:null}makeBasicElementPropertiesComparable(e){return e.reduce((t,i)=>{let a=i.position?`${i.tag}.${i.position.slice(0,2).join(",")}`:i.tag,l=`${a}+${i.relativePosition}`,u=this.makeQualifiedClasses(i.classes).map(p=>`${a}.${p}`),d=[];this.makeQualifiedAttributes(i.attributes).qualifiedAttributes.forEach(p=>{d.push(`${a}[${p}]`),d.push(`${a}[${p}]=${i.attributes[p].value}`)});let f=i.feature?this.makeInnerFeaturesComparable([i.feature],{customTag:a,includeTag:!1,featureTypeWhiteList:[6]}):[],h=[...t,a,l,...u,...d,...f];return i.text&&(h.push(`${a}<>`),h.push(`${a}<${i.text}>`)),i.distance&&(h.push(`${a}->${i.distance}`),h.push(`${a}->[]${this.getDistanceRange(i.distance)}`)),h},[])}getDistanceRange(e){let t=[10,20,30,40,50,60,70,80,90,100];for(let i of t)if(e<i)return i;return t[t.length-1]}setVisualVicinityComparable(){this.visualVicinityComparable=this.makeVisualVicinityComparable(this.targetElementESRAMetadata.visualVicinity)}makeVisualVicinityComparable(e){return this.makeBasicElementPropertiesComparable(e)}setStructuralVicinityComparable(){this.structuralVicinityComparable=this.makeStructuralVicinityComparable(this.targetElementESRAMetadata.structuralVicinity)}makeStructuralVicinityComparable(e){return this.makeBasicElementPropertiesComparable(e)}makeInnerFeaturesComparable(e,{customTag:t=void 0,includeTag:i=!0,featureTypeWhiteList:a=void 0}={}){return e.reduce((l,u)=>{if(a&&!a.includes(u.type)||u.isHidden)return l;let d=t??u.tag,f=i?[...l,d]:l;switch(u.type){case 3:f.push(`${d}[type=${u.buttonType}]`);break;case 4:u.inputType&&f.push(`${d}[type=${u.inputType}]`),u.placeholder&&f.push(`${d}[placeholder=${u.placeholder}]`);break;case 6:u.components.forEach(h=>{let p=[];for(let v in h.attributes)p.push(`[${v}=${h.attributes[v]}]`);f.push(`${d}${p.join("")}`)});break}return"text"in u&&u.text&&(f.push(`${d}<>`),f.push(`${d}<${u.text}>`)),f},[])}setInnerFeaturesComparable(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}isDealBreaker(e){if(this.targetElementESRAMetadata.tag==="input"&&e.tag==="input"){let t=o(l=>l.type?l.type.value:"text","getType"),i=t(this.targetElementESRAMetadata.attributes),a=t(e.attributes);if(i!==a)return!0}return!1}tagSimilarity(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}attributesSimilarity(e){let t=o(a=>[...this.keyValueObjectToArray(a),...Object.keys(a)],"makeJaccardParam"),{qualifiedAttributesMap:i}=this.makeQualifiedAttributes(e.attributes);return this.jaccard(t(this.qualifiedAttributesMap),t(i))}indicativeAttributesSimilarity(e){return this.qualifiedAttributesMap.placehoder&&e.attributes.placehoder&&this.qualifiedAttributesMap.placehoder===e.attributes.placehoder.value?1:0}classSimilarity(e){return this.jaccard(this.qualifiedClasses,this.makeQualifiedClasses(e.classes))}innerTextSimilarity(e){if(!this.targetElementESRAMetadata.innerText&&!e.innerText)return 1;let t=this.makeQualifiedInnerText(e.innerText);if(!this.qualifiedInnerText||!t)return 0;if(this.qualifiedInnerText.content===t.content)return 1;Object.values({email:/^[^\s@]+@[^\s@]+\.[^\s@]+$/,url:/^(http|https):\/\/[^ "]+$/}).forEach(l=>{if(l.test(this.qualifiedInnerText.content)&&l.test(t.content))return .5});try{return new Date(this.qualifiedInnerText.content),new Date(t.content),.5}catch{}let a=o(l=>l.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s"),"template");return a(this.qualifiedInnerText.content)===a(t.content)?.5:0}innerFeaturesSimilarity(e){return this.jaccard(this.innerFeaturesComparable,this.makeInnerFeaturesComparable(e.innerFeatures))}visualVicinitySimilarity(e){return this.jaccard(this.visualVicinityComparable,this.makeVisualVicinityComparable(e.visualVicinity))}structuralVicinitySimilarity(e){return this.jaccard(this.structuralVicinityComparable,this.makeStructuralVicinityComparable(e.structuralVicinity))}styleSimilarity(e){let t=o(l=>[...this.keyValueObjectToArray(l),...Object.keys(l)],"makeJaccardParam"),i=this.jaccard(t(this.targetElementESRAMetadata.style.inline??{}),t(e.style.inline??{})),a=this.jaccard(t(this.targetElementESRAMetadata.style.computed??{}),t(e.style.computed??{}));return i*Le.get().style.inlineWeight+a*Le.get().style.computedWeight}svgsSimilarity(e){return!this.targetElementESRAMetadata.svgs&&!e.svgs||this.targetElementESRAMetadata.svgs&&e.svgs&&JSON.stringify(this.targetElementESRAMetadata.svgs)===JSON.stringify(e.svgs)?1:0}keyValueObjectToArray(e,t="=",i=void 0){let a=o(l=>i?i(e,l):e[l],"getValue");return Object.keys(e).map(l=>`${l}${t}${a(l)}`)}jaccard(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,yh.jaccard)(e,t)}};var tr=class n{constructor(e,t){this.POSITIONING_SATISFACTORY_SCORE=1;this.targetElementStaticData={};this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.candidateQueries=[];this.candidates=[];this.uniqueCandidates=[];this.queryCandidates=[];this.interactableCandidates=[];this.rankedCandidates=[];this.filteredAndSortedRankedCandidates=[];this.finalCandidates=[];this.weightsSum=0;this.config={innerText:{dropIfMoreThanNCandidates:5},innerFeatures:{mandatoryPercentage:.6,mandatoryMax:6},results:{scorePercentile:.75,epsilon:.01}};this.getSelectionResultForCandidate=o(e=>{let t=pt.getInstance("getElementSelectionResult",{log:!1}),i=t.get();if(i||(i=new Map,t.set(i)),i.has(e))return i.get(e);this.checkTimeout();let a=this.extractMetadata(e),{score:l,scores:u}=this.similarity.rank(a),d={score:l,candidate:e,scores:u,esraMetadata:a};return i.set(e,d),t.set(i),d},"getSelectionResultForCandidate");this.targetElementESRAMetadata=e,this.targetElementStaticData=t||e.staticMetadata,this.similarity=new mo(this.targetElementESRAMetadata),this.esraMetadataExtractor=new lt(document)}static{o(this,"ESRASelector")}makeWeight(e){return this.weightsSum+=e,e}getWeight(e){return e/this.weightsSum}extractMetadata(e){return new fo(this.esraMetadataExtractor.extract(e).toMetadata())}getLastSelectionLogs(e=5){if(!this.candidates?.length)return{};let t=new XMLSerializer,i=o((u,d=50)=>u.slice(0,d).map(f=>({score:f.score,metadata:f.metadata,element:t.serializeToString(f.candidate).substring(0,200)})),"printCandidates"),a=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,e)].score,l=o(u=>i(u,e).filter(d=>d.score>=a),"filterByScore");return{candidatesQuery:this.candidateQueries.filter(u=>!!u.length).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:i(this.rankedCandidates,e),topRemovedCandidates:{hidden:l(this.removedCandidates.hidden),staticData:l(this.removedCandidates.static)}}}selectByPositioning(){let e=this.targetElementESRAMetadata.positioning;if(window.innerWidth!==e.viewport.size.width||window.innerHeight!==e.viewport.size.height)return;let t=document.elementFromPoint(e.viewport.element.left*window.innerWidth,e.viewport.element.top*window.innerHeight),i=this.extractMetadata(t),{score:a}=this.similarity.rank(i);return a>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:a,esraMetadata:i}:void 0}collectCandidates(){this.setQualifiedAttributesQueries(),this.setQualifiedClassesQueries(),this.setInnerFeaturesQueries(),this.candidates=[];let e=this.candidateQueries.filter(t=>!!t.length).join(",");this.queryCandidates=[],e.length&&(this.queryCandidates=we(e)),this.interactableCandidates=[],this.elementsFiltering!==0&&(this.interactableCandidates=Bt())}select(){console.log("selecting elements, filtering: ",ri[this.elementsFiltering]);let e=o(l=>{switch(l){case 0:return this.queryCandidates;case 1:return this.intersectElements(this.queryCandidates,this.interactableCandidates);case 2:return this.interactableCandidates;case 3:return this.queryCandidates.concat(this.interactableCandidates)}},"filterElements");for(;this.candidates=e(this.elementsFiltering),!(this.candidates.length||this.elementsFiltering===3);)console.log(`no candidates found, expanding selection to ${ri[this.elementsFiltering+1]}`),this.elementsFiltering++;console.log("# of query/interactable/total candidates:",this.queryCandidates.length,this.interactableCandidates.length,this.candidates.length),this.candidates.push(...this.getInnerTextCandidates()),this.candidates.length||this.candidates.push(...this.getTagCandidates()),this.uniqueCandidates=this.candidates.filter((l,u,d)=>d.indexOf(l)===u);let t=n.limitChildren;t?.length&&(t=t.map(l=>({...l,parent:document.querySelector(l.selector)})),this.uniqueCandidates=this.uniqueCandidates.filter(l=>{for(var u of t)if(u.parent&&this.isDescendant(u.parent,l)&&u.limit--<=0)return!1;return!0})),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter(l=>l instanceof Er(l).HTMLElement||l instanceof Er(l).SVGElement).map(this.getSelectionResultForCandidate).sort((l,u)=>u.score-l.score),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter(l=>{let{isHidden:u,clickOffset:d}=this.isHidden(l.candidate);return u===!0?(this.removedCandidates.hidden.push(l),!1):(d&&(l.clickOffset=d),bs(this.targetElementStaticData)&&!Bd(this.formatStaticCandidates(l.esraMetadata.staticCandidates),this.targetElementStaticData)?(l.metadata=JSON.stringify(l.esraMetadata.staticCandidates),this.removedCandidates.static.push(l),!1):!0)}),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((l,u,d)=>{l.candidate.tagName==="INPUT"&&this.filteredAndSortedRankedCandidates.find(f=>f.score>.1&&f.candidate.contains(l.candidate))&&(this.removedCandidates.hidden.splice(d.length-1-u,1),this.filteredAndSortedRankedCandidates.push(l))}),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((l,u)=>u.score-l.score);let i=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];let a=null;for(let l=0;l<this.filteredAndSortedRankedCandidates.length;++l){let u=this.filteredAndSortedRankedCandidates[l];if(l>=i&&(!a||a.score-u.score>this.config.results.epsilon))break;a=u,this.finalCandidates.push(u)}return this.finalCandidates}intersectElements(e,t){let i=o((d,{useElementSize:f=!1}={})=>{let h=new Set;return d.forEach(p=>{let v=2,y=p;for(;y&&v-- >0&&(h.add(y),!(f&&Math.abs(y.parentElement.clientWidth-y.clientWidth)>y.clientWidth*.3&&Math.abs(y.parentElement.clientHeight-y.clientHeight)>y.clientHeight*.3));)y=y.parentElement}),h},"normalize"),a=i(e),l=i(t),u=new Set;return a.forEach(d=>{l.has(d)&&u.add(d)}),Array.from(u)}checkTimeout(){if(n.timeout&&Date.now()-this.processStartTime>n.timeout)throw new po}selectOne({elementsFiltering:e=1,minSelectionScore:t=.3}={}){try{if(this.elementsFiltering=e,this.processStartTime=Date.now(),this.targetElementESRAMetadata.tag==="html"){let a=document.querySelector("html");return{candidate:a,score:1,esraMetadata:this.extractMetadata(a)}}let i=this.selectByPositioning();if(i)return console.log("Found element by positioning"),i;for(this.collectCandidates();;){let a=this.select();if(!a.length)break;let{score:l}=a[0];if(l<t&&this.elementsFiltering!==3){this.elementsFiltering++,console.log(`Best matching element is below threshold (${l}/${t}), expanding selection to ${ri[this.elementsFiltering]}`);continue}return a[0]}}catch(i){i instanceof po?console.error("ESRA selection timeout"):console.error("ESRA selection error",i)}return{candidate:void 0,score:0,esraMetadata:void 0}}getFinalCandidates(){return this.finalCandidates}setQualifiedAttributesQueries(){this.candidateQueries.push(this.similarity.getQualifiedAttributes().map(e=>`[${e}="${this.targetElementESRAMetadata.attributes[e].value}"]`).join(","))}setQualifiedClassesQueries(){this.candidateQueries.push(this.similarity.getQualifiedClasses().map(e=>`.${e}`).join(","))}setInnerFeaturesQueries(){let e=this.targetElementESRAMetadata.innerFeatures.filter(l=>!l.isRoot);e.length>10&&(e=Object.values(e.reduce((l,u)=>{let d=`${u.type}_${u.tag}`;return l[d]?l:{...l,[d]:u}},{})));let t=Math.min(Math.ceil(e.length*this.config.innerFeatures.mandatoryPercentage),this.config.innerFeatures.mandatoryMax);o(l=>l.reduce((u,d)=>{let f=u.map(h=>[...h,d]).filter(h=>h.length<=t);return u.concat(f)},[[]]),"combinations")(e).filter(l=>l.length===t).forEach(l=>{let u=[];l.forEach(f=>u.push(this.getFeatureSelector(f))),this.cartesian(u).forEach(f=>this.candidateQueries.push("*"+f.map(h=>`:has(${h})`).join("")))})}cartesian(e){if(!e.length)return[];var t=[],i=e.length-1;function a(l,u){for(var d=0,f=e[u].length;d<f;d++){var h=l.slice(0);h.push(e[u][d]),u===i?t.push(h):a(h,u+1)}}return o(a,"helper"),a([],0),t}getFeatureSelector(e){let t=[e.tag];switch(e.type){case 0:e.src&&t.push(`${e.tag}[src="${e.src}"]`);break;case 2:t.push(`${e.tag}[href="${e.href}"]`);break;case 3:break;case 4:t.push(`${e.tag}[type="${e.inputType}"]`),e.placeholder&&t.push(`${e.tag}[placeholder="${e.placeholder}"]`);break}return t}getInnerTextCandidates(){let e=this.similarity.getQualifiedInnerText();if(!e)return[];let t=Ud(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}getTagCandidates(){return we(this.targetElementESRAMetadata.tag)}isDescendant(e,t){return e.contains(t)}formatStaticCandidates(e){let t={};return Object.keys(e).forEach(i=>{t[i]=e[i]}),t}isHidden(e){return rt(e,{useCache:!0})}},po=class extends Error{static{o(this,"ESRATimeoutError")}constructor(){super("ESRA selection timeout")}};var Eh=o(n=>{let e=o(l=>l&&(l instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(l.type||"")||l instanceof HTMLTextAreaElement)?!(l.disabled||l.readOnly):!1,"isEditableInputOrTextArea"),t=o((l,u)=>{n({key:l,eventTarget:u})},"sendKeyEvent"),i=o(l=>(l.ctrlKey?"ctrl ":"")+(l.altKey?"alt ":"")+(l.shiftKey?"shift ":"")+(l.metaKey?"meta ":"")+l.key,"formatKeyProperties"),a=o(l=>{try{if(e(l.target))return;t(i(l),l.target)}catch{}},"onKeyUp");window.addEventListener("keyup",l=>{a(l)})},"startKeyboardObserver");var go=class n{constructor(e=document,t){this.target=e;this.onEvent=t;this.monitoredTextElements=[];this.inputEnabledSelectors=["[contenteditable=true]"].join(",");this.iframeObservers=[];this.monitorInputEnabledElement=o(e=>{e.addEventListener("input",t=>{this.onEvent({text:t.target?.innerText,eventTarget:t.target})})},"monitorInputEnabledElement")}static{o(this,"ContendEditableObserver")}startObserver(){this.startIframesObserver(),this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(i=>{if(i.querySelector){let a=i.querySelector("iframe");a&&console.log("FFF",a)}if(i.nodeType===Node.ELEMENT_NODE&&i.nodeType===Node.ELEMENT_NODE){let a=i;a.matches(this.inputEnabledSelectors)||a.isContentEditable?this.monitorInputEnabledElement(a):Array.from(we("*",a)).filter(l=>l.matches&&l.matches(this.inputEnabledSelectors)||l.isContentEditable).forEach(this.monitorInputEnabledElement)}})})}),this.observer.observe(this.target,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),this.startInputMonitoring()}startIframesObserver(){setInterval(()=>{we("iframe",this.target).forEach(t=>{if(this.iframeObservers.find(u=>u.iframe===t))return;let i=o(u=>{if(u.iframe.contentWindow)try{u.observer=new n(u.iframe.contentWindow.document,this.onEvent),u.observer.startObserver()}catch{}},"observeIframe"),a=t,l={iframe:a,observer:null};this.iframeObservers.push(l),a.contentWindow?i(l):a.addEventListener("load",()=>{i(l)})})},500)}startInputMonitoring(){this.monitoredTextElements=we(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}};var vo=class{constructor(e){this.onEvent=e;this.onURLChange=o(()=>{setTimeout(()=>{let e=window.location.href;if(e!==this.currentURL){this.currentURL=e;try{this.onEvent({url:e})}catch{}}})},"onURLChange")}static{o(this,"URLObserver")}start(){window.addEventListener("popstate",i=>{this.onURLChange()}),window.addEventListener("locationchange",i=>{this.onURLChange()}),window.addEventListener("hashchange",i=>{this.onURLChange()});let e=window.history.pushState;window.history.pushState=(...i)=>(this.onURLChange(),e.apply(window.history,i));let t=window.history.replaceState;window.history.replaceState=(...i)=>(this.onURLChange(),t.apply(window.history,i))}};var yo=class{constructor(e){this.logNativeMutationObserver=!1;this.stopRRWebRecording=o(()=>{},"stopRRWebRecording");this.start=o(()=>{this.stopRRWebRecording=Zt({emit:this.eventHandler,sampling:{mousemove:!1},userTriggeredOnInput:!0}),this.logNativeMutationObserver&&this.selfObserve(),this.startURLObserver(),this.startKeyboardObserver(),this.startContentEditableObserver()},"start");this.stop=o(()=>{this.stopRRWebRecording()},"stop");this.startURLObserver=o(()=>{this.urlObserver=new vo(({url:e})=>{let t={url:e};this.addCustomEvent("url-change",t)}),this.urlObserver.start()},"startURLObserver");this.startContentEditableObserver=o(()=>{this.contentEditableObserver=new go(document,({text:e,eventTarget:t})=>{let i={text:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("contenteditable-input",i)}),this.contentEditableObserver.startObserver()},"startContentEditableObserver");this.startKeyboardObserver=o(()=>{Eh(({key:e,eventTarget:t})=>{let i={key:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("key-stroke",i)})},"startKeyboardObserver");this.addCustomEvent=o((e,t)=>{Zt.addCustomEvent(e,t)},"addCustomEvent");this.tryGetMetaFromEventTarget=o(e=>{try{return this.getMeta(e)}catch{}},"tryGetMetaFromEventTarget");this.selfObserve=o(()=>{let e=document.getElementsByTagName("body"),t={attributes:!0,childList:!0,subtree:!0},i=o((l,u)=>{for(let d of l)d.type==="childList"?console.log("A child node has been added or removed.",d):d.type==="attributes"&&console.log(`The ${d.attributeName} attribute was modified.`,d)},"callback");new MutationObserver(i).observe(e[0],t)},"selfObserve");this.getNodeById=o(e=>Zt.mirror.getNode(e),"getNodeById");this.getMeta=o(e=>Zt.mirror.getMeta(e),"getMeta");this.eventHandler=e,this.currentURL=window.location.href}static{o(this,"SessionRecorder")}};var bh=["aria-label","aria-labelledby","label","title","alt"];function wh(n){return n._debugSource?.fileName?n._debugSource?.fileName:""}o(wh,"getComponentpath");function Sh(n,e){if(n==="Unknown"||typeof n!="string"||n[0]!==n[0].toUpperCase()||e.type.$$typeof===Symbol.for("react.context")||e.type.$$typeof===Symbol.for("react.forward_ref")||e.type.$$typeof===Symbol.for("react.memo")||e.type.$$typeof===Symbol.for("react.profiler")||e.type.$$typeof===Symbol.for("react.suspense"))return!1;let t=wh(e);return!(/.*\/node_modules\//.test(t)||n===t||/^(?!.*src).*$/.test(t))}o(Sh,"isComponentAllowed");function tc(n,e={}){if(!n)return["",{}];let t=n.type,i=t?t.name||t:"Unknown",a="";if(Sh(i,n)){a+=`<${i}>`;let l=wh(n);e[i]=l}if(n.child){let[l,u]=tc(n.child,e);a+=l,e={...e,...u}}if(Sh(i,n)&&(a+=`</${i}>`),n.sibling){let[l,u]=tc(n.sibling,e);a+=l,e={...e,...u}}return[a,e]}o(tc,"traverseReactTree");function Mh(n){let e=n._reactRootContainer?._internalRoot.current;return e||console.log("No react tree in element",n),tc(e)}o(Mh,"getReactTree");var xi=class n{static{o(this,"FrontendLogger")}static{this.original={}}static setPrefix(e){["log","warn","error"].forEach(t=>{n.original[t]||(n.original[t]=console[t]),console[t]=(...i)=>{i.unshift(e),n.original[t].apply(console,i)}})}};var Eo=class{constructor(e=a=>a.map(l=>l.target),t={childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},i={collectElement:!0}){this.filterElements=e;this.observeOptions=t;this.options=i;this.mutationEventListeners=[]}static{o(this,"MutationDetector")}addEventListener(e,t){this.mutationEventListeners.push({selector:e,listener:t})}startListening(){this.elements=[],this.observer=new MutationObserver(e=>{this.options.collectElement&&(this.elements=[...this.elements,...this.filterElements(e)]),this.mutationEventListeners.length&&e.forEach(t=>{t.addedNodes.forEach(i=>{if(i.nodeType!==Node.ELEMENT_NODE)return;let a=i;this.mutationEventListeners.forEach(l=>{a.matches(l.selector)?l.listener(a):a.querySelectorAll(l.selector).forEach(u=>{l.listener(u)})})})})}),this.observer.observe(document.body,this.observeOptions)}stopListening(){return this.observer.disconnect(),this.elements}};function xh(n){let e=n.filter(i=>i.addedNodes.length>0).reduce((i,a)=>[...i,...a.addedNodes],[]),t=n.filter(i=>i.type==="attributes"&&i.attributeName==="style"&&i.target instanceof HTMLElement&&/display\s*:\s*none/.test(i.oldValue)&&ys(i.target).visible).map(i=>i.target);return[...e,...t]}o(xh,"poppingElementsFilter");var kr;function Th(n){kr=!1;let e=Ih(n);return kr?e:null}o(Th,"getElementCaptionKey");var Ih=o(n=>{let e=o(l=>{if(!(l.tagName.toLowerCase()in gs))return l.tagName.toLowerCase();let u=gs[l.tagName.toLowerCase()].map(d=>`${d}:${l.getAttribute(d)}`).join(",");return u?(kr=!0,`SVG:${u}`):l.tagName.toLowerCase()},"getSVGKey"),t=o(l=>{kr=!0;let u=i(l);return`IMG:${l.src}`+(u!==l.tagName.toLowerCase()?`(${u})`:"")},"getIMGKey"),i=o(l=>{let u=window.getComputedStyle(l).backgroundImage;if(u&&u!=="none"){let d=u.match(/url\("(.+)"\)/);if(d)return kr=!0,`BGIMG:${l.tagName.toLowerCase()+d[1]}`}for(let d of["::before","::after"]){let f=window.getComputedStyle(l,d).content.replace(/['"]/g,""),h=window.getComputedStyle(l,d).fontFamily;if(f!=="none"&&f!==""){kr=!0;let p=f.charCodeAt(0).toString(16).padStart(4,"0");return`FONT:${l.tagName.toLowerCase()+h+p}`}}return l.tagName.toLowerCase()},"getElementKey");if(!n||n.nodeType===Node.TEXT_NODE||!n.tagName)return;let a=n instanceof SVGElement?e(n):n instanceof HTMLImageElement?t(n):i(n);if(n.childNodes.length>0){let l=Array.from(n.childNodes).map(Ih).filter(Boolean).join("+");l&&l.length>0&&(a+="("+l+")")}return a},"walk");function tM(n,e){let t=new Set;for(;n;)t.add(n),n=n.parentNode;for(;e;){if(t.has(e))return e;e=e.parentNode}return null}o(tM,"findCommonAncestor");function nc(n,e){let t=tM(n,e),i=0,a;if(!t)return 99999;for(a=n;a&&a!==t;)i++,a=a.parentNode;for(a=e;a&&a!==t;)i++,a=a.parentNode;return i}o(nc,"distanceBetweenNodes");var rc=class{constructor(){this.lastHighlights=[]}static{o(this,"ElementHighlighter")}clearHighlights(){this.lastHighlights.length&&(this.lastHighlights.forEach(e=>e.remove()),this.lastHighlights=[])}highlightElement(e,{highlightStyle:t={},textStyle:i={},mousePosition:a,text:l,textType:u="static",textPosition:d="overlap",textWidthType:f="rect",clear:h=!0,shouldFlipHighlightTextOutsideViewport:p=!0,pointerEvents:v,classNames:y=[]}={}){if(h&&this.clearHighlights(),!e)return;let w=e.ownerDocument,M=Qa(e),b=e.getBoundingClientRect(),R=w.createElement("div");if(R.style.outline="2px dashed rgba(255,0,0,.75)",R.style.position=M?"fixed":"absolute",R.style.left=b.left+"px",R.style.top=b.top+"px",R.style.width=b.right-b.left+"px",R.style.height=b.bottom-b.top+"px",R.style.pointerEvents=v??"none",R.style.zIndex="2147483647",R.className=["checksum-dom-cache-ignore",...y].join(" "),this.mergeStyle(R,t),a){let C=w.createElement("div");if(C.style.position="absolute",C.style.left=+a.x-16+"px",C.style.top=+a.y-16+"px",C.style.color="#004DFF",C.className=["checksum-dom-cache-ignore","mouse-cross",...y].join(" "),C.style.zIndex="2147483648",!w.head.querySelector("style[role=mouse-location]")){var T=w.head.appendChild(w.createElement("style"));T.setAttribute("role","mouse-location"),T.innerHTML=".mouse-cross:before, .mouse-cross:after {position: absolute;left: 15px;content: ' ';height: 33px;width: 3px;background-color: #004DFF;}.mouse-cross:before {transform: rotate(0deg);}.mouse-cross:after {transform: rotate(-90deg);}"}w.body.appendChild(C),this.lastHighlights.push(C)}let _=w.createElement("div");l&&(_.className=["checksum-dom-cache-ignore",...y].join(" "),_.innerText=l,_.style.fontSize="12px",_.style.width=f==="rect"?`${b.width}px`:"auto",_.style.background="#000000a1",_.style.color="white",_.style.padding="5px",_.style.position="absolute",_.style.pointerEvents="none",_.style.userSelect="none",d==="above"?_.style.bottom=`${b.height}px`:d==="below"&&(_.style.top=`${b.height}px`),this.mergeStyle(_,i),R.appendChild(_),R.style.pointerEvents=v??"none",u==="hover"&&(_.style.display="none",R.addEventListener("mouseover",()=>{_.style.display="block"}),R.addEventListener("mouseout",()=>{_.style.display="none"}))),w.body.appendChild(R),d==="above"&&Xa(_)>0?(_.style.bottom="initial",_.style.top=`${b.height}px`):d==="below"&&Za(_)>0&&(_.style.top="initial",_.style.bottom=`${b.height}px`),this.lastHighlights.push(R),p&&this.flipHighlightTextPositionOutsideViewport(_,d,b.height)}mergeStyle(e,t){for(let i in t)e.style[i]=t[i]}flipHighlightTextPositionOutsideViewport(e,t,i){t==="above"&&Xa(e)>0?(e.style.bottom="initial",e.style.top=`${i}px`):t==="below"&&Za(e)>0&&(e.style.top="initial",e.style.bottom=`${i}px`)}},Nn=new rc;var bo=class{constructor(e,t){this.rawDbName=e;this.storeName=t;this.db=null}static{o(this,"IndexedDBClient")}getDBName(){if(!this._dbName){if(!window.name){let e=window.sessionStorage.getItem("nextTabIndex")??"0";window.name=e,window.sessionStorage.setItem("nextTabIndex",`${parseInt(e)+1}`)}this._dbName=`${this.rawDbName}-${window.name}`}return this._dbName}open(e=1){return new Promise((t,i)=>{let a=indexedDB.open(this.getDBName(),e);a.onupgradeneeded=l=>{this.db=a.result,this.db.objectStoreNames.contains(this.storeName)||this.db.createObjectStore(this.storeName)},a.onsuccess=l=>{this.db=a.result,t(this.db)},a.onerror=l=>{console.log("IndexedDBClient.open() error",l,a.error),i(a.error)}})}count(){return new Promise((e,t)=>{if(!this.db){t("Database has not been initialized");return}let l=this.db.transaction([this.storeName]).objectStore(this.storeName).count();l.onsuccess=()=>e(l.result),l.onerror=()=>t(l.error)})}set(e,t){return new Promise((i,a)=>{if(!this.db){a("Database has not been initialized");return}let d=this.db.transaction([this.storeName],"readwrite").objectStore(this.storeName).add(e,t);d.onsuccess=()=>i(),d.onerror=()=>a(d.error)})}get(e,t,i){return new Promise((a,l)=>{if(!this.db){l("Database has not been initialized");return}let d=this.db.transaction([this.storeName]).objectStore(this.storeName),f=e?d.getAll(t,i):d.get(t);f.onsuccess=()=>a(f.result),f.onerror=()=>l(f.error)})}getOne(e){return this.get(!1,e)}getAll(e,t){return this.get(!0,e,t)}};var ic=class{constructor(){this.initialized=!1;this.rrwebEventsLoaded=!1;this.loadRRwebEvents=[];this.rrwebCrossFrameEventIdCounter=0}static{o(this,"RrwebEventsStorageManager")}async initRRwebEvents(){if(this.initialized){console.warn("[RrwebEventsStorageManager] initRRwebEvents called more than once");return}this.initialized=!0,this.rrwebEventsIndexedDB=new bo("checksum","rrwebEvents");try{await this.rrwebEventsIndexedDB.open()}catch{return}this.rrwebCrossFrameEventIdCounter=await this.rrwebEventsIndexedDB.count(),this.loadRRwebEvents.forEach(e=>{this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++)}),this.rrwebEventsLoaded=!0}onRRwebEvent(e){this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.set(e,this.rrwebCrossFrameEventIdCounter++):this.loadRRwebEvents.push(e)}isInitialized(){return this.initialized}getLastRRwebEventKey(){return this.rrwebCrossFrameEventIdCounter-1}async postRRwebEvents(e){if(!this.rrwebEventsLoaded)return[];let t=await this.rrwebEventsIndexedDB.getAll();return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async getRRwebEvents(e){return this.rrwebEventsLoaded?await this.rrwebEventsIndexedDB.getAll(IDBKeyRange.lowerBound(e)):[]}async getRRwebEvent(e){return this.rrwebEventsLoaded?this.rrwebEventsIndexedDB.getOne(e):null}},Ln=new ic;var nM="$checksum",So=class extends Dn{constructor(t={}){xi.setPrefix(nM);super();this.options={skipElementHighlighting:!1};this.testIdCounter=0;this.initialized=!1;this.elementSelector=new xt,this.options={...this.options,...t},this.htmlReducer=new Sr}static{o(this,"ChecksumTestGenerator")}init(t,i={},{sessionRecorder:a=!0}={},l={}){this.appSpecificRules=t,this.config=i,this.options={...this.options,...l},!this.initialized&&(this.initialized=!0,a&&(this.sessionMirror=new yo(u=>(Ln.onRRwebEvent(u),this.eventProcessor.processEvent(u))),Ln.initRRwebEvents()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),tr.limitChildren=this.appSpecificRules?.esraSelectionRules?.limitChildren??[],tr.timeout=this.config.esraTimeout,this.config.logPrefix?.length&&xi.setPrefix(this.config.logPrefix))}getElementSelector(){return this.elementSelector}getLastSelectionLogs(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}getBestMatchingElementSimilarityScore(t){return this.currentESRASelector=new tr(t),this.currentESRASelector.selectOne().score}async extractESRAMetadata(t){return new lt(document).extract(t).toMetadata()}async select(t,i){return await this.elementSelector.selector(t,i)}async getSelectionDataForSelector(t,i){try{let a=await this.elementSelector.selector(t,i);if(!a)return console.warn("could not find element for selector: "+t),null;let{locator:l}=await this.elementSelector.getSelectorAndLocator(a,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),u=await this.extractESRAMetadata(a);return{generatedLocator:l,esraMetadata:u,selector:t,parentFramesSelectors:i}}catch(a){console.log("getMetadataForSelector exception",a);return}}async getMatchingElementSelectionData(t,{minSelectionScore:i,cachedSelector:a,staticMetadata:l}={minSelectionScore:.3},u=!1){try{let d,f,h;if(a&&(console.log("Trying to locate using cached selector",a),d=await this.elementSelector.selector(a)),!d){console.log("Trying to locate using ESRA",t),bs(l)&&console.log("and static data",l),this.currentESRASelector=new tr(t,l);let v=this.currentESRASelector.selectOne({minSelectionScore:i});v.score>=i?(d=v.candidate,f=v.score,h=v.clickOffset):console.log("Best matching element was below threshold",v)}if(console.log(d?[`Located with score ${f}`,d]:"Element not located"),!d)return;u&&new Kt(d).scrollIntoView(),this.highlightElement(d);let p=await this.makeMatchingElementSelectionData(d,f);return h&&(p.clickOffset=h),p}catch(d){console.log("getMatchingElementSelectionData exception",d);return}}getAllInteractableElementsForLastSelectQuery(){let t=this.currentESRASelector.getFinalCandidates();return Promise.all(t.map(async i=>({esraMetadata:i.esraMetadata,selectionData:await this.makeMatchingElementSelectionData(i.candidate,i.score)})))}async getInteractableElementsRaw(){return Bt()}async getInteractableElements(){let t=Bt(),i=new lt(document);return Promise.all(t.map(async a=>{let l=i.extract(a).toMetadata(),u=await this.makeMatchingElementSelectionData(a);return{esraMetadata:l,selectionData:u}}))}getCurrentESRASelector(){return this.currentESRASelector}startFlashingElementsDetection(){return this.htmlReducer.startFlashingElementsDetection()}async postRRwebEvents(t){return Ln.postRRwebEvents(t)}async getRRwebEvents(t){return Ln.getRRwebEvents(t)}async reduceHTML(t={},i={},a=document){let l=await this.htmlReducer.reduceHTML({...this.appSpecificRules,...t},i,a),u=Ln.isInitialized()?Ln.getLastRRwebEventKey():void 0;if(u){let d=await Ln.getRRwebEvent(u);d&&(l.lastRRwebEvent={key:u,timestamp:d.timestamp})}if(i.extractESRAForInterpretationRequiredElements){console.log("Extracting ESRA for interpretation required elements...");let d=this.htmlReducer.getInteractableElementsInReducedHTML();l.elementsForNodeInterpretation=d.reduce((f,{checksumId:h,element:p})=>{if(!(p instanceof HTMLElement)||p.innerText?.trim().length)return f;let y=new lt(document).extract(p).toMetadata();return[...f,{checksumId:h,esraMetadata:y}]},[]),console.log("Done with ESRA extraction for interpretation required elements")}return l}getMoreItemsForTemplate(t,i={}){return this.htmlReducer.getMoreElementsFromTemplate(t,{...this.appSpecificRules,...i})}displayInterpretationForElements(t){this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach(({checksumId:a,element:l})=>{let u=t[a];if(u){if(!l.isConnected){console.log(`Element ${a} is not connected to the DOM, skipping display`);return}this.highlightElement(l,{text:u,textType:"hover",clear:!1,textStyle:{width:"120px"}})}})}async overlayInteractableElementsWithChecksumId({reduceBeforeRender:t=!1,mode:i="full",textPosition:a=i==="tag"?"above":void 0,shouldFlipHighlightTextOutsideViewport:l=!0,scrollIntoView:u=!1}={}){this.clearHighlights(),t&&await this.reduceHTML();let d=o((h,p,v)=>{if(!p.isConnected){console.log(`Element ${h} is not connected to the DOM, skipping display`);return}let{width:y,height:w}=p.getBoundingClientRect();if(y<=0||w<=0)return;function M(T){switch(i){case"tag":return{background:T,width:"initial",left:"-2px",border:`3px dashed ${T}`,"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}o(M,"getTextStyleByMode");function b(T){let _=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return T?_[T%_.length]:"red"}o(b,"getColor");let R=b(v);this.highlightElement(p,{text:h,clear:!1,highlightStyle:{outline:i==="tag"?`3px dashed ${R}`:"none"},...a?{textPosition:a}:{},textStyle:M(R),shouldFlipHighlightTextOutsideViewport:l})},"overlayElement");this.htmlReducer.getInteractableElementsInReducedHTML().filter(h=>!rt(h.element,{...ll,scrollIntoView:u}).isHidden).forEach(({checksumId:h,element:p},v)=>{d(h,p,v)})}async getElementForChecksumId(t){return(await this.htmlReducer.getSelectorForChecksumId(t))?.element}async getSelectorForChecksumId(t){let i=await this.htmlReducer.getSelectorForChecksumId(t),{element:a,innerText:l,...u}=i;return u}hasInnerTextByChecksumId(t){return this.htmlReducer.hasInnerTextByChecksumId(t)}async getSelectorByPosition(t,i){let a=document.elementFromPoint(t,i),{selector:l,locator:u,parentFramesSelectors:d}=await this.elementSelector.getSelectorAndLocator(a);return{selector:l,locator:u,parentFramesSelectors:d}}isInput(t){let i=we(t);if(i.length)return["input","textarea"].includes(i[0].tagName.toLowerCase())}querySelectorExtended(t){return we(t)}getReactTree(t){return Mh(t)}isHidden(t,i){return rt(t,i)}showGrid(){this.removeGrid();let t=document.createElement("style");t.id="checksum_grid_style",t.innerHTML=`
31
+ .checksum_grid {
32
+ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");
33
+ background-repeat: repeat;
34
+ background-size: 20px;
35
+ background-position: 0px 0px;
36
+ position: absolute;
37
+ top: 0;
38
+ left: 0;
39
+ bottom: 0;
40
+ width: 100%;
41
+ height: 100%;
42
+ z-index: 1000;
43
+ }
44
+ `,document.body.prepend(t);let i=document.createElement("div");i.classList.add("checksum_grid"),document.body.prepend(i)}removeGrid(){let t=document.querySelector("#checksum_grid_style");t&&t.remove();let i=document.querySelector(".checksum_grid");i&&i.remove()}clearHighlights(){Nn.clearHighlights()}highlightElement(t,i={}){this.options.skipElementHighlighting||Nn.highlightElement(t,i)}async getInspectedElementSelectionResultByRRwebId(t,i={fromTimeMachine:!1}){let l=await(i.fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror).getNodeById(t);if(l)return await this.elementSelector.getSelectorAndLocator(l,{ignoredIframesSelectors:i.fromTimeMachine?[".replayer-wrapper > iframe"]:[]})}getNodeSelector(t){return new wr().getSelector(t)}startListeningForHTMLChanges(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Eo(xh),this.mutationDetector.startListening()}stopListeningForHTMLChanges(t){let i=this.mutationDetector.stopListening();switch(t){default:return i.map(a=>(a.innerText??a.textContent)?.trim())}}async recordScrollPosition(t){let i=await this.getElementForChecksumId(t);if(!i)return;let a=new Kt(i);a.getScrollableParentsPositions(),i._checksumScrollHelper=a}async restoreScrollPosition(t){let i=await this.getElementForChecksumId(t);!i||!("_checksumScrollHelper"in i)||(i._checksumScrollHelper.restore(),delete i._checksumScrollHelper)}async getElementCaptioningKeyForChecksumId(t){let i=this.htmlReducer.getElementForChecksumId(t);if(!i){console.warn(`Element with checksumId ${t} not found`);return}return Th(i)}determineClosestNode(t,i,a){return nc(t,a)-nc(i,a)}addForceIncludeElement(t,i){this.htmlReducer.addForceIncludeElement({element:t,checksumid:i})}shouldCaptionElement(t,{recursive:i}={recursive:!0}){let a=this.htmlReducer.getElementForChecksumId(t);if(!a)return!1;let l=bh,u=o(p=>{let v=p.parentElement;if(!v||v.nodeType!==Node.ELEMENT_NODE)return!1;let{width:y,height:w}=v.getBoundingClientRect(),{width:M,height:b}=p.getBoundingClientRect();return Math.abs(y-M)<15&&Math.abs(w-b)<15},"shouldCheckParent"),d=!1,f=a,h=o(()=>(d?f=f?.parentElement:d=!0,f),"getNextParent");for(;;){let p=h();if(l.some(v=>p.getAttribute(v))||p.querySelectorAll("[checksuminteractable]").length>0||l.filter(v=>p.querySelectorAll(`[${v}]`)).length===1)return!1;if(!i||!u(p))break}return!0}async makeMatchingElementSelectionData(t,i,a){try{let l=this.setAndGetTestId(t),u=this.getVisibleParent(t),d=this.setAndGetTestId(u),f=this.getElementAtCenterOfElement(t),h=this.setAndGetTestId(f),p={element:l,visibleElement:d===l?void 0:d,atPointElement:h===l||h===d?void 0:h},v=await this.elementSelector.getSelectorAndLocator(t,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),y=await this.elementSelector.getSelectorAndLocator(f,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),w=await this.elementSelector.getSelectorAndLocator(u,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),M={element:v?.selector,visibleElement:w?.selector,atPointElement:y?.selector},b={element:v?.parentFramesSelectors,visibleElement:w?.parentFramesSelectors,atPointElement:y?.parentFramesSelectors},R=o(G=>({tag:G.tagName.toLowerCase()}),"makeElementData"),T={element:R(t),visibleElement:p.visibleElement?R(u):void 0,atPointElement:p.atPointElement?R(f):void 0},_=o(async G=>G===t&&a?a:new lt(document).extract(G).toMetadata(),"makeESRAMetadata"),C={element:await _(t),visibleElement:p.visibleElement?await _(u):void 0,atPointElement:p.atPointElement?await _(f):void 0},F=v?.locator;return{testIds:p,selectors:M,parentFramesSelectors:b,elementData:T,score:i,esraMetadata:C,generatedLocator:F}}catch(l){return console.log("[makeMatchingElementSelectionData] exception",l),{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0}}}getElementAtCenterOfElement(t){let{x:i,y:a}=t.getBoundingClientRect(),l=t.ownerDocument.elementFromPoint(i,a);return l instanceof HTMLElement?l:void 0}setAndGetTestId(t){if(!t)return;let i=t.getAttribute("data-checksum-testid");if(i)return i;let a=(this.testIdCounter++).toString();return t.setAttribute("data-checksum-testid",a),a}getVisibleParent(t){return!(t instanceof HTMLElement)||t.offsetParent!==null?t:this.getVisibleParent(fn(t))}};var wo=class{static{o(this,"GoalTracker")}constructor(){this.goals={}}async init(){}recordGoalFinished(e){console.log(`Goal reached: ${e}`),this.goals[e]||(this.goals[e]=0),this.goals[e]+=1,window.checksumai?.capture("goal_reached",{goalName:e})}getGoals(){return this.goals}};var Mo=class extends Dn{constructor(){super({enableInteract:!0});this.shouldHandleEvents=!0}static{o(this,"TimeMachine")}setEventHandlers(t,i=!0){this.shouldHandleEvents=i,super.setEventHandlers(t)}async handleEvents(t,i){console.log("starting handleEvents",i);try{for(let a of t)await this.eventProcessor.processEvent(a,this.shouldHandleEvents),await this.skipEvents([a])}catch(a){console.error(a)}console.log("done handleEvents",i)}setShouldHandleEvents(t){this.shouldHandleEvents=t}goBack(t,i={}){return t?this.sessionReplayer.goBack(t,i):this.goLive()}getElementByRRwebId(t){return this.sessionReplayer.getNodeById(t)}goLive(){return this.sessionReplayer.goLive()}};var Ch=ni(oo());var xo=class{constructor(){this.esraExtractors=[];this.playwrightSelector=new xt}static{o(this,"TimeMachineElementSelection")}async getSelector(e,{extractPlaywrightSelector:t=!0,extractEsraMetadata:i=!0}={}){if(!e)return null;console.log("[SessionDigesterSelector] generating for node",e);let a={};if(i)try{console.log("extracting ESRA metadata...");let l=this.getESRAExtractor(e).extract(e);a.esraMetadata=l.toMetadata(),console.log("ESRA metadata extraction complete")}catch(l){console.error("Failed to extract ESRA metadata",l)}if(t){console.log("extracting playwright selector...");let{selector:l,locator:u,parentFramesSelectors:d}=await this.playwrightSelector.getSelectorAndLocator(e);a.playwrightSelector=l,a.playwrightLocator=u,a.playwrightParentFramesSelectors=d,console.log("Playwright selector extraction complete")}return a}getESRAExtractor(e){let t=e.ownerDocument;if(!t)throw console.warn("Node does not have an owner document",e),new Error("Node does not have an owner document");let i=this.esraExtractors.find(l=>l.isSameDocument(t));if(i)return i;let a=new lt(t);return this.esraExtractors.push(a),a}};var To=class n{static{o(this,"SequenceMatcher")}findSequence(e,t,i){for(let a=0;a<=e.length-t.length;a++){let l=this.findMatch(a,e,t,i);if(l!==null)return l}return null}findMatch(e,t,i,a){let l={},u=[];for(let d=0;d<i.length;d++){let f=t[e+d],h=i[d];if(!this.matchItem(h,f,l,a??f))return null;u.push(f)}return{items:u,token_values:l}}matchItem(e,t,i,a){if(Array.isArray(e)&&Array.isArray(t))return this.matchArray(e,t,i,a);if(typeof e=="object"&&e!==null&&typeof t=="object"&&t!==null){for(let l in e){let u=e[l],d=t[l];if(typeof u=="string"&&u.startsWith("$")){if(i[u]===void 0)i[u]={value:d,item:a};else if(i[u].value!==d)return!1}else if(typeof u=="object"&&u!==null){if(!this.matchItem(u,d,i,a))return!1}else if(u!==d)return!1}return!0}else return e===t}matchArray(e,t,i,a){for(let l=0;l<=t.length-e.length;l++){let u=t.slice(l,l+e.length),d=this.findSequence(u,e,a);if(d){for(let f in d.token_values)if(i[f]===void 0)i[f]={value:d.token_values[f].value,item:a};else if(i[f].value!==d.token_values[f].value)return!1;return!0}}return!1}runExample(){let e=[{x:"banana",id:"1gf3",class:"fruit",index:"3",details:{a:1,b:2,nested:{key:"value1"}},arr:[{a:3,b:2},{a:1,b:2}]},{y:"apple",id:"4gs2",class:"fruit",parentIndex:"3",index:"7",details:{a:1,b:2,nested:{key:"value1"}}}],t=[{class:"$1",index:"$2",details:{a:1,b:"$3",nested:{key:"$4"}},arr:[{a:1,b:"$5"}]},{class:"$1",parentIndex:"$2",details:{a:1,b:"$3",nested:{key:"$4"}}}],a=new n().findSequence(e,t);console.log(a)}};var Io=class extends _n{constructor(){super();this.events=[];this.interactions=[];this.lastInteractionEventIndex=0;this.sequences=[];this.sequenceMatcher=new To;this.inputFilter=void 0;this.clickFilter=void 0;this.releasePendingInputAction=o(()=>{clearTimeout(this.inputFilter.timeout),this.addInteraction(this.inputFilter.action),this.inputFilter=void 0},"releasePendingInputAction");this.releasePendingClickActions=o((t=!0)=>{clearTimeout(this.clickFilter.timeout),t&&this.clickFilter.actions.forEach(i=>this.addInteraction(i)),this.clickFilter=void 0},"releasePendingClickActions");this.dragAndDropSequence={events:[{type:$.IncrementalSnapshot,data:{source:U.MouseInteraction,type:ae.MouseDown}},{type:$.IncrementalSnapshot,data:{source:U.Mutation,adds:[{parentId:"$dropzoneId",node:{id:"$draggableId"}}],removes:[{id:"$draggableId"}]}}],handler:o(async({token_values:{$dropzoneId:t,$draggableId:i},items:a})=>{await this.sessionReplayer.goBack(i.item.timestamp);let l=i.value,u=await this.getNodeById(l);if(!u)return;let d=await this.elementSelector.getSelector(u);if(!d)return;await this.sessionReplayer.goBack(t.item.timestamp);let f=t.value,h=await this.getNodeById(f);if(!h)return;let p=await this.elementSelector.getSelector(h);if(p)return console.log("Drag and drop",d.playwrightLocator,p.playwrightLocator),[this.makePageAction("drag_and_drop",a[0],d,{dropTarget:{selector:p.playwrightSelector,locator:p.playwrightLocator,parentFramesSelectors:p.playwrightParentFramesSelectors,esraMetadata:p.esraMetadata}})]},"handler")};this.maxNumberOfGetNodeRetries=3;this.elementSelector=new xo,this.buildSequences()}static{o(this,"VisualTestGenerationTimeMachineEventHandlers")}setSessionReplayer(t){this.sessionReplayer=t}getInteractions(t=0){return this.interactions.slice(t)}preEvent(t){this.inputFilter&&this.isActionEvent(t)&&!this.isConsecutiveInputEvent(t)&&this.releasePendingInputAction(),this.clickFilter&&this.isActionEvent(t)&&!this.isConsecutiveClickEvent(t)&&this.releasePendingClickActions(),this.events.push(t)}async postEvent(t,i){try{await this.performSequenceSearch()}catch(a){console.error("performSequenceSearch",a)}}async handleInput(t,i,a=!1){if(this.inputFilter){this.inputFilter.action.fillValue=t.text,this.inputFilter.timeout=this.setInputWaitTimeout();return}if(!t.userTriggered)return;let l=await this.getNodeById(t.id);if(!l)return;let u=await this.elementSelector.getSelector(l);if(!u)return;let d=this.makePageAction(this.getInputEventCode(l,t),i,u);if(d.eventCode==="input"){d.fillValue=t.text,this.inputFilter={action:d,nodeId:t.id,contenteditable:a,timeout:this.setInputWaitTimeout()};return}d.eventCode==="upload_files"&&(d.files=[],d.files.push(t.text)),this.addInteraction(d)}isConsecutiveInputEvent(t){return this.inputFilter?this.inputFilter.contenteditable?t.type===$.Custom&&t.data.tag==="contenteditable-input"&&t.data.payload.id===this.inputFilter.nodeId:t.type===$.IncrementalSnapshot&&t.data.source===U.Input&&t.data.id===this.inputFilter.nodeId&&!!t.data.userTriggered:!1}setInputWaitTimeout(){return this.inputFilter?.timeout&&clearTimeout(this.inputFilter.timeout),setTimeout(this.releasePendingInputAction,1e3)}handleContentEditableInput(t,i){this.handleInput({userTriggered:!0,id:t.id,text:t.text,isChecked:!1,source:U.Input},i,!0)}handleKeyStroke(t,i){}async handleClick(t,i){if(t.x===void 0||t.y===void 0)return;let a=await this.getNodeById(t.id);if(!a)return;let l=await this.elementSelector.getSelector(a);if(!l)return;let u=this.makePageAction("click",i,l);if(this.clickFilter){this.clickFilter.actions.push(u);return}this.clickFilter={actions:[u],nodeId:t.id,timeout:this.setClickWaitTimeout()}}isConsecutiveClickEvent(t){return this.clickFilter?t.type===$.IncrementalSnapshot&&t.data.source===U.MouseInteraction&&t.data.type===ae.Click&&t.data.id===this.clickFilter.nodeId:!1}setClickWaitTimeout(){return this.clickFilter?.timeout&&clearTimeout(this.clickFilter.timeout),setTimeout(this.releasePendingClickActions,600)}async handleDblClick(t,i){if(t.x===void 0||t.y===void 0)return;let a=await this.getNodeById(t.id);if(!a)return;let l=await this.elementSelector.getSelector(a);if(!l)return;let u=this.makePageAction("double_click",i,l);this.addInteraction(u),this.releasePendingClickActions(!1)}buildSequences(){this.sequences.push(this.dragAndDropSequence)}async performSequenceSearch(){let t=this.events.slice(this.lastInteractionEventIndex);for(let i of this.sequences){let a=this.sequenceMatcher.findSequence(t,i.events);if(a){let l=await i.handler(a);l&&l.forEach(u=>this.addInteraction(u))}}await this.sessionReplayer.goLive()}isActionEvent(t){switch(t.type){case $.Meta:return!1;case $.IncrementalSnapshot:switch(t.data.source){case U.Input:return t.data.userTriggered;case U.MouseInteraction:case U.MouseMove:return!0;default:return!1}case $.Custom:switch(t.data.tag){case"contenteditable-input":return!0;default:return!1}default:return!1}}addInteraction(t){this.interactions.push(t),this.lastInteractionEventIndex=this.events.length}makePageAction(t,i,a,l={}){return{nodeId:this.interactions.length.toString(),eventCode:t,selector:a.playwrightSelector,locator:a.playwrightLocator,parentFramesSelectors:a.playwrightParentFramesSelectors,esraMetadata:a.esraMetadata,pageId:void 0,timestamp:i.timestamp,...l}}async getNodeById(t,{retriesLeft:i=this.maxNumberOfGetNodeRetries,useCompoundInteractableDetection:a=!0}={}){if(!i)return console.error("no node"),null;let l=this.sessionReplayer.getNodeById(t);return l?a?qn(l,[]):l:(await(0,Ch.default)(100*(this.maxNumberOfGetNodeRetries-i+1)),this.getNodeById(t,{retriesLeft:i-1,useCompoundInteractableDetection:a}))}getInputEventCode(t,i){switch(t.getAttribute("type")){case"file":return"upload_files";case"checkbox":case"radio":return i.isChecked?"check":"uncheck";case"text":default:return"input"}}};var Co=class n{constructor(e=document,t,i){this.rootDocument=e;this.defaultView=t;this.topLevelInspector=i;this.wasHoveredElementSelected=!1;this.selected=[];this.singleSelection=!0;this.subDocumentInspector=null;this.listening=!1;this.onMouseOver=o(async e=>{let t=e.composedPath()[0];if("getRootNode"in t){let d=t.getRootNode();if(d!==this.rootDocument){this.handleSubDocument(d,this.defaultView);return}}if(t instanceof this.defaultView.HTMLIFrameElement){this.handleSubDocument(t.contentDocument,t.contentDocument.defaultView);return}if(this.subDocumentInspector&&this.stopSubDocumentInspector(!0),!(t instanceof this.defaultView.Element)||t===this.hoveredElement||t.matches(".element-inspector-ignore"))return;Nn.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0});let{locator:i,selector:a,parentFramesSelectors:l}=await this.playwrightElementSelectorGenerator.getSelectorAndLocator(t);Nn.highlightElement(t,{text:i.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"]});let u=await this.playwrightElementSelectorGenerator.selector(a,l);u!==t&&Nn.highlightElement(u,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"]}),this.hoveredElement=t,this.hoveredElementSelection={locator:i,selector:a,parentFramesSelectors:l},this.wasHoveredElementSelected=!1,t.addEventListener("click",this.onClick,{capture:!0})},"onMouseOver");this.onClick=o(async e=>{e.stopPropagation(),e.preventDefault(),!this.wasHoveredElementSelected&&(this.wasHoveredElementSelected=!0,this.selected.push(this.hoveredElementSelection),this.singleSelection&&(this.topLevelInspector?this.topLevelInspector.stop():this.stop()),console.log("selected",this.selected))},"onClick");this.handleSubDocument=o((e,t)=>{if(this.subDocumentInspector){if(this.subDocumentInspector.rootDocument===e)return!0;this.stopSubDocumentInspector(!0)}return this.subDocumentInspector=new n(e,t,this.topLevelInspector??this),this.subDocumentInspector.start(this.singleSelection),!0},"handleSubDocument");this.stopSubDocumentInspector=o(e=>{this.subDocumentInspector&&(this.subDocumentInspector.stop(e),this.subDocumentInspector=null)},"stopSubDocumentInspector");this.playwrightElementSelectorGenerator=new xt,t||(this.defaultView=this.rootDocument.nodeType===Node.DOCUMENT_NODE?this.rootDocument.defaultView:window)}static{o(this,"ElementInspector")}start(e=!0){this.singleSelection=e,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.listening=!0}stop(e=!1){this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),Nn.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.hoveredElement=null,this.wasHoveredElementSelected=!1,this.rootDocument.removeEventListener("mouseover",this.onMouseOver),e&&this.cleanSelection())}cleanSelection(){this.subDocumentInspector&&this.subDocumentInspector.cleanSelection(),this.selected=[]}consumeSelections(){if(this.subDocumentInspector)return this.subDocumentInspector.consumeSelections();let e=this.selected;return this.cleanSelection(),e}};var Ro=class{constructor(e){this.timeMachine=e;this.lengthOfConsumedInteractions=0;this.eventHandlers=new Io}static{o(this,"VisualTestGenerator")}init(e=!0){this.timeMachine.setEventHandlers(this.eventHandlers,e)}consumeInteractions(){let e=this.eventHandlers.getInteractions(this.lengthOfConsumedInteractions);return this.lengthOfConsumedInteractions+=e.length,e}startInspector(e=!0,t){this.elementInspector=new Co(t??this.getRRwebReplayerDocument()),this.elementInspector.start(e)}getRRwebReplayerDocument(){return document.querySelector(".replayer-wrapper > iframe").contentDocument}stopInspector(){this.elementInspector.stop()}consumeSelections(){return this.elementInspector.consumeSelections()}};(function(){let n=Element.prototype.addEventListener;Element.prototype.addEventListener=function(e,t,i){n.call(this,e,t,i),this._checksum_eventListenerList||(this._checksum_eventListenerList={}),this._checksum_eventListenerList[e]||(this._checksum_eventListenerList[e]=[]),this._checksum_eventListenerList[e].push(t)}})();if(!window.checksum){let n=new So,e=new uo,t=new wo,i=new Mo,a=new Ro(i);window.checksum={testGenerator:n,sessionDigester:e,goalTracker:t,timeMachine:i,visualTestGenerator:a}}})();
45
+ /*! Bundled license information:
46
+
47
+ lodash/lodash.js:
48
+ (**
49
+ * @license
50
+ * Lodash <https://lodash.com/>
51
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
52
+ * Released under MIT license <https://lodash.com/license>
53
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
54
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
55
+ *)
56
+
57
+ rrweb/es/rrweb/ext/tslib/tslib.es6.js:
58
+ (*! *****************************************************************************
59
+ Copyright (c) Microsoft Corporation.
60
+
61
+ Permission to use, copy, modify, and/or distribute this software for any
62
+ purpose with or without fee is hereby granted.
63
+
64
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
65
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
66
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
67
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
68
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
69
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
70
+ PERFORMANCE OF THIS SOFTWARE.
71
+ ***************************************************************************** *)
72
+
73
+ rrweb/es/rrweb/_virtual/image-bitmap-data-url-worker.js:
74
+ (*! *****************************************************************************
75
+ Copyright (c) Microsoft Corporation.
76
+
77
+ Permission to use, copy, modify, and/or distribute this software for any
78
+ purpose with or without fee is hereby granted.
79
+
80
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
81
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
82
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
83
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
84
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
85
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
86
+ PERFORMANCE OF THIS SOFTWARE.
87
+ ***************************************************************************** *)
88
+
89
+ rrweb/es/rrweb/ext/@xstate/fsm/es/index.js:
90
+ (*! *****************************************************************************
91
+ Copyright (c) Microsoft Corporation.
92
+
93
+ Permission to use, copy, modify, and/or distribute this software for any
94
+ purpose with or without fee is hereby granted.
95
+
96
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
97
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
98
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
99
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
100
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
101
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
102
+ PERFORMANCE OF THIS SOFTWARE.
103
+ ***************************************************************************** *)
104
+ */