@checksum-ai/runtime 4.1.1-beta.2 → 4.1.1-beta.4
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/.env +1 -1
- package/checksumlib.js +42 -42
- package/cli.js +219 -216
- package/package.json +1 -1
package/checksumlib.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(()=>{var mR=Object.create;var qu=Object.defineProperty;var gR=Object.getOwnPropertyDescriptor;var yR=Object.getOwnPropertyNames;var bR=Object.getPrototypeOf,vR=Object.prototype.hasOwnProperty;var l=(n,e)=>qu(n,"name",{value:e,configurable:!0});var Jo=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var wR=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yR(e))!vR.call(n,i)&&i!==t&&qu(n,i,{get:()=>e[i],enumerable:!(r=gR(e,i))||r.enumerable});return n};var Yu=(n,e,t)=>(t=n!=null?mR(bR(n)):{},wR(e||!n||!n.__esModule?qu(t,"default",{value:n,enumerable:!0}):t,n));var Vg=Jo((wH,Ug)=>{Ug.exports=n=>new Promise(e=>setTimeout(e,n))});var Yg=Jo((ri,us)=>{(function(){var n,e="4.18.1",t=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",a="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,g=2,y=4,w=1,S=2,C=1,v=2,M=4,A=8,T=16,L=32,V=64,U=128,Z=256,W=512,G=30,re="...",B=800,j=16,k=1,Q=2,ee=3,q=1/0,ae=9007199254740991,rt=17976931348623157e292,De=NaN,Pe=4294967295,gn=Pe-1,$n=Pe>>>1,pe=[["ary",U],["bind",C],["bindKey",v],["curry",A],["curryRight",T],["flip",W],["partial",L],["partialRight",V],["rearg",Z]],st="[object Arguments]",mt="[object Array]",Nt="[object AsyncFunction]",gt="[object Boolean]",ct="[object Date]",Wi="[object DOMException]",xr="[object Error]",we="[object Function]",It="[object GeneratorFunction]",xe="[object Map]",Le="[object Number]",Vt="[object Null]",ge="[object Object]",Hn="[object Promise]",kE="[object Proxy]",Ui="[object RegExp]",Jt="[object Set]",Vi="[object String]",co="[object Symbol]",PE="[object Undefined]",zi="[object WeakMap]",FE="[object WeakSet]",Gi="[object ArrayBuffer]",Bn="[object DataView]",Mc="[object Float32Array]",Tc="[object Float64Array]",Ic="[object Int8Array]",Rc="[object Int16Array]",Ac="[object Int32Array]",Oc="[object Uint8Array]",_c="[object Uint8ClampedArray]",Lc="[object Uint16Array]",Nc="[object Uint32Array]",$E=/\b__p \+= '';/g,HE=/\b(__p \+=) '' \+/g,BE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,lp=/&(?:amp|lt|gt|quot|#39);/g,cp=/[&<>"']/g,WE=RegExp(lp.source),UE=RegExp(cp.source),VE=/<%-([\s\S]+?)%>/g,zE=/<%([\s\S]+?)%>/g,up=/<%=([\s\S]+?)%>/g,GE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jE=/^\w*$/,qE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dc=/[\\^$.*+?()[\]{}|]/g,YE=RegExp(Dc.source),kc=/^\s+/,KE=/\s/,XE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ZE=/\{\n\/\* \[wrapped with (.+)\] \*/,JE=/,? & /,QE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fp=/[()=,{}\[\]\/\s]/,eC=/\\(\\)?/g,tC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hp=/\w*$/,rC=/^[-+]0x[0-9a-f]+$/i,nC=/^0b[01]+$/i,iC=/^\[object .+?Constructor\]$/,sC=/^0o[0-7]+$/i,oC=/^(?:0|[1-9]\d*)$/,aC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,uo=/($^)/,lC=/['\n\r\u2028\u2029\\]/g,fo="\\ud800-\\udfff",cC="\\u0300-\\u036f",uC="\\ufe20-\\ufe2f",fC="\\u20d0-\\u20ff",dp=cC+uC+fC,pp="\\u2700-\\u27bf",mp="a-z\\xdf-\\xf6\\xf8-\\xff",hC="\\xac\\xb1\\xd7\\xf7",dC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pC="\\u2000-\\u206f",mC=" \\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",gp="A-Z\\xc0-\\xd6\\xd8-\\xde",yp="\\ufe0e\\ufe0f",bp=hC+dC+pC+mC,Pc="['\u2019]",gC="["+fo+"]",vp="["+bp+"]",ho="["+dp+"]",wp="\\d+",yC="["+pp+"]",Sp="["+mp+"]",Ep="[^"+fo+bp+wp+pp+mp+gp+"]",Fc="\\ud83c[\\udffb-\\udfff]",bC="(?:"+ho+"|"+Fc+")",Cp="[^"+fo+"]",$c="(?:\\ud83c[\\udde6-\\uddff]){2}",Hc="[\\ud800-\\udbff][\\udc00-\\udfff]",Wn="["+gp+"]",xp="\\u200d",Mp="(?:"+Sp+"|"+Ep+")",vC="(?:"+Wn+"|"+Ep+")",Tp="(?:"+Pc+"(?:d|ll|m|re|s|t|ve))?",Ip="(?:"+Pc+"(?:D|LL|M|RE|S|T|VE))?",Rp=bC+"?",Ap="["+yp+"]?",wC="(?:"+xp+"(?:"+[Cp,$c,Hc].join("|")+")"+Ap+Rp+")*",SC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",EC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Op=Ap+Rp+wC,CC="(?:"+[yC,$c,Hc].join("|")+")"+Op,xC="(?:"+[Cp+ho+"?",ho,$c,Hc,gC].join("|")+")",MC=RegExp(Pc,"g"),TC=RegExp(ho,"g"),Bc=RegExp(Fc+"(?="+Fc+")|"+xC+Op,"g"),IC=RegExp([Wn+"?"+Sp+"+"+Tp+"(?="+[vp,Wn,"$"].join("|")+")",vC+"+"+Ip+"(?="+[vp,Wn+Mp,"$"].join("|")+")",Wn+"?"+Mp+"+"+Tp,Wn+"+"+Ip,EC,SC,wp,CC].join("|"),"g"),RC=RegExp("["+xp+fo+dp+yp+"]"),AC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,OC=["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"],_C=-1,We={};We[Mc]=We[Tc]=We[Ic]=We[Rc]=We[Ac]=We[Oc]=We[_c]=We[Lc]=We[Nc]=!0,We[st]=We[mt]=We[Gi]=We[gt]=We[Bn]=We[ct]=We[xr]=We[we]=We[xe]=We[Le]=We[ge]=We[Ui]=We[Jt]=We[Vi]=We[zi]=!1;var Fe={};Fe[st]=Fe[mt]=Fe[Gi]=Fe[Bn]=Fe[gt]=Fe[ct]=Fe[Mc]=Fe[Tc]=Fe[Ic]=Fe[Rc]=Fe[Ac]=Fe[xe]=Fe[Le]=Fe[ge]=Fe[Ui]=Fe[Jt]=Fe[Vi]=Fe[co]=Fe[Oc]=Fe[_c]=Fe[Lc]=Fe[Nc]=!0,Fe[xr]=Fe[we]=Fe[zi]=!1;var LC={\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"},NC={"&":"&","<":"<",">":">",'"':""","'":"'"},DC={"&":"&","<":"<",">":">",""":'"',"'":"'"},kC={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},PC=parseFloat,FC=parseInt,_p=typeof global=="object"&&global&&global.Object===Object&&global,$C=typeof self=="object"&&self&&self.Object===Object&&self,ut=_p||$C||Function("return this")(),Wc=typeof ri=="object"&&ri&&!ri.nodeType&&ri,yn=Wc&&typeof us=="object"&&us&&!us.nodeType&&us,Lp=yn&&yn.exports===Wc,Uc=Lp&&_p.process,zt=function(){try{var O=yn&&yn.require&&yn.require("util").types;return O||Uc&&Uc.binding&&Uc.binding("util")}catch{}}(),Np=zt&&zt.isArrayBuffer,Dp=zt&&zt.isDate,kp=zt&&zt.isMap,Pp=zt&&zt.isRegExp,Fp=zt&&zt.isSet,$p=zt&&zt.isTypedArray;function Dt(O,D,N){switch(N.length){case 0:return O.call(D);case 1:return O.call(D,N[0]);case 2:return O.call(D,N[0],N[1]);case 3:return O.call(D,N[0],N[1],N[2])}return O.apply(D,N)}l(Dt,"apply");function HC(O,D,N,X){for(var le=-1,Te=O==null?0:O.length;++le<Te;){var ot=O[le];D(X,ot,N(ot),O)}return X}l(HC,"arrayAggregator");function kt(O,D){for(var N=-1,X=O==null?0:O.length;++N<X&&D(O[N],N,O)!==!1;);return O}l(kt,"arrayEach");function BC(O,D){for(var N=O==null?0:O.length;N--&&D(O[N],N,O)!==!1;);return O}l(BC,"arrayEachRight");function Hp(O,D){for(var N=-1,X=O==null?0:O.length;++N<X;)if(!D(O[N],N,O))return!1;return!0}l(Hp,"arrayEvery");function Gr(O,D){for(var N=-1,X=O==null?0:O.length,le=0,Te=[];++N<X;){var ot=O[N];D(ot,N,O)&&(Te[le++]=ot)}return Te}l(Gr,"arrayFilter");function po(O,D){var N=O==null?0:O.length;return!!N&&Un(O,D,0)>-1}l(po,"arrayIncludes");function Vc(O,D,N){for(var X=-1,le=O==null?0:O.length;++X<le;)if(N(D,O[X]))return!0;return!1}l(Vc,"arrayIncludesWith");function qe(O,D){for(var N=-1,X=O==null?0:O.length,le=Array(X);++N<X;)le[N]=D(O[N],N,O);return le}l(qe,"arrayMap");function jr(O,D){for(var N=-1,X=D.length,le=O.length;++N<X;)O[le+N]=D[N];return O}l(jr,"arrayPush");function zc(O,D,N,X){var le=-1,Te=O==null?0:O.length;for(X&&Te&&(N=O[++le]);++le<Te;)N=D(N,O[le],le,O);return N}l(zc,"arrayReduce");function WC(O,D,N,X){var le=O==null?0:O.length;for(X&&le&&(N=O[--le]);le--;)N=D(N,O[le],le,O);return N}l(WC,"arrayReduceRight");function Gc(O,D){for(var N=-1,X=O==null?0:O.length;++N<X;)if(D(O[N],N,O))return!0;return!1}l(Gc,"arraySome");var UC=jc("length");function VC(O){return O.split("")}l(VC,"asciiToArray");function zC(O){return O.match(QE)||[]}l(zC,"asciiWords");function Bp(O,D,N){var X;return N(O,function(le,Te,ot){if(D(le,Te,ot))return X=Te,!1}),X}l(Bp,"baseFindKey");function mo(O,D,N,X){for(var le=O.length,Te=N+(X?1:-1);X?Te--:++Te<le;)if(D(O[Te],Te,O))return Te;return-1}l(mo,"baseFindIndex");function Un(O,D,N){return D===D?rx(O,D,N):mo(O,Wp,N)}l(Un,"baseIndexOf");function GC(O,D,N,X){for(var le=N-1,Te=O.length;++le<Te;)if(X(O[le],D))return le;return-1}l(GC,"baseIndexOfWith");function Wp(O){return O!==O}l(Wp,"baseIsNaN");function Up(O,D){var N=O==null?0:O.length;return N?Yc(O,D)/N:De}l(Up,"baseMean");function jc(O){return function(D){return D==null?n:D[O]}}l(jc,"baseProperty");function qc(O){return function(D){return O==null?n:O[D]}}l(qc,"basePropertyOf");function Vp(O,D,N,X,le){return le(O,function(Te,ot,ke){N=X?(X=!1,Te):D(N,Te,ot,ke)}),N}l(Vp,"baseReduce");function jC(O,D){var N=O.length;for(O.sort(D);N--;)O[N]=O[N].value;return O}l(jC,"baseSortBy");function Yc(O,D){for(var N,X=-1,le=O.length;++X<le;){var Te=D(O[X]);Te!==n&&(N=N===n?Te:N+Te)}return N}l(Yc,"baseSum");function Kc(O,D){for(var N=-1,X=Array(O);++N<O;)X[N]=D(N);return X}l(Kc,"baseTimes");function qC(O,D){return qe(D,function(N){return[N,O[N]]})}l(qC,"baseToPairs");function zp(O){return O&&O.slice(0,Yp(O)+1).replace(kc,"")}l(zp,"baseTrim");function Pt(O){return function(D){return O(D)}}l(Pt,"baseUnary");function Xc(O,D){return qe(D,function(N){return O[N]})}l(Xc,"baseValues");function ji(O,D){return O.has(D)}l(ji,"cacheHas");function Gp(O,D){for(var N=-1,X=O.length;++N<X&&Un(D,O[N],0)>-1;);return N}l(Gp,"charsStartIndex");function jp(O,D){for(var N=O.length;N--&&Un(D,O[N],0)>-1;);return N}l(jp,"charsEndIndex");function YC(O,D){for(var N=O.length,X=0;N--;)O[N]===D&&++X;return X}l(YC,"countHolders");var KC=qc(LC),XC=qc(NC);function ZC(O){return"\\"+kC[O]}l(ZC,"escapeStringChar");function JC(O,D){return O==null?n:O[D]}l(JC,"getValue");function Vn(O){return RC.test(O)}l(Vn,"hasUnicode");function QC(O){return AC.test(O)}l(QC,"hasUnicodeWord");function ex(O){for(var D,N=[];!(D=O.next()).done;)N.push(D.value);return N}l(ex,"iteratorToArray");function Zc(O){var D=-1,N=Array(O.size);return O.forEach(function(X,le){N[++D]=[le,X]}),N}l(Zc,"mapToArray");function qp(O,D){return function(N){return O(D(N))}}l(qp,"overArg");function qr(O,D){for(var N=-1,X=O.length,le=0,Te=[];++N<X;){var ot=O[N];(ot===D||ot===d)&&(O[N]=d,Te[le++]=N)}return Te}l(qr,"replaceHolders");function go(O){var D=-1,N=Array(O.size);return O.forEach(function(X){N[++D]=X}),N}l(go,"setToArray");function tx(O){var D=-1,N=Array(O.size);return O.forEach(function(X){N[++D]=[X,X]}),N}l(tx,"setToPairs");function rx(O,D,N){for(var X=N-1,le=O.length;++X<le;)if(O[X]===D)return X;return-1}l(rx,"strictIndexOf");function nx(O,D,N){for(var X=N+1;X--;)if(O[X]===D)return X;return X}l(nx,"strictLastIndexOf");function zn(O){return Vn(O)?sx(O):UC(O)}l(zn,"stringSize");function Qt(O){return Vn(O)?ox(O):VC(O)}l(Qt,"stringToArray");function Yp(O){for(var D=O.length;D--&&KE.test(O.charAt(D)););return D}l(Yp,"trimmedEndIndex");var ix=qc(DC);function sx(O){for(var D=Bc.lastIndex=0;Bc.test(O);)++D;return D}l(sx,"unicodeSize");function ox(O){return O.match(Bc)||[]}l(ox,"unicodeToArray");function ax(O){return O.match(IC)||[]}l(ax,"unicodeWords");var lx=l(function O(D){D=D==null?ut:Yr.defaults(ut.Object(),D,Yr.pick(ut,OC));var N=D.Array,X=D.Date,le=D.Error,Te=D.Function,ot=D.Math,ke=D.Object,Jc=D.RegExp,cx=D.String,Gt=D.TypeError,yo=N.prototype,ux=Te.prototype,Gn=ke.prototype,bo=D["__core-js_shared__"],vo=ux.toString,Ie=Gn.hasOwnProperty,fx=0,Kp=function(){var s=/[^.]+$/.exec(bo&&bo.keys&&bo.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),wo=Gn.toString,hx=vo.call(ke),dx=ut._,px=Jc("^"+vo.call(Ie).replace(Dc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),So=Lp?D.Buffer:n,Kr=D.Symbol,Eo=D.Uint8Array,Xp=So?So.allocUnsafe:n,Co=qp(ke.getPrototypeOf,ke),Zp=ke.create,Jp=Gn.propertyIsEnumerable,xo=yo.splice,Qp=Kr?Kr.isConcatSpreadable:n,qi=Kr?Kr.iterator:n,bn=Kr?Kr.toStringTag:n,Mo=function(){try{var s=Cn(ke,"defineProperty");return s({},"",{}),s}catch{}}(),mx=D.clearTimeout!==ut.clearTimeout&&D.clearTimeout,gx=X&&X.now!==ut.Date.now&&X.now,yx=D.setTimeout!==ut.setTimeout&&D.setTimeout,To=ot.ceil,Io=ot.floor,Qc=ke.getOwnPropertySymbols,bx=So?So.isBuffer:n,em=D.isFinite,vx=yo.join,wx=qp(ke.keys,ke),at=ot.max,yt=ot.min,Sx=X.now,Ex=D.parseInt,tm=ot.random,Cx=yo.reverse,eu=Cn(D,"DataView"),Yi=Cn(D,"Map"),tu=Cn(D,"Promise"),jn=Cn(D,"Set"),Ki=Cn(D,"WeakMap"),Xi=Cn(ke,"create"),Ro=Ki&&new Ki,qn={},xx=xn(eu),Mx=xn(Yi),Tx=xn(tu),Ix=xn(jn),Rx=xn(Ki),Ao=Kr?Kr.prototype:n,Zi=Ao?Ao.valueOf:n,rm=Ao?Ao.toString:n;function E(s){if(et(s)&&!ce(s)&&!(s instanceof be)){if(s instanceof jt)return s;if(Ie.call(s,"__wrapped__"))return ng(s)}return new jt(s)}l(E,"lodash");var Yn=function(){function s(){}return l(s,"object"),function(c){if(!Je(c))return{};if(Zp)return Zp(c);s.prototype=c;var h=new s;return s.prototype=n,h}}();function Oo(){}l(Oo,"baseLodash");function jt(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=n}l(jt,"LodashWrapper"),E.templateSettings={escape:VE,evaluate:zE,interpolate:up,variable:"",imports:{_:E}},E.prototype=Oo.prototype,E.prototype.constructor=E,jt.prototype=Yn(Oo.prototype),jt.prototype.constructor=jt;function be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Pe,this.__views__=[]}l(be,"LazyWrapper");function Ax(){var s=new be(this.__wrapped__);return s.__actions__=Rt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Rt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Rt(this.__views__),s}l(Ax,"lazyClone");function Ox(){if(this.__filtered__){var s=new be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}l(Ox,"lazyReverse");function _x(){var s=this.__wrapped__.value(),c=this.__dir__,h=ce(s),m=c<0,b=h?s.length:0,x=V0(0,b,this.__views__),I=x.start,R=x.end,_=R-I,F=m?R:I-1,$=this.__iteratees__,H=$.length,K=0,te=yt(_,this.__takeCount__);if(!h||!m&&b==_&&te==_)return Tm(s,this.__actions__);var oe=[];e:for(;_--&&K<te;){F+=c;for(var fe=-1,ne=s[F];++fe<H;){var ye=$[fe],Se=ye.iteratee,Ht=ye.type,xt=Se(ne);if(Ht==Q)ne=xt;else if(!xt){if(Ht==k)continue e;break e}}oe[K++]=ne}return oe}l(_x,"lazyValue"),be.prototype=Yn(Oo.prototype),be.prototype.constructor=be;function vn(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(vn,"Hash");function Lx(){this.__data__=Xi?Xi(null):{},this.size=0}l(Lx,"hashClear");function Nx(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}l(Nx,"hashDelete");function Dx(s){var c=this.__data__;if(Xi){var h=c[s];return h===u?n:h}return Ie.call(c,s)?c[s]:n}l(Dx,"hashGet");function kx(s){var c=this.__data__;return Xi?c[s]!==n:Ie.call(c,s)}l(kx,"hashHas");function Px(s,c){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Xi&&c===n?u:c,this}l(Px,"hashSet"),vn.prototype.clear=Lx,vn.prototype.delete=Nx,vn.prototype.get=Dx,vn.prototype.has=kx,vn.prototype.set=Px;function Mr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(Mr,"ListCache");function Fx(){this.__data__=[],this.size=0}l(Fx,"listCacheClear");function $x(s){var c=this.__data__,h=_o(c,s);if(h<0)return!1;var m=c.length-1;return h==m?c.pop():xo.call(c,h,1),--this.size,!0}l($x,"listCacheDelete");function Hx(s){var c=this.__data__,h=_o(c,s);return h<0?n:c[h][1]}l(Hx,"listCacheGet");function Bx(s){return _o(this.__data__,s)>-1}l(Bx,"listCacheHas");function Wx(s,c){var h=this.__data__,m=_o(h,s);return m<0?(++this.size,h.push([s,c])):h[m][1]=c,this}l(Wx,"listCacheSet"),Mr.prototype.clear=Fx,Mr.prototype.delete=$x,Mr.prototype.get=Hx,Mr.prototype.has=Bx,Mr.prototype.set=Wx;function Tr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(Tr,"MapCache");function Ux(){this.size=0,this.__data__={hash:new vn,map:new(Yi||Mr),string:new vn}}l(Ux,"mapCacheClear");function Vx(s){var c=Vo(this,s).delete(s);return this.size-=c?1:0,c}l(Vx,"mapCacheDelete");function zx(s){return Vo(this,s).get(s)}l(zx,"mapCacheGet");function Gx(s){return Vo(this,s).has(s)}l(Gx,"mapCacheHas");function jx(s,c){var h=Vo(this,s),m=h.size;return h.set(s,c),this.size+=h.size==m?0:1,this}l(jx,"mapCacheSet"),Tr.prototype.clear=Ux,Tr.prototype.delete=Vx,Tr.prototype.get=zx,Tr.prototype.has=Gx,Tr.prototype.set=jx;function wn(s){var c=-1,h=s==null?0:s.length;for(this.__data__=new Tr;++c<h;)this.add(s[c])}l(wn,"SetCache");function qx(s){return this.__data__.set(s,u),this}l(qx,"setCacheAdd");function Yx(s){return this.__data__.has(s)}l(Yx,"setCacheHas"),wn.prototype.add=wn.prototype.push=qx,wn.prototype.has=Yx;function er(s){var c=this.__data__=new Mr(s);this.size=c.size}l(er,"Stack");function Kx(){this.__data__=new Mr,this.size=0}l(Kx,"stackClear");function Xx(s){var c=this.__data__,h=c.delete(s);return this.size=c.size,h}l(Xx,"stackDelete");function Zx(s){return this.__data__.get(s)}l(Zx,"stackGet");function Jx(s){return this.__data__.has(s)}l(Jx,"stackHas");function Qx(s,c){var h=this.__data__;if(h instanceof Mr){var m=h.__data__;if(!Yi||m.length<t-1)return m.push([s,c]),this.size=++h.size,this;h=this.__data__=new Tr(m)}return h.set(s,c),this.size=h.size,this}l(Qx,"stackSet"),er.prototype.clear=Kx,er.prototype.delete=Xx,er.prototype.get=Zx,er.prototype.has=Jx,er.prototype.set=Qx;function nm(s,c){var h=ce(s),m=!h&&Mn(s),b=!h&&!m&&en(s),x=!h&&!m&&!b&&Jn(s),I=h||m||b||x,R=I?Kc(s.length,cx):[],_=R.length;for(var F in s)(c||Ie.call(s,F))&&!(I&&(F=="length"||b&&(F=="offset"||F=="parent")||x&&(F=="buffer"||F=="byteLength"||F=="byteOffset")||Ar(F,_)))&&R.push(F);return R}l(nm,"arrayLikeKeys");function im(s){var c=s.length;return c?s[hu(0,c-1)]:n}l(im,"arraySample");function e0(s,c){return zo(Rt(s),Sn(c,0,s.length))}l(e0,"arraySampleSize");function t0(s){return zo(Rt(s))}l(t0,"arrayShuffle");function ru(s,c,h){(h!==n&&!rr(s[c],h)||h===n&&!(c in s))&&cr(s,c,h)}l(ru,"assignMergeValue");function Ji(s,c,h){var m=s[c];(!(Ie.call(s,c)&&rr(m,h))||h===n&&!(c in s))&&cr(s,c,h)}l(Ji,"assignValue");function _o(s,c){for(var h=s.length;h--;)if(rr(s[h][0],c))return h;return-1}l(_o,"assocIndexOf");function r0(s,c,h,m){return Xr(s,function(b,x,I){c(m,b,h(b),I)}),m}l(r0,"baseAggregator");function sm(s,c){return s&&fr(c,ft(c),s)}l(sm,"baseAssign");function n0(s,c){return s&&fr(c,Ot(c),s)}l(n0,"baseAssignIn");function cr(s,c,h){c=="__proto__"&&Mo?Mo(s,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[c]=h}l(cr,"baseAssignValue");function nu(s,c){for(var h=-1,m=c.length,b=N(m),x=s==null;++h<m;)b[h]=x?n:$u(s,c[h]);return b}l(nu,"baseAt");function Sn(s,c,h){return s===s&&(h!==n&&(s=s<=h?s:h),c!==n&&(s=s>=c?s:c)),s}l(Sn,"baseClamp");function qt(s,c,h,m,b,x){var I,R=c&p,_=c&g,F=c&y;if(h&&(I=b?h(s,m,b,x):h(s)),I!==n)return I;if(!Je(s))return s;var $=ce(s);if($){if(I=G0(s),!R)return Rt(s,I)}else{var H=bt(s),K=H==we||H==It;if(en(s))return Am(s,R);if(H==ge||H==st||K&&!b){if(I=_||K?{}:Ym(s),!R)return _?D0(s,n0(I,s)):N0(s,sm(I,s))}else{if(!Fe[H])return b?s:{};I=j0(s,H,R)}}x||(x=new er);var te=x.get(s);if(te)return te;x.set(s,I),Cg(s)?s.forEach(function(ne){I.add(qt(ne,c,h,ne,s,x))}):Sg(s)&&s.forEach(function(ne,ye){I.set(ye,qt(ne,c,h,ye,s,x))});var oe=F?_?Cu:Eu:_?Ot:ft,fe=$?n:oe(s);return kt(fe||s,function(ne,ye){fe&&(ye=ne,ne=s[ye]),Ji(I,ye,qt(ne,c,h,ye,s,x))}),I}l(qt,"baseClone");function i0(s){var c=ft(s);return function(h){return om(h,s,c)}}l(i0,"baseConforms");function om(s,c,h){var m=h.length;if(s==null)return!m;for(s=ke(s);m--;){var b=h[m],x=c[b],I=s[b];if(I===n&&!(b in s)||!x(I))return!1}return!0}l(om,"baseConformsTo");function am(s,c,h){if(typeof s!="function")throw new Gt(i);return ss(function(){s.apply(n,h)},c)}l(am,"baseDelay");function Qi(s,c,h,m){var b=-1,x=po,I=!0,R=s.length,_=[],F=c.length;if(!R)return _;h&&(c=qe(c,Pt(h))),m?(x=Vc,I=!1):c.length>=t&&(x=ji,I=!1,c=new wn(c));e:for(;++b<R;){var $=s[b],H=h==null?$:h($);if($=m||$!==0?$:0,I&&H===H){for(var K=F;K--;)if(c[K]===H)continue e;_.push($)}else x(c,H,m)||_.push($)}return _}l(Qi,"baseDifference");var Xr=Dm(ur),lm=Dm(su,!0);function s0(s,c){var h=!0;return Xr(s,function(m,b,x){return h=!!c(m,b,x),h}),h}l(s0,"baseEvery");function Lo(s,c,h){for(var m=-1,b=s.length;++m<b;){var x=s[m],I=c(x);if(I!=null&&(R===n?I===I&&!$t(I):h(I,R)))var R=I,_=x}return _}l(Lo,"baseExtremum");function o0(s,c,h,m){var b=s.length;for(h=ue(h),h<0&&(h=-h>b?0:b+h),m=m===n||m>b?b:ue(m),m<0&&(m+=b),m=h>m?0:Mg(m);h<m;)s[h++]=c;return s}l(o0,"baseFill");function cm(s,c){var h=[];return Xr(s,function(m,b,x){c(m,b,x)&&h.push(m)}),h}l(cm,"baseFilter");function ht(s,c,h,m,b){var x=-1,I=s.length;for(h||(h=Y0),b||(b=[]);++x<I;){var R=s[x];c>0&&h(R)?c>1?ht(R,c-1,h,m,b):jr(b,R):m||(b[b.length]=R)}return b}l(ht,"baseFlatten");var iu=km(),um=km(!0);function ur(s,c){return s&&iu(s,c,ft)}l(ur,"baseForOwn");function su(s,c){return s&&um(s,c,ft)}l(su,"baseForOwnRight");function No(s,c){return Gr(c,function(h){return Or(s[h])})}l(No,"baseFunctions");function En(s,c){c=Jr(c,s);for(var h=0,m=c.length;s!=null&&h<m;)s=s[tr(c[h++])];return h&&h==m?s:n}l(En,"baseGet");function fm(s,c,h){var m=c(s);return ce(s)?m:jr(m,h(s))}l(fm,"baseGetAllKeys");function Et(s){return s==null?s===n?PE:Vt:bn&&bn in ke(s)?U0(s):tM(s)}l(Et,"baseGetTag");function ou(s,c){return s>c}l(ou,"baseGt");function a0(s,c){return s!=null&&Ie.call(s,c)}l(a0,"baseHas");function l0(s,c){return s!=null&&c in ke(s)}l(l0,"baseHasIn");function c0(s,c,h){return s>=yt(c,h)&&s<at(c,h)}l(c0,"baseInRange");function au(s,c,h){for(var m=h?Vc:po,b=s[0].length,x=s.length,I=x,R=N(x),_=1/0,F=[];I--;){var $=s[I];I&&c&&($=qe($,Pt(c))),_=yt($.length,_),R[I]=!h&&(c||b>=120&&$.length>=120)?new wn(I&&$):n}$=s[0];var H=-1,K=R[0];e:for(;++H<b&&F.length<_;){var te=$[H],oe=c?c(te):te;if(te=h||te!==0?te:0,!(K?ji(K,oe):m(F,oe,h))){for(I=x;--I;){var fe=R[I];if(!(fe?ji(fe,oe):m(s[I],oe,h)))continue e}K&&K.push(oe),F.push(te)}}return F}l(au,"baseIntersection");function u0(s,c,h,m){return ur(s,function(b,x,I){c(m,h(b),x,I)}),m}l(u0,"baseInverter");function es(s,c,h){c=Jr(c,s),s=Jm(s,c);var m=s==null?s:s[tr(Kt(c))];return m==null?n:Dt(m,s,h)}l(es,"baseInvoke");function hm(s){return et(s)&&Et(s)==st}l(hm,"baseIsArguments");function f0(s){return et(s)&&Et(s)==Gi}l(f0,"baseIsArrayBuffer");function h0(s){return et(s)&&Et(s)==ct}l(h0,"baseIsDate");function ts(s,c,h,m,b){return s===c?!0:s==null||c==null||!et(s)&&!et(c)?s!==s&&c!==c:d0(s,c,h,m,ts,b)}l(ts,"baseIsEqual");function d0(s,c,h,m,b,x){var I=ce(s),R=ce(c),_=I?mt:bt(s),F=R?mt:bt(c);_=_==st?ge:_,F=F==st?ge:F;var $=_==ge,H=F==ge,K=_==F;if(K&&en(s)){if(!en(c))return!1;I=!0,$=!1}if(K&&!$)return x||(x=new er),I||Jn(s)?Gm(s,c,h,m,b,x):B0(s,c,_,h,m,b,x);if(!(h&w)){var te=$&&Ie.call(s,"__wrapped__"),oe=H&&Ie.call(c,"__wrapped__");if(te||oe){var fe=te?s.value():s,ne=oe?c.value():c;return x||(x=new er),b(fe,ne,h,m,x)}}return K?(x||(x=new er),W0(s,c,h,m,b,x)):!1}l(d0,"baseIsEqualDeep");function p0(s){return et(s)&&bt(s)==xe}l(p0,"baseIsMap");function lu(s,c,h,m){var b=h.length,x=b,I=!m;if(s==null)return!x;for(s=ke(s);b--;){var R=h[b];if(I&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++b<x;){R=h[b];var _=R[0],F=s[_],$=R[1];if(I&&R[2]){if(F===n&&!(_ in s))return!1}else{var H=new er;if(m)var K=m(F,$,_,s,c,H);if(!(K===n?ts($,F,w|S,m,H):K))return!1}}return!0}l(lu,"baseIsMatch");function dm(s){if(!Je(s)||X0(s))return!1;var c=Or(s)?px:iC;return c.test(xn(s))}l(dm,"baseIsNative");function m0(s){return et(s)&&Et(s)==Ui}l(m0,"baseIsRegExp");function g0(s){return et(s)&&bt(s)==Jt}l(g0,"baseIsSet");function y0(s){return et(s)&&Xo(s.length)&&!!We[Et(s)]}l(y0,"baseIsTypedArray");function pm(s){return typeof s=="function"?s:s==null?_t:typeof s=="object"?ce(s)?ym(s[0],s[1]):gm(s):Fg(s)}l(pm,"baseIteratee");function cu(s){if(!is(s))return wx(s);var c=[];for(var h in ke(s))Ie.call(s,h)&&h!="constructor"&&c.push(h);return c}l(cu,"baseKeys");function b0(s){if(!Je(s))return eM(s);var c=is(s),h=[];for(var m in s)m=="constructor"&&(c||!Ie.call(s,m))||h.push(m);return h}l(b0,"baseKeysIn");function uu(s,c){return s<c}l(uu,"baseLt");function mm(s,c){var h=-1,m=At(s)?N(s.length):[];return Xr(s,function(b,x,I){m[++h]=c(b,x,I)}),m}l(mm,"baseMap");function gm(s){var c=Mu(s);return c.length==1&&c[0][2]?Xm(c[0][0],c[0][1]):function(h){return h===s||lu(h,s,c)}}l(gm,"baseMatches");function ym(s,c){return Iu(s)&&Km(c)?Xm(tr(s),c):function(h){var m=$u(h,s);return m===n&&m===c?Hu(h,s):ts(c,m,w|S)}}l(ym,"baseMatchesProperty");function Do(s,c,h,m,b){s!==c&&iu(c,function(x,I){if(b||(b=new er),Je(x))v0(s,c,I,h,Do,m,b);else{var R=m?m(Au(s,I),x,I+"",s,c,b):n;R===n&&(R=x),ru(s,I,R)}},Ot)}l(Do,"baseMerge");function v0(s,c,h,m,b,x,I){var R=Au(s,h),_=Au(c,h),F=I.get(_);if(F){ru(s,h,F);return}var $=x?x(R,_,h+"",s,c,I):n,H=$===n;if(H){var K=ce(_),te=!K&&en(_),oe=!K&&!te&&Jn(_);$=_,K||te||oe?ce(R)?$=R:nt(R)?$=Rt(R):te?(H=!1,$=Am(_,!0)):oe?(H=!1,$=Om(_,!0)):$=[]:os(_)||Mn(_)?($=R,Mn(R)?$=Tg(R):(!Je(R)||Or(R))&&($=Ym(_))):H=!1}H&&(I.set(_,$),b($,_,m,x,I),I.delete(_)),ru(s,h,$)}l(v0,"baseMergeDeep");function bm(s,c){var h=s.length;if(h)return c+=c<0?h:0,Ar(c,h)?s[c]:n}l(bm,"baseNth");function vm(s,c,h){c.length?c=qe(c,function(x){return ce(x)?function(I){return En(I,x.length===1?x[0]:x)}:x}):c=[_t];var m=-1;c=qe(c,Pt(se()));var b=mm(s,function(x,I,R){var _=qe(c,function(F){return F(x)});return{criteria:_,index:++m,value:x}});return jC(b,function(x,I){return L0(x,I,h)})}l(vm,"baseOrderBy");function w0(s,c){return wm(s,c,function(h,m){return Hu(s,m)})}l(w0,"basePick");function wm(s,c,h){for(var m=-1,b=c.length,x={};++m<b;){var I=c[m],R=En(s,I);h(R,I)&&rs(x,Jr(I,s),R)}return x}l(wm,"basePickBy");function S0(s){return function(c){return En(c,s)}}l(S0,"basePropertyDeep");function fu(s,c,h,m){var b=m?GC:Un,x=-1,I=c.length,R=s;for(s===c&&(c=Rt(c)),h&&(R=qe(s,Pt(h)));++x<I;)for(var _=0,F=c[x],$=h?h(F):F;(_=b(R,$,_,m))>-1;)R!==s&&xo.call(R,_,1),xo.call(s,_,1);return s}l(fu,"basePullAll");function Sm(s,c){for(var h=s?c.length:0,m=h-1;h--;){var b=c[h];if(h==m||b!==x){var x=b;Ar(b)?xo.call(s,b,1):mu(s,b)}}return s}l(Sm,"basePullAt");function hu(s,c){return s+Io(tm()*(c-s+1))}l(hu,"baseRandom");function E0(s,c,h,m){for(var b=-1,x=at(To((c-s)/(h||1)),0),I=N(x);x--;)I[m?x:++b]=s,s+=h;return I}l(E0,"baseRange");function du(s,c){var h="";if(!s||c<1||c>ae)return h;do c%2&&(h+=s),c=Io(c/2),c&&(s+=s);while(c);return h}l(du,"baseRepeat");function me(s,c){return Ou(Zm(s,c,_t),s+"")}l(me,"baseRest");function C0(s){return im(Qn(s))}l(C0,"baseSample");function x0(s,c){var h=Qn(s);return zo(h,Sn(c,0,h.length))}l(x0,"baseSampleSize");function rs(s,c,h,m){if(!Je(s))return s;c=Jr(c,s);for(var b=-1,x=c.length,I=x-1,R=s;R!=null&&++b<x;){var _=tr(c[b]),F=h;if(_==="__proto__"||_==="constructor"||_==="prototype")return s;if(b!=I){var $=R[_];F=m?m($,_,R):n,F===n&&(F=Je($)?$:Ar(c[b+1])?[]:{})}Ji(R,_,F),R=R[_]}return s}l(rs,"baseSet");var Em=Ro?function(s,c){return Ro.set(s,c),s}:_t,M0=Mo?function(s,c){return Mo(s,"toString",{configurable:!0,enumerable:!1,value:Wu(c),writable:!0})}:_t;function T0(s){return zo(Qn(s))}l(T0,"baseShuffle");function Yt(s,c,h){var m=-1,b=s.length;c<0&&(c=-c>b?0:b+c),h=h>b?b:h,h<0&&(h+=b),b=c>h?0:h-c>>>0,c>>>=0;for(var x=N(b);++m<b;)x[m]=s[m+c];return x}l(Yt,"baseSlice");function I0(s,c){var h;return Xr(s,function(m,b,x){return h=c(m,b,x),!h}),!!h}l(I0,"baseSome");function ko(s,c,h){var m=0,b=s==null?m:s.length;if(typeof c=="number"&&c===c&&b<=$n){for(;m<b;){var x=m+b>>>1,I=s[x];I!==null&&!$t(I)&&(h?I<=c:I<c)?m=x+1:b=x}return b}return pu(s,c,_t,h)}l(ko,"baseSortedIndex");function pu(s,c,h,m){var b=0,x=s==null?0:s.length;if(x===0)return 0;c=h(c);for(var I=c!==c,R=c===null,_=$t(c),F=c===n;b<x;){var $=Io((b+x)/2),H=h(s[$]),K=H!==n,te=H===null,oe=H===H,fe=$t(H);if(I)var ne=m||oe;else F?ne=oe&&(m||K):R?ne=oe&&K&&(m||!te):_?ne=oe&&K&&!te&&(m||!fe):te||fe?ne=!1:ne=m?H<=c:H<c;ne?b=$+1:x=$}return yt(x,gn)}l(pu,"baseSortedIndexBy");function Cm(s,c){for(var h=-1,m=s.length,b=0,x=[];++h<m;){var I=s[h],R=c?c(I):I;if(!h||!rr(R,_)){var _=R;x[b++]=I===0?0:I}}return x}l(Cm,"baseSortedUniq");function xm(s){return typeof s=="number"?s:$t(s)?De:+s}l(xm,"baseToNumber");function Ft(s){if(typeof s=="string")return s;if(ce(s))return qe(s,Ft)+"";if($t(s))return rm?rm.call(s):"";var c=s+"";return c=="0"&&1/s==-q?"-0":c}l(Ft,"baseToString");function Zr(s,c,h){var m=-1,b=po,x=s.length,I=!0,R=[],_=R;if(h)I=!1,b=Vc;else if(x>=t){var F=c?null:$0(s);if(F)return go(F);I=!1,b=ji,_=new wn}else _=c?[]:R;e:for(;++m<x;){var $=s[m],H=c?c($):$;if($=h||$!==0?$:0,I&&H===H){for(var K=_.length;K--;)if(_[K]===H)continue e;c&&_.push(H),R.push($)}else b(_,H,h)||(_!==R&&_.push(H),R.push($))}return R}l(Zr,"baseUniq");function mu(s,c){c=Jr(c,s);var h=-1,m=c.length;if(!m)return!0;for(;++h<m;){var b=tr(c[h]);if(b==="__proto__"&&!Ie.call(s,"__proto__")||(b==="constructor"||b==="prototype")&&h<m-1)return!1}var x=Jm(s,c);return x==null||delete x[tr(Kt(c))]}l(mu,"baseUnset");function Mm(s,c,h,m){return rs(s,c,h(En(s,c)),m)}l(Mm,"baseUpdate");function Po(s,c,h,m){for(var b=s.length,x=m?b:-1;(m?x--:++x<b)&&c(s[x],x,s););return h?Yt(s,m?0:x,m?x+1:b):Yt(s,m?x+1:0,m?b:x)}l(Po,"baseWhile");function Tm(s,c){var h=s;return h instanceof be&&(h=h.value()),zc(c,function(m,b){return b.func.apply(b.thisArg,jr([m],b.args))},h)}l(Tm,"baseWrapperValue");function gu(s,c,h){var m=s.length;if(m<2)return m?Zr(s[0]):[];for(var b=-1,x=N(m);++b<m;)for(var I=s[b],R=-1;++R<m;)R!=b&&(x[b]=Qi(x[b]||I,s[R],c,h));return Zr(ht(x,1),c,h)}l(gu,"baseXor");function Im(s,c,h){for(var m=-1,b=s.length,x=c.length,I={};++m<b;){var R=m<x?c[m]:n;h(I,s[m],R)}return I}l(Im,"baseZipObject");function yu(s){return nt(s)?s:[]}l(yu,"castArrayLikeObject");function bu(s){return typeof s=="function"?s:_t}l(bu,"castFunction");function Jr(s,c){return ce(s)?s:Iu(s,c)?[s]:rg(Re(s))}l(Jr,"castPath");var R0=me;function Qr(s,c,h){var m=s.length;return h=h===n?m:h,!c&&h>=m?s:Yt(s,c,h)}l(Qr,"castSlice");var Rm=mx||function(s){return ut.clearTimeout(s)};function Am(s,c){if(c)return s.slice();var h=s.length,m=Xp?Xp(h):new s.constructor(h);return s.copy(m),m}l(Am,"cloneBuffer");function vu(s){var c=new s.constructor(s.byteLength);return new Eo(c).set(new Eo(s)),c}l(vu,"cloneArrayBuffer");function A0(s,c){var h=c?vu(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}l(A0,"cloneDataView");function O0(s){var c=new s.constructor(s.source,hp.exec(s));return c.lastIndex=s.lastIndex,c}l(O0,"cloneRegExp");function _0(s){return Zi?ke(Zi.call(s)):{}}l(_0,"cloneSymbol");function Om(s,c){var h=c?vu(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}l(Om,"cloneTypedArray");function _m(s,c){if(s!==c){var h=s!==n,m=s===null,b=s===s,x=$t(s),I=c!==n,R=c===null,_=c===c,F=$t(c);if(!R&&!F&&!x&&s>c||x&&I&&_&&!R&&!F||m&&I&&_||!h&&_||!b)return 1;if(!m&&!x&&!F&&s<c||F&&h&&b&&!m&&!x||R&&h&&b||!I&&b||!_)return-1}return 0}l(_m,"compareAscending");function L0(s,c,h){for(var m=-1,b=s.criteria,x=c.criteria,I=b.length,R=h.length;++m<I;){var _=_m(b[m],x[m]);if(_){if(m>=R)return _;var F=h[m];return _*(F=="desc"?-1:1)}}return s.index-c.index}l(L0,"compareMultiple");function Lm(s,c,h,m){for(var b=-1,x=s.length,I=h.length,R=-1,_=c.length,F=at(x-I,0),$=N(_+F),H=!m;++R<_;)$[R]=c[R];for(;++b<I;)(H||b<x)&&($[h[b]]=s[b]);for(;F--;)$[R++]=s[b++];return $}l(Lm,"composeArgs");function Nm(s,c,h,m){for(var b=-1,x=s.length,I=-1,R=h.length,_=-1,F=c.length,$=at(x-R,0),H=N($+F),K=!m;++b<$;)H[b]=s[b];for(var te=b;++_<F;)H[te+_]=c[_];for(;++I<R;)(K||b<x)&&(H[te+h[I]]=s[b++]);return H}l(Nm,"composeArgsRight");function Rt(s,c){var h=-1,m=s.length;for(c||(c=N(m));++h<m;)c[h]=s[h];return c}l(Rt,"copyArray");function fr(s,c,h,m){var b=!h;h||(h={});for(var x=-1,I=c.length;++x<I;){var R=c[x],_=m?m(h[R],s[R],R,h,s):n;_===n&&(_=s[R]),b?cr(h,R,_):Ji(h,R,_)}return h}l(fr,"copyObject");function N0(s,c){return fr(s,Tu(s),c)}l(N0,"copySymbols");function D0(s,c){return fr(s,jm(s),c)}l(D0,"copySymbolsIn");function Fo(s,c){return function(h,m){var b=ce(h)?HC:r0,x=c?c():{};return b(h,s,se(m,2),x)}}l(Fo,"createAggregator");function Kn(s){return me(function(c,h){var m=-1,b=h.length,x=b>1?h[b-1]:n,I=b>2?h[2]:n;for(x=s.length>3&&typeof x=="function"?(b--,x):n,I&&Ct(h[0],h[1],I)&&(x=b<3?n:x,b=1),c=ke(c);++m<b;){var R=h[m];R&&s(c,R,m,x)}return c})}l(Kn,"createAssigner");function Dm(s,c){return function(h,m){if(h==null)return h;if(!At(h))return s(h,m);for(var b=h.length,x=c?b:-1,I=ke(h);(c?x--:++x<b)&&m(I[x],x,I)!==!1;);return h}}l(Dm,"createBaseEach");function km(s){return function(c,h,m){for(var b=-1,x=ke(c),I=m(c),R=I.length;R--;){var _=I[s?R:++b];if(h(x[_],_,x)===!1)break}return c}}l(km,"createBaseFor");function k0(s,c,h){var m=c&C,b=ns(s);function x(){var I=this&&this!==ut&&this instanceof x?b:s;return I.apply(m?h:this,arguments)}return l(x,"wrapper"),x}l(k0,"createBind");function Pm(s){return function(c){c=Re(c);var h=Vn(c)?Qt(c):n,m=h?h[0]:c.charAt(0),b=h?Qr(h,1).join(""):c.slice(1);return m[s]()+b}}l(Pm,"createCaseFirst");function Xn(s){return function(c){return zc(kg(Dg(c).replace(MC,"")),s,"")}}l(Xn,"createCompounder");function ns(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=Yn(s.prototype),m=s.apply(h,c);return Je(m)?m:h}}l(ns,"createCtor");function P0(s,c,h){var m=ns(s);function b(){for(var x=arguments.length,I=N(x),R=x,_=Zn(b);R--;)I[R]=arguments[R];var F=x<3&&I[0]!==_&&I[x-1]!==_?[]:qr(I,_);if(x-=F.length,x<h)return Wm(s,c,$o,b.placeholder,n,I,F,n,n,h-x);var $=this&&this!==ut&&this instanceof b?m:s;return Dt($,this,I)}return l(b,"wrapper"),b}l(P0,"createCurry");function Fm(s){return function(c,h,m){var b=ke(c);if(!At(c)){var x=se(h,3);c=ft(c),h=l(function(R){return x(b[R],R,b)},"predicate")}var I=s(c,h,m);return I>-1?b[x?c[I]:I]:n}}l(Fm,"createFind");function $m(s){return Rr(function(c){var h=c.length,m=h,b=jt.prototype.thru;for(s&&c.reverse();m--;){var x=c[m];if(typeof x!="function")throw new Gt(i);if(b&&!I&&Uo(x)=="wrapper")var I=new jt([],!0)}for(m=I?m:h;++m<h;){x=c[m];var R=Uo(x),_=R=="wrapper"?xu(x):n;_&&Ru(_[0])&&_[1]==(U|A|L|Z)&&!_[4].length&&_[9]==1?I=I[Uo(_[0])].apply(I,_[3]):I=x.length==1&&Ru(x)?I[R]():I.thru(x)}return function(){var F=arguments,$=F[0];if(I&&F.length==1&&ce($))return I.plant($).value();for(var H=0,K=h?c[H].apply(this,F):$;++H<h;)K=c[H].call(this,K);return K}})}l($m,"createFlow");function $o(s,c,h,m,b,x,I,R,_,F){var $=c&U,H=c&C,K=c&v,te=c&(A|T),oe=c&W,fe=K?n:ns(s);function ne(){for(var ye=arguments.length,Se=N(ye),Ht=ye;Ht--;)Se[Ht]=arguments[Ht];if(te)var xt=Zn(ne),Bt=YC(Se,xt);if(m&&(Se=Lm(Se,m,b,te)),x&&(Se=Nm(Se,x,I,te)),ye-=Bt,te&&ye<F){var it=qr(Se,xt);return Wm(s,c,$o,ne.placeholder,h,Se,it,R,_,F-ye)}var nr=H?h:this,Lr=K?nr[s]:s;return ye=Se.length,R?Se=rM(Se,R):oe&&ye>1&&Se.reverse(),$&&_<ye&&(Se.length=_),this&&this!==ut&&this instanceof ne&&(Lr=fe||ns(Lr)),Lr.apply(nr,Se)}return l(ne,"wrapper"),ne}l($o,"createHybrid");function Hm(s,c){return function(h,m){return u0(h,s,c(m),{})}}l(Hm,"createInverter");function Ho(s,c){return function(h,m){var b;if(h===n&&m===n)return c;if(h!==n&&(b=h),m!==n){if(b===n)return m;typeof h=="string"||typeof m=="string"?(h=Ft(h),m=Ft(m)):(h=xm(h),m=xm(m)),b=s(h,m)}return b}}l(Ho,"createMathOperation");function wu(s){return Rr(function(c){return c=qe(c,Pt(se())),me(function(h){var m=this;return s(c,function(b){return Dt(b,m,h)})})})}l(wu,"createOver");function Bo(s,c){c=c===n?" ":Ft(c);var h=c.length;if(h<2)return h?du(c,s):c;var m=du(c,To(s/zn(c)));return Vn(c)?Qr(Qt(m),0,s).join(""):m.slice(0,s)}l(Bo,"createPadding");function F0(s,c,h,m){var b=c&C,x=ns(s);function I(){for(var R=-1,_=arguments.length,F=-1,$=m.length,H=N($+_),K=this&&this!==ut&&this instanceof I?x:s;++F<$;)H[F]=m[F];for(;_--;)H[F++]=arguments[++R];return Dt(K,b?h:this,H)}return l(I,"wrapper"),I}l(F0,"createPartial");function Bm(s){return function(c,h,m){return m&&typeof m!="number"&&Ct(c,h,m)&&(h=m=n),c=_r(c),h===n?(h=c,c=0):h=_r(h),m=m===n?c<h?1:-1:_r(m),E0(c,h,m,s)}}l(Bm,"createRange");function Wo(s){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Xt(c),h=Xt(h)),s(c,h)}}l(Wo,"createRelationalOperation");function Wm(s,c,h,m,b,x,I,R,_,F){var $=c&A,H=$?I:n,K=$?n:I,te=$?x:n,oe=$?n:x;c|=$?L:V,c&=~($?V:L),c&M||(c&=~(C|v));var fe=[s,c,b,te,H,oe,K,R,_,F],ne=h.apply(n,fe);return Ru(s)&&Qm(ne,fe),ne.placeholder=m,eg(ne,s,c)}l(Wm,"createRecurry");function Su(s){var c=ot[s];return function(h,m){if(h=Xt(h),m=m==null?0:yt(ue(m),292),m&&em(h)){var b=(Re(h)+"e").split("e"),x=c(b[0]+"e"+(+b[1]+m));return b=(Re(x)+"e").split("e"),+(b[0]+"e"+(+b[1]-m))}return c(h)}}l(Su,"createRound");var $0=jn&&1/go(new jn([,-0]))[1]==q?function(s){return new jn(s)}:zu;function Um(s){return function(c){var h=bt(c);return h==xe?Zc(c):h==Jt?tx(c):qC(c,s(c))}}l(Um,"createToPairs");function Ir(s,c,h,m,b,x,I,R){var _=c&v;if(!_&&typeof s!="function")throw new Gt(i);var F=m?m.length:0;if(F||(c&=~(L|V),m=b=n),I=I===n?I:at(ue(I),0),R=R===n?R:ue(R),F-=b?b.length:0,c&V){var $=m,H=b;m=b=n}var K=_?n:xu(s),te=[s,c,h,m,b,$,H,x,I,R];if(K&&Q0(te,K),s=te[0],c=te[1],h=te[2],m=te[3],b=te[4],R=te[9]=te[9]===n?_?0:s.length:at(te[9]-F,0),!R&&c&(A|T)&&(c&=~(A|T)),!c||c==C)var oe=k0(s,c,h);else c==A||c==T?oe=P0(s,c,R):(c==L||c==(C|L))&&!b.length?oe=F0(s,c,h,m):oe=$o.apply(n,te);var fe=K?Em:Qm;return eg(fe(oe,te),s,c)}l(Ir,"createWrap");function Vm(s,c,h,m){return s===n||rr(s,Gn[h])&&!Ie.call(m,h)?c:s}l(Vm,"customDefaultsAssignIn");function zm(s,c,h,m,b,x){return Je(s)&&Je(c)&&(x.set(c,s),Do(s,c,n,zm,x),x.delete(c)),s}l(zm,"customDefaultsMerge");function H0(s){return os(s)?n:s}l(H0,"customOmitClone");function Gm(s,c,h,m,b,x){var I=h&w,R=s.length,_=c.length;if(R!=_&&!(I&&_>R))return!1;var F=x.get(s),$=x.get(c);if(F&&$)return F==c&&$==s;var H=-1,K=!0,te=h&S?new wn:n;for(x.set(s,c),x.set(c,s);++H<R;){var oe=s[H],fe=c[H];if(m)var ne=I?m(fe,oe,H,c,s,x):m(oe,fe,H,s,c,x);if(ne!==n){if(ne)continue;K=!1;break}if(te){if(!Gc(c,function(ye,Se){if(!ji(te,Se)&&(oe===ye||b(oe,ye,h,m,x)))return te.push(Se)})){K=!1;break}}else if(!(oe===fe||b(oe,fe,h,m,x))){K=!1;break}}return x.delete(s),x.delete(c),K}l(Gm,"equalArrays");function B0(s,c,h,m,b,x,I){switch(h){case Bn:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case Gi:return!(s.byteLength!=c.byteLength||!x(new Eo(s),new Eo(c)));case gt:case ct:case Le:return rr(+s,+c);case xr:return s.name==c.name&&s.message==c.message;case Ui:case Vi:return s==c+"";case xe:var R=Zc;case Jt:var _=m&w;if(R||(R=go),s.size!=c.size&&!_)return!1;var F=I.get(s);if(F)return F==c;m|=S,I.set(s,c);var $=Gm(R(s),R(c),m,b,x,I);return I.delete(s),$;case co:if(Zi)return Zi.call(s)==Zi.call(c)}return!1}l(B0,"equalByTag");function W0(s,c,h,m,b,x){var I=h&w,R=Eu(s),_=R.length,F=Eu(c),$=F.length;if(_!=$&&!I)return!1;for(var H=_;H--;){var K=R[H];if(!(I?K in c:Ie.call(c,K)))return!1}var te=x.get(s),oe=x.get(c);if(te&&oe)return te==c&&oe==s;var fe=!0;x.set(s,c),x.set(c,s);for(var ne=I;++H<_;){K=R[H];var ye=s[K],Se=c[K];if(m)var Ht=I?m(Se,ye,K,c,s,x):m(ye,Se,K,s,c,x);if(!(Ht===n?ye===Se||b(ye,Se,h,m,x):Ht)){fe=!1;break}ne||(ne=K=="constructor")}if(fe&&!ne){var xt=s.constructor,Bt=c.constructor;xt!=Bt&&"constructor"in s&&"constructor"in c&&!(typeof xt=="function"&&xt instanceof xt&&typeof Bt=="function"&&Bt instanceof Bt)&&(fe=!1)}return x.delete(s),x.delete(c),fe}l(W0,"equalObjects");function Rr(s){return Ou(Zm(s,n,og),s+"")}l(Rr,"flatRest");function Eu(s){return fm(s,ft,Tu)}l(Eu,"getAllKeys");function Cu(s){return fm(s,Ot,jm)}l(Cu,"getAllKeysIn");var xu=Ro?function(s){return Ro.get(s)}:zu;function Uo(s){for(var c=s.name+"",h=qn[c],m=Ie.call(qn,c)?h.length:0;m--;){var b=h[m],x=b.func;if(x==null||x==s)return b.name}return c}l(Uo,"getFuncName");function Zn(s){var c=Ie.call(E,"placeholder")?E:s;return c.placeholder}l(Zn,"getHolder");function se(){var s=E.iteratee||Uu;return s=s===Uu?pm:s,arguments.length?s(arguments[0],arguments[1]):s}l(se,"getIteratee");function Vo(s,c){var h=s.__data__;return K0(c)?h[typeof c=="string"?"string":"hash"]:h.map}l(Vo,"getMapData");function Mu(s){for(var c=ft(s),h=c.length;h--;){var m=c[h],b=s[m];c[h]=[m,b,Km(b)]}return c}l(Mu,"getMatchData");function Cn(s,c){var h=JC(s,c);return dm(h)?h:n}l(Cn,"getNative");function U0(s){var c=Ie.call(s,bn),h=s[bn];try{s[bn]=n;var m=!0}catch{}var b=wo.call(s);return m&&(c?s[bn]=h:delete s[bn]),b}l(U0,"getRawTag");var Tu=Qc?function(s){return s==null?[]:(s=ke(s),Gr(Qc(s),function(c){return Jp.call(s,c)}))}:Gu,jm=Qc?function(s){for(var c=[];s;)jr(c,Tu(s)),s=Co(s);return c}:Gu,bt=Et;(eu&&bt(new eu(new ArrayBuffer(1)))!=Bn||Yi&&bt(new Yi)!=xe||tu&&bt(tu.resolve())!=Hn||jn&&bt(new jn)!=Jt||Ki&&bt(new Ki)!=zi)&&(bt=l(function(s){var c=Et(s),h=c==ge?s.constructor:n,m=h?xn(h):"";if(m)switch(m){case xx:return Bn;case Mx:return xe;case Tx:return Hn;case Ix:return Jt;case Rx:return zi}return c},"getTag"));function V0(s,c,h){for(var m=-1,b=h.length;++m<b;){var x=h[m],I=x.size;switch(x.type){case"drop":s+=I;break;case"dropRight":c-=I;break;case"take":c=yt(c,s+I);break;case"takeRight":s=at(s,c-I);break}}return{start:s,end:c}}l(V0,"getView");function z0(s){var c=s.match(ZE);return c?c[1].split(JE):[]}l(z0,"getWrapDetails");function qm(s,c,h){c=Jr(c,s);for(var m=-1,b=c.length,x=!1;++m<b;){var I=tr(c[m]);if(!(x=s!=null&&h(s,I)))break;s=s[I]}return x||++m!=b?x:(b=s==null?0:s.length,!!b&&Xo(b)&&Ar(I,b)&&(ce(s)||Mn(s)))}l(qm,"hasPath");function G0(s){var c=s.length,h=new s.constructor(c);return c&&typeof s[0]=="string"&&Ie.call(s,"index")&&(h.index=s.index,h.input=s.input),h}l(G0,"initCloneArray");function Ym(s){return typeof s.constructor=="function"&&!is(s)?Yn(Co(s)):{}}l(Ym,"initCloneObject");function j0(s,c,h){var m=s.constructor;switch(c){case Gi:return vu(s);case gt:case ct:return new m(+s);case Bn:return A0(s,h);case Mc:case Tc:case Ic:case Rc:case Ac:case Oc:case _c:case Lc:case Nc:return Om(s,h);case xe:return new m;case Le:case Vi:return new m(s);case Ui:return O0(s);case Jt:return new m;case co:return _0(s)}}l(j0,"initCloneByTag");function q0(s,c){var h=c.length;if(!h)return s;var m=h-1;return c[m]=(h>1?"& ":"")+c[m],c=c.join(h>2?", ":" "),s.replace(XE,`{
|
|
1
|
+
(()=>{var mR=Object.create;var Xu=Object.defineProperty;var gR=Object.getOwnPropertyDescriptor;var yR=Object.getOwnPropertyNames;var bR=Object.getPrototypeOf,vR=Object.prototype.hasOwnProperty;var l=(n,e)=>Xu(n,"name",{value:e,configurable:!0});var Jo=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var wR=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of yR(e))!vR.call(n,i)&&i!==t&&Xu(n,i,{get:()=>e[i],enumerable:!(r=gR(e,i))||r.enumerable});return n};var Zu=(n,e,t)=>(t=n!=null?mR(bR(n)):{},wR(e||!n||!n.__esModule?Xu(t,"default",{value:n,enumerable:!0}):t,n));var zg=Jo((EH,Vg)=>{Vg.exports=n=>new Promise(e=>setTimeout(e,n))});var Kg=Jo((ni,us)=>{(function(){var n,e="4.18.1",t=200,r="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",a="Invalid `imports` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,d="__lodash_placeholder__",p=1,g=2,y=4,w=1,S=2,E=1,v=2,M=4,A=8,T=16,L=32,V=64,U=128,Z=256,W=512,G=30,re="...",B=800,j=16,k=1,Q=2,ee=3,q=1/0,ae=9007199254740991,rt=17976931348623157e292,De=NaN,Pe=4294967295,gn=Pe-1,Hn=Pe>>>1,pe=[["ary",U],["bind",E],["bindKey",v],["curry",A],["curryRight",T],["flip",W],["partial",L],["partialRight",V],["rearg",Z]],st="[object Arguments]",mt="[object Array]",Nt="[object AsyncFunction]",gt="[object Boolean]",ct="[object Date]",Wi="[object DOMException]",xr="[object Error]",we="[object Function]",It="[object GeneratorFunction]",xe="[object Map]",Le="[object Number]",Vt="[object Null]",ge="[object Object]",Bn="[object Promise]",kE="[object Proxy]",Ui="[object RegExp]",Jt="[object Set]",Vi="[object String]",co="[object Symbol]",PE="[object Undefined]",zi="[object WeakMap]",FE="[object WeakSet]",Gi="[object ArrayBuffer]",Wn="[object DataView]",Rc="[object Float32Array]",Ac="[object Float64Array]",Oc="[object Int8Array]",_c="[object Int16Array]",Lc="[object Int32Array]",Nc="[object Uint8Array]",Dc="[object Uint8ClampedArray]",kc="[object Uint16Array]",Pc="[object Uint32Array]",$E=/\b__p \+= '';/g,HE=/\b(__p \+=) '' \+/g,BE=/(__e\(.*?\)|\b__t\)) \+\n'';/g,cp=/&(?:amp|lt|gt|quot|#39);/g,up=/[&<>"']/g,WE=RegExp(cp.source),UE=RegExp(up.source),VE=/<%-([\s\S]+?)%>/g,zE=/<%([\s\S]+?)%>/g,fp=/<%=([\s\S]+?)%>/g,GE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jE=/^\w*$/,qE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fc=/[\\^$.*+?()[\]{}|]/g,YE=RegExp(Fc.source),$c=/^\s+/,KE=/\s/,XE=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ZE=/\{\n\/\* \[wrapped with (.+)\] \*/,JE=/,? & /,QE=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hp=/[()=,{}\[\]\/\s]/,eC=/\\(\\)?/g,tC=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dp=/\w*$/,rC=/^[-+]0x[0-9a-f]+$/i,nC=/^0b[01]+$/i,iC=/^\[object .+?Constructor\]$/,sC=/^0o[0-7]+$/i,oC=/^(?:0|[1-9]\d*)$/,aC=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,uo=/($^)/,lC=/['\n\r\u2028\u2029\\]/g,fo="\\ud800-\\udfff",cC="\\u0300-\\u036f",uC="\\ufe20-\\ufe2f",fC="\\u20d0-\\u20ff",pp=cC+uC+fC,mp="\\u2700-\\u27bf",gp="a-z\\xdf-\\xf6\\xf8-\\xff",hC="\\xac\\xb1\\xd7\\xf7",dC="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",pC="\\u2000-\\u206f",mC=" \\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",yp="A-Z\\xc0-\\xd6\\xd8-\\xde",bp="\\ufe0e\\ufe0f",vp=hC+dC+pC+mC,Hc="['\u2019]",gC="["+fo+"]",wp="["+vp+"]",ho="["+pp+"]",Sp="\\d+",yC="["+mp+"]",Ep="["+gp+"]",Cp="[^"+fo+vp+Sp+mp+gp+yp+"]",Bc="\\ud83c[\\udffb-\\udfff]",bC="(?:"+ho+"|"+Bc+")",xp="[^"+fo+"]",Wc="(?:\\ud83c[\\udde6-\\uddff]){2}",Uc="[\\ud800-\\udbff][\\udc00-\\udfff]",Un="["+yp+"]",Mp="\\u200d",Tp="(?:"+Ep+"|"+Cp+")",vC="(?:"+Un+"|"+Cp+")",Ip="(?:"+Hc+"(?:d|ll|m|re|s|t|ve))?",Rp="(?:"+Hc+"(?:D|LL|M|RE|S|T|VE))?",Ap=bC+"?",Op="["+bp+"]?",wC="(?:"+Mp+"(?:"+[xp,Wc,Uc].join("|")+")"+Op+Ap+")*",SC="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",EC="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",_p=Op+Ap+wC,CC="(?:"+[yC,Wc,Uc].join("|")+")"+_p,xC="(?:"+[xp+ho+"?",ho,Wc,Uc,gC].join("|")+")",MC=RegExp(Hc,"g"),TC=RegExp(ho,"g"),Vc=RegExp(Bc+"(?="+Bc+")|"+xC+_p,"g"),IC=RegExp([Un+"?"+Ep+"+"+Ip+"(?="+[wp,Un,"$"].join("|")+")",vC+"+"+Rp+"(?="+[wp,Un+Tp,"$"].join("|")+")",Un+"?"+Tp+"+"+Ip,Un+"+"+Rp,EC,SC,Sp,CC].join("|"),"g"),RC=RegExp("["+Mp+fo+pp+bp+"]"),AC=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,OC=["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"],_C=-1,We={};We[Rc]=We[Ac]=We[Oc]=We[_c]=We[Lc]=We[Nc]=We[Dc]=We[kc]=We[Pc]=!0,We[st]=We[mt]=We[Gi]=We[gt]=We[Wn]=We[ct]=We[xr]=We[we]=We[xe]=We[Le]=We[ge]=We[Ui]=We[Jt]=We[Vi]=We[zi]=!1;var Fe={};Fe[st]=Fe[mt]=Fe[Gi]=Fe[Wn]=Fe[gt]=Fe[ct]=Fe[Rc]=Fe[Ac]=Fe[Oc]=Fe[_c]=Fe[Lc]=Fe[xe]=Fe[Le]=Fe[ge]=Fe[Ui]=Fe[Jt]=Fe[Vi]=Fe[co]=Fe[Nc]=Fe[Dc]=Fe[kc]=Fe[Pc]=!0,Fe[xr]=Fe[we]=Fe[zi]=!1;var LC={\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"},NC={"&":"&","<":"<",">":">",'"':""","'":"'"},DC={"&":"&","<":"<",">":">",""":'"',"'":"'"},kC={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},PC=parseFloat,FC=parseInt,Lp=typeof global=="object"&&global&&global.Object===Object&&global,$C=typeof self=="object"&&self&&self.Object===Object&&self,ut=Lp||$C||Function("return this")(),zc=typeof ni=="object"&&ni&&!ni.nodeType&&ni,yn=zc&&typeof us=="object"&&us&&!us.nodeType&&us,Np=yn&&yn.exports===zc,Gc=Np&&Lp.process,zt=function(){try{var O=yn&&yn.require&&yn.require("util").types;return O||Gc&&Gc.binding&&Gc.binding("util")}catch{}}(),Dp=zt&&zt.isArrayBuffer,kp=zt&&zt.isDate,Pp=zt&&zt.isMap,Fp=zt&&zt.isRegExp,$p=zt&&zt.isSet,Hp=zt&&zt.isTypedArray;function Dt(O,D,N){switch(N.length){case 0:return O.call(D);case 1:return O.call(D,N[0]);case 2:return O.call(D,N[0],N[1]);case 3:return O.call(D,N[0],N[1],N[2])}return O.apply(D,N)}l(Dt,"apply");function HC(O,D,N,X){for(var le=-1,Te=O==null?0:O.length;++le<Te;){var ot=O[le];D(X,ot,N(ot),O)}return X}l(HC,"arrayAggregator");function kt(O,D){for(var N=-1,X=O==null?0:O.length;++N<X&&D(O[N],N,O)!==!1;);return O}l(kt,"arrayEach");function BC(O,D){for(var N=O==null?0:O.length;N--&&D(O[N],N,O)!==!1;);return O}l(BC,"arrayEachRight");function Bp(O,D){for(var N=-1,X=O==null?0:O.length;++N<X;)if(!D(O[N],N,O))return!1;return!0}l(Bp,"arrayEvery");function Gr(O,D){for(var N=-1,X=O==null?0:O.length,le=0,Te=[];++N<X;){var ot=O[N];D(ot,N,O)&&(Te[le++]=ot)}return Te}l(Gr,"arrayFilter");function po(O,D){var N=O==null?0:O.length;return!!N&&Vn(O,D,0)>-1}l(po,"arrayIncludes");function jc(O,D,N){for(var X=-1,le=O==null?0:O.length;++X<le;)if(N(D,O[X]))return!0;return!1}l(jc,"arrayIncludesWith");function qe(O,D){for(var N=-1,X=O==null?0:O.length,le=Array(X);++N<X;)le[N]=D(O[N],N,O);return le}l(qe,"arrayMap");function jr(O,D){for(var N=-1,X=D.length,le=O.length;++N<X;)O[le+N]=D[N];return O}l(jr,"arrayPush");function qc(O,D,N,X){var le=-1,Te=O==null?0:O.length;for(X&&Te&&(N=O[++le]);++le<Te;)N=D(N,O[le],le,O);return N}l(qc,"arrayReduce");function WC(O,D,N,X){var le=O==null?0:O.length;for(X&&le&&(N=O[--le]);le--;)N=D(N,O[le],le,O);return N}l(WC,"arrayReduceRight");function Yc(O,D){for(var N=-1,X=O==null?0:O.length;++N<X;)if(D(O[N],N,O))return!0;return!1}l(Yc,"arraySome");var UC=Kc("length");function VC(O){return O.split("")}l(VC,"asciiToArray");function zC(O){return O.match(QE)||[]}l(zC,"asciiWords");function Wp(O,D,N){var X;return N(O,function(le,Te,ot){if(D(le,Te,ot))return X=Te,!1}),X}l(Wp,"baseFindKey");function mo(O,D,N,X){for(var le=O.length,Te=N+(X?1:-1);X?Te--:++Te<le;)if(D(O[Te],Te,O))return Te;return-1}l(mo,"baseFindIndex");function Vn(O,D,N){return D===D?rx(O,D,N):mo(O,Up,N)}l(Vn,"baseIndexOf");function GC(O,D,N,X){for(var le=N-1,Te=O.length;++le<Te;)if(X(O[le],D))return le;return-1}l(GC,"baseIndexOfWith");function Up(O){return O!==O}l(Up,"baseIsNaN");function Vp(O,D){var N=O==null?0:O.length;return N?Zc(O,D)/N:De}l(Vp,"baseMean");function Kc(O){return function(D){return D==null?n:D[O]}}l(Kc,"baseProperty");function Xc(O){return function(D){return O==null?n:O[D]}}l(Xc,"basePropertyOf");function zp(O,D,N,X,le){return le(O,function(Te,ot,ke){N=X?(X=!1,Te):D(N,Te,ot,ke)}),N}l(zp,"baseReduce");function jC(O,D){var N=O.length;for(O.sort(D);N--;)O[N]=O[N].value;return O}l(jC,"baseSortBy");function Zc(O,D){for(var N,X=-1,le=O.length;++X<le;){var Te=D(O[X]);Te!==n&&(N=N===n?Te:N+Te)}return N}l(Zc,"baseSum");function Jc(O,D){for(var N=-1,X=Array(O);++N<O;)X[N]=D(N);return X}l(Jc,"baseTimes");function qC(O,D){return qe(D,function(N){return[N,O[N]]})}l(qC,"baseToPairs");function Gp(O){return O&&O.slice(0,Kp(O)+1).replace($c,"")}l(Gp,"baseTrim");function Pt(O){return function(D){return O(D)}}l(Pt,"baseUnary");function Qc(O,D){return qe(D,function(N){return O[N]})}l(Qc,"baseValues");function ji(O,D){return O.has(D)}l(ji,"cacheHas");function jp(O,D){for(var N=-1,X=O.length;++N<X&&Vn(D,O[N],0)>-1;);return N}l(jp,"charsStartIndex");function qp(O,D){for(var N=O.length;N--&&Vn(D,O[N],0)>-1;);return N}l(qp,"charsEndIndex");function YC(O,D){for(var N=O.length,X=0;N--;)O[N]===D&&++X;return X}l(YC,"countHolders");var KC=Xc(LC),XC=Xc(NC);function ZC(O){return"\\"+kC[O]}l(ZC,"escapeStringChar");function JC(O,D){return O==null?n:O[D]}l(JC,"getValue");function zn(O){return RC.test(O)}l(zn,"hasUnicode");function QC(O){return AC.test(O)}l(QC,"hasUnicodeWord");function ex(O){for(var D,N=[];!(D=O.next()).done;)N.push(D.value);return N}l(ex,"iteratorToArray");function eu(O){var D=-1,N=Array(O.size);return O.forEach(function(X,le){N[++D]=[le,X]}),N}l(eu,"mapToArray");function Yp(O,D){return function(N){return O(D(N))}}l(Yp,"overArg");function qr(O,D){for(var N=-1,X=O.length,le=0,Te=[];++N<X;){var ot=O[N];(ot===D||ot===d)&&(O[N]=d,Te[le++]=N)}return Te}l(qr,"replaceHolders");function go(O){var D=-1,N=Array(O.size);return O.forEach(function(X){N[++D]=X}),N}l(go,"setToArray");function tx(O){var D=-1,N=Array(O.size);return O.forEach(function(X){N[++D]=[X,X]}),N}l(tx,"setToPairs");function rx(O,D,N){for(var X=N-1,le=O.length;++X<le;)if(O[X]===D)return X;return-1}l(rx,"strictIndexOf");function nx(O,D,N){for(var X=N+1;X--;)if(O[X]===D)return X;return X}l(nx,"strictLastIndexOf");function Gn(O){return zn(O)?sx(O):UC(O)}l(Gn,"stringSize");function Qt(O){return zn(O)?ox(O):VC(O)}l(Qt,"stringToArray");function Kp(O){for(var D=O.length;D--&&KE.test(O.charAt(D)););return D}l(Kp,"trimmedEndIndex");var ix=Xc(DC);function sx(O){for(var D=Vc.lastIndex=0;Vc.test(O);)++D;return D}l(sx,"unicodeSize");function ox(O){return O.match(Vc)||[]}l(ox,"unicodeToArray");function ax(O){return O.match(IC)||[]}l(ax,"unicodeWords");var lx=l(function O(D){D=D==null?ut:Yr.defaults(ut.Object(),D,Yr.pick(ut,OC));var N=D.Array,X=D.Date,le=D.Error,Te=D.Function,ot=D.Math,ke=D.Object,tu=D.RegExp,cx=D.String,Gt=D.TypeError,yo=N.prototype,ux=Te.prototype,jn=ke.prototype,bo=D["__core-js_shared__"],vo=ux.toString,Ie=jn.hasOwnProperty,fx=0,Xp=function(){var s=/[^.]+$/.exec(bo&&bo.keys&&bo.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),wo=jn.toString,hx=vo.call(ke),dx=ut._,px=tu("^"+vo.call(Ie).replace(Fc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),So=Np?D.Buffer:n,Kr=D.Symbol,Eo=D.Uint8Array,Zp=So?So.allocUnsafe:n,Co=Yp(ke.getPrototypeOf,ke),Jp=ke.create,Qp=jn.propertyIsEnumerable,xo=yo.splice,em=Kr?Kr.isConcatSpreadable:n,qi=Kr?Kr.iterator:n,bn=Kr?Kr.toStringTag:n,Mo=function(){try{var s=Cn(ke,"defineProperty");return s({},"",{}),s}catch{}}(),mx=D.clearTimeout!==ut.clearTimeout&&D.clearTimeout,gx=X&&X.now!==ut.Date.now&&X.now,yx=D.setTimeout!==ut.setTimeout&&D.setTimeout,To=ot.ceil,Io=ot.floor,ru=ke.getOwnPropertySymbols,bx=So?So.isBuffer:n,tm=D.isFinite,vx=yo.join,wx=Yp(ke.keys,ke),at=ot.max,yt=ot.min,Sx=X.now,Ex=D.parseInt,rm=ot.random,Cx=yo.reverse,nu=Cn(D,"DataView"),Yi=Cn(D,"Map"),iu=Cn(D,"Promise"),qn=Cn(D,"Set"),Ki=Cn(D,"WeakMap"),Xi=Cn(ke,"create"),Ro=Ki&&new Ki,Yn={},xx=xn(nu),Mx=xn(Yi),Tx=xn(iu),Ix=xn(qn),Rx=xn(Ki),Ao=Kr?Kr.prototype:n,Zi=Ao?Ao.valueOf:n,nm=Ao?Ao.toString:n;function C(s){if(et(s)&&!ce(s)&&!(s instanceof be)){if(s instanceof jt)return s;if(Ie.call(s,"__wrapped__"))return ig(s)}return new jt(s)}l(C,"lodash");var Kn=function(){function s(){}return l(s,"object"),function(c){if(!Je(c))return{};if(Jp)return Jp(c);s.prototype=c;var h=new s;return s.prototype=n,h}}();function Oo(){}l(Oo,"baseLodash");function jt(s,c){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!c,this.__index__=0,this.__values__=n}l(jt,"LodashWrapper"),C.templateSettings={escape:VE,evaluate:zE,interpolate:fp,variable:"",imports:{_:C}},C.prototype=Oo.prototype,C.prototype.constructor=C,jt.prototype=Kn(Oo.prototype),jt.prototype.constructor=jt;function be(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Pe,this.__views__=[]}l(be,"LazyWrapper");function Ax(){var s=new be(this.__wrapped__);return s.__actions__=Rt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Rt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Rt(this.__views__),s}l(Ax,"lazyClone");function Ox(){if(this.__filtered__){var s=new be(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}l(Ox,"lazyReverse");function _x(){var s=this.__wrapped__.value(),c=this.__dir__,h=ce(s),m=c<0,b=h?s.length:0,x=V0(0,b,this.__views__),I=x.start,R=x.end,_=R-I,F=m?R:I-1,$=this.__iteratees__,H=$.length,K=0,te=yt(_,this.__takeCount__);if(!h||!m&&b==_&&te==_)return Im(s,this.__actions__);var oe=[];e:for(;_--&&K<te;){F+=c;for(var he=-1,ne=s[F];++he<H;){var ye=$[he],Se=ye.iteratee,Ht=ye.type,xt=Se(ne);if(Ht==Q)ne=xt;else if(!xt){if(Ht==k)continue e;break e}}oe[K++]=ne}return oe}l(_x,"lazyValue"),be.prototype=Kn(Oo.prototype),be.prototype.constructor=be;function vn(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(vn,"Hash");function Lx(){this.__data__=Xi?Xi(null):{},this.size=0}l(Lx,"hashClear");function Nx(s){var c=this.has(s)&&delete this.__data__[s];return this.size-=c?1:0,c}l(Nx,"hashDelete");function Dx(s){var c=this.__data__;if(Xi){var h=c[s];return h===u?n:h}return Ie.call(c,s)?c[s]:n}l(Dx,"hashGet");function kx(s){var c=this.__data__;return Xi?c[s]!==n:Ie.call(c,s)}l(kx,"hashHas");function Px(s,c){var h=this.__data__;return this.size+=this.has(s)?0:1,h[s]=Xi&&c===n?u:c,this}l(Px,"hashSet"),vn.prototype.clear=Lx,vn.prototype.delete=Nx,vn.prototype.get=Dx,vn.prototype.has=kx,vn.prototype.set=Px;function Mr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(Mr,"ListCache");function Fx(){this.__data__=[],this.size=0}l(Fx,"listCacheClear");function $x(s){var c=this.__data__,h=_o(c,s);if(h<0)return!1;var m=c.length-1;return h==m?c.pop():xo.call(c,h,1),--this.size,!0}l($x,"listCacheDelete");function Hx(s){var c=this.__data__,h=_o(c,s);return h<0?n:c[h][1]}l(Hx,"listCacheGet");function Bx(s){return _o(this.__data__,s)>-1}l(Bx,"listCacheHas");function Wx(s,c){var h=this.__data__,m=_o(h,s);return m<0?(++this.size,h.push([s,c])):h[m][1]=c,this}l(Wx,"listCacheSet"),Mr.prototype.clear=Fx,Mr.prototype.delete=$x,Mr.prototype.get=Hx,Mr.prototype.has=Bx,Mr.prototype.set=Wx;function Tr(s){var c=-1,h=s==null?0:s.length;for(this.clear();++c<h;){var m=s[c];this.set(m[0],m[1])}}l(Tr,"MapCache");function Ux(){this.size=0,this.__data__={hash:new vn,map:new(Yi||Mr),string:new vn}}l(Ux,"mapCacheClear");function Vx(s){var c=Vo(this,s).delete(s);return this.size-=c?1:0,c}l(Vx,"mapCacheDelete");function zx(s){return Vo(this,s).get(s)}l(zx,"mapCacheGet");function Gx(s){return Vo(this,s).has(s)}l(Gx,"mapCacheHas");function jx(s,c){var h=Vo(this,s),m=h.size;return h.set(s,c),this.size+=h.size==m?0:1,this}l(jx,"mapCacheSet"),Tr.prototype.clear=Ux,Tr.prototype.delete=Vx,Tr.prototype.get=zx,Tr.prototype.has=Gx,Tr.prototype.set=jx;function wn(s){var c=-1,h=s==null?0:s.length;for(this.__data__=new Tr;++c<h;)this.add(s[c])}l(wn,"SetCache");function qx(s){return this.__data__.set(s,u),this}l(qx,"setCacheAdd");function Yx(s){return this.__data__.has(s)}l(Yx,"setCacheHas"),wn.prototype.add=wn.prototype.push=qx,wn.prototype.has=Yx;function er(s){var c=this.__data__=new Mr(s);this.size=c.size}l(er,"Stack");function Kx(){this.__data__=new Mr,this.size=0}l(Kx,"stackClear");function Xx(s){var c=this.__data__,h=c.delete(s);return this.size=c.size,h}l(Xx,"stackDelete");function Zx(s){return this.__data__.get(s)}l(Zx,"stackGet");function Jx(s){return this.__data__.has(s)}l(Jx,"stackHas");function Qx(s,c){var h=this.__data__;if(h instanceof Mr){var m=h.__data__;if(!Yi||m.length<t-1)return m.push([s,c]),this.size=++h.size,this;h=this.__data__=new Tr(m)}return h.set(s,c),this.size=h.size,this}l(Qx,"stackSet"),er.prototype.clear=Kx,er.prototype.delete=Xx,er.prototype.get=Zx,er.prototype.has=Jx,er.prototype.set=Qx;function im(s,c){var h=ce(s),m=!h&&Mn(s),b=!h&&!m&&en(s),x=!h&&!m&&!b&&Qn(s),I=h||m||b||x,R=I?Jc(s.length,cx):[],_=R.length;for(var F in s)(c||Ie.call(s,F))&&!(I&&(F=="length"||b&&(F=="offset"||F=="parent")||x&&(F=="buffer"||F=="byteLength"||F=="byteOffset")||Ar(F,_)))&&R.push(F);return R}l(im,"arrayLikeKeys");function sm(s){var c=s.length;return c?s[mu(0,c-1)]:n}l(sm,"arraySample");function e0(s,c){return zo(Rt(s),Sn(c,0,s.length))}l(e0,"arraySampleSize");function t0(s){return zo(Rt(s))}l(t0,"arrayShuffle");function su(s,c,h){(h!==n&&!rr(s[c],h)||h===n&&!(c in s))&&cr(s,c,h)}l(su,"assignMergeValue");function Ji(s,c,h){var m=s[c];(!(Ie.call(s,c)&&rr(m,h))||h===n&&!(c in s))&&cr(s,c,h)}l(Ji,"assignValue");function _o(s,c){for(var h=s.length;h--;)if(rr(s[h][0],c))return h;return-1}l(_o,"assocIndexOf");function r0(s,c,h,m){return Xr(s,function(b,x,I){c(m,b,h(b),I)}),m}l(r0,"baseAggregator");function om(s,c){return s&&fr(c,ft(c),s)}l(om,"baseAssign");function n0(s,c){return s&&fr(c,Ot(c),s)}l(n0,"baseAssignIn");function cr(s,c,h){c=="__proto__"&&Mo?Mo(s,c,{configurable:!0,enumerable:!0,value:h,writable:!0}):s[c]=h}l(cr,"baseAssignValue");function ou(s,c){for(var h=-1,m=c.length,b=N(m),x=s==null;++h<m;)b[h]=x?n:Wu(s,c[h]);return b}l(ou,"baseAt");function Sn(s,c,h){return s===s&&(h!==n&&(s=s<=h?s:h),c!==n&&(s=s>=c?s:c)),s}l(Sn,"baseClamp");function qt(s,c,h,m,b,x){var I,R=c&p,_=c&g,F=c&y;if(h&&(I=b?h(s,m,b,x):h(s)),I!==n)return I;if(!Je(s))return s;var $=ce(s);if($){if(I=G0(s),!R)return Rt(s,I)}else{var H=bt(s),K=H==we||H==It;if(en(s))return Om(s,R);if(H==ge||H==st||K&&!b){if(I=_||K?{}:Km(s),!R)return _?D0(s,n0(I,s)):N0(s,om(I,s))}else{if(!Fe[H])return b?s:{};I=j0(s,H,R)}}x||(x=new er);var te=x.get(s);if(te)return te;x.set(s,I),xg(s)?s.forEach(function(ne){I.add(qt(ne,c,h,ne,s,x))}):Eg(s)&&s.forEach(function(ne,ye){I.set(ye,qt(ne,c,h,ye,s,x))});var oe=F?_?Tu:Mu:_?Ot:ft,he=$?n:oe(s);return kt(he||s,function(ne,ye){he&&(ye=ne,ne=s[ye]),Ji(I,ye,qt(ne,c,h,ye,s,x))}),I}l(qt,"baseClone");function i0(s){var c=ft(s);return function(h){return am(h,s,c)}}l(i0,"baseConforms");function am(s,c,h){var m=h.length;if(s==null)return!m;for(s=ke(s);m--;){var b=h[m],x=c[b],I=s[b];if(I===n&&!(b in s)||!x(I))return!1}return!0}l(am,"baseConformsTo");function lm(s,c,h){if(typeof s!="function")throw new Gt(i);return ss(function(){s.apply(n,h)},c)}l(lm,"baseDelay");function Qi(s,c,h,m){var b=-1,x=po,I=!0,R=s.length,_=[],F=c.length;if(!R)return _;h&&(c=qe(c,Pt(h))),m?(x=jc,I=!1):c.length>=t&&(x=ji,I=!1,c=new wn(c));e:for(;++b<R;){var $=s[b],H=h==null?$:h($);if($=m||$!==0?$:0,I&&H===H){for(var K=F;K--;)if(c[K]===H)continue e;_.push($)}else x(c,H,m)||_.push($)}return _}l(Qi,"baseDifference");var Xr=km(ur),cm=km(lu,!0);function s0(s,c){var h=!0;return Xr(s,function(m,b,x){return h=!!c(m,b,x),h}),h}l(s0,"baseEvery");function Lo(s,c,h){for(var m=-1,b=s.length;++m<b;){var x=s[m],I=c(x);if(I!=null&&(R===n?I===I&&!$t(I):h(I,R)))var R=I,_=x}return _}l(Lo,"baseExtremum");function o0(s,c,h,m){var b=s.length;for(h=fe(h),h<0&&(h=-h>b?0:b+h),m=m===n||m>b?b:fe(m),m<0&&(m+=b),m=h>m?0:Tg(m);h<m;)s[h++]=c;return s}l(o0,"baseFill");function um(s,c){var h=[];return Xr(s,function(m,b,x){c(m,b,x)&&h.push(m)}),h}l(um,"baseFilter");function ht(s,c,h,m,b){var x=-1,I=s.length;for(h||(h=Y0),b||(b=[]);++x<I;){var R=s[x];c>0&&h(R)?c>1?ht(R,c-1,h,m,b):jr(b,R):m||(b[b.length]=R)}return b}l(ht,"baseFlatten");var au=Pm(),fm=Pm(!0);function ur(s,c){return s&&au(s,c,ft)}l(ur,"baseForOwn");function lu(s,c){return s&&fm(s,c,ft)}l(lu,"baseForOwnRight");function No(s,c){return Gr(c,function(h){return Or(s[h])})}l(No,"baseFunctions");function En(s,c){c=Jr(c,s);for(var h=0,m=c.length;s!=null&&h<m;)s=s[tr(c[h++])];return h&&h==m?s:n}l(En,"baseGet");function hm(s,c,h){var m=c(s);return ce(s)?m:jr(m,h(s))}l(hm,"baseGetAllKeys");function Et(s){return s==null?s===n?PE:Vt:bn&&bn in ke(s)?U0(s):t1(s)}l(Et,"baseGetTag");function cu(s,c){return s>c}l(cu,"baseGt");function a0(s,c){return s!=null&&Ie.call(s,c)}l(a0,"baseHas");function l0(s,c){return s!=null&&c in ke(s)}l(l0,"baseHasIn");function c0(s,c,h){return s>=yt(c,h)&&s<at(c,h)}l(c0,"baseInRange");function uu(s,c,h){for(var m=h?jc:po,b=s[0].length,x=s.length,I=x,R=N(x),_=1/0,F=[];I--;){var $=s[I];I&&c&&($=qe($,Pt(c))),_=yt($.length,_),R[I]=!h&&(c||b>=120&&$.length>=120)?new wn(I&&$):n}$=s[0];var H=-1,K=R[0];e:for(;++H<b&&F.length<_;){var te=$[H],oe=c?c(te):te;if(te=h||te!==0?te:0,!(K?ji(K,oe):m(F,oe,h))){for(I=x;--I;){var he=R[I];if(!(he?ji(he,oe):m(s[I],oe,h)))continue e}K&&K.push(oe),F.push(te)}}return F}l(uu,"baseIntersection");function u0(s,c,h,m){return ur(s,function(b,x,I){c(m,h(b),x,I)}),m}l(u0,"baseInverter");function es(s,c,h){c=Jr(c,s),s=Qm(s,c);var m=s==null?s:s[tr(Kt(c))];return m==null?n:Dt(m,s,h)}l(es,"baseInvoke");function dm(s){return et(s)&&Et(s)==st}l(dm,"baseIsArguments");function f0(s){return et(s)&&Et(s)==Gi}l(f0,"baseIsArrayBuffer");function h0(s){return et(s)&&Et(s)==ct}l(h0,"baseIsDate");function ts(s,c,h,m,b){return s===c?!0:s==null||c==null||!et(s)&&!et(c)?s!==s&&c!==c:d0(s,c,h,m,ts,b)}l(ts,"baseIsEqual");function d0(s,c,h,m,b,x){var I=ce(s),R=ce(c),_=I?mt:bt(s),F=R?mt:bt(c);_=_==st?ge:_,F=F==st?ge:F;var $=_==ge,H=F==ge,K=_==F;if(K&&en(s)){if(!en(c))return!1;I=!0,$=!1}if(K&&!$)return x||(x=new er),I||Qn(s)?jm(s,c,h,m,b,x):B0(s,c,_,h,m,b,x);if(!(h&w)){var te=$&&Ie.call(s,"__wrapped__"),oe=H&&Ie.call(c,"__wrapped__");if(te||oe){var he=te?s.value():s,ne=oe?c.value():c;return x||(x=new er),b(he,ne,h,m,x)}}return K?(x||(x=new er),W0(s,c,h,m,b,x)):!1}l(d0,"baseIsEqualDeep");function p0(s){return et(s)&&bt(s)==xe}l(p0,"baseIsMap");function fu(s,c,h,m){var b=h.length,x=b,I=!m;if(s==null)return!x;for(s=ke(s);b--;){var R=h[b];if(I&&R[2]?R[1]!==s[R[0]]:!(R[0]in s))return!1}for(;++b<x;){R=h[b];var _=R[0],F=s[_],$=R[1];if(I&&R[2]){if(F===n&&!(_ in s))return!1}else{var H=new er;if(m)var K=m(F,$,_,s,c,H);if(!(K===n?ts($,F,w|S,m,H):K))return!1}}return!0}l(fu,"baseIsMatch");function pm(s){if(!Je(s)||X0(s))return!1;var c=Or(s)?px:iC;return c.test(xn(s))}l(pm,"baseIsNative");function m0(s){return et(s)&&Et(s)==Ui}l(m0,"baseIsRegExp");function g0(s){return et(s)&&bt(s)==Jt}l(g0,"baseIsSet");function y0(s){return et(s)&&Xo(s.length)&&!!We[Et(s)]}l(y0,"baseIsTypedArray");function mm(s){return typeof s=="function"?s:s==null?_t:typeof s=="object"?ce(s)?bm(s[0],s[1]):ym(s):$g(s)}l(mm,"baseIteratee");function hu(s){if(!is(s))return wx(s);var c=[];for(var h in ke(s))Ie.call(s,h)&&h!="constructor"&&c.push(h);return c}l(hu,"baseKeys");function b0(s){if(!Je(s))return e1(s);var c=is(s),h=[];for(var m in s)m=="constructor"&&(c||!Ie.call(s,m))||h.push(m);return h}l(b0,"baseKeysIn");function du(s,c){return s<c}l(du,"baseLt");function gm(s,c){var h=-1,m=At(s)?N(s.length):[];return Xr(s,function(b,x,I){m[++h]=c(b,x,I)}),m}l(gm,"baseMap");function ym(s){var c=Ru(s);return c.length==1&&c[0][2]?Zm(c[0][0],c[0][1]):function(h){return h===s||fu(h,s,c)}}l(ym,"baseMatches");function bm(s,c){return Ou(s)&&Xm(c)?Zm(tr(s),c):function(h){var m=Wu(h,s);return m===n&&m===c?Uu(h,s):ts(c,m,w|S)}}l(bm,"baseMatchesProperty");function Do(s,c,h,m,b){s!==c&&au(c,function(x,I){if(b||(b=new er),Je(x))v0(s,c,I,h,Do,m,b);else{var R=m?m(Lu(s,I),x,I+"",s,c,b):n;R===n&&(R=x),su(s,I,R)}},Ot)}l(Do,"baseMerge");function v0(s,c,h,m,b,x,I){var R=Lu(s,h),_=Lu(c,h),F=I.get(_);if(F){su(s,h,F);return}var $=x?x(R,_,h+"",s,c,I):n,H=$===n;if(H){var K=ce(_),te=!K&&en(_),oe=!K&&!te&&Qn(_);$=_,K||te||oe?ce(R)?$=R:nt(R)?$=Rt(R):te?(H=!1,$=Om(_,!0)):oe?(H=!1,$=_m(_,!0)):$=[]:os(_)||Mn(_)?($=R,Mn(R)?$=Ig(R):(!Je(R)||Or(R))&&($=Km(_))):H=!1}H&&(I.set(_,$),b($,_,m,x,I),I.delete(_)),su(s,h,$)}l(v0,"baseMergeDeep");function vm(s,c){var h=s.length;if(h)return c+=c<0?h:0,Ar(c,h)?s[c]:n}l(vm,"baseNth");function wm(s,c,h){c.length?c=qe(c,function(x){return ce(x)?function(I){return En(I,x.length===1?x[0]:x)}:x}):c=[_t];var m=-1;c=qe(c,Pt(se()));var b=gm(s,function(x,I,R){var _=qe(c,function(F){return F(x)});return{criteria:_,index:++m,value:x}});return jC(b,function(x,I){return L0(x,I,h)})}l(wm,"baseOrderBy");function w0(s,c){return Sm(s,c,function(h,m){return Uu(s,m)})}l(w0,"basePick");function Sm(s,c,h){for(var m=-1,b=c.length,x={};++m<b;){var I=c[m],R=En(s,I);h(R,I)&&rs(x,Jr(I,s),R)}return x}l(Sm,"basePickBy");function S0(s){return function(c){return En(c,s)}}l(S0,"basePropertyDeep");function pu(s,c,h,m){var b=m?GC:Vn,x=-1,I=c.length,R=s;for(s===c&&(c=Rt(c)),h&&(R=qe(s,Pt(h)));++x<I;)for(var _=0,F=c[x],$=h?h(F):F;(_=b(R,$,_,m))>-1;)R!==s&&xo.call(R,_,1),xo.call(s,_,1);return s}l(pu,"basePullAll");function Em(s,c){for(var h=s?c.length:0,m=h-1;h--;){var b=c[h];if(h==m||b!==x){var x=b;Ar(b)?xo.call(s,b,1):bu(s,b)}}return s}l(Em,"basePullAt");function mu(s,c){return s+Io(rm()*(c-s+1))}l(mu,"baseRandom");function E0(s,c,h,m){for(var b=-1,x=at(To((c-s)/(h||1)),0),I=N(x);x--;)I[m?x:++b]=s,s+=h;return I}l(E0,"baseRange");function gu(s,c){var h="";if(!s||c<1||c>ae)return h;do c%2&&(h+=s),c=Io(c/2),c&&(s+=s);while(c);return h}l(gu,"baseRepeat");function me(s,c){return Nu(Jm(s,c,_t),s+"")}l(me,"baseRest");function C0(s){return sm(ei(s))}l(C0,"baseSample");function x0(s,c){var h=ei(s);return zo(h,Sn(c,0,h.length))}l(x0,"baseSampleSize");function rs(s,c,h,m){if(!Je(s))return s;c=Jr(c,s);for(var b=-1,x=c.length,I=x-1,R=s;R!=null&&++b<x;){var _=tr(c[b]),F=h;if(_==="__proto__"||_==="constructor"||_==="prototype")return s;if(b!=I){var $=R[_];F=m?m($,_,R):n,F===n&&(F=Je($)?$:Ar(c[b+1])?[]:{})}Ji(R,_,F),R=R[_]}return s}l(rs,"baseSet");var Cm=Ro?function(s,c){return Ro.set(s,c),s}:_t,M0=Mo?function(s,c){return Mo(s,"toString",{configurable:!0,enumerable:!1,value:zu(c),writable:!0})}:_t;function T0(s){return zo(ei(s))}l(T0,"baseShuffle");function Yt(s,c,h){var m=-1,b=s.length;c<0&&(c=-c>b?0:b+c),h=h>b?b:h,h<0&&(h+=b),b=c>h?0:h-c>>>0,c>>>=0;for(var x=N(b);++m<b;)x[m]=s[m+c];return x}l(Yt,"baseSlice");function I0(s,c){var h;return Xr(s,function(m,b,x){return h=c(m,b,x),!h}),!!h}l(I0,"baseSome");function ko(s,c,h){var m=0,b=s==null?m:s.length;if(typeof c=="number"&&c===c&&b<=Hn){for(;m<b;){var x=m+b>>>1,I=s[x];I!==null&&!$t(I)&&(h?I<=c:I<c)?m=x+1:b=x}return b}return yu(s,c,_t,h)}l(ko,"baseSortedIndex");function yu(s,c,h,m){var b=0,x=s==null?0:s.length;if(x===0)return 0;c=h(c);for(var I=c!==c,R=c===null,_=$t(c),F=c===n;b<x;){var $=Io((b+x)/2),H=h(s[$]),K=H!==n,te=H===null,oe=H===H,he=$t(H);if(I)var ne=m||oe;else F?ne=oe&&(m||K):R?ne=oe&&K&&(m||!te):_?ne=oe&&K&&!te&&(m||!he):te||he?ne=!1:ne=m?H<=c:H<c;ne?b=$+1:x=$}return yt(x,gn)}l(yu,"baseSortedIndexBy");function xm(s,c){for(var h=-1,m=s.length,b=0,x=[];++h<m;){var I=s[h],R=c?c(I):I;if(!h||!rr(R,_)){var _=R;x[b++]=I===0?0:I}}return x}l(xm,"baseSortedUniq");function Mm(s){return typeof s=="number"?s:$t(s)?De:+s}l(Mm,"baseToNumber");function Ft(s){if(typeof s=="string")return s;if(ce(s))return qe(s,Ft)+"";if($t(s))return nm?nm.call(s):"";var c=s+"";return c=="0"&&1/s==-q?"-0":c}l(Ft,"baseToString");function Zr(s,c,h){var m=-1,b=po,x=s.length,I=!0,R=[],_=R;if(h)I=!1,b=jc;else if(x>=t){var F=c?null:$0(s);if(F)return go(F);I=!1,b=ji,_=new wn}else _=c?[]:R;e:for(;++m<x;){var $=s[m],H=c?c($):$;if($=h||$!==0?$:0,I&&H===H){for(var K=_.length;K--;)if(_[K]===H)continue e;c&&_.push(H),R.push($)}else b(_,H,h)||(_!==R&&_.push(H),R.push($))}return R}l(Zr,"baseUniq");function bu(s,c){c=Jr(c,s);var h=-1,m=c.length;if(!m)return!0;for(;++h<m;){var b=tr(c[h]);if(b==="__proto__"&&!Ie.call(s,"__proto__")||(b==="constructor"||b==="prototype")&&h<m-1)return!1}var x=Qm(s,c);return x==null||delete x[tr(Kt(c))]}l(bu,"baseUnset");function Tm(s,c,h,m){return rs(s,c,h(En(s,c)),m)}l(Tm,"baseUpdate");function Po(s,c,h,m){for(var b=s.length,x=m?b:-1;(m?x--:++x<b)&&c(s[x],x,s););return h?Yt(s,m?0:x,m?x+1:b):Yt(s,m?x+1:0,m?b:x)}l(Po,"baseWhile");function Im(s,c){var h=s;return h instanceof be&&(h=h.value()),qc(c,function(m,b){return b.func.apply(b.thisArg,jr([m],b.args))},h)}l(Im,"baseWrapperValue");function vu(s,c,h){var m=s.length;if(m<2)return m?Zr(s[0]):[];for(var b=-1,x=N(m);++b<m;)for(var I=s[b],R=-1;++R<m;)R!=b&&(x[b]=Qi(x[b]||I,s[R],c,h));return Zr(ht(x,1),c,h)}l(vu,"baseXor");function Rm(s,c,h){for(var m=-1,b=s.length,x=c.length,I={};++m<b;){var R=m<x?c[m]:n;h(I,s[m],R)}return I}l(Rm,"baseZipObject");function wu(s){return nt(s)?s:[]}l(wu,"castArrayLikeObject");function Su(s){return typeof s=="function"?s:_t}l(Su,"castFunction");function Jr(s,c){return ce(s)?s:Ou(s,c)?[s]:ng(Re(s))}l(Jr,"castPath");var R0=me;function Qr(s,c,h){var m=s.length;return h=h===n?m:h,!c&&h>=m?s:Yt(s,c,h)}l(Qr,"castSlice");var Am=mx||function(s){return ut.clearTimeout(s)};function Om(s,c){if(c)return s.slice();var h=s.length,m=Zp?Zp(h):new s.constructor(h);return s.copy(m),m}l(Om,"cloneBuffer");function Eu(s){var c=new s.constructor(s.byteLength);return new Eo(c).set(new Eo(s)),c}l(Eu,"cloneArrayBuffer");function A0(s,c){var h=c?Eu(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.byteLength)}l(A0,"cloneDataView");function O0(s){var c=new s.constructor(s.source,dp.exec(s));return c.lastIndex=s.lastIndex,c}l(O0,"cloneRegExp");function _0(s){return Zi?ke(Zi.call(s)):{}}l(_0,"cloneSymbol");function _m(s,c){var h=c?Eu(s.buffer):s.buffer;return new s.constructor(h,s.byteOffset,s.length)}l(_m,"cloneTypedArray");function Lm(s,c){if(s!==c){var h=s!==n,m=s===null,b=s===s,x=$t(s),I=c!==n,R=c===null,_=c===c,F=$t(c);if(!R&&!F&&!x&&s>c||x&&I&&_&&!R&&!F||m&&I&&_||!h&&_||!b)return 1;if(!m&&!x&&!F&&s<c||F&&h&&b&&!m&&!x||R&&h&&b||!I&&b||!_)return-1}return 0}l(Lm,"compareAscending");function L0(s,c,h){for(var m=-1,b=s.criteria,x=c.criteria,I=b.length,R=h.length;++m<I;){var _=Lm(b[m],x[m]);if(_){if(m>=R)return _;var F=h[m];return _*(F=="desc"?-1:1)}}return s.index-c.index}l(L0,"compareMultiple");function Nm(s,c,h,m){for(var b=-1,x=s.length,I=h.length,R=-1,_=c.length,F=at(x-I,0),$=N(_+F),H=!m;++R<_;)$[R]=c[R];for(;++b<I;)(H||b<x)&&($[h[b]]=s[b]);for(;F--;)$[R++]=s[b++];return $}l(Nm,"composeArgs");function Dm(s,c,h,m){for(var b=-1,x=s.length,I=-1,R=h.length,_=-1,F=c.length,$=at(x-R,0),H=N($+F),K=!m;++b<$;)H[b]=s[b];for(var te=b;++_<F;)H[te+_]=c[_];for(;++I<R;)(K||b<x)&&(H[te+h[I]]=s[b++]);return H}l(Dm,"composeArgsRight");function Rt(s,c){var h=-1,m=s.length;for(c||(c=N(m));++h<m;)c[h]=s[h];return c}l(Rt,"copyArray");function fr(s,c,h,m){var b=!h;h||(h={});for(var x=-1,I=c.length;++x<I;){var R=c[x],_=m?m(h[R],s[R],R,h,s):n;_===n&&(_=s[R]),b?cr(h,R,_):Ji(h,R,_)}return h}l(fr,"copyObject");function N0(s,c){return fr(s,Au(s),c)}l(N0,"copySymbols");function D0(s,c){return fr(s,qm(s),c)}l(D0,"copySymbolsIn");function Fo(s,c){return function(h,m){var b=ce(h)?HC:r0,x=c?c():{};return b(h,s,se(m,2),x)}}l(Fo,"createAggregator");function Xn(s){return me(function(c,h){var m=-1,b=h.length,x=b>1?h[b-1]:n,I=b>2?h[2]:n;for(x=s.length>3&&typeof x=="function"?(b--,x):n,I&&Ct(h[0],h[1],I)&&(x=b<3?n:x,b=1),c=ke(c);++m<b;){var R=h[m];R&&s(c,R,m,x)}return c})}l(Xn,"createAssigner");function km(s,c){return function(h,m){if(h==null)return h;if(!At(h))return s(h,m);for(var b=h.length,x=c?b:-1,I=ke(h);(c?x--:++x<b)&&m(I[x],x,I)!==!1;);return h}}l(km,"createBaseEach");function Pm(s){return function(c,h,m){for(var b=-1,x=ke(c),I=m(c),R=I.length;R--;){var _=I[s?R:++b];if(h(x[_],_,x)===!1)break}return c}}l(Pm,"createBaseFor");function k0(s,c,h){var m=c&E,b=ns(s);function x(){var I=this&&this!==ut&&this instanceof x?b:s;return I.apply(m?h:this,arguments)}return l(x,"wrapper"),x}l(k0,"createBind");function Fm(s){return function(c){c=Re(c);var h=zn(c)?Qt(c):n,m=h?h[0]:c.charAt(0),b=h?Qr(h,1).join(""):c.slice(1);return m[s]()+b}}l(Fm,"createCaseFirst");function Zn(s){return function(c){return qc(Pg(kg(c).replace(MC,"")),s,"")}}l(Zn,"createCompounder");function ns(s){return function(){var c=arguments;switch(c.length){case 0:return new s;case 1:return new s(c[0]);case 2:return new s(c[0],c[1]);case 3:return new s(c[0],c[1],c[2]);case 4:return new s(c[0],c[1],c[2],c[3]);case 5:return new s(c[0],c[1],c[2],c[3],c[4]);case 6:return new s(c[0],c[1],c[2],c[3],c[4],c[5]);case 7:return new s(c[0],c[1],c[2],c[3],c[4],c[5],c[6])}var h=Kn(s.prototype),m=s.apply(h,c);return Je(m)?m:h}}l(ns,"createCtor");function P0(s,c,h){var m=ns(s);function b(){for(var x=arguments.length,I=N(x),R=x,_=Jn(b);R--;)I[R]=arguments[R];var F=x<3&&I[0]!==_&&I[x-1]!==_?[]:qr(I,_);if(x-=F.length,x<h)return Um(s,c,$o,b.placeholder,n,I,F,n,n,h-x);var $=this&&this!==ut&&this instanceof b?m:s;return Dt($,this,I)}return l(b,"wrapper"),b}l(P0,"createCurry");function $m(s){return function(c,h,m){var b=ke(c);if(!At(c)){var x=se(h,3);c=ft(c),h=l(function(R){return x(b[R],R,b)},"predicate")}var I=s(c,h,m);return I>-1?b[x?c[I]:I]:n}}l($m,"createFind");function Hm(s){return Rr(function(c){var h=c.length,m=h,b=jt.prototype.thru;for(s&&c.reverse();m--;){var x=c[m];if(typeof x!="function")throw new Gt(i);if(b&&!I&&Uo(x)=="wrapper")var I=new jt([],!0)}for(m=I?m:h;++m<h;){x=c[m];var R=Uo(x),_=R=="wrapper"?Iu(x):n;_&&_u(_[0])&&_[1]==(U|A|L|Z)&&!_[4].length&&_[9]==1?I=I[Uo(_[0])].apply(I,_[3]):I=x.length==1&&_u(x)?I[R]():I.thru(x)}return function(){var F=arguments,$=F[0];if(I&&F.length==1&&ce($))return I.plant($).value();for(var H=0,K=h?c[H].apply(this,F):$;++H<h;)K=c[H].call(this,K);return K}})}l(Hm,"createFlow");function $o(s,c,h,m,b,x,I,R,_,F){var $=c&U,H=c&E,K=c&v,te=c&(A|T),oe=c&W,he=K?n:ns(s);function ne(){for(var ye=arguments.length,Se=N(ye),Ht=ye;Ht--;)Se[Ht]=arguments[Ht];if(te)var xt=Jn(ne),Bt=YC(Se,xt);if(m&&(Se=Nm(Se,m,b,te)),x&&(Se=Dm(Se,x,I,te)),ye-=Bt,te&&ye<F){var it=qr(Se,xt);return Um(s,c,$o,ne.placeholder,h,Se,it,R,_,F-ye)}var nr=H?h:this,Lr=K?nr[s]:s;return ye=Se.length,R?Se=r1(Se,R):oe&&ye>1&&Se.reverse(),$&&_<ye&&(Se.length=_),this&&this!==ut&&this instanceof ne&&(Lr=he||ns(Lr)),Lr.apply(nr,Se)}return l(ne,"wrapper"),ne}l($o,"createHybrid");function Bm(s,c){return function(h,m){return u0(h,s,c(m),{})}}l(Bm,"createInverter");function Ho(s,c){return function(h,m){var b;if(h===n&&m===n)return c;if(h!==n&&(b=h),m!==n){if(b===n)return m;typeof h=="string"||typeof m=="string"?(h=Ft(h),m=Ft(m)):(h=Mm(h),m=Mm(m)),b=s(h,m)}return b}}l(Ho,"createMathOperation");function Cu(s){return Rr(function(c){return c=qe(c,Pt(se())),me(function(h){var m=this;return s(c,function(b){return Dt(b,m,h)})})})}l(Cu,"createOver");function Bo(s,c){c=c===n?" ":Ft(c);var h=c.length;if(h<2)return h?gu(c,s):c;var m=gu(c,To(s/Gn(c)));return zn(c)?Qr(Qt(m),0,s).join(""):m.slice(0,s)}l(Bo,"createPadding");function F0(s,c,h,m){var b=c&E,x=ns(s);function I(){for(var R=-1,_=arguments.length,F=-1,$=m.length,H=N($+_),K=this&&this!==ut&&this instanceof I?x:s;++F<$;)H[F]=m[F];for(;_--;)H[F++]=arguments[++R];return Dt(K,b?h:this,H)}return l(I,"wrapper"),I}l(F0,"createPartial");function Wm(s){return function(c,h,m){return m&&typeof m!="number"&&Ct(c,h,m)&&(h=m=n),c=_r(c),h===n?(h=c,c=0):h=_r(h),m=m===n?c<h?1:-1:_r(m),E0(c,h,m,s)}}l(Wm,"createRange");function Wo(s){return function(c,h){return typeof c=="string"&&typeof h=="string"||(c=Xt(c),h=Xt(h)),s(c,h)}}l(Wo,"createRelationalOperation");function Um(s,c,h,m,b,x,I,R,_,F){var $=c&A,H=$?I:n,K=$?n:I,te=$?x:n,oe=$?n:x;c|=$?L:V,c&=~($?V:L),c&M||(c&=~(E|v));var he=[s,c,b,te,H,oe,K,R,_,F],ne=h.apply(n,he);return _u(s)&&eg(ne,he),ne.placeholder=m,tg(ne,s,c)}l(Um,"createRecurry");function xu(s){var c=ot[s];return function(h,m){if(h=Xt(h),m=m==null?0:yt(fe(m),292),m&&tm(h)){var b=(Re(h)+"e").split("e"),x=c(b[0]+"e"+(+b[1]+m));return b=(Re(x)+"e").split("e"),+(b[0]+"e"+(+b[1]-m))}return c(h)}}l(xu,"createRound");var $0=qn&&1/go(new qn([,-0]))[1]==q?function(s){return new qn(s)}:qu;function Vm(s){return function(c){var h=bt(c);return h==xe?eu(c):h==Jt?tx(c):qC(c,s(c))}}l(Vm,"createToPairs");function Ir(s,c,h,m,b,x,I,R){var _=c&v;if(!_&&typeof s!="function")throw new Gt(i);var F=m?m.length:0;if(F||(c&=~(L|V),m=b=n),I=I===n?I:at(fe(I),0),R=R===n?R:fe(R),F-=b?b.length:0,c&V){var $=m,H=b;m=b=n}var K=_?n:Iu(s),te=[s,c,h,m,b,$,H,x,I,R];if(K&&Q0(te,K),s=te[0],c=te[1],h=te[2],m=te[3],b=te[4],R=te[9]=te[9]===n?_?0:s.length:at(te[9]-F,0),!R&&c&(A|T)&&(c&=~(A|T)),!c||c==E)var oe=k0(s,c,h);else c==A||c==T?oe=P0(s,c,R):(c==L||c==(E|L))&&!b.length?oe=F0(s,c,h,m):oe=$o.apply(n,te);var he=K?Cm:eg;return tg(he(oe,te),s,c)}l(Ir,"createWrap");function zm(s,c,h,m){return s===n||rr(s,jn[h])&&!Ie.call(m,h)?c:s}l(zm,"customDefaultsAssignIn");function Gm(s,c,h,m,b,x){return Je(s)&&Je(c)&&(x.set(c,s),Do(s,c,n,Gm,x),x.delete(c)),s}l(Gm,"customDefaultsMerge");function H0(s){return os(s)?n:s}l(H0,"customOmitClone");function jm(s,c,h,m,b,x){var I=h&w,R=s.length,_=c.length;if(R!=_&&!(I&&_>R))return!1;var F=x.get(s),$=x.get(c);if(F&&$)return F==c&&$==s;var H=-1,K=!0,te=h&S?new wn:n;for(x.set(s,c),x.set(c,s);++H<R;){var oe=s[H],he=c[H];if(m)var ne=I?m(he,oe,H,c,s,x):m(oe,he,H,s,c,x);if(ne!==n){if(ne)continue;K=!1;break}if(te){if(!Yc(c,function(ye,Se){if(!ji(te,Se)&&(oe===ye||b(oe,ye,h,m,x)))return te.push(Se)})){K=!1;break}}else if(!(oe===he||b(oe,he,h,m,x))){K=!1;break}}return x.delete(s),x.delete(c),K}l(jm,"equalArrays");function B0(s,c,h,m,b,x,I){switch(h){case Wn:if(s.byteLength!=c.byteLength||s.byteOffset!=c.byteOffset)return!1;s=s.buffer,c=c.buffer;case Gi:return!(s.byteLength!=c.byteLength||!x(new Eo(s),new Eo(c)));case gt:case ct:case Le:return rr(+s,+c);case xr:return s.name==c.name&&s.message==c.message;case Ui:case Vi:return s==c+"";case xe:var R=eu;case Jt:var _=m&w;if(R||(R=go),s.size!=c.size&&!_)return!1;var F=I.get(s);if(F)return F==c;m|=S,I.set(s,c);var $=jm(R(s),R(c),m,b,x,I);return I.delete(s),$;case co:if(Zi)return Zi.call(s)==Zi.call(c)}return!1}l(B0,"equalByTag");function W0(s,c,h,m,b,x){var I=h&w,R=Mu(s),_=R.length,F=Mu(c),$=F.length;if(_!=$&&!I)return!1;for(var H=_;H--;){var K=R[H];if(!(I?K in c:Ie.call(c,K)))return!1}var te=x.get(s),oe=x.get(c);if(te&&oe)return te==c&&oe==s;var he=!0;x.set(s,c),x.set(c,s);for(var ne=I;++H<_;){K=R[H];var ye=s[K],Se=c[K];if(m)var Ht=I?m(Se,ye,K,c,s,x):m(ye,Se,K,s,c,x);if(!(Ht===n?ye===Se||b(ye,Se,h,m,x):Ht)){he=!1;break}ne||(ne=K=="constructor")}if(he&&!ne){var xt=s.constructor,Bt=c.constructor;xt!=Bt&&"constructor"in s&&"constructor"in c&&!(typeof xt=="function"&&xt instanceof xt&&typeof Bt=="function"&&Bt instanceof Bt)&&(he=!1)}return x.delete(s),x.delete(c),he}l(W0,"equalObjects");function Rr(s){return Nu(Jm(s,n,ag),s+"")}l(Rr,"flatRest");function Mu(s){return hm(s,ft,Au)}l(Mu,"getAllKeys");function Tu(s){return hm(s,Ot,qm)}l(Tu,"getAllKeysIn");var Iu=Ro?function(s){return Ro.get(s)}:qu;function Uo(s){for(var c=s.name+"",h=Yn[c],m=Ie.call(Yn,c)?h.length:0;m--;){var b=h[m],x=b.func;if(x==null||x==s)return b.name}return c}l(Uo,"getFuncName");function Jn(s){var c=Ie.call(C,"placeholder")?C:s;return c.placeholder}l(Jn,"getHolder");function se(){var s=C.iteratee||Gu;return s=s===Gu?mm:s,arguments.length?s(arguments[0],arguments[1]):s}l(se,"getIteratee");function Vo(s,c){var h=s.__data__;return K0(c)?h[typeof c=="string"?"string":"hash"]:h.map}l(Vo,"getMapData");function Ru(s){for(var c=ft(s),h=c.length;h--;){var m=c[h],b=s[m];c[h]=[m,b,Xm(b)]}return c}l(Ru,"getMatchData");function Cn(s,c){var h=JC(s,c);return pm(h)?h:n}l(Cn,"getNative");function U0(s){var c=Ie.call(s,bn),h=s[bn];try{s[bn]=n;var m=!0}catch{}var b=wo.call(s);return m&&(c?s[bn]=h:delete s[bn]),b}l(U0,"getRawTag");var Au=ru?function(s){return s==null?[]:(s=ke(s),Gr(ru(s),function(c){return Qp.call(s,c)}))}:Yu,qm=ru?function(s){for(var c=[];s;)jr(c,Au(s)),s=Co(s);return c}:Yu,bt=Et;(nu&&bt(new nu(new ArrayBuffer(1)))!=Wn||Yi&&bt(new Yi)!=xe||iu&&bt(iu.resolve())!=Bn||qn&&bt(new qn)!=Jt||Ki&&bt(new Ki)!=zi)&&(bt=l(function(s){var c=Et(s),h=c==ge?s.constructor:n,m=h?xn(h):"";if(m)switch(m){case xx:return Wn;case Mx:return xe;case Tx:return Bn;case Ix:return Jt;case Rx:return zi}return c},"getTag"));function V0(s,c,h){for(var m=-1,b=h.length;++m<b;){var x=h[m],I=x.size;switch(x.type){case"drop":s+=I;break;case"dropRight":c-=I;break;case"take":c=yt(c,s+I);break;case"takeRight":s=at(s,c-I);break}}return{start:s,end:c}}l(V0,"getView");function z0(s){var c=s.match(ZE);return c?c[1].split(JE):[]}l(z0,"getWrapDetails");function Ym(s,c,h){c=Jr(c,s);for(var m=-1,b=c.length,x=!1;++m<b;){var I=tr(c[m]);if(!(x=s!=null&&h(s,I)))break;s=s[I]}return x||++m!=b?x:(b=s==null?0:s.length,!!b&&Xo(b)&&Ar(I,b)&&(ce(s)||Mn(s)))}l(Ym,"hasPath");function G0(s){var c=s.length,h=new s.constructor(c);return c&&typeof s[0]=="string"&&Ie.call(s,"index")&&(h.index=s.index,h.input=s.input),h}l(G0,"initCloneArray");function Km(s){return typeof s.constructor=="function"&&!is(s)?Kn(Co(s)):{}}l(Km,"initCloneObject");function j0(s,c,h){var m=s.constructor;switch(c){case Gi:return Eu(s);case gt:case ct:return new m(+s);case Wn:return A0(s,h);case Rc:case Ac:case Oc:case _c:case Lc:case Nc:case Dc:case kc:case Pc:return _m(s,h);case xe:return new m;case Le:case Vi:return new m(s);case Ui:return O0(s);case Jt:return new m;case co:return _0(s)}}l(j0,"initCloneByTag");function q0(s,c){var h=c.length;if(!h)return s;var m=h-1;return c[m]=(h>1?"& ":"")+c[m],c=c.join(h>2?", ":" "),s.replace(XE,`{
|
|
2
2
|
/* [wrapped with `+c+`] */
|
|
3
|
-
`)}l(q0,"insertWrapDetails");function Y0(s){return ce(s)||Mn(s)||!!(Qp&&s&&s[Qp])}l(Y0,"isFlattenable");function Ar(s,c){var h=typeof s;return c=c??ae,!!c&&(h=="number"||h!="symbol"&&oC.test(s))&&s>-1&&s%1==0&&s<c}l(Ar,"isIndex");function Ct(s,c,h){if(!Je(h))return!1;var m=typeof c;return(m=="number"?At(h)&&Ar(c,h.length):m=="string"&&c in h)?rr(h[c],s):!1}l(Ct,"isIterateeCall");function Iu(s,c){if(ce(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||$t(s)?!0:jE.test(s)||!GE.test(s)||c!=null&&s in ke(c)}l(Iu,"isKey");function K0(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}l(K0,"isKeyable");function Ru(s){var c=Uo(s),h=E[c];if(typeof h!="function"||!(c in be.prototype))return!1;if(s===h)return!0;var m=xu(h);return!!m&&s===m[0]}l(Ru,"isLaziable");function X0(s){return!!Kp&&Kp in s}l(X0,"isMasked");var Z0=bo?Or:ju;function is(s){var c=s&&s.constructor,h=typeof c=="function"&&c.prototype||Gn;return s===h}l(is,"isPrototype");function Km(s){return s===s&&!Je(s)}l(Km,"isStrictComparable");function Xm(s,c){return function(h){return h==null?!1:h[s]===c&&(c!==n||s in ke(h))}}l(Xm,"matchesStrictComparable");function J0(s){var c=Yo(s,function(m){return h.size===f&&h.clear(),m}),h=c.cache;return c}l(J0,"memoizeCapped");function Q0(s,c){var h=s[1],m=c[1],b=h|m,x=b<(C|v|U),I=m==U&&h==A||m==U&&h==Z&&s[7].length<=c[8]||m==(U|Z)&&c[7].length<=c[8]&&h==A;if(!(x||I))return s;m&C&&(s[2]=c[2],b|=h&C?0:M);var R=c[3];if(R){var _=s[3];s[3]=_?Lm(_,R,c[4]):R,s[4]=_?qr(s[3],d):c[4]}return R=c[5],R&&(_=s[5],s[5]=_?Nm(_,R,c[6]):R,s[6]=_?qr(s[5],d):c[6]),R=c[7],R&&(s[7]=R),m&U&&(s[8]=s[8]==null?c[8]:yt(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=b,s}l(Q0,"mergeData");function eM(s){var c=[];if(s!=null)for(var h in ke(s))c.push(h);return c}l(eM,"nativeKeysIn");function tM(s){return wo.call(s)}l(tM,"objectToString");function Zm(s,c,h){return c=at(c===n?s.length-1:c,0),function(){for(var m=arguments,b=-1,x=at(m.length-c,0),I=N(x);++b<x;)I[b]=m[c+b];b=-1;for(var R=N(c+1);++b<c;)R[b]=m[b];return R[c]=h(I),Dt(s,this,R)}}l(Zm,"overRest");function Jm(s,c){return c.length<2?s:En(s,Yt(c,0,-1))}l(Jm,"parent");function rM(s,c){for(var h=s.length,m=yt(c.length,h),b=Rt(s);m--;){var x=c[m];s[m]=Ar(x,h)?b[x]:n}return s}l(rM,"reorder");function Au(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}l(Au,"safeGet");var Qm=tg(Em),ss=yx||function(s,c){return ut.setTimeout(s,c)},Ou=tg(M0);function eg(s,c,h){var m=c+"";return Ou(s,q0(m,nM(z0(m),h)))}l(eg,"setWrapToString");function tg(s){var c=0,h=0;return function(){var m=Sx(),b=j-(m-h);if(h=m,b>0){if(++c>=B)return arguments[0]}else c=0;return s.apply(n,arguments)}}l(tg,"shortOut");function zo(s,c){var h=-1,m=s.length,b=m-1;for(c=c===n?m:c;++h<c;){var x=hu(h,b),I=s[x];s[x]=s[h],s[h]=I}return s.length=c,s}l(zo,"shuffleSelf");var rg=J0(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(qE,function(h,m,b,x){c.push(b?x.replace(eC,"$1"):m||h)}),c});function tr(s){if(typeof s=="string"||$t(s))return s;var c=s+"";return c=="0"&&1/s==-q?"-0":c}l(tr,"toKey");function xn(s){if(s!=null){try{return vo.call(s)}catch{}try{return s+""}catch{}}return""}l(xn,"toSource");function nM(s,c){return kt(pe,function(h){var m="_."+h[0];c&h[1]&&!po(s,m)&&s.push(m)}),s.sort()}l(nM,"updateWrapDetails");function ng(s){if(s instanceof be)return s.clone();var c=new jt(s.__wrapped__,s.__chain__);return c.__actions__=Rt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}l(ng,"wrapperClone");function iM(s,c,h){(h?Ct(s,c,h):c===n)?c=1:c=at(ue(c),0);var m=s==null?0:s.length;if(!m||c<1)return[];for(var b=0,x=0,I=N(To(m/c));b<m;)I[x++]=Yt(s,b,b+=c);return I}l(iM,"chunk");function sM(s){for(var c=-1,h=s==null?0:s.length,m=0,b=[];++c<h;){var x=s[c];x&&(b[m++]=x)}return b}l(sM,"compact");function oM(){var s=arguments.length;if(!s)return[];for(var c=N(s-1),h=arguments[0],m=s;m--;)c[m-1]=arguments[m];return jr(ce(h)?Rt(h):[h],ht(c,1))}l(oM,"concat");var aM=me(function(s,c){return nt(s)?Qi(s,ht(c,1,nt,!0)):[]}),lM=me(function(s,c){var h=Kt(c);return nt(h)&&(h=n),nt(s)?Qi(s,ht(c,1,nt,!0),se(h,2)):[]}),cM=me(function(s,c){var h=Kt(c);return nt(h)&&(h=n),nt(s)?Qi(s,ht(c,1,nt,!0),n,h):[]});function uM(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:ue(c),Yt(s,c<0?0:c,m)):[]}l(uM,"drop");function fM(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:ue(c),c=m-c,Yt(s,0,c<0?0:c)):[]}l(fM,"dropRight");function hM(s,c){return s&&s.length?Po(s,se(c,3),!0,!0):[]}l(hM,"dropRightWhile");function dM(s,c){return s&&s.length?Po(s,se(c,3),!0):[]}l(dM,"dropWhile");function pM(s,c,h,m){var b=s==null?0:s.length;return b?(h&&typeof h!="number"&&Ct(s,c,h)&&(h=0,m=b),o0(s,c,h,m)):[]}l(pM,"fill");function ig(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=h==null?0:ue(h);return b<0&&(b=at(m+b,0)),mo(s,se(c,3),b)}l(ig,"findIndex");function sg(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=m-1;return h!==n&&(b=ue(h),b=h<0?at(m+b,0):yt(b,m-1)),mo(s,se(c,3),b,!0)}l(sg,"findLastIndex");function og(s){var c=s==null?0:s.length;return c?ht(s,1):[]}l(og,"flatten");function mM(s){var c=s==null?0:s.length;return c?ht(s,q):[]}l(mM,"flattenDeep");function gM(s,c){var h=s==null?0:s.length;return h?(c=c===n?1:ue(c),ht(s,c)):[]}l(gM,"flattenDepth");function yM(s){for(var c=-1,h=s==null?0:s.length,m={};++c<h;){var b=s[c];cr(m,b[0],b[1])}return m}l(yM,"fromPairs");function ag(s){return s&&s.length?s[0]:n}l(ag,"head");function bM(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=h==null?0:ue(h);return b<0&&(b=at(m+b,0)),Un(s,c,b)}l(bM,"indexOf");function vM(s){var c=s==null?0:s.length;return c?Yt(s,0,-1):[]}l(vM,"initial");var wM=me(function(s){var c=qe(s,yu);return c.length&&c[0]===s[0]?au(c):[]}),SM=me(function(s){var c=Kt(s),h=qe(s,yu);return c===Kt(h)?c=n:h.pop(),h.length&&h[0]===s[0]?au(h,se(c,2)):[]}),EM=me(function(s){var c=Kt(s),h=qe(s,yu);return c=typeof c=="function"?c:n,c&&h.pop(),h.length&&h[0]===s[0]?au(h,n,c):[]});function CM(s,c){return s==null?"":vx.call(s,c)}l(CM,"join");function Kt(s){var c=s==null?0:s.length;return c?s[c-1]:n}l(Kt,"last");function xM(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=m;return h!==n&&(b=ue(h),b=b<0?at(m+b,0):yt(b,m-1)),c===c?nx(s,c,b):mo(s,Wp,b,!0)}l(xM,"lastIndexOf");function MM(s,c){return s&&s.length?bm(s,ue(c)):n}l(MM,"nth");var TM=me(lg);function lg(s,c){return s&&s.length&&c&&c.length?fu(s,c):s}l(lg,"pullAll");function IM(s,c,h){return s&&s.length&&c&&c.length?fu(s,c,se(h,2)):s}l(IM,"pullAllBy");function RM(s,c,h){return s&&s.length&&c&&c.length?fu(s,c,n,h):s}l(RM,"pullAllWith");var AM=Rr(function(s,c){var h=s==null?0:s.length,m=nu(s,c);return Sm(s,qe(c,function(b){return Ar(b,h)?+b:b}).sort(_m)),m});function OM(s,c){var h=[];if(!(s&&s.length))return h;var m=-1,b=[],x=s.length;for(c=se(c,3);++m<x;){var I=s[m];c(I,m,s)&&(h.push(I),b.push(m))}return Sm(s,b),h}l(OM,"remove");function _u(s){return s==null?s:Cx.call(s)}l(_u,"reverse");function _M(s,c,h){var m=s==null?0:s.length;return m?(h&&typeof h!="number"&&Ct(s,c,h)?(c=0,h=m):(c=c==null?0:ue(c),h=h===n?m:ue(h)),Yt(s,c,h)):[]}l(_M,"slice");function LM(s,c){return ko(s,c)}l(LM,"sortedIndex");function NM(s,c,h){return pu(s,c,se(h,2))}l(NM,"sortedIndexBy");function DM(s,c){var h=s==null?0:s.length;if(h){var m=ko(s,c);if(m<h&&rr(s[m],c))return m}return-1}l(DM,"sortedIndexOf");function kM(s,c){return ko(s,c,!0)}l(kM,"sortedLastIndex");function PM(s,c,h){return pu(s,c,se(h,2),!0)}l(PM,"sortedLastIndexBy");function FM(s,c){var h=s==null?0:s.length;if(h){var m=ko(s,c,!0)-1;if(rr(s[m],c))return m}return-1}l(FM,"sortedLastIndexOf");function $M(s){return s&&s.length?Cm(s):[]}l($M,"sortedUniq");function HM(s,c){return s&&s.length?Cm(s,se(c,2)):[]}l(HM,"sortedUniqBy");function BM(s){var c=s==null?0:s.length;return c?Yt(s,1,c):[]}l(BM,"tail");function WM(s,c,h){return s&&s.length?(c=h||c===n?1:ue(c),Yt(s,0,c<0?0:c)):[]}l(WM,"take");function UM(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:ue(c),c=m-c,Yt(s,c<0?0:c,m)):[]}l(UM,"takeRight");function VM(s,c){return s&&s.length?Po(s,se(c,3),!1,!0):[]}l(VM,"takeRightWhile");function zM(s,c){return s&&s.length?Po(s,se(c,3)):[]}l(zM,"takeWhile");var GM=me(function(s){return Zr(ht(s,1,nt,!0))}),jM=me(function(s){var c=Kt(s);return nt(c)&&(c=n),Zr(ht(s,1,nt,!0),se(c,2))}),qM=me(function(s){var c=Kt(s);return c=typeof c=="function"?c:n,Zr(ht(s,1,nt,!0),n,c)});function YM(s){return s&&s.length?Zr(s):[]}l(YM,"uniq");function KM(s,c){return s&&s.length?Zr(s,se(c,2)):[]}l(KM,"uniqBy");function XM(s,c){return c=typeof c=="function"?c:n,s&&s.length?Zr(s,n,c):[]}l(XM,"uniqWith");function Lu(s){if(!(s&&s.length))return[];var c=0;return s=Gr(s,function(h){if(nt(h))return c=at(h.length,c),!0}),Kc(c,function(h){return qe(s,jc(h))})}l(Lu,"unzip");function cg(s,c){if(!(s&&s.length))return[];var h=Lu(s);return c==null?h:qe(h,function(m){return Dt(c,n,m)})}l(cg,"unzipWith");var ZM=me(function(s,c){return nt(s)?Qi(s,c):[]}),JM=me(function(s){return gu(Gr(s,nt))}),QM=me(function(s){var c=Kt(s);return nt(c)&&(c=n),gu(Gr(s,nt),se(c,2))}),e1=me(function(s){var c=Kt(s);return c=typeof c=="function"?c:n,gu(Gr(s,nt),n,c)}),t1=me(Lu);function r1(s,c){return Im(s||[],c||[],Ji)}l(r1,"zipObject");function n1(s,c){return Im(s||[],c||[],rs)}l(n1,"zipObjectDeep");var i1=me(function(s){var c=s.length,h=c>1?s[c-1]:n;return h=typeof h=="function"?(s.pop(),h):n,cg(s,h)});function ug(s){var c=E(s);return c.__chain__=!0,c}l(ug,"chain");function s1(s,c){return c(s),s}l(s1,"tap");function Go(s,c){return c(s)}l(Go,"thru");var o1=Rr(function(s){var c=s.length,h=c?s[0]:0,m=this.__wrapped__,b=l(function(x){return nu(x,s)},"interceptor");return c>1||this.__actions__.length||!(m instanceof be)||!Ar(h)?this.thru(b):(m=m.slice(h,+h+(c?1:0)),m.__actions__.push({func:Go,args:[b],thisArg:n}),new jt(m,this.__chain__).thru(function(x){return c&&!x.length&&x.push(n),x}))});function a1(){return ug(this)}l(a1,"wrapperChain");function l1(){return new jt(this.value(),this.__chain__)}l(l1,"wrapperCommit");function c1(){this.__values__===n&&(this.__values__=xg(this.value()));var s=this.__index__>=this.__values__.length,c=s?n:this.__values__[this.__index__++];return{done:s,value:c}}l(c1,"wrapperNext");function u1(){return this}l(u1,"wrapperToIterator");function f1(s){for(var c,h=this;h instanceof Oo;){var m=ng(h);m.__index__=0,m.__values__=n,c?b.__wrapped__=m:c=m;var b=m;h=h.__wrapped__}return b.__wrapped__=s,c}l(f1,"wrapperPlant");function h1(){var s=this.__wrapped__;if(s instanceof be){var c=s;return this.__actions__.length&&(c=new be(this)),c=c.reverse(),c.__actions__.push({func:Go,args:[_u],thisArg:n}),new jt(c,this.__chain__)}return this.thru(_u)}l(h1,"wrapperReverse");function d1(){return Tm(this.__wrapped__,this.__actions__)}l(d1,"wrapperValue");var p1=Fo(function(s,c,h){Ie.call(s,h)?++s[h]:cr(s,h,1)});function m1(s,c,h){var m=ce(s)?Hp:s0;return h&&Ct(s,c,h)&&(c=n),m(s,se(c,3))}l(m1,"every");function g1(s,c){var h=ce(s)?Gr:cm;return h(s,se(c,3))}l(g1,"filter");var y1=Fm(ig),b1=Fm(sg);function v1(s,c){return ht(jo(s,c),1)}l(v1,"flatMap");function w1(s,c){return ht(jo(s,c),q)}l(w1,"flatMapDeep");function S1(s,c,h){return h=h===n?1:ue(h),ht(jo(s,c),h)}l(S1,"flatMapDepth");function fg(s,c){var h=ce(s)?kt:Xr;return h(s,se(c,3))}l(fg,"forEach");function hg(s,c){var h=ce(s)?BC:lm;return h(s,se(c,3))}l(hg,"forEachRight");var E1=Fo(function(s,c,h){Ie.call(s,h)?s[h].push(c):cr(s,h,[c])});function C1(s,c,h,m){s=At(s)?s:Qn(s),h=h&&!m?ue(h):0;var b=s.length;return h<0&&(h=at(b+h,0)),Zo(s)?h<=b&&s.indexOf(c,h)>-1:!!b&&Un(s,c,h)>-1}l(C1,"includes");var x1=me(function(s,c,h){var m=-1,b=typeof c=="function",x=At(s)?N(s.length):[];return Xr(s,function(I){x[++m]=b?Dt(c,I,h):es(I,c,h)}),x}),M1=Fo(function(s,c,h){cr(s,h,c)});function jo(s,c){var h=ce(s)?qe:mm;return h(s,se(c,3))}l(jo,"map");function T1(s,c,h,m){return s==null?[]:(ce(c)||(c=c==null?[]:[c]),h=m?n:h,ce(h)||(h=h==null?[]:[h]),vm(s,c,h))}l(T1,"orderBy");var I1=Fo(function(s,c,h){s[h?0:1].push(c)},function(){return[[],[]]});function R1(s,c,h){var m=ce(s)?zc:Vp,b=arguments.length<3;return m(s,se(c,4),h,b,Xr)}l(R1,"reduce");function A1(s,c,h){var m=ce(s)?WC:Vp,b=arguments.length<3;return m(s,se(c,4),h,b,lm)}l(A1,"reduceRight");function O1(s,c){var h=ce(s)?Gr:cm;return h(s,Ko(se(c,3)))}l(O1,"reject");function _1(s){var c=ce(s)?im:C0;return c(s)}l(_1,"sample");function L1(s,c,h){(h?Ct(s,c,h):c===n)?c=1:c=ue(c);var m=ce(s)?e0:x0;return m(s,c)}l(L1,"sampleSize");function N1(s){var c=ce(s)?t0:T0;return c(s)}l(N1,"shuffle");function D1(s){if(s==null)return 0;if(At(s))return Zo(s)?zn(s):s.length;var c=bt(s);return c==xe||c==Jt?s.size:cu(s).length}l(D1,"size");function k1(s,c,h){var m=ce(s)?Gc:I0;return h&&Ct(s,c,h)&&(c=n),m(s,se(c,3))}l(k1,"some");var P1=me(function(s,c){if(s==null)return[];var h=c.length;return h>1&&Ct(s,c[0],c[1])?c=[]:h>2&&Ct(c[0],c[1],c[2])&&(c=[c[0]]),vm(s,ht(c,1),[])}),qo=gx||function(){return ut.Date.now()};function F1(s,c){if(typeof c!="function")throw new Gt(i);return s=ue(s),function(){if(--s<1)return c.apply(this,arguments)}}l(F1,"after");function dg(s,c,h){return c=h?n:c,c=s&&c==null?s.length:c,Ir(s,U,n,n,n,n,c)}l(dg,"ary");function pg(s,c){var h;if(typeof c!="function")throw new Gt(i);return s=ue(s),function(){return--s>0&&(h=c.apply(this,arguments)),s<=1&&(c=n),h}}l(pg,"before");var Nu=me(function(s,c,h){var m=C;if(h.length){var b=qr(h,Zn(Nu));m|=L}return Ir(s,m,c,h,b)}),mg=me(function(s,c,h){var m=C|v;if(h.length){var b=qr(h,Zn(mg));m|=L}return Ir(c,m,s,h,b)});function gg(s,c,h){c=h?n:c;var m=Ir(s,A,n,n,n,n,n,c);return m.placeholder=gg.placeholder,m}l(gg,"curry");function yg(s,c,h){c=h?n:c;var m=Ir(s,T,n,n,n,n,n,c);return m.placeholder=yg.placeholder,m}l(yg,"curryRight");function bg(s,c,h){var m,b,x,I,R,_,F=0,$=!1,H=!1,K=!0;if(typeof s!="function")throw new Gt(i);c=Xt(c)||0,Je(h)&&($=!!h.leading,H="maxWait"in h,x=H?at(Xt(h.maxWait)||0,c):x,K="trailing"in h?!!h.trailing:K);function te(it){var nr=m,Lr=b;return m=b=n,F=it,I=s.apply(Lr,nr),I}l(te,"invokeFunc");function oe(it){return F=it,R=ss(ye,c),$?te(it):I}l(oe,"leadingEdge");function fe(it){var nr=it-_,Lr=it-F,$g=c-nr;return H?yt($g,x-Lr):$g}l(fe,"remainingWait");function ne(it){var nr=it-_,Lr=it-F;return _===n||nr>=c||nr<0||H&&Lr>=x}l(ne,"shouldInvoke");function ye(){var it=qo();if(ne(it))return Se(it);R=ss(ye,fe(it))}l(ye,"timerExpired");function Se(it){return R=n,K&&m?te(it):(m=b=n,I)}l(Se,"trailingEdge");function Ht(){R!==n&&Rm(R),F=0,m=_=b=R=n}l(Ht,"cancel");function xt(){return R===n?I:Se(qo())}l(xt,"flush");function Bt(){var it=qo(),nr=ne(it);if(m=arguments,b=this,_=it,nr){if(R===n)return oe(_);if(H)return Rm(R),R=ss(ye,c),te(_)}return R===n&&(R=ss(ye,c)),I}return l(Bt,"debounced"),Bt.cancel=Ht,Bt.flush=xt,Bt}l(bg,"debounce");var $1=me(function(s,c){return am(s,1,c)}),H1=me(function(s,c,h){return am(s,Xt(c)||0,h)});function B1(s){return Ir(s,W)}l(B1,"flip");function Yo(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Gt(i);var h=l(function(){var m=arguments,b=c?c.apply(this,m):m[0],x=h.cache;if(x.has(b))return x.get(b);var I=s.apply(this,m);return h.cache=x.set(b,I)||x,I},"memoized");return h.cache=new(Yo.Cache||Tr),h}l(Yo,"memoize"),Yo.Cache=Tr;function Ko(s){if(typeof s!="function")throw new Gt(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}l(Ko,"negate");function W1(s){return pg(2,s)}l(W1,"once");var U1=R0(function(s,c){c=c.length==1&&ce(c[0])?qe(c[0],Pt(se())):qe(ht(c,1),Pt(se()));var h=c.length;return me(function(m){for(var b=-1,x=yt(m.length,h);++b<x;)m[b]=c[b].call(this,m[b]);return Dt(s,this,m)})}),Du=me(function(s,c){var h=qr(c,Zn(Du));return Ir(s,L,n,c,h)}),vg=me(function(s,c){var h=qr(c,Zn(vg));return Ir(s,V,n,c,h)}),V1=Rr(function(s,c){return Ir(s,Z,n,n,n,c)});function z1(s,c){if(typeof s!="function")throw new Gt(i);return c=c===n?c:ue(c),me(s,c)}l(z1,"rest");function G1(s,c){if(typeof s!="function")throw new Gt(i);return c=c==null?0:at(ue(c),0),me(function(h){var m=h[c],b=Qr(h,0,c);return m&&jr(b,m),Dt(s,this,b)})}l(G1,"spread");function j1(s,c,h){var m=!0,b=!0;if(typeof s!="function")throw new Gt(i);return Je(h)&&(m="leading"in h?!!h.leading:m,b="trailing"in h?!!h.trailing:b),bg(s,c,{leading:m,maxWait:c,trailing:b})}l(j1,"throttle");function q1(s){return dg(s,1)}l(q1,"unary");function Y1(s,c){return Du(bu(c),s)}l(Y1,"wrap");function K1(){if(!arguments.length)return[];var s=arguments[0];return ce(s)?s:[s]}l(K1,"castArray");function X1(s){return qt(s,y)}l(X1,"clone");function Z1(s,c){return c=typeof c=="function"?c:n,qt(s,y,c)}l(Z1,"cloneWith");function J1(s){return qt(s,p|y)}l(J1,"cloneDeep");function Q1(s,c){return c=typeof c=="function"?c:n,qt(s,p|y,c)}l(Q1,"cloneDeepWith");function eT(s,c){return c==null||om(s,c,ft(c))}l(eT,"conformsTo");function rr(s,c){return s===c||s!==s&&c!==c}l(rr,"eq");var tT=Wo(ou),rT=Wo(function(s,c){return s>=c}),Mn=hm(function(){return arguments}())?hm:function(s){return et(s)&&Ie.call(s,"callee")&&!Jp.call(s,"callee")},ce=N.isArray,nT=Np?Pt(Np):f0;function At(s){return s!=null&&Xo(s.length)&&!Or(s)}l(At,"isArrayLike");function nt(s){return et(s)&&At(s)}l(nt,"isArrayLikeObject");function iT(s){return s===!0||s===!1||et(s)&&Et(s)==gt}l(iT,"isBoolean");var en=bx||ju,sT=Dp?Pt(Dp):h0;function oT(s){return et(s)&&s.nodeType===1&&!os(s)}l(oT,"isElement");function aT(s){if(s==null)return!0;if(At(s)&&(ce(s)||typeof s=="string"||typeof s.splice=="function"||en(s)||Jn(s)||Mn(s)))return!s.length;var c=bt(s);if(c==xe||c==Jt)return!s.size;if(is(s))return!cu(s).length;for(var h in s)if(Ie.call(s,h))return!1;return!0}l(aT,"isEmpty");function lT(s,c){return ts(s,c)}l(lT,"isEqual");function cT(s,c,h){h=typeof h=="function"?h:n;var m=h?h(s,c):n;return m===n?ts(s,c,n,h):!!m}l(cT,"isEqualWith");function ku(s){if(!et(s))return!1;var c=Et(s);return c==xr||c==Wi||typeof s.message=="string"&&typeof s.name=="string"&&!os(s)}l(ku,"isError");function uT(s){return typeof s=="number"&&em(s)}l(uT,"isFinite");function Or(s){if(!Je(s))return!1;var c=Et(s);return c==we||c==It||c==Nt||c==kE}l(Or,"isFunction");function wg(s){return typeof s=="number"&&s==ue(s)}l(wg,"isInteger");function Xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ae}l(Xo,"isLength");function Je(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}l(Je,"isObject");function et(s){return s!=null&&typeof s=="object"}l(et,"isObjectLike");var Sg=kp?Pt(kp):p0;function fT(s,c){return s===c||lu(s,c,Mu(c))}l(fT,"isMatch");function hT(s,c,h){return h=typeof h=="function"?h:n,lu(s,c,Mu(c),h)}l(hT,"isMatchWith");function dT(s){return Eg(s)&&s!=+s}l(dT,"isNaN");function pT(s){if(Z0(s))throw new le(r);return dm(s)}l(pT,"isNative");function mT(s){return s===null}l(mT,"isNull");function gT(s){return s==null}l(gT,"isNil");function Eg(s){return typeof s=="number"||et(s)&&Et(s)==Le}l(Eg,"isNumber");function os(s){if(!et(s)||Et(s)!=ge)return!1;var c=Co(s);if(c===null)return!0;var h=Ie.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&vo.call(h)==hx}l(os,"isPlainObject");var Pu=Pp?Pt(Pp):m0;function yT(s){return wg(s)&&s>=-ae&&s<=ae}l(yT,"isSafeInteger");var Cg=Fp?Pt(Fp):g0;function Zo(s){return typeof s=="string"||!ce(s)&&et(s)&&Et(s)==Vi}l(Zo,"isString");function $t(s){return typeof s=="symbol"||et(s)&&Et(s)==co}l($t,"isSymbol");var Jn=$p?Pt($p):y0;function bT(s){return s===n}l(bT,"isUndefined");function vT(s){return et(s)&&bt(s)==zi}l(vT,"isWeakMap");function wT(s){return et(s)&&Et(s)==FE}l(wT,"isWeakSet");var ST=Wo(uu),ET=Wo(function(s,c){return s<=c});function xg(s){if(!s)return[];if(At(s))return Zo(s)?Qt(s):Rt(s);if(qi&&s[qi])return ex(s[qi]());var c=bt(s),h=c==xe?Zc:c==Jt?go:Qn;return h(s)}l(xg,"toArray");function _r(s){if(!s)return s===0?s:0;if(s=Xt(s),s===q||s===-q){var c=s<0?-1:1;return c*rt}return s===s?s:0}l(_r,"toFinite");function ue(s){var c=_r(s),h=c%1;return c===c?h?c-h:c:0}l(ue,"toInteger");function Mg(s){return s?Sn(ue(s),0,Pe):0}l(Mg,"toLength");function Xt(s){if(typeof s=="number")return s;if($t(s))return De;if(Je(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=Je(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=zp(s);var h=nC.test(s);return h||sC.test(s)?FC(s.slice(2),h?2:8):rC.test(s)?De:+s}l(Xt,"toNumber");function Tg(s){return fr(s,Ot(s))}l(Tg,"toPlainObject");function CT(s){return s?Sn(ue(s),-ae,ae):s===0?s:0}l(CT,"toSafeInteger");function Re(s){return s==null?"":Ft(s)}l(Re,"toString");var xT=Kn(function(s,c){if(is(c)||At(c)){fr(c,ft(c),s);return}for(var h in c)Ie.call(c,h)&&Ji(s,h,c[h])}),Ig=Kn(function(s,c){fr(c,Ot(c),s)}),Rg=Kn(function(s,c,h,m){fr(c,Ot(c),s,m)}),Fu=Kn(function(s,c,h,m){fr(c,ft(c),s,m)}),MT=Rr(nu);function TT(s,c){var h=Yn(s);return c==null?h:sm(h,c)}l(TT,"create");var IT=me(function(s,c){s=ke(s);var h=-1,m=c.length,b=m>2?c[2]:n;for(b&&Ct(c[0],c[1],b)&&(m=1);++h<m;)for(var x=c[h],I=Ot(x),R=-1,_=I.length;++R<_;){var F=I[R],$=s[F];($===n||rr($,Gn[F])&&!Ie.call(s,F))&&(s[F]=x[F])}return s}),RT=me(function(s){return s.push(n,zm),Dt(Ag,n,s)});function AT(s,c){return Bp(s,se(c,3),ur)}l(AT,"findKey");function OT(s,c){return Bp(s,se(c,3),su)}l(OT,"findLastKey");function _T(s,c){return s==null?s:iu(s,se(c,3),Ot)}l(_T,"forIn");function LT(s,c){return s==null?s:um(s,se(c,3),Ot)}l(LT,"forInRight");function NT(s,c){return s&&ur(s,se(c,3))}l(NT,"forOwn");function DT(s,c){return s&&su(s,se(c,3))}l(DT,"forOwnRight");function kT(s){return s==null?[]:No(s,ft(s))}l(kT,"functions");function PT(s){return s==null?[]:No(s,Ot(s))}l(PT,"functionsIn");function $u(s,c,h){var m=s==null?n:En(s,c);return m===n?h:m}l($u,"get");function FT(s,c){return s!=null&&qm(s,c,a0)}l(FT,"has");function Hu(s,c){return s!=null&&qm(s,c,l0)}l(Hu,"hasIn");var $T=Hm(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=wo.call(c)),s[c]=h},Wu(_t)),HT=Hm(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=wo.call(c)),Ie.call(s,c)?s[c].push(h):s[c]=[h]},se),BT=me(es);function ft(s){return At(s)?nm(s):cu(s)}l(ft,"keys");function Ot(s){return At(s)?nm(s,!0):b0(s)}l(Ot,"keysIn");function WT(s,c){var h={};return c=se(c,3),ur(s,function(m,b,x){cr(h,c(m,b,x),m)}),h}l(WT,"mapKeys");function UT(s,c){var h={};return c=se(c,3),ur(s,function(m,b,x){cr(h,b,c(m,b,x))}),h}l(UT,"mapValues");var VT=Kn(function(s,c,h){Do(s,c,h)}),Ag=Kn(function(s,c,h,m){Do(s,c,h,m)}),zT=Rr(function(s,c){var h={};if(s==null)return h;var m=!1;c=qe(c,function(x){return x=Jr(x,s),m||(m=x.length>1),x}),fr(s,Cu(s),h),m&&(h=qt(h,p|g|y,H0));for(var b=c.length;b--;)mu(h,c[b]);return h});function GT(s,c){return Og(s,Ko(se(c)))}l(GT,"omitBy");var jT=Rr(function(s,c){return s==null?{}:w0(s,c)});function Og(s,c){if(s==null)return{};var h=qe(Cu(s),function(m){return[m]});return c=se(c),wm(s,h,function(m,b){return c(m,b[0])})}l(Og,"pickBy");function qT(s,c,h){c=Jr(c,s);var m=-1,b=c.length;for(b||(b=1,s=n);++m<b;){var x=s==null?n:s[tr(c[m])];x===n&&(m=b,x=h),s=Or(x)?x.call(s):x}return s}l(qT,"result");function YT(s,c,h){return s==null?s:rs(s,c,h)}l(YT,"set");function KT(s,c,h,m){return m=typeof m=="function"?m:n,s==null?s:rs(s,c,h,m)}l(KT,"setWith");var _g=Um(ft),Lg=Um(Ot);function XT(s,c,h){var m=ce(s),b=m||en(s)||Jn(s);if(c=se(c,4),h==null){var x=s&&s.constructor;b?h=m?new x:[]:Je(s)?h=Or(x)?Yn(Co(s)):{}:h={}}return(b?kt:ur)(s,function(I,R,_){return c(h,I,R,_)}),h}l(XT,"transform");function ZT(s,c){return s==null?!0:mu(s,c)}l(ZT,"unset");function JT(s,c,h){return s==null?s:Mm(s,c,bu(h))}l(JT,"update");function QT(s,c,h,m){return m=typeof m=="function"?m:n,s==null?s:Mm(s,c,bu(h),m)}l(QT,"updateWith");function Qn(s){return s==null?[]:Xc(s,ft(s))}l(Qn,"values");function eI(s){return s==null?[]:Xc(s,Ot(s))}l(eI,"valuesIn");function tI(s,c,h){return h===n&&(h=c,c=n),h!==n&&(h=Xt(h),h=h===h?h:0),c!==n&&(c=Xt(c),c=c===c?c:0),Sn(Xt(s),c,h)}l(tI,"clamp");function rI(s,c,h){return c=_r(c),h===n?(h=c,c=0):h=_r(h),s=Xt(s),c0(s,c,h)}l(rI,"inRange");function nI(s,c,h){if(h&&typeof h!="boolean"&&Ct(s,c,h)&&(c=h=n),h===n&&(typeof c=="boolean"?(h=c,c=n):typeof s=="boolean"&&(h=s,s=n)),s===n&&c===n?(s=0,c=1):(s=_r(s),c===n?(c=s,s=0):c=_r(c)),s>c){var m=s;s=c,c=m}if(h||s%1||c%1){var b=tm();return yt(s+b*(c-s+PC("1e-"+((b+"").length-1))),c)}return hu(s,c)}l(nI,"random");var iI=Xn(function(s,c,h){return c=c.toLowerCase(),s+(h?Ng(c):c)});function Ng(s){return Bu(Re(s).toLowerCase())}l(Ng,"capitalize");function Dg(s){return s=Re(s),s&&s.replace(aC,KC).replace(TC,"")}l(Dg,"deburr");function sI(s,c,h){s=Re(s),c=Ft(c);var m=s.length;h=h===n?m:Sn(ue(h),0,m);var b=h;return h-=c.length,h>=0&&s.slice(h,b)==c}l(sI,"endsWith");function oI(s){return s=Re(s),s&&UE.test(s)?s.replace(cp,XC):s}l(oI,"escape");function aI(s){return s=Re(s),s&&YE.test(s)?s.replace(Dc,"\\$&"):s}l(aI,"escapeRegExp");var lI=Xn(function(s,c,h){return s+(h?"-":"")+c.toLowerCase()}),cI=Xn(function(s,c,h){return s+(h?" ":"")+c.toLowerCase()}),uI=Pm("toLowerCase");function fI(s,c,h){s=Re(s),c=ue(c);var m=c?zn(s):0;if(!c||m>=c)return s;var b=(c-m)/2;return Bo(Io(b),h)+s+Bo(To(b),h)}l(fI,"pad");function hI(s,c,h){s=Re(s),c=ue(c);var m=c?zn(s):0;return c&&m<c?s+Bo(c-m,h):s}l(hI,"padEnd");function dI(s,c,h){s=Re(s),c=ue(c);var m=c?zn(s):0;return c&&m<c?Bo(c-m,h)+s:s}l(dI,"padStart");function pI(s,c,h){return h||c==null?c=0:c&&(c=+c),Ex(Re(s).replace(kc,""),c||0)}l(pI,"parseInt");function mI(s,c,h){return(h?Ct(s,c,h):c===n)?c=1:c=ue(c),du(Re(s),c)}l(mI,"repeat");function gI(){var s=arguments,c=Re(s[0]);return s.length<3?c:c.replace(s[1],s[2])}l(gI,"replace");var yI=Xn(function(s,c,h){return s+(h?"_":"")+c.toLowerCase()});function bI(s,c,h){return h&&typeof h!="number"&&Ct(s,c,h)&&(c=h=n),h=h===n?Pe:h>>>0,h?(s=Re(s),s&&(typeof c=="string"||c!=null&&!Pu(c))&&(c=Ft(c),!c&&Vn(s))?Qr(Qt(s),0,h):s.split(c,h)):[]}l(bI,"split");var vI=Xn(function(s,c,h){return s+(h?" ":"")+Bu(c)});function wI(s,c,h){return s=Re(s),h=h==null?0:Sn(ue(h),0,s.length),c=Ft(c),s.slice(h,h+c.length)==c}l(wI,"startsWith");function SI(s,c,h){var m=E.templateSettings;h&&Ct(s,c,h)&&(c=n),s=Re(s),c=Fu({},c,m,Vm);var b=Fu({},c.imports,m.imports,Vm),x=ft(b),I=Xc(b,x);kt(x,function(ne){if(fp.test(ne))throw new le(a)});var R,_,F=0,$=c.interpolate||uo,H="__p += '",K=Jc((c.escape||uo).source+"|"+$.source+"|"+($===up?tC:uo).source+"|"+(c.evaluate||uo).source+"|$","g"),te="//# sourceURL="+(Ie.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_C+"]")+`
|
|
3
|
+
`)}l(q0,"insertWrapDetails");function Y0(s){return ce(s)||Mn(s)||!!(em&&s&&s[em])}l(Y0,"isFlattenable");function Ar(s,c){var h=typeof s;return c=c??ae,!!c&&(h=="number"||h!="symbol"&&oC.test(s))&&s>-1&&s%1==0&&s<c}l(Ar,"isIndex");function Ct(s,c,h){if(!Je(h))return!1;var m=typeof c;return(m=="number"?At(h)&&Ar(c,h.length):m=="string"&&c in h)?rr(h[c],s):!1}l(Ct,"isIterateeCall");function Ou(s,c){if(ce(s))return!1;var h=typeof s;return h=="number"||h=="symbol"||h=="boolean"||s==null||$t(s)?!0:jE.test(s)||!GE.test(s)||c!=null&&s in ke(c)}l(Ou,"isKey");function K0(s){var c=typeof s;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?s!=="__proto__":s===null}l(K0,"isKeyable");function _u(s){var c=Uo(s),h=C[c];if(typeof h!="function"||!(c in be.prototype))return!1;if(s===h)return!0;var m=Iu(h);return!!m&&s===m[0]}l(_u,"isLaziable");function X0(s){return!!Xp&&Xp in s}l(X0,"isMasked");var Z0=bo?Or:Ku;function is(s){var c=s&&s.constructor,h=typeof c=="function"&&c.prototype||jn;return s===h}l(is,"isPrototype");function Xm(s){return s===s&&!Je(s)}l(Xm,"isStrictComparable");function Zm(s,c){return function(h){return h==null?!1:h[s]===c&&(c!==n||s in ke(h))}}l(Zm,"matchesStrictComparable");function J0(s){var c=Yo(s,function(m){return h.size===f&&h.clear(),m}),h=c.cache;return c}l(J0,"memoizeCapped");function Q0(s,c){var h=s[1],m=c[1],b=h|m,x=b<(E|v|U),I=m==U&&h==A||m==U&&h==Z&&s[7].length<=c[8]||m==(U|Z)&&c[7].length<=c[8]&&h==A;if(!(x||I))return s;m&E&&(s[2]=c[2],b|=h&E?0:M);var R=c[3];if(R){var _=s[3];s[3]=_?Nm(_,R,c[4]):R,s[4]=_?qr(s[3],d):c[4]}return R=c[5],R&&(_=s[5],s[5]=_?Dm(_,R,c[6]):R,s[6]=_?qr(s[5],d):c[6]),R=c[7],R&&(s[7]=R),m&U&&(s[8]=s[8]==null?c[8]:yt(s[8],c[8])),s[9]==null&&(s[9]=c[9]),s[0]=c[0],s[1]=b,s}l(Q0,"mergeData");function e1(s){var c=[];if(s!=null)for(var h in ke(s))c.push(h);return c}l(e1,"nativeKeysIn");function t1(s){return wo.call(s)}l(t1,"objectToString");function Jm(s,c,h){return c=at(c===n?s.length-1:c,0),function(){for(var m=arguments,b=-1,x=at(m.length-c,0),I=N(x);++b<x;)I[b]=m[c+b];b=-1;for(var R=N(c+1);++b<c;)R[b]=m[b];return R[c]=h(I),Dt(s,this,R)}}l(Jm,"overRest");function Qm(s,c){return c.length<2?s:En(s,Yt(c,0,-1))}l(Qm,"parent");function r1(s,c){for(var h=s.length,m=yt(c.length,h),b=Rt(s);m--;){var x=c[m];s[m]=Ar(x,h)?b[x]:n}return s}l(r1,"reorder");function Lu(s,c){if(!(c==="constructor"&&typeof s[c]=="function")&&c!="__proto__")return s[c]}l(Lu,"safeGet");var eg=rg(Cm),ss=yx||function(s,c){return ut.setTimeout(s,c)},Nu=rg(M0);function tg(s,c,h){var m=c+"";return Nu(s,q0(m,n1(z0(m),h)))}l(tg,"setWrapToString");function rg(s){var c=0,h=0;return function(){var m=Sx(),b=j-(m-h);if(h=m,b>0){if(++c>=B)return arguments[0]}else c=0;return s.apply(n,arguments)}}l(rg,"shortOut");function zo(s,c){var h=-1,m=s.length,b=m-1;for(c=c===n?m:c;++h<c;){var x=mu(h,b),I=s[x];s[x]=s[h],s[h]=I}return s.length=c,s}l(zo,"shuffleSelf");var ng=J0(function(s){var c=[];return s.charCodeAt(0)===46&&c.push(""),s.replace(qE,function(h,m,b,x){c.push(b?x.replace(eC,"$1"):m||h)}),c});function tr(s){if(typeof s=="string"||$t(s))return s;var c=s+"";return c=="0"&&1/s==-q?"-0":c}l(tr,"toKey");function xn(s){if(s!=null){try{return vo.call(s)}catch{}try{return s+""}catch{}}return""}l(xn,"toSource");function n1(s,c){return kt(pe,function(h){var m="_."+h[0];c&h[1]&&!po(s,m)&&s.push(m)}),s.sort()}l(n1,"updateWrapDetails");function ig(s){if(s instanceof be)return s.clone();var c=new jt(s.__wrapped__,s.__chain__);return c.__actions__=Rt(s.__actions__),c.__index__=s.__index__,c.__values__=s.__values__,c}l(ig,"wrapperClone");function i1(s,c,h){(h?Ct(s,c,h):c===n)?c=1:c=at(fe(c),0);var m=s==null?0:s.length;if(!m||c<1)return[];for(var b=0,x=0,I=N(To(m/c));b<m;)I[x++]=Yt(s,b,b+=c);return I}l(i1,"chunk");function s1(s){for(var c=-1,h=s==null?0:s.length,m=0,b=[];++c<h;){var x=s[c];x&&(b[m++]=x)}return b}l(s1,"compact");function o1(){var s=arguments.length;if(!s)return[];for(var c=N(s-1),h=arguments[0],m=s;m--;)c[m-1]=arguments[m];return jr(ce(h)?Rt(h):[h],ht(c,1))}l(o1,"concat");var a1=me(function(s,c){return nt(s)?Qi(s,ht(c,1,nt,!0)):[]}),l1=me(function(s,c){var h=Kt(c);return nt(h)&&(h=n),nt(s)?Qi(s,ht(c,1,nt,!0),se(h,2)):[]}),c1=me(function(s,c){var h=Kt(c);return nt(h)&&(h=n),nt(s)?Qi(s,ht(c,1,nt,!0),n,h):[]});function u1(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:fe(c),Yt(s,c<0?0:c,m)):[]}l(u1,"drop");function f1(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:fe(c),c=m-c,Yt(s,0,c<0?0:c)):[]}l(f1,"dropRight");function h1(s,c){return s&&s.length?Po(s,se(c,3),!0,!0):[]}l(h1,"dropRightWhile");function d1(s,c){return s&&s.length?Po(s,se(c,3),!0):[]}l(d1,"dropWhile");function p1(s,c,h,m){var b=s==null?0:s.length;return b?(h&&typeof h!="number"&&Ct(s,c,h)&&(h=0,m=b),o0(s,c,h,m)):[]}l(p1,"fill");function sg(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=h==null?0:fe(h);return b<0&&(b=at(m+b,0)),mo(s,se(c,3),b)}l(sg,"findIndex");function og(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=m-1;return h!==n&&(b=fe(h),b=h<0?at(m+b,0):yt(b,m-1)),mo(s,se(c,3),b,!0)}l(og,"findLastIndex");function ag(s){var c=s==null?0:s.length;return c?ht(s,1):[]}l(ag,"flatten");function m1(s){var c=s==null?0:s.length;return c?ht(s,q):[]}l(m1,"flattenDeep");function g1(s,c){var h=s==null?0:s.length;return h?(c=c===n?1:fe(c),ht(s,c)):[]}l(g1,"flattenDepth");function y1(s){for(var c=-1,h=s==null?0:s.length,m={};++c<h;){var b=s[c];cr(m,b[0],b[1])}return m}l(y1,"fromPairs");function lg(s){return s&&s.length?s[0]:n}l(lg,"head");function b1(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=h==null?0:fe(h);return b<0&&(b=at(m+b,0)),Vn(s,c,b)}l(b1,"indexOf");function v1(s){var c=s==null?0:s.length;return c?Yt(s,0,-1):[]}l(v1,"initial");var w1=me(function(s){var c=qe(s,wu);return c.length&&c[0]===s[0]?uu(c):[]}),S1=me(function(s){var c=Kt(s),h=qe(s,wu);return c===Kt(h)?c=n:h.pop(),h.length&&h[0]===s[0]?uu(h,se(c,2)):[]}),E1=me(function(s){var c=Kt(s),h=qe(s,wu);return c=typeof c=="function"?c:n,c&&h.pop(),h.length&&h[0]===s[0]?uu(h,n,c):[]});function C1(s,c){return s==null?"":vx.call(s,c)}l(C1,"join");function Kt(s){var c=s==null?0:s.length;return c?s[c-1]:n}l(Kt,"last");function x1(s,c,h){var m=s==null?0:s.length;if(!m)return-1;var b=m;return h!==n&&(b=fe(h),b=b<0?at(m+b,0):yt(b,m-1)),c===c?nx(s,c,b):mo(s,Up,b,!0)}l(x1,"lastIndexOf");function M1(s,c){return s&&s.length?vm(s,fe(c)):n}l(M1,"nth");var T1=me(cg);function cg(s,c){return s&&s.length&&c&&c.length?pu(s,c):s}l(cg,"pullAll");function I1(s,c,h){return s&&s.length&&c&&c.length?pu(s,c,se(h,2)):s}l(I1,"pullAllBy");function R1(s,c,h){return s&&s.length&&c&&c.length?pu(s,c,n,h):s}l(R1,"pullAllWith");var A1=Rr(function(s,c){var h=s==null?0:s.length,m=ou(s,c);return Em(s,qe(c,function(b){return Ar(b,h)?+b:b}).sort(Lm)),m});function O1(s,c){var h=[];if(!(s&&s.length))return h;var m=-1,b=[],x=s.length;for(c=se(c,3);++m<x;){var I=s[m];c(I,m,s)&&(h.push(I),b.push(m))}return Em(s,b),h}l(O1,"remove");function Du(s){return s==null?s:Cx.call(s)}l(Du,"reverse");function _1(s,c,h){var m=s==null?0:s.length;return m?(h&&typeof h!="number"&&Ct(s,c,h)?(c=0,h=m):(c=c==null?0:fe(c),h=h===n?m:fe(h)),Yt(s,c,h)):[]}l(_1,"slice");function L1(s,c){return ko(s,c)}l(L1,"sortedIndex");function N1(s,c,h){return yu(s,c,se(h,2))}l(N1,"sortedIndexBy");function D1(s,c){var h=s==null?0:s.length;if(h){var m=ko(s,c);if(m<h&&rr(s[m],c))return m}return-1}l(D1,"sortedIndexOf");function k1(s,c){return ko(s,c,!0)}l(k1,"sortedLastIndex");function P1(s,c,h){return yu(s,c,se(h,2),!0)}l(P1,"sortedLastIndexBy");function F1(s,c){var h=s==null?0:s.length;if(h){var m=ko(s,c,!0)-1;if(rr(s[m],c))return m}return-1}l(F1,"sortedLastIndexOf");function $1(s){return s&&s.length?xm(s):[]}l($1,"sortedUniq");function H1(s,c){return s&&s.length?xm(s,se(c,2)):[]}l(H1,"sortedUniqBy");function B1(s){var c=s==null?0:s.length;return c?Yt(s,1,c):[]}l(B1,"tail");function W1(s,c,h){return s&&s.length?(c=h||c===n?1:fe(c),Yt(s,0,c<0?0:c)):[]}l(W1,"take");function U1(s,c,h){var m=s==null?0:s.length;return m?(c=h||c===n?1:fe(c),c=m-c,Yt(s,c<0?0:c,m)):[]}l(U1,"takeRight");function V1(s,c){return s&&s.length?Po(s,se(c,3),!1,!0):[]}l(V1,"takeRightWhile");function z1(s,c){return s&&s.length?Po(s,se(c,3)):[]}l(z1,"takeWhile");var G1=me(function(s){return Zr(ht(s,1,nt,!0))}),j1=me(function(s){var c=Kt(s);return nt(c)&&(c=n),Zr(ht(s,1,nt,!0),se(c,2))}),q1=me(function(s){var c=Kt(s);return c=typeof c=="function"?c:n,Zr(ht(s,1,nt,!0),n,c)});function Y1(s){return s&&s.length?Zr(s):[]}l(Y1,"uniq");function K1(s,c){return s&&s.length?Zr(s,se(c,2)):[]}l(K1,"uniqBy");function X1(s,c){return c=typeof c=="function"?c:n,s&&s.length?Zr(s,n,c):[]}l(X1,"uniqWith");function ku(s){if(!(s&&s.length))return[];var c=0;return s=Gr(s,function(h){if(nt(h))return c=at(h.length,c),!0}),Jc(c,function(h){return qe(s,Kc(h))})}l(ku,"unzip");function ug(s,c){if(!(s&&s.length))return[];var h=ku(s);return c==null?h:qe(h,function(m){return Dt(c,n,m)})}l(ug,"unzipWith");var Z1=me(function(s,c){return nt(s)?Qi(s,c):[]}),J1=me(function(s){return vu(Gr(s,nt))}),Q1=me(function(s){var c=Kt(s);return nt(c)&&(c=n),vu(Gr(s,nt),se(c,2))}),eM=me(function(s){var c=Kt(s);return c=typeof c=="function"?c:n,vu(Gr(s,nt),n,c)}),tM=me(ku);function rM(s,c){return Rm(s||[],c||[],Ji)}l(rM,"zipObject");function nM(s,c){return Rm(s||[],c||[],rs)}l(nM,"zipObjectDeep");var iM=me(function(s){var c=s.length,h=c>1?s[c-1]:n;return h=typeof h=="function"?(s.pop(),h):n,ug(s,h)});function fg(s){var c=C(s);return c.__chain__=!0,c}l(fg,"chain");function sM(s,c){return c(s),s}l(sM,"tap");function Go(s,c){return c(s)}l(Go,"thru");var oM=Rr(function(s){var c=s.length,h=c?s[0]:0,m=this.__wrapped__,b=l(function(x){return ou(x,s)},"interceptor");return c>1||this.__actions__.length||!(m instanceof be)||!Ar(h)?this.thru(b):(m=m.slice(h,+h+(c?1:0)),m.__actions__.push({func:Go,args:[b],thisArg:n}),new jt(m,this.__chain__).thru(function(x){return c&&!x.length&&x.push(n),x}))});function aM(){return fg(this)}l(aM,"wrapperChain");function lM(){return new jt(this.value(),this.__chain__)}l(lM,"wrapperCommit");function cM(){this.__values__===n&&(this.__values__=Mg(this.value()));var s=this.__index__>=this.__values__.length,c=s?n:this.__values__[this.__index__++];return{done:s,value:c}}l(cM,"wrapperNext");function uM(){return this}l(uM,"wrapperToIterator");function fM(s){for(var c,h=this;h instanceof Oo;){var m=ig(h);m.__index__=0,m.__values__=n,c?b.__wrapped__=m:c=m;var b=m;h=h.__wrapped__}return b.__wrapped__=s,c}l(fM,"wrapperPlant");function hM(){var s=this.__wrapped__;if(s instanceof be){var c=s;return this.__actions__.length&&(c=new be(this)),c=c.reverse(),c.__actions__.push({func:Go,args:[Du],thisArg:n}),new jt(c,this.__chain__)}return this.thru(Du)}l(hM,"wrapperReverse");function dM(){return Im(this.__wrapped__,this.__actions__)}l(dM,"wrapperValue");var pM=Fo(function(s,c,h){Ie.call(s,h)?++s[h]:cr(s,h,1)});function mM(s,c,h){var m=ce(s)?Bp:s0;return h&&Ct(s,c,h)&&(c=n),m(s,se(c,3))}l(mM,"every");function gM(s,c){var h=ce(s)?Gr:um;return h(s,se(c,3))}l(gM,"filter");var yM=$m(sg),bM=$m(og);function vM(s,c){return ht(jo(s,c),1)}l(vM,"flatMap");function wM(s,c){return ht(jo(s,c),q)}l(wM,"flatMapDeep");function SM(s,c,h){return h=h===n?1:fe(h),ht(jo(s,c),h)}l(SM,"flatMapDepth");function hg(s,c){var h=ce(s)?kt:Xr;return h(s,se(c,3))}l(hg,"forEach");function dg(s,c){var h=ce(s)?BC:cm;return h(s,se(c,3))}l(dg,"forEachRight");var EM=Fo(function(s,c,h){Ie.call(s,h)?s[h].push(c):cr(s,h,[c])});function CM(s,c,h,m){s=At(s)?s:ei(s),h=h&&!m?fe(h):0;var b=s.length;return h<0&&(h=at(b+h,0)),Zo(s)?h<=b&&s.indexOf(c,h)>-1:!!b&&Vn(s,c,h)>-1}l(CM,"includes");var xM=me(function(s,c,h){var m=-1,b=typeof c=="function",x=At(s)?N(s.length):[];return Xr(s,function(I){x[++m]=b?Dt(c,I,h):es(I,c,h)}),x}),MM=Fo(function(s,c,h){cr(s,h,c)});function jo(s,c){var h=ce(s)?qe:gm;return h(s,se(c,3))}l(jo,"map");function TM(s,c,h,m){return s==null?[]:(ce(c)||(c=c==null?[]:[c]),h=m?n:h,ce(h)||(h=h==null?[]:[h]),wm(s,c,h))}l(TM,"orderBy");var IM=Fo(function(s,c,h){s[h?0:1].push(c)},function(){return[[],[]]});function RM(s,c,h){var m=ce(s)?qc:zp,b=arguments.length<3;return m(s,se(c,4),h,b,Xr)}l(RM,"reduce");function AM(s,c,h){var m=ce(s)?WC:zp,b=arguments.length<3;return m(s,se(c,4),h,b,cm)}l(AM,"reduceRight");function OM(s,c){var h=ce(s)?Gr:um;return h(s,Ko(se(c,3)))}l(OM,"reject");function _M(s){var c=ce(s)?sm:C0;return c(s)}l(_M,"sample");function LM(s,c,h){(h?Ct(s,c,h):c===n)?c=1:c=fe(c);var m=ce(s)?e0:x0;return m(s,c)}l(LM,"sampleSize");function NM(s){var c=ce(s)?t0:T0;return c(s)}l(NM,"shuffle");function DM(s){if(s==null)return 0;if(At(s))return Zo(s)?Gn(s):s.length;var c=bt(s);return c==xe||c==Jt?s.size:hu(s).length}l(DM,"size");function kM(s,c,h){var m=ce(s)?Yc:I0;return h&&Ct(s,c,h)&&(c=n),m(s,se(c,3))}l(kM,"some");var PM=me(function(s,c){if(s==null)return[];var h=c.length;return h>1&&Ct(s,c[0],c[1])?c=[]:h>2&&Ct(c[0],c[1],c[2])&&(c=[c[0]]),wm(s,ht(c,1),[])}),qo=gx||function(){return ut.Date.now()};function FM(s,c){if(typeof c!="function")throw new Gt(i);return s=fe(s),function(){if(--s<1)return c.apply(this,arguments)}}l(FM,"after");function pg(s,c,h){return c=h?n:c,c=s&&c==null?s.length:c,Ir(s,U,n,n,n,n,c)}l(pg,"ary");function mg(s,c){var h;if(typeof c!="function")throw new Gt(i);return s=fe(s),function(){return--s>0&&(h=c.apply(this,arguments)),s<=1&&(c=n),h}}l(mg,"before");var Pu=me(function(s,c,h){var m=E;if(h.length){var b=qr(h,Jn(Pu));m|=L}return Ir(s,m,c,h,b)}),gg=me(function(s,c,h){var m=E|v;if(h.length){var b=qr(h,Jn(gg));m|=L}return Ir(c,m,s,h,b)});function yg(s,c,h){c=h?n:c;var m=Ir(s,A,n,n,n,n,n,c);return m.placeholder=yg.placeholder,m}l(yg,"curry");function bg(s,c,h){c=h?n:c;var m=Ir(s,T,n,n,n,n,n,c);return m.placeholder=bg.placeholder,m}l(bg,"curryRight");function vg(s,c,h){var m,b,x,I,R,_,F=0,$=!1,H=!1,K=!0;if(typeof s!="function")throw new Gt(i);c=Xt(c)||0,Je(h)&&($=!!h.leading,H="maxWait"in h,x=H?at(Xt(h.maxWait)||0,c):x,K="trailing"in h?!!h.trailing:K);function te(it){var nr=m,Lr=b;return m=b=n,F=it,I=s.apply(Lr,nr),I}l(te,"invokeFunc");function oe(it){return F=it,R=ss(ye,c),$?te(it):I}l(oe,"leadingEdge");function he(it){var nr=it-_,Lr=it-F,Hg=c-nr;return H?yt(Hg,x-Lr):Hg}l(he,"remainingWait");function ne(it){var nr=it-_,Lr=it-F;return _===n||nr>=c||nr<0||H&&Lr>=x}l(ne,"shouldInvoke");function ye(){var it=qo();if(ne(it))return Se(it);R=ss(ye,he(it))}l(ye,"timerExpired");function Se(it){return R=n,K&&m?te(it):(m=b=n,I)}l(Se,"trailingEdge");function Ht(){R!==n&&Am(R),F=0,m=_=b=R=n}l(Ht,"cancel");function xt(){return R===n?I:Se(qo())}l(xt,"flush");function Bt(){var it=qo(),nr=ne(it);if(m=arguments,b=this,_=it,nr){if(R===n)return oe(_);if(H)return Am(R),R=ss(ye,c),te(_)}return R===n&&(R=ss(ye,c)),I}return l(Bt,"debounced"),Bt.cancel=Ht,Bt.flush=xt,Bt}l(vg,"debounce");var $M=me(function(s,c){return lm(s,1,c)}),HM=me(function(s,c,h){return lm(s,Xt(c)||0,h)});function BM(s){return Ir(s,W)}l(BM,"flip");function Yo(s,c){if(typeof s!="function"||c!=null&&typeof c!="function")throw new Gt(i);var h=l(function(){var m=arguments,b=c?c.apply(this,m):m[0],x=h.cache;if(x.has(b))return x.get(b);var I=s.apply(this,m);return h.cache=x.set(b,I)||x,I},"memoized");return h.cache=new(Yo.Cache||Tr),h}l(Yo,"memoize"),Yo.Cache=Tr;function Ko(s){if(typeof s!="function")throw new Gt(i);return function(){var c=arguments;switch(c.length){case 0:return!s.call(this);case 1:return!s.call(this,c[0]);case 2:return!s.call(this,c[0],c[1]);case 3:return!s.call(this,c[0],c[1],c[2])}return!s.apply(this,c)}}l(Ko,"negate");function WM(s){return mg(2,s)}l(WM,"once");var UM=R0(function(s,c){c=c.length==1&&ce(c[0])?qe(c[0],Pt(se())):qe(ht(c,1),Pt(se()));var h=c.length;return me(function(m){for(var b=-1,x=yt(m.length,h);++b<x;)m[b]=c[b].call(this,m[b]);return Dt(s,this,m)})}),Fu=me(function(s,c){var h=qr(c,Jn(Fu));return Ir(s,L,n,c,h)}),wg=me(function(s,c){var h=qr(c,Jn(wg));return Ir(s,V,n,c,h)}),VM=Rr(function(s,c){return Ir(s,Z,n,n,n,c)});function zM(s,c){if(typeof s!="function")throw new Gt(i);return c=c===n?c:fe(c),me(s,c)}l(zM,"rest");function GM(s,c){if(typeof s!="function")throw new Gt(i);return c=c==null?0:at(fe(c),0),me(function(h){var m=h[c],b=Qr(h,0,c);return m&&jr(b,m),Dt(s,this,b)})}l(GM,"spread");function jM(s,c,h){var m=!0,b=!0;if(typeof s!="function")throw new Gt(i);return Je(h)&&(m="leading"in h?!!h.leading:m,b="trailing"in h?!!h.trailing:b),vg(s,c,{leading:m,maxWait:c,trailing:b})}l(jM,"throttle");function qM(s){return pg(s,1)}l(qM,"unary");function YM(s,c){return Fu(Su(c),s)}l(YM,"wrap");function KM(){if(!arguments.length)return[];var s=arguments[0];return ce(s)?s:[s]}l(KM,"castArray");function XM(s){return qt(s,y)}l(XM,"clone");function ZM(s,c){return c=typeof c=="function"?c:n,qt(s,y,c)}l(ZM,"cloneWith");function JM(s){return qt(s,p|y)}l(JM,"cloneDeep");function QM(s,c){return c=typeof c=="function"?c:n,qt(s,p|y,c)}l(QM,"cloneDeepWith");function eT(s,c){return c==null||am(s,c,ft(c))}l(eT,"conformsTo");function rr(s,c){return s===c||s!==s&&c!==c}l(rr,"eq");var tT=Wo(cu),rT=Wo(function(s,c){return s>=c}),Mn=dm(function(){return arguments}())?dm:function(s){return et(s)&&Ie.call(s,"callee")&&!Qp.call(s,"callee")},ce=N.isArray,nT=Dp?Pt(Dp):f0;function At(s){return s!=null&&Xo(s.length)&&!Or(s)}l(At,"isArrayLike");function nt(s){return et(s)&&At(s)}l(nt,"isArrayLikeObject");function iT(s){return s===!0||s===!1||et(s)&&Et(s)==gt}l(iT,"isBoolean");var en=bx||Ku,sT=kp?Pt(kp):h0;function oT(s){return et(s)&&s.nodeType===1&&!os(s)}l(oT,"isElement");function aT(s){if(s==null)return!0;if(At(s)&&(ce(s)||typeof s=="string"||typeof s.splice=="function"||en(s)||Qn(s)||Mn(s)))return!s.length;var c=bt(s);if(c==xe||c==Jt)return!s.size;if(is(s))return!hu(s).length;for(var h in s)if(Ie.call(s,h))return!1;return!0}l(aT,"isEmpty");function lT(s,c){return ts(s,c)}l(lT,"isEqual");function cT(s,c,h){h=typeof h=="function"?h:n;var m=h?h(s,c):n;return m===n?ts(s,c,n,h):!!m}l(cT,"isEqualWith");function $u(s){if(!et(s))return!1;var c=Et(s);return c==xr||c==Wi||typeof s.message=="string"&&typeof s.name=="string"&&!os(s)}l($u,"isError");function uT(s){return typeof s=="number"&&tm(s)}l(uT,"isFinite");function Or(s){if(!Je(s))return!1;var c=Et(s);return c==we||c==It||c==Nt||c==kE}l(Or,"isFunction");function Sg(s){return typeof s=="number"&&s==fe(s)}l(Sg,"isInteger");function Xo(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=ae}l(Xo,"isLength");function Je(s){var c=typeof s;return s!=null&&(c=="object"||c=="function")}l(Je,"isObject");function et(s){return s!=null&&typeof s=="object"}l(et,"isObjectLike");var Eg=Pp?Pt(Pp):p0;function fT(s,c){return s===c||fu(s,c,Ru(c))}l(fT,"isMatch");function hT(s,c,h){return h=typeof h=="function"?h:n,fu(s,c,Ru(c),h)}l(hT,"isMatchWith");function dT(s){return Cg(s)&&s!=+s}l(dT,"isNaN");function pT(s){if(Z0(s))throw new le(r);return pm(s)}l(pT,"isNative");function mT(s){return s===null}l(mT,"isNull");function gT(s){return s==null}l(gT,"isNil");function Cg(s){return typeof s=="number"||et(s)&&Et(s)==Le}l(Cg,"isNumber");function os(s){if(!et(s)||Et(s)!=ge)return!1;var c=Co(s);if(c===null)return!0;var h=Ie.call(c,"constructor")&&c.constructor;return typeof h=="function"&&h instanceof h&&vo.call(h)==hx}l(os,"isPlainObject");var Hu=Fp?Pt(Fp):m0;function yT(s){return Sg(s)&&s>=-ae&&s<=ae}l(yT,"isSafeInteger");var xg=$p?Pt($p):g0;function Zo(s){return typeof s=="string"||!ce(s)&&et(s)&&Et(s)==Vi}l(Zo,"isString");function $t(s){return typeof s=="symbol"||et(s)&&Et(s)==co}l($t,"isSymbol");var Qn=Hp?Pt(Hp):y0;function bT(s){return s===n}l(bT,"isUndefined");function vT(s){return et(s)&&bt(s)==zi}l(vT,"isWeakMap");function wT(s){return et(s)&&Et(s)==FE}l(wT,"isWeakSet");var ST=Wo(du),ET=Wo(function(s,c){return s<=c});function Mg(s){if(!s)return[];if(At(s))return Zo(s)?Qt(s):Rt(s);if(qi&&s[qi])return ex(s[qi]());var c=bt(s),h=c==xe?eu:c==Jt?go:ei;return h(s)}l(Mg,"toArray");function _r(s){if(!s)return s===0?s:0;if(s=Xt(s),s===q||s===-q){var c=s<0?-1:1;return c*rt}return s===s?s:0}l(_r,"toFinite");function fe(s){var c=_r(s),h=c%1;return c===c?h?c-h:c:0}l(fe,"toInteger");function Tg(s){return s?Sn(fe(s),0,Pe):0}l(Tg,"toLength");function Xt(s){if(typeof s=="number")return s;if($t(s))return De;if(Je(s)){var c=typeof s.valueOf=="function"?s.valueOf():s;s=Je(c)?c+"":c}if(typeof s!="string")return s===0?s:+s;s=Gp(s);var h=nC.test(s);return h||sC.test(s)?FC(s.slice(2),h?2:8):rC.test(s)?De:+s}l(Xt,"toNumber");function Ig(s){return fr(s,Ot(s))}l(Ig,"toPlainObject");function CT(s){return s?Sn(fe(s),-ae,ae):s===0?s:0}l(CT,"toSafeInteger");function Re(s){return s==null?"":Ft(s)}l(Re,"toString");var xT=Xn(function(s,c){if(is(c)||At(c)){fr(c,ft(c),s);return}for(var h in c)Ie.call(c,h)&&Ji(s,h,c[h])}),Rg=Xn(function(s,c){fr(c,Ot(c),s)}),Ag=Xn(function(s,c,h,m){fr(c,Ot(c),s,m)}),Bu=Xn(function(s,c,h,m){fr(c,ft(c),s,m)}),MT=Rr(ou);function TT(s,c){var h=Kn(s);return c==null?h:om(h,c)}l(TT,"create");var IT=me(function(s,c){s=ke(s);var h=-1,m=c.length,b=m>2?c[2]:n;for(b&&Ct(c[0],c[1],b)&&(m=1);++h<m;)for(var x=c[h],I=Ot(x),R=-1,_=I.length;++R<_;){var F=I[R],$=s[F];($===n||rr($,jn[F])&&!Ie.call(s,F))&&(s[F]=x[F])}return s}),RT=me(function(s){return s.push(n,Gm),Dt(Og,n,s)});function AT(s,c){return Wp(s,se(c,3),ur)}l(AT,"findKey");function OT(s,c){return Wp(s,se(c,3),lu)}l(OT,"findLastKey");function _T(s,c){return s==null?s:au(s,se(c,3),Ot)}l(_T,"forIn");function LT(s,c){return s==null?s:fm(s,se(c,3),Ot)}l(LT,"forInRight");function NT(s,c){return s&&ur(s,se(c,3))}l(NT,"forOwn");function DT(s,c){return s&&lu(s,se(c,3))}l(DT,"forOwnRight");function kT(s){return s==null?[]:No(s,ft(s))}l(kT,"functions");function PT(s){return s==null?[]:No(s,Ot(s))}l(PT,"functionsIn");function Wu(s,c,h){var m=s==null?n:En(s,c);return m===n?h:m}l(Wu,"get");function FT(s,c){return s!=null&&Ym(s,c,a0)}l(FT,"has");function Uu(s,c){return s!=null&&Ym(s,c,l0)}l(Uu,"hasIn");var $T=Bm(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=wo.call(c)),s[c]=h},zu(_t)),HT=Bm(function(s,c,h){c!=null&&typeof c.toString!="function"&&(c=wo.call(c)),Ie.call(s,c)?s[c].push(h):s[c]=[h]},se),BT=me(es);function ft(s){return At(s)?im(s):hu(s)}l(ft,"keys");function Ot(s){return At(s)?im(s,!0):b0(s)}l(Ot,"keysIn");function WT(s,c){var h={};return c=se(c,3),ur(s,function(m,b,x){cr(h,c(m,b,x),m)}),h}l(WT,"mapKeys");function UT(s,c){var h={};return c=se(c,3),ur(s,function(m,b,x){cr(h,b,c(m,b,x))}),h}l(UT,"mapValues");var VT=Xn(function(s,c,h){Do(s,c,h)}),Og=Xn(function(s,c,h,m){Do(s,c,h,m)}),zT=Rr(function(s,c){var h={};if(s==null)return h;var m=!1;c=qe(c,function(x){return x=Jr(x,s),m||(m=x.length>1),x}),fr(s,Tu(s),h),m&&(h=qt(h,p|g|y,H0));for(var b=c.length;b--;)bu(h,c[b]);return h});function GT(s,c){return _g(s,Ko(se(c)))}l(GT,"omitBy");var jT=Rr(function(s,c){return s==null?{}:w0(s,c)});function _g(s,c){if(s==null)return{};var h=qe(Tu(s),function(m){return[m]});return c=se(c),Sm(s,h,function(m,b){return c(m,b[0])})}l(_g,"pickBy");function qT(s,c,h){c=Jr(c,s);var m=-1,b=c.length;for(b||(b=1,s=n);++m<b;){var x=s==null?n:s[tr(c[m])];x===n&&(m=b,x=h),s=Or(x)?x.call(s):x}return s}l(qT,"result");function YT(s,c,h){return s==null?s:rs(s,c,h)}l(YT,"set");function KT(s,c,h,m){return m=typeof m=="function"?m:n,s==null?s:rs(s,c,h,m)}l(KT,"setWith");var Lg=Vm(ft),Ng=Vm(Ot);function XT(s,c,h){var m=ce(s),b=m||en(s)||Qn(s);if(c=se(c,4),h==null){var x=s&&s.constructor;b?h=m?new x:[]:Je(s)?h=Or(x)?Kn(Co(s)):{}:h={}}return(b?kt:ur)(s,function(I,R,_){return c(h,I,R,_)}),h}l(XT,"transform");function ZT(s,c){return s==null?!0:bu(s,c)}l(ZT,"unset");function JT(s,c,h){return s==null?s:Tm(s,c,Su(h))}l(JT,"update");function QT(s,c,h,m){return m=typeof m=="function"?m:n,s==null?s:Tm(s,c,Su(h),m)}l(QT,"updateWith");function ei(s){return s==null?[]:Qc(s,ft(s))}l(ei,"values");function eI(s){return s==null?[]:Qc(s,Ot(s))}l(eI,"valuesIn");function tI(s,c,h){return h===n&&(h=c,c=n),h!==n&&(h=Xt(h),h=h===h?h:0),c!==n&&(c=Xt(c),c=c===c?c:0),Sn(Xt(s),c,h)}l(tI,"clamp");function rI(s,c,h){return c=_r(c),h===n?(h=c,c=0):h=_r(h),s=Xt(s),c0(s,c,h)}l(rI,"inRange");function nI(s,c,h){if(h&&typeof h!="boolean"&&Ct(s,c,h)&&(c=h=n),h===n&&(typeof c=="boolean"?(h=c,c=n):typeof s=="boolean"&&(h=s,s=n)),s===n&&c===n?(s=0,c=1):(s=_r(s),c===n?(c=s,s=0):c=_r(c)),s>c){var m=s;s=c,c=m}if(h||s%1||c%1){var b=rm();return yt(s+b*(c-s+PC("1e-"+((b+"").length-1))),c)}return mu(s,c)}l(nI,"random");var iI=Zn(function(s,c,h){return c=c.toLowerCase(),s+(h?Dg(c):c)});function Dg(s){return Vu(Re(s).toLowerCase())}l(Dg,"capitalize");function kg(s){return s=Re(s),s&&s.replace(aC,KC).replace(TC,"")}l(kg,"deburr");function sI(s,c,h){s=Re(s),c=Ft(c);var m=s.length;h=h===n?m:Sn(fe(h),0,m);var b=h;return h-=c.length,h>=0&&s.slice(h,b)==c}l(sI,"endsWith");function oI(s){return s=Re(s),s&&UE.test(s)?s.replace(up,XC):s}l(oI,"escape");function aI(s){return s=Re(s),s&&YE.test(s)?s.replace(Fc,"\\$&"):s}l(aI,"escapeRegExp");var lI=Zn(function(s,c,h){return s+(h?"-":"")+c.toLowerCase()}),cI=Zn(function(s,c,h){return s+(h?" ":"")+c.toLowerCase()}),uI=Fm("toLowerCase");function fI(s,c,h){s=Re(s),c=fe(c);var m=c?Gn(s):0;if(!c||m>=c)return s;var b=(c-m)/2;return Bo(Io(b),h)+s+Bo(To(b),h)}l(fI,"pad");function hI(s,c,h){s=Re(s),c=fe(c);var m=c?Gn(s):0;return c&&m<c?s+Bo(c-m,h):s}l(hI,"padEnd");function dI(s,c,h){s=Re(s),c=fe(c);var m=c?Gn(s):0;return c&&m<c?Bo(c-m,h)+s:s}l(dI,"padStart");function pI(s,c,h){return h||c==null?c=0:c&&(c=+c),Ex(Re(s).replace($c,""),c||0)}l(pI,"parseInt");function mI(s,c,h){return(h?Ct(s,c,h):c===n)?c=1:c=fe(c),gu(Re(s),c)}l(mI,"repeat");function gI(){var s=arguments,c=Re(s[0]);return s.length<3?c:c.replace(s[1],s[2])}l(gI,"replace");var yI=Zn(function(s,c,h){return s+(h?"_":"")+c.toLowerCase()});function bI(s,c,h){return h&&typeof h!="number"&&Ct(s,c,h)&&(c=h=n),h=h===n?Pe:h>>>0,h?(s=Re(s),s&&(typeof c=="string"||c!=null&&!Hu(c))&&(c=Ft(c),!c&&zn(s))?Qr(Qt(s),0,h):s.split(c,h)):[]}l(bI,"split");var vI=Zn(function(s,c,h){return s+(h?" ":"")+Vu(c)});function wI(s,c,h){return s=Re(s),h=h==null?0:Sn(fe(h),0,s.length),c=Ft(c),s.slice(h,h+c.length)==c}l(wI,"startsWith");function SI(s,c,h){var m=C.templateSettings;h&&Ct(s,c,h)&&(c=n),s=Re(s),c=Bu({},c,m,zm);var b=Bu({},c.imports,m.imports,zm),x=ft(b),I=Qc(b,x);kt(x,function(ne){if(hp.test(ne))throw new le(a)});var R,_,F=0,$=c.interpolate||uo,H="__p += '",K=tu((c.escape||uo).source+"|"+$.source+"|"+($===fp?tC:uo).source+"|"+(c.evaluate||uo).source+"|$","g"),te="//# sourceURL="+(Ie.call(c,"sourceURL")?(c.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_C+"]")+`
|
|
4
4
|
`;s.replace(K,function(ne,ye,Se,Ht,xt,Bt){return Se||(Se=Ht),H+=s.slice(F,Bt).replace(lC,ZC),ye&&(R=!0,H+=`' +
|
|
5
5
|
__e(`+ye+`) +
|
|
6
6
|
'`),xt&&(_=!0,H+=`';
|
|
@@ -11,70 +11,70 @@ __p += '`),Se&&(H+=`' +
|
|
|
11
11
|
`;var oe=Ie.call(c,"variable")&&c.variable;if(!oe)H=`with (obj) {
|
|
12
12
|
`+H+`
|
|
13
13
|
}
|
|
14
|
-
`;else if(
|
|
14
|
+
`;else if(hp.test(oe))throw new le(o);H=(_?H.replace($E,""):H).replace(HE,"$1").replace(BE,"$1;"),H="function("+(oe||"obj")+`) {
|
|
15
15
|
`+(oe?"":`obj || (obj = {});
|
|
16
16
|
`)+"var __t, __p = ''"+(R?", __e = _.escape":"")+(_?`, __j = Array.prototype.join;
|
|
17
17
|
function print() { __p += __j.call(arguments, '') }
|
|
18
18
|
`:`;
|
|
19
19
|
`)+H+`return __p
|
|
20
|
-
}`;var fe=Pg(function(){return Te(x,te+"return "+H).apply(n,I)});if(fe.source=H,ku(fe))throw fe;return fe}l(SI,"template");function EI(s){return Re(s).toLowerCase()}l(EI,"toLower");function CI(s){return Re(s).toUpperCase()}l(CI,"toUpper");function xI(s,c,h){if(s=Re(s),s&&(h||c===n))return zp(s);if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=Qt(c),x=Gp(m,b),I=jp(m,b)+1;return Qr(m,x,I).join("")}l(xI,"trim");function MI(s,c,h){if(s=Re(s),s&&(h||c===n))return s.slice(0,Yp(s)+1);if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=jp(m,Qt(c))+1;return Qr(m,0,b).join("")}l(MI,"trimEnd");function TI(s,c,h){if(s=Re(s),s&&(h||c===n))return s.replace(kc,"");if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=Gp(m,Qt(c));return Qr(m,b).join("")}l(TI,"trimStart");function II(s,c){var h=G,m=re;if(Je(c)){var b="separator"in c?c.separator:b;h="length"in c?ue(c.length):h,m="omission"in c?Ft(c.omission):m}s=Re(s);var x=s.length;if(Vn(s)){var I=Qt(s);x=I.length}if(h>=x)return s;var R=h-zn(m);if(R<1)return m;var _=I?Qr(I,0,R).join(""):s.slice(0,R);if(b===n)return _+m;if(I&&(R+=_.length-R),Pu(b)){if(s.slice(R).search(b)){var F,$=_;for(b.global||(b=Jc(b.source,Re(hp.exec(b))+"g")),b.lastIndex=0;F=b.exec($);)var H=F.index;_=_.slice(0,H===n?R:H)}}else if(s.indexOf(Ft(b),R)!=R){var K=_.lastIndexOf(b);K>-1&&(_=_.slice(0,K))}return _+m}l(II,"truncate");function RI(s){return s=Re(s),s&&WE.test(s)?s.replace(lp,ix):s}l(RI,"unescape");var AI=Xn(function(s,c,h){return s+(h?" ":"")+c.toUpperCase()}),Bu=Pm("toUpperCase");function kg(s,c,h){return s=Re(s),c=h?n:c,c===n?QC(s)?ax(s):zC(s):s.match(c)||[]}l(kg,"words");var Pg=me(function(s,c){try{return Dt(s,n,c)}catch(h){return ku(h)?h:new le(h)}}),OI=Rr(function(s,c){return kt(c,function(h){h=tr(h),cr(s,h,Nu(s[h],s))}),s});function _I(s){var c=s==null?0:s.length,h=se();return s=c?qe(s,function(m){if(typeof m[1]!="function")throw new Gt(i);return[h(m[0]),m[1]]}):[],me(function(m){for(var b=-1;++b<c;){var x=s[b];if(Dt(x[0],this,m))return Dt(x[1],this,m)}})}l(_I,"cond");function LI(s){return i0(qt(s,p))}l(LI,"conforms");function Wu(s){return function(){return s}}l(Wu,"constant");function NI(s,c){return s==null||s!==s?c:s}l(NI,"defaultTo");var DI=$m(),kI=$m(!0);function _t(s){return s}l(_t,"identity");function Uu(s){return pm(typeof s=="function"?s:qt(s,p))}l(Uu,"iteratee");function PI(s){return gm(qt(s,p))}l(PI,"matches");function FI(s,c){return ym(s,qt(c,p))}l(FI,"matchesProperty");var $I=me(function(s,c){return function(h){return es(h,s,c)}}),HI=me(function(s,c){return function(h){return es(s,h,c)}});function Vu(s,c,h){var m=ft(c),b=No(c,m);h==null&&!(Je(c)&&(b.length||!m.length))&&(h=c,c=s,s=this,b=No(c,ft(c)));var x=!(Je(h)&&"chain"in h)||!!h.chain,I=Or(s);return kt(b,function(R){var _=c[R];s[R]=_,I&&(s.prototype[R]=function(){var F=this.__chain__;if(x||F){var $=s(this.__wrapped__),H=$.__actions__=Rt(this.__actions__);return H.push({func:_,args:arguments,thisArg:s}),$.__chain__=F,$}return _.apply(s,jr([this.value()],arguments))})}),s}l(Vu,"mixin");function BI(){return ut._===this&&(ut._=dx),this}l(BI,"noConflict");function zu(){}l(zu,"noop");function WI(s){return s=ue(s),me(function(c){return bm(c,s)})}l(WI,"nthArg");var UI=wu(qe),VI=wu(Hp),zI=wu(Gc);function Fg(s){return Iu(s)?jc(tr(s)):S0(s)}l(Fg,"property");function GI(s){return function(c){return s==null?n:En(s,c)}}l(GI,"propertyOf");var jI=Bm(),qI=Bm(!0);function Gu(){return[]}l(Gu,"stubArray");function ju(){return!1}l(ju,"stubFalse");function YI(){return{}}l(YI,"stubObject");function KI(){return""}l(KI,"stubString");function XI(){return!0}l(XI,"stubTrue");function ZI(s,c){if(s=ue(s),s<1||s>ae)return[];var h=Pe,m=yt(s,Pe);c=se(c),s-=Pe;for(var b=Kc(m,c);++h<s;)c(h);return b}l(ZI,"times");function JI(s){return ce(s)?qe(s,tr):$t(s)?[s]:Rt(rg(Re(s)))}l(JI,"toPath");function QI(s){var c=++fx;return Re(s)+c}l(QI,"uniqueId");var eR=Ho(function(s,c){return s+c},0),tR=Su("ceil"),rR=Ho(function(s,c){return s/c},1),nR=Su("floor");function iR(s){return s&&s.length?Lo(s,_t,ou):n}l(iR,"max");function sR(s,c){return s&&s.length?Lo(s,se(c,2),ou):n}l(sR,"maxBy");function oR(s){return Up(s,_t)}l(oR,"mean");function aR(s,c){return Up(s,se(c,2))}l(aR,"meanBy");function lR(s){return s&&s.length?Lo(s,_t,uu):n}l(lR,"min");function cR(s,c){return s&&s.length?Lo(s,se(c,2),uu):n}l(cR,"minBy");var uR=Ho(function(s,c){return s*c},1),fR=Su("round"),hR=Ho(function(s,c){return s-c},0);function dR(s){return s&&s.length?Yc(s,_t):0}l(dR,"sum");function pR(s,c){return s&&s.length?Yc(s,se(c,2)):0}return l(pR,"sumBy"),E.after=F1,E.ary=dg,E.assign=xT,E.assignIn=Ig,E.assignInWith=Rg,E.assignWith=Fu,E.at=MT,E.before=pg,E.bind=Nu,E.bindAll=OI,E.bindKey=mg,E.castArray=K1,E.chain=ug,E.chunk=iM,E.compact=sM,E.concat=oM,E.cond=_I,E.conforms=LI,E.constant=Wu,E.countBy=p1,E.create=TT,E.curry=gg,E.curryRight=yg,E.debounce=bg,E.defaults=IT,E.defaultsDeep=RT,E.defer=$1,E.delay=H1,E.difference=aM,E.differenceBy=lM,E.differenceWith=cM,E.drop=uM,E.dropRight=fM,E.dropRightWhile=hM,E.dropWhile=dM,E.fill=pM,E.filter=g1,E.flatMap=v1,E.flatMapDeep=w1,E.flatMapDepth=S1,E.flatten=og,E.flattenDeep=mM,E.flattenDepth=gM,E.flip=B1,E.flow=DI,E.flowRight=kI,E.fromPairs=yM,E.functions=kT,E.functionsIn=PT,E.groupBy=E1,E.initial=vM,E.intersection=wM,E.intersectionBy=SM,E.intersectionWith=EM,E.invert=$T,E.invertBy=HT,E.invokeMap=x1,E.iteratee=Uu,E.keyBy=M1,E.keys=ft,E.keysIn=Ot,E.map=jo,E.mapKeys=WT,E.mapValues=UT,E.matches=PI,E.matchesProperty=FI,E.memoize=Yo,E.merge=VT,E.mergeWith=Ag,E.method=$I,E.methodOf=HI,E.mixin=Vu,E.negate=Ko,E.nthArg=WI,E.omit=zT,E.omitBy=GT,E.once=W1,E.orderBy=T1,E.over=UI,E.overArgs=U1,E.overEvery=VI,E.overSome=zI,E.partial=Du,E.partialRight=vg,E.partition=I1,E.pick=jT,E.pickBy=Og,E.property=Fg,E.propertyOf=GI,E.pull=TM,E.pullAll=lg,E.pullAllBy=IM,E.pullAllWith=RM,E.pullAt=AM,E.range=jI,E.rangeRight=qI,E.rearg=V1,E.reject=O1,E.remove=OM,E.rest=z1,E.reverse=_u,E.sampleSize=L1,E.set=YT,E.setWith=KT,E.shuffle=N1,E.slice=_M,E.sortBy=P1,E.sortedUniq=$M,E.sortedUniqBy=HM,E.split=bI,E.spread=G1,E.tail=BM,E.take=WM,E.takeRight=UM,E.takeRightWhile=VM,E.takeWhile=zM,E.tap=s1,E.throttle=j1,E.thru=Go,E.toArray=xg,E.toPairs=_g,E.toPairsIn=Lg,E.toPath=JI,E.toPlainObject=Tg,E.transform=XT,E.unary=q1,E.union=GM,E.unionBy=jM,E.unionWith=qM,E.uniq=YM,E.uniqBy=KM,E.uniqWith=XM,E.unset=ZT,E.unzip=Lu,E.unzipWith=cg,E.update=JT,E.updateWith=QT,E.values=Qn,E.valuesIn=eI,E.without=ZM,E.words=kg,E.wrap=Y1,E.xor=JM,E.xorBy=QM,E.xorWith=e1,E.zip=t1,E.zipObject=r1,E.zipObjectDeep=n1,E.zipWith=i1,E.entries=_g,E.entriesIn=Lg,E.extend=Ig,E.extendWith=Rg,Vu(E,E),E.add=eR,E.attempt=Pg,E.camelCase=iI,E.capitalize=Ng,E.ceil=tR,E.clamp=tI,E.clone=X1,E.cloneDeep=J1,E.cloneDeepWith=Q1,E.cloneWith=Z1,E.conformsTo=eT,E.deburr=Dg,E.defaultTo=NI,E.divide=rR,E.endsWith=sI,E.eq=rr,E.escape=oI,E.escapeRegExp=aI,E.every=m1,E.find=y1,E.findIndex=ig,E.findKey=AT,E.findLast=b1,E.findLastIndex=sg,E.findLastKey=OT,E.floor=nR,E.forEach=fg,E.forEachRight=hg,E.forIn=_T,E.forInRight=LT,E.forOwn=NT,E.forOwnRight=DT,E.get=$u,E.gt=tT,E.gte=rT,E.has=FT,E.hasIn=Hu,E.head=ag,E.identity=_t,E.includes=C1,E.indexOf=bM,E.inRange=rI,E.invoke=BT,E.isArguments=Mn,E.isArray=ce,E.isArrayBuffer=nT,E.isArrayLike=At,E.isArrayLikeObject=nt,E.isBoolean=iT,E.isBuffer=en,E.isDate=sT,E.isElement=oT,E.isEmpty=aT,E.isEqual=lT,E.isEqualWith=cT,E.isError=ku,E.isFinite=uT,E.isFunction=Or,E.isInteger=wg,E.isLength=Xo,E.isMap=Sg,E.isMatch=fT,E.isMatchWith=hT,E.isNaN=dT,E.isNative=pT,E.isNil=gT,E.isNull=mT,E.isNumber=Eg,E.isObject=Je,E.isObjectLike=et,E.isPlainObject=os,E.isRegExp=Pu,E.isSafeInteger=yT,E.isSet=Cg,E.isString=Zo,E.isSymbol=$t,E.isTypedArray=Jn,E.isUndefined=bT,E.isWeakMap=vT,E.isWeakSet=wT,E.join=CM,E.kebabCase=lI,E.last=Kt,E.lastIndexOf=xM,E.lowerCase=cI,E.lowerFirst=uI,E.lt=ST,E.lte=ET,E.max=iR,E.maxBy=sR,E.mean=oR,E.meanBy=aR,E.min=lR,E.minBy=cR,E.stubArray=Gu,E.stubFalse=ju,E.stubObject=YI,E.stubString=KI,E.stubTrue=XI,E.multiply=uR,E.nth=MM,E.noConflict=BI,E.noop=zu,E.now=qo,E.pad=fI,E.padEnd=hI,E.padStart=dI,E.parseInt=pI,E.random=nI,E.reduce=R1,E.reduceRight=A1,E.repeat=mI,E.replace=gI,E.result=qT,E.round=fR,E.runInContext=O,E.sample=_1,E.size=D1,E.snakeCase=yI,E.some=k1,E.sortedIndex=LM,E.sortedIndexBy=NM,E.sortedIndexOf=DM,E.sortedLastIndex=kM,E.sortedLastIndexBy=PM,E.sortedLastIndexOf=FM,E.startCase=vI,E.startsWith=wI,E.subtract=hR,E.sum=dR,E.sumBy=pR,E.template=SI,E.times=ZI,E.toFinite=_r,E.toInteger=ue,E.toLength=Mg,E.toLower=EI,E.toNumber=Xt,E.toSafeInteger=CT,E.toString=Re,E.toUpper=CI,E.trim=xI,E.trimEnd=MI,E.trimStart=TI,E.truncate=II,E.unescape=RI,E.uniqueId=QI,E.upperCase=AI,E.upperFirst=Bu,E.each=fg,E.eachRight=hg,E.first=ag,Vu(E,function(){var s={};return ur(E,function(c,h){Ie.call(E.prototype,h)||(s[h]=c)}),s}(),{chain:!1}),E.VERSION=e,kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){E[s].placeholder=E}),kt(["drop","take"],function(s,c){be.prototype[s]=function(h){h=h===n?1:at(ue(h),0);var m=this.__filtered__&&!c?new be(this):this.clone();return m.__filtered__?m.__takeCount__=yt(h,m.__takeCount__):m.__views__.push({size:yt(h,Pe),type:s+(m.__dir__<0?"Right":"")}),m},be.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),kt(["filter","map","takeWhile"],function(s,c){var h=c+1,m=h==k||h==ee;be.prototype[s]=function(b){var x=this.clone();return x.__iteratees__.push({iteratee:se(b,3),type:h}),x.__filtered__=x.__filtered__||m,x}}),kt(["head","last"],function(s,c){var h="take"+(c?"Right":"");be.prototype[s]=function(){return this[h](1).value()[0]}}),kt(["initial","tail"],function(s,c){var h="drop"+(c?"":"Right");be.prototype[s]=function(){return this.__filtered__?new be(this):this[h](1)}}),be.prototype.compact=function(){return this.filter(_t)},be.prototype.find=function(s){return this.filter(s).head()},be.prototype.findLast=function(s){return this.reverse().find(s)},be.prototype.invokeMap=me(function(s,c){return typeof s=="function"?new be(this):this.map(function(h){return es(h,s,c)})}),be.prototype.reject=function(s){return this.filter(Ko(se(s)))},be.prototype.slice=function(s,c){s=ue(s);var h=this;return h.__filtered__&&(s>0||c<0)?new be(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),c!==n&&(c=ue(c),h=c<0?h.dropRight(-c):h.take(c-s)),h)},be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},be.prototype.toArray=function(){return this.take(Pe)},ur(be.prototype,function(s,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),b=E[m?"take"+(c=="last"?"Right":""):c],x=m||/^find/.test(c);b&&(E.prototype[c]=function(){var I=this.__wrapped__,R=m?[1]:arguments,_=I instanceof be,F=R[0],$=_||ce(I),H=l(function(ye){var Se=b.apply(E,jr([ye],R));return m&&K?Se[0]:Se},"interceptor");$&&h&&typeof F=="function"&&F.length!=1&&(_=$=!1);var K=this.__chain__,te=!!this.__actions__.length,oe=x&&!K,fe=_&&!te;if(!x&&$){I=fe?I:new be(this);var ne=s.apply(I,R);return ne.__actions__.push({func:Go,args:[H],thisArg:n}),new jt(ne,K)}return oe&&fe?s.apply(this,R):(ne=this.thru(H),oe?m?ne.value()[0]:ne.value():ne)})}),kt(["pop","push","shift","sort","splice","unshift"],function(s){var c=yo[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",m=/^(?:pop|shift)$/.test(s);E.prototype[s]=function(){var b=arguments;if(m&&!this.__chain__){var x=this.value();return c.apply(ce(x)?x:[],b)}return this[h](function(I){return c.apply(ce(I)?I:[],b)})}}),ur(be.prototype,function(s,c){var h=E[c];if(h){var m=h.name+"";Ie.call(qn,m)||(qn[m]=[]),qn[m].push({name:c,func:h})}}),qn[$o(n,v).name]=[{name:"wrapper",func:n}],be.prototype.clone=Ax,be.prototype.reverse=Ox,be.prototype.value=_x,E.prototype.at=o1,E.prototype.chain=a1,E.prototype.commit=l1,E.prototype.next=c1,E.prototype.plant=f1,E.prototype.reverse=h1,E.prototype.toJSON=E.prototype.valueOf=E.prototype.value=d1,E.prototype.first=E.prototype.head,qi&&(E.prototype[qi]=u1),E},"runInContext"),Yr=lx();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ut._=Yr,define(function(){return Yr})):yn?((yn.exports=Yr)._=Yr,Wc._=Yr):ut._=Yr}).call(ri)});var Kg=Jo(In=>{var ea=Yg();function fs(n){return n.reduce(function(e,t,r,i){return e+t})}l(fs,"sum");function mr(n){if(ea.isArray(n))return n;if(typeof n=="string")return n.split("");throw Error("Parameter must be a string or array.")}l(mr,"ensureArr");In.jarowinkler=function(n,e,U){n=mr(n),e=mr(e);var r,i;n.length>e.length?(r=n,i=e):(r=e,i=n);var o=U||.7,a=.1,u=Math.floor(Math.max(r.length/2-1,0)),f=[],d=[],p,g,y,w,S=0;for(p=0;p<i.length;p++)for(w=i[p],g=Math.max(p-u,0),y=Math.min(p+u+1,r.length);g<y;g++)if(!d[g]&&w===r[g]){f[p]=g,d[g]=!0,S++;break}var C=[],v=[],M,A,T=0,L=0;for(M=0,A=0;M<i.length;M++)f[M]>-1&&(C[A]=i[M],A++);for(M=0,A=0;M<r.length;M++)d[M]&&(v[A]=r[M],A++);for(p=0;p<C.length;p++)C[p]!==v[p]&&T++;for(p=0;p<i.length&&n[p]===e[p];p++)L++;var V=S,U=T/2;if(V){var Z=(V/n.length+V/e.length+(V-U)/V)/3,W=Z<o?Z:Z+Math.min(a,1/r.length)*L*(1-Z);return W}else return 0};In.levenshtein=function(n,e,t){if(n=mr(n),e=mr(e),n.length===0)return e.length;if(e.length===0)return n.length;var r=t||{d:1,i:1,s:1},i=[],o=[],a=e.length+1,u,f,d,p;for(u=0;u<a;u++)i[u]=u;for(u=0;u<n.length;u++){for(o[0]=u+1,f=0;f<e.length;f++)d=n[u]===e[f]?0:r.s,o[f+1]=Math.min(o[f]+r.d,i[f+1]+r.i,i[f]+d);for(f=0;f<a;f++)i[f]=o[f]}return p=Math.max(n.length,e.length),(p-o[e.length])/p};In.ngram=function(n,e,t){n=mr(n),e=mr(e);var r=n.length,i=e.length,o=t||2,a,u,f,d,p,g,y,w=[],S=[],C=[],v=[],M=[],A=r+1;if(r===0||i===0)return r===i?1:0;if(a=0,r<o||i<o){for(u=0,d=Math.min(r,i);u<d;u++)n[u]===e[u]&&a++;return a/Math.max(r,i)}for(u=0;u<r+o-1;u++)u<o-1?w[u]=0:w[u]=n[u-o+1];for(u=0;u<=r;u++)S[u]=u;for(f=1;f<=i;f++){if(f<o){for(p=0;p<o-f;p++)M[p]=0;for(p=o-f;p<o;p++)M[p]=e[p-(o-f)]}else M=e.slice(f-o,f);for(C[0]=f,u=1;u<=r;u++){for(a=0,g=o,d=0;d<o;d++)w[u-1+d]!==M[d]?a++:w[u-1+d]===0&&g--;y=a/g,C[u]=Math.min(Math.min(C[u-1]+1,S[u]+1),S[u-1]+y)}v=S,S=C,C=v}return 1-S[r]/Math.max(r,i)};In.pearson=function(n,e){var t=[];Object.keys(n).forEach(function(g){e[g]&&t.push(g)});var r=t.length;if(r===0)return 0;var i=fs(t.map(function(g){return n[g]})),o=fs(t.map(function(g){return e[g]})),a=fs(t.map(function(g){return Math.pow(n[g],2)})),u=fs(t.map(function(g){return Math.pow(e[g],2)})),f=fs(t.map(function(g){return n[g]*e[g]})),d=f-i*o/r,p=Math.sqrt((a-Math.pow(i,2)/r)*(u-Math.pow(o,2)/r));return p===0?0:d/p};In.jaccard=function(n,e){return n=mr(n),e=mr(e),ea.intersection(n,e).length/ea.union(n,e).length};In.tanimoto=function(n,e){n=mr(n),e=mr(e);var t=ea.intersection(n,e).length;return t/(n.length+e.length-t)}});var ay=Jo((la,nf)=>{(function(n,e){typeof la=="object"&&typeof nf=="object"?nf.exports=e():typeof define=="function"&&define.amd?define([],e):typeof la=="object"?la.resq=e():(n.window=n.window||{},n.window.resq=e())})(window,function(){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return l(t,"r"),t.m=n,t.c=e,t.d=function(r,i,o){t.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,i){if(1&i&&(r=t(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)t.d(o,a,function(u){return r[u]}.bind(null,a));return o},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=16)}([function(n,e,t){"use strict";t.d(e,"a",function(){return L}),t.d(e,"d",function(){return W}),t.d(e,"b",function(){return G}),t.d(e,"c",function(){return re});var r=t(1),i=t.n(r),o=t(14),a=t.n(o),u=t(2),f=t.n(u),d=t(15),p=t.n(d);function g(B,j){var k=Object.keys(B);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(B);j&&(Q=Q.filter(function(ee){return Object.getOwnPropertyDescriptor(B,ee).enumerable})),k.push.apply(k,Q)}return k}l(g,"l");var y=Array.isArray,w=Object.keys;function S(B){return typeof B=="function"}l(S,"x");function C(B){return B instanceof HTMLElement||B instanceof Text}l(C,"y");function v(B){return f()(B)==="object"&&!y(B)}l(v,"h");function M(B){if(!B||typeof B=="string")return B;var j=function(k){for(var Q=1;Q<arguments.length;Q++){var ee=arguments[Q]!=null?arguments[Q]:{};Q%2?g(Object(ee),!0).forEach(function(q){a()(k,q,ee[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(ee)):g(Object(ee)).forEach(function(q){Object.defineProperty(k,q,Object.getOwnPropertyDescriptor(ee,q))})}return k}({},B);return delete j.children,j}l(M,"b");function A(B,j){var k=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return!(!y(B)||!y(j))&&(k?B.length===j.length&&!B.find(function(Q){return!j.includes(Q)}):B.some(function(Q){return j.includes(Q)}))}l(A,"v");function T(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Q=[];if(!w(B).length)return!0;if(j===null||!w(j).length)return!1;if(k)return p()(B,j);var ee=w(B).filter(function(q){return w(j).includes(q)});return ee.forEach(function(q){v(B[q])&&v(j[q])&&(Q=Q.concat(T(B[q],j[q]))),(B[q]===j[q]||A(B[q],j[q]))&&Q.push(j)}),Q.length>0&&Q.filter(function(q){return q}).length===ee.length}l(T,"_");function L(B){var j,k={children:[]};if(!B)return k;k.name=S(j=B.type)?j.displayName||j.name:j,k.props=M(B.memoizedProps),k.state=function(ee){if(ee){var q=ee.baseState;return q||ee}}(B.memoizedState);var Q=B.child;if(Q)for(k.children.push(Q);Q.sibling;)k.children.push(Q.sibling),Q=Q.sibling;return k.children=k.children.map(function(ee){return L(ee)}),S(B.type)&&function(ee){return ee.children.length>1}(k)?(k.node=function(ee){return ee.children.map(function(q){return q.node}).filter(function(q){return!!q})}(k),k.isFragment=!0):k.node=function(ee){return C(ee.stateNode)?ee.stateNode:ee.child&&C(ee.child.stateNode)?ee.child.stateNode:null}(B),k}l(L,"m");function V(B){for(;B.length;){var j=B.shift();if(j.node)return j.node;j.children&&Array.isArray(j.children)&&B.push.apply(B,i()(j.children))}}l(V,"g");function U(B,j){for(var k=[];B.length;){var Q=B.shift().children;Q&&Array.isArray(Q)&&Q.forEach(function(ee){j(ee)&&(!ee.node&&Array.isArray(ee.children)&&(ee.node=V(ee.children.concat([]))),k.push(ee)),B.push(ee)})}return k}l(U,"O");function Z(B,j){var k=function(Q){if(Q){var ee=Q.split("(");return ee.length===1?Q:ee.find(function(q){return q.includes(")")}).replace(/\)*/g,"")}}(j);return new RegExp("^"+B.split("*").map(function(Q){return Q.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}).join(".+")+"$").test(k)}l(Z,"w");function W(B,j){var k=arguments.length>3?arguments[3]:void 0;return B.reduce(function(Q,ee){return Q.concat(U(Q,k&&typeof k=="function"?k:function(q){return typeof q.name=="string"?Z(ee,q.name):q.name!==null&&f()(q.name)==="object"&&Z(ee,q.name.displayName)}))},[j])}l(W,"j");function G(B,j,k){var Q=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S(k)?(console.warn("Functions are not supported as filter matchers"),[]):B.filter(function(ee){return v(k)&&T(k,ee[j],Q)||y(k)&&A(k,ee[j],Q)||ee[j]===k})}l(G,"M");function re(B){if(B.hasOwnProperty("_reactRootContainer"))return B._reactRootContainer._internalRoot.current;var j=Object.keys(B).find(function(k){return k.startsWith("__reactInternalInstance")||k.startsWith("__reactFiber")||k.startsWith("__reactContainer")});return j?B[j]:void 0}l(re,"P")},function(n,e,t){var r=t(17),i=t(18),o=t(19),a=t(20);n.exports=function(u){return r(u)||i(u)||o(u)||a()},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?(n.exports=t=l(function(i){return typeof i},"r"),n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=t=l(function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},"r"),n.exports.default=n.exports,n.exports.__esModule=!0),t(r)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r){return n.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},n.exports.default=n.exports,n.exports.__esModule=!0,t(r)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r,i){for(var o=0;o<i.length;o++){var a=i[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}l(t,"r"),n.exports=function(r,i,o){return i&&t(r.prototype,i),o&&t(r,o),r},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r,i){return n.exports=t=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n.exports.default=n.exports,n.exports.__esModule=!0,t(r,i)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(6);n.exports=function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&r(i,o)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(3),i=t(6),o=t(22),a=t(23);function u(f){var d=typeof Map=="function"?new Map:void 0;return n.exports=u=l(function(p){if(p===null||!o(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(d!==void 0){if(d.has(p))return d.get(p);d.set(p,g)}function g(){return a(p,arguments,r(this).constructor)}return l(g,"e"),g.prototype=Object.create(p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),i(g,p)},"c"),n.exports.default=n.exports,n.exports.__esModule=!0,u(f)}l(u,"c"),n.exports=u,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,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";(function(r){t.d(e,"a",function(){return o});var i=t(0);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3,u=arguments.length>1?arguments[1]:void 0;if(r.isReactLoaded)return Promise.resolve("React already loaded");var f=l(function(){var d=document.createTreeWalker(document);if(u)return document.querySelector(u);for(;d.nextNode();)if(d.currentNode.hasOwnProperty("_reactRootContainer"))return d.currentNode},"o");return new Promise(function(d,p){var g=!1,y=null;l(function w(){var S=f();if(S&&(r.isReactLoaded=!0,r.rootReactElement=Object(i.c)(S),r.rootReactElement))return clearTimeout(y),d();g||setTimeout(w,200)},"e")(),y=setTimeout(function(){g=!0,p("Timed out")},a)})}l(o,"o")}).call(this,t(9))},function(n,e,t){"use strict";t.d(e,"a",function(){return V});var r=t(1),i=t.n(r),o=t(4),a=t.n(o),u=t(5),f=t.n(u),d=t(7),p=t.n(d),g=t(13),y=t.n(g),w=t(3),S=t.n(w),C=t(8),v=t.n(C),M=t(0);function A(U){var Z=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 W,G=S()(U);if(Z){var re=S()(this).constructor;W=Reflect.construct(G,arguments,re)}else W=G.apply(this,arguments);return y()(this,W)}}l(A,"v");var T=function(U){p()(W,U);var Z=A(W);function W(G){return a()(this,W),G||(G=[]),Z.call.apply(Z,[this].concat(i()(G)))}return l(W,"r"),f()(W,[{key:"byProps",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this,"props",G,B);return new W(j)},"value")},{key:"byState",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this,"state",G,B);return new W(j)},"value")}]),W}(v()(Array)),L=function(U){p()(W,U);var Z=A(W);function W(G,re){var B;for(var j in a()(this,W),(B=Z.call(this,G))._nodes=re,G)B[j]=G[j];return B}return l(W,"r"),f()(W,[{key:"byProps",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this._nodes,"props",G,B)[0];return new W(j,this._nodes)},"value")},{key:"byState",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this._nodes,"state",G,B)[0];return new W(j,this._nodes)},"value")}]),W}(v()(Object)),V=function(){function U(Z,W){a()(this,U),this.selectors=Z.split(" ").filter(function(G){return!!G}).map(function(G){return G.trim()}),this.rootComponent=W,this.tree=Object(M.a)(this.rootComponent)}return l(U,"t"),f()(U,[{key:"find",value:l(function(){return this.nodes=new T(Object(M.d)(this.selectors,this.tree,!0)),new L(this.nodes[0],this.nodes)},"value")},{key:"findAll",value:l(function(){return new T(Object(M.d)(this.selectors,this.tree))},"value")}]),U}()},function(n,e,t){var r=t(2).default,i=t(21);n.exports=function(o,a){return!a||r(a)!=="object"&&typeof a!="function"?i(o):a},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;n.exports=l(function a(u,f){if(u===f)return!0;if(u&&f&&typeof u=="object"&&typeof f=="object"){var d,p,g,y=r(u),w=r(f);if(y&&w){if((p=u.length)!=f.length)return!1;for(d=p;d--!=0;)if(!a(u[d],f[d]))return!1;return!0}if(y!=w)return!1;var S=u instanceof Date,C=f instanceof Date;if(S!=C)return!1;if(S&&C)return u.getTime()==f.getTime();var v=u instanceof RegExp,M=f instanceof RegExp;if(v!=M)return!1;if(v&&M)return u.toString()==f.toString();var A=i(u);if((p=A.length)!==i(f).length)return!1;for(d=p;d--!=0;)if(!o.call(f,A[d]))return!1;for(d=p;d--!=0;)if(!a(u[g=A[d]],f[g]))return!1;return!0}return u!=u&&f!=f},"t")},function(n,e,t){"use strict";t.r(e),function(r){t.d(e,"resq$",function(){return f}),t.d(e,"resq$$",function(){return d});var i=t(12),o=t(11);t.d(e,"waitToLoadReact",function(){return o.a});var a=t(0);function u(p,g,y){if(!y&&!r.isReactLoaded)throw new Error("Could not find the root element of your application");var w=r.rootReactElement;if(y instanceof HTMLElement&&(w=Object(a.c)(y)),!w)throw new Error("Could not find instance of React in given element");return new i.a(p,w)[g]()}l(u,"i");function f(p,g){return u(p,"find",g)}l(f,"c");function d(p,g){return u(p,"findAll",g)}l(d,"f")}.call(this,t(9))},function(n,e,t){var r=t(10);n.exports=function(i){if(Array.isArray(i))return r(i)},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 r=t(10);n.exports=function(i,o){if(i){if(typeof i=="string")return r(i,o);var a=Object.prototype.toString.call(i).slice(8,-1);return a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set"?Array.from(i):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(i,o):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.
|
|
21
|
-
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 r=t(6),i=t(24);function o(a,u,f){return i()?(n.exports=o=Reflect.construct,n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=o=l(function(d,p,g){var y=[null];y.push.apply(y,p);var w=new(Function.bind.apply(d,y));return g&&r(w,g.prototype),w},"u"),n.exports.default=n.exports,n.exports.__esModule=!0),o.apply(null,arguments)}l(o,"u"),n.exports=o,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}])})});function Hg(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}}l(Hg,"isCrossOriginIframe");var he=l((n,e=document,{excludeCrossOriginIframes:t=!1,includeHTML:r=!1}={})=>{let i=[],o=l(u=>{u.querySelectorAll(n).forEach(f=>i.push(f))},"queryElement"),a=l(u=>{o(u);let f=[],d=l(p=>{p.shadowRoot&&f.push(p.shadowRoot),p.childNodes?.forEach(g=>d(g))},"findShadowRoots");d(u),f.forEach(p=>a(p)),u.querySelectorAll("iframe").forEach(p=>{if(!(t&&Hg(p)))try{let g=p.contentDocument;g&&a(g)}catch{return}})},"queryNode");return a(e),r&&e instanceof Document&&e.documentElement.matches(n)&&i.push(e.documentElement),i},"querySelectorAllExtended"),Tn=l((n,e)=>{if(n.matches(e))return n;let t=n.slot;if(t){let o=n.parentElement;for(;o;){if(o.shadowRoot){let a=o.shadowRoot.querySelector(`slot[name="${t}"]`);if(a)return Tn(a,e)}o=o.parentElement}return null}let r=n.closest(e);if(r)return r;let i=n.getRootNode();return i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Tn(i.host,e):null},"closestExtended"),ei=l((n,{flattenShadowRootChildren:e=!1}={})=>{if(!n)return[];let t=Array.from(n.childNodes);if(n.nodeType===Node.ELEMENT_NODE){let r=n;r.shadowRoot&&(t=t.filter(i=>!i.assignedSlot),e?t=t.concat(Array.from(r.shadowRoot.childNodes)):t.push(r.shadowRoot)),r.tagName.toLowerCase()==="slot"&&t.push(...r.assignedNodes())}return t},"childNodesExtended"),Bg=l(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 hr=l(n=>{let e=n.parentElement;if(e)return e;switch(n.nodeType){case Node.ELEMENT_NODE:let r=n;if(r.assignedSlot)return r.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 i=Array.from(window.document.querySelectorAll("iframe")).find(o=>o.contentDocument===t);if(i)return i}return null},"parentElementExtended");var as=l((n,{includeComments:e=!0,includeCDATA:t=!0,trim:r=!0,limitAttributeLength:i=!1}={})=>{if(!n)return"";function o(d){switch(d.nodeType){case Node.ELEMENT_NODE:return f(d);case Node.TEXT_NODE:return d.nodeValue;case Node.CDATA_SECTION_NODE:return t&&d.nodeValue.trim().length>0?`<![CDATA[${d.nodeValue}]]>`:"";case Node.COMMENT_NODE:return e&&d.nodeValue.trim().length>0?`<!--${d.nodeValue}-->`:"";default:return""}}l(o,"serializeNode");function a(d){return Array.from(d.childNodes).map(o).join("")}l(a,"serializeShadowRoot");function u(d){try{let p=d.contentDocument||d.contentWindow.document;return as(p.documentElement)}catch{return""}}l(u,"serializeIframe");function f(d){let p=d.tagName.toLowerCase(),g=`<${p}`;return Array.from(d.attributes).forEach(y=>{let w=y.value.slice(0,i?100:void 0);g+=` ${y.name}="${w}"`}),g+=">",d.shadowRoot?g+=a(d.shadowRoot):["script","style","svg"].includes(p)||Array.from(d.childNodes).forEach(y=>{y instanceof Element&&y.tagName.toLowerCase()==="iframe"?g+=u(y):g+=o(y)}),g+=`</${p}>`,g}return l(f,"serializeElementNode"),n.tagName.toLowerCase()==="iframe"?u(n):o(n)},"serializeElement");var Lt=class n{constructor({target:e=document,disabled:t=!1,log:r=!0,name:i,monitorInput:o=!1}){this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid","data-scrollable-x","data-scrollable-y","data-scrollable-x-progress","data-scrollable-y-progress","rrwebid"];this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"];this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"];this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(",");this.shouldIgnoreMutationRecord=l(e=>{try{if(e.type==="attributes"&&this.ignoreMutationsWithAttributes.includes(e.attributeName)||e.type==="attributes"&&this.ignoreMutationsWithAttributeRegexPatterns.some(r=>new RegExp("^"+r+"$").test(e.attributeName)))return!0;if(e.type==="attributes"&&e.attributeName==="class"){let r=l(i=>i?i.split(" ").filter(o=>![":hover","rrweb-paused"].includes(o)).sort().join(" "):"","standardizeClassName");return r(e.oldValue)===r(e.target.className)}let t=l(r=>this.ignoreElementsWithClasses.some(i=>r.classList.contains(i)),"doesElementHaveIgnoredClass");if(e.type==="childList"&&Array.from(e.addedNodes).every(r=>t(r))&&Array.from(e.removedNodes).every(r=>t(r)))return!0}catch{}return!1},"shouldIgnoreMutationRecord");this.monitoredTextElements=[];this.monitorInputEnabledElement=l(e=>{e.addEventListener("input",t=>{this.invalidate()})},"monitorInputEnabledElement");this.target=e,this.name=i,this.disabled=t,this.logActivity=r,this.monitorInput=o,this.startObserver()}static{l(this,"DOMMutationDependentCache")}static{this.instances={}}static getInstance(e,t){let r=this.makeNameForCache(e,t?.flags);n.instances[r]||(n.instances[r]=new n({...t,name:t?.name??e}),t?.initialValue&&n.instances[r].set(t?.initialValue));let i=n.instances[r];return t?.invalidate&&i.invalidate(),i}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(r=>{if(r.nodeType===Node.ELEMENT_NODE&&r.nodeType===Node.ELEMENT_NODE){let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(i.querySelectorAll("*")).filter(o=>o.matches&&o.matches(this.inputEnabledSelectors)||o.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=he(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 Ye(n,e,t=!0){try{if(!n.ownerDocument)return!1;let r=n.ownerDocument.defaultView;return r?n instanceof r[e]||n instanceof r.top?.[e]||t&&SR(n,e.toString()):!1}catch{}return!1}l(Ye,"isNodeInstanceOf");function SR(n,e){if(typeof n!="object"||n===null)return!1;let t=Object.getPrototypeOf(n);for(;t!==null;){if(t.constructor&&t.constructor.name===e)return!0;t=Object.getPrototypeOf(t)}return!1}l(SR,"isNodeInstanceOfAlt");function ti(n,e){return e??n?.ownerDocument?.defaultView??window}l(ti,"getElementWindow");async function Ku(n,e,t){if(!e.length)return[];let r=n.ownerDocument;if(r===document)return[];let i=e.find(a=>a.contentDocument===r);if(!i)return[];let o=await t(i);return[...await Ku(i,e,t),o]}l(Ku,"getParentFramesSelectors");function Wg({rootDocument:n=document,ignoredIframesSelectors:e=[],flags:t={}}={}){let r=l(u=>u.filter(f=>!e.some(d=>f.matches(d))),"makeReturnValue"),i=Lt.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1,flags:t});if(i.hasCache())return r(i.get());let o=n.defaultView,a=he("iframe",o?.document);return i.set(a),r(a)}l(Wg,"getIframes");var jg=Yu(Vg());var ls=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]","canvas"],zg=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],Gg=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],Xu=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],dr=[":hover",":focus",":active","\\:hover","\\:focus","\\:active"];var Wt=class{static{l(this,"PlaywrightElementSelectorGenerator")}async injectSelectorsAndLocators(e,{testIdSelector:t,searchParentFrames:r=!0}={}){let i=e.map(o=>({container:o,removedAttributes:this.stripNodeAttributes(o.element)}));return i=await Promise.all(i.map(async o=>{let{selector:a,locator:u,parentFramesSelectors:f}=await this.getSelectorAndLocator(o.container.element,{testIdSelector:t,searchParentFrames:r,stripAttributes:!0});return{...o,selector:a,locator:u,parentFramesSelectors:f}})),i=await Promise.all(i.map(async o=>{if(!o.removedAttributes.id&&!o.removedAttributes.originalClasses||(this.restoreNodeAttributes(o.container.element,o.removedAttributes),window.playwright.$(o.selector)!==void 0))return o;let a=await this.getSelectorAndLocator(o.container.element,{testIdSelector:t,searchParentFrames:r,stripAttributes:!1});return console.log(`Selector ${o.selector} is not valid, generated new one: ${a.selector}`),Object.assign(o,a),o})),i.map(o=>{let{container:a,selector:u,locator:f,parentFramesSelectors:d}=o;return{...a,selector:u,locator:f,parentFramesSelectors:d}})}stripNodeAttributes(e){let t=e,r,i;t.id&&(r=t.id,t.removeAttribute("id"));try{if(i=t.getAttribute("class"),i&&typeof i=="string"){let o=i.split(" ").filter(a=>!a.startsWith("css-")&&!a.startsWith("jss-")&&!dr.includes(a)).join(" ");t.setAttribute("class",o)}else i=void 0}catch(o){return console.warn("[playwright selector generator] error with class filtering",o),{}}return{id:r,originalClasses:i}}restoreNodeAttributes(e,t){let r=e,{id:i,originalClasses:o}=t;i&&r.setAttribute("id",i),o&&r.setAttribute("class",o)}getElementWindowPlaywright(e){let t=e.ownerDocument.defaultView;return t?(t!==window&&!t.playwright&&(t.playwright=window.playwright),t.playwright):window.playwright}async safeGetSelectorAndLocator(e,{retriesLeft:t=3}={}){try{try{return window.playwright.generateSelectorAndLocator(e)}catch{return this.getElementWindowPlaywright(e).generateSelectorAndLocator(e)}}catch{return t>0?(await(0,jg.default)(500),this.safeGetSelectorAndLocator(e,{retriesLeft:t-1})):{selector:"",locator:""}}}async getSelectorAndLocator(e,{testIdSelector:t,searchParentFrames:r=!0,stripAttributes:i=!0,ignoredIframesSelectors:o=[],rootDocument:a=document,flags:u={}}={}){try{if(!e)return null;let f=r?await Ku(e,Wg({rootDocument:a,ignoredIframesSelectors:o,flags:u}),async S=>(await this.getSelectorAndLocator(S,{searchParentFrames:!1})).selector):[],d=e,p=this.getTestAttributeSelector(d,t);if(p)return{selector:p,locator:`locator("${p}")`,parentFramesSelectors:f};let g;i&&(g=this.stripNodeAttributes(e));let{selector:y,locator:w}=await this.safeGetSelectorAndLocator(d);return g&&(this.restoreNodeAttributes(e,g),await this.getElementWindowPlaywright(e).$(y)!==e&&({selector:y,locator:w}=await this.safeGetSelectorAndLocator(d))),{selector:y,locator:w,parentFramesSelectors:f}}catch(f){return console.log("get selector and locator error",e,f),{selector:"",locator:""}}}async findIframeWindowByParentFrameSelectors(e=[]){let t=window.top;try{if(e&&e.length>0)for(let r of e){let i=await t.playwright.$(r);i||(i=await window.playwright.$(r)),i||(i=he(r)[0]),i?t=i.contentWindow:console.warn("Failed to find iframe window by parent frame selectors",r)}}catch(r){console.log("find iframe window by parent frame selectors error",r,e)}return t}async selector(e,t){let r;try{r=await((await this.findIframeWindowByParentFrameSelectors(t)).playwright??window.playwright).$(e)}catch(i){console.log("selector error",e,i)}return r??this.selectFromFirstIframe(e)}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 r=["data-cy","data-testid","data-test-id","data-test"];for(let o of[t,...r])if(o&&e.getAttribute(o)){let a=`[${o}='${e.getAttribute(o)}']`;if(he(a).length===1)return a;if(he(a).length>1){let f=Array.from(he(a)).indexOf(e);return`${a} >> nth=${f}`}}}escapeBackslash(e){return e.replace(/\\/g,"\\\\")}};var Qo=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 r in t)this[r]=t[r]}}static{l(this,"ESRAElementMetadata")}serialize(){return JSON.stringify(this)}};var cs=(i=>(i[i.Query=0]="Query",i[i.Intersection=1]="Intersection",i[i.Interactables=2]="Interactables",i[i.All=3]="All",i))(cs||{});var qg=l((n,{tag:e="*"}={})=>he(e).filter(t=>t.innerText?.trim()===n.trim()),"findElementsWithText");function pr(n){let e=n.getRootNode();switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ER(n,e);default:return n.innerText}}l(pr,"getInnerText");function ER(n,e){let t=n.querySelectorAll("slot");if(!t.length)return n.innerText;let r=n.cloneNode(!0),i=r.querySelectorAll("slot");return t.forEach((o,a)=>{let u=o.assignedNodes();i[a].innerText=u.map(f=>{switch(f.nodeType){case Node.TEXT_NODE:return f.textContent;case Node.ELEMENT_NODE:return f.innerText}}).filter(f=>!!f).join(`
|
|
22
|
-
`)}),r.innerText.trim()}l(ER,"extractInnerTextForElementInShadowDOM");var Xg=Yu(Kg());var Zu=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{l(this,"ESRASimilarityConfigClass")}makeWeight(e){return this.weightsSum+=e,e}get(){return this.config}weight(e){return e/this.weightsSum}},Ue=new Zu;var ta=class{constructor(e){this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.unqualifiedClasses=[];this.qualifiedInnerText=void 0;this.visualVicinityComparable=[];this.structuralVicinityComparable=[];this.innerFeaturesComparable=[];this.rank=l(e=>{if(this.isDealBreaker(e))return{score:0,scores:{}};let t=this.tagSimilarity(e),r=this.attributesSimilarity(e),i=this.classSimilarity(e),o=this.styleSimilarity(e),a=this.innerTextSimilarity(e),u=this.innerFeaturesSimilarity(e),f=this.visualVicinitySimilarity(e),d=this.structuralVicinitySimilarity(e),p=this.svgsSimilarity(e),g={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:u,visualVicinityScore:f,structuralVicinityScore:d,svgsScore:p},y={tagScore:Ue.weight(Ue.get().tagName.decisionWeight)*t,attributesScore:Ue.weight(Ue.get().attributes.decisionWeight)*r,classesScore:Ue.weight(Ue.get().classes.decisionWeight)*i,innerTextScore:Ue.weight(Ue.get().innerText.decisionWeight)*a,innerFeaturesScore:Ue.weight(Ue.get().innerFeatures.decisionWeight)*u,styleScore:Ue.weight(Ue.get().style.decisionWeight)*o,visualVicinityScore:Ue.weight(Ue.get().visualVicinity.decisionWeight)*f,structuralVicinityScore:Ue.weight(Ue.get().structuralVicinity.decisionWeight)*d};return{score:Object.values(y).reduce((S,C)=>S+C,0),scores:g}},"rank");this.targetElementESRAMetadata=e,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}static{l(this,"ESRASimilarity")}getQualifiedAttributes(){return this.qualifiedAttributes}getQualifiedClasses(){return this.qualifiedClasses}getQualifiedInnerText(){return this.qualifiedInnerText}setQualifiedAttributes(){let e=this.targetElementESRAMetadata.attributes,{qualifiedAttributes:t,qualifiedAttributesMap:r}=this.makeQualifiedAttributes(e);this.qualifiedAttributes=t,this.qualifiedAttributesMap=r}makeQualifiedAttributes(e,t){let r=Object.keys(e).filter(o=>{switch(t){case"input":if(o==="value")return!1;break}let a=e[o];for(let u in a)u.endsWith("Uniqenuess")&&(a[u.replace("Uniqenuess","Uniqueness")]=a[u]);return a.globalUniqueness>Ue.get().attributes.qualification.globalUniquenessThreshold||a.tagUniqueness>Ue.get().attributes.qualification.tagUniquenessThreshold}),i=r.reduce((o,a)=>(o[a]=e[a].value,o),{});return{qualifiedAttributes:r,qualifiedAttributesMap:i}}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 r=e[t];return!this.isValidClass(t)||t.startsWith("jss")||t.startsWith("css-")||t===":hover"?!1:r.globalUniqueness>Ue.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>Ue.get().classes.qualification.tagUniquenessThreshold})}setQualifiedInnerText(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}makeQualifiedInnerText(e){return e&&e.content?.length<=Ue.get().innerText.qualification.maxLength&&e.content?.length>=Ue.get().innerText.qualification.minLength?e:null}makeBasicElementPropertiesComparable(e){return e.reduce((t,r)=>{let i=r.position?`${r.tag}.${r.position.slice(0,2).join(",")}`:r.tag,o=`${i}+${r.relativePosition}`,a=this.makeQualifiedClasses(r.classes).map(p=>`${i}.${p}`),u=[];this.makeQualifiedAttributes(r.attributes).qualifiedAttributes.forEach(p=>{u.push(`${i}[${p}]`),u.push(`${i}[${p}]=${r.attributes[p].value}`)});let f=r.feature?this.makeInnerFeaturesComparable([r.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[6]}):[],d=[...t,i,o,...a,...u,...f];return r.text&&(d.push(`${i}<>`),d.push(`${i}<${r.text}>`)),r.distance&&(d.push(`${i}->${r.distance}`),d.push(`${i}->[]${this.getDistanceRange(r.distance)}`)),d},[])}getDistanceRange(e){let t=[10,20,30,40,50,60,70,80,90,100];for(let r of t)if(e<r)return r;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:r=!0,featureTypeWhiteList:i=void 0}={}){return e.reduce((o,a)=>{if(i&&!i.includes(a.type)||a.isHidden)return o;let u=t??a.tag,f=r?[...o,u]:o;switch(a.type){case 3:f.push(`${u}[type=${a.buttonType}]`);break;case 4:a.inputType&&f.push(`${u}[type=${a.inputType}]`),a.placeholder&&f.push(`${u}[placeholder=${a.placeholder}]`);break;case 6:a.components.forEach(d=>{let p=[];for(let g in d.attributes)p.push(`[${g}=${d.attributes[g]}]`);f.push(`${u}${p.join("")}`)});break}return"text"in a&&a.text&&(f.push(`${u}<>`),f.push(`${u}<${a.text}>`)),f},[])}setInnerFeaturesComparable(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}isDealBreaker(e){if(this.targetElementESRAMetadata.tag==="input"&&e.tag==="input"){let t=l(o=>o.type?o.type.value:"text","getType"),r=t(this.targetElementESRAMetadata.attributes),i=t(e.attributes);if(r!==i)return!0}return!1}tagSimilarity(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}attributesSimilarity(e){let t=l(i=>[...this.keyValueObjectToArray(i),...Object.keys(i)],"makeJaccardParam"),{qualifiedAttributesMap:r}=this.makeQualifiedAttributes(e.attributes);return this.jaccard(t(this.qualifiedAttributesMap),t(r))}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(o=>{if(o.test(this.qualifiedInnerText.content)&&o.test(t.content))return .5});try{return new Date(this.qualifiedInnerText.content),new Date(t.content),.5}catch{}let i=l(o=>o.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s"),"template");return i(this.qualifiedInnerText.content)===i(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=l(o=>[...this.keyValueObjectToArray(o),...Object.keys(o)],"makeJaccardParam"),r=this.jaccard(t(this.targetElementESRAMetadata.style.inline??{}),t(e.style.inline??{})),i=this.jaccard(t(this.targetElementESRAMetadata.style.computed??{}),t(e.style.computed??{}));return r*Ue.get().style.inlineWeight+i*Ue.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="=",r=void 0){let i=l(o=>r?r(e,o):e[o],"getValue");return Object.keys(e).map(o=>`${o}${t}${i(o)}`)}jaccard(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,Xg.jaccard)(e,t)}};var Zg={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 ni={attributesToExtract:Zg.examinedAttributes,structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}};var CR={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"]},ii=class{constructor(e){this.document=e;this.limit=5;this.extractSVG=l(e=>Array.from(e.children).map(t=>{let r=CR[t.tagName.toLowerCase()];if(!r)return null;let i=r.reduce((a,u)=>{let f=t.getAttribute(u);return{...a,[u]:f}},{});return{tagName:t.tagName.toLowerCase(),attributes:i}}).filter(t=>!!t),"extractSVG")}static{l(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 hs(n){if(!n)return!1;let e=n.getBoundingClientRect();return e.top<=window.innerHeight&&e.left<=window.innerWidth&&e.bottom>=0&&e.right>=0}l(hs,"isElementInViewport");function ra(n,e=!0){let t=window.getComputedStyle(n),r=t.opacity==="0";return{visible:t.visibility!=="hidden"&&t.display!=="none"&&(!e||!r),isTransparent:r}}l(ra,"isElementVisibleByStyles");function Jg(n,e,t=!0,r=!0){let i=n.getBoundingClientRect(),o=e.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,u=i.top<o.bottom&&i.bottom>o.top;return(!t||a)&&(!r||u)}l(Jg,"elementsOverlap");function Qg(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;if(!t)return null;let r=n.ownerDocument,i={top:0,left:0,right:t.innerWidth||r.documentElement.clientWidth,bottom:t.innerHeight||r.documentElement.clientHeight},o={top:Math.max(e.top,i.top),left:Math.max(e.left,i.left),right:Math.min(e.right,i.right),bottom:Math.min(e.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}l(Qg,"getOverlappingRectangleWithViewport");function Qu(n){try{return getComputedStyle(n).position==="fixed"?!0:!n.parentElement||n.parentElement===document.body?!1:Qu(n.parentElement)}catch(e){return console.error("isAncestorOrSelfFixed",e),!1}}l(Qu,"isAncestorOrSelfFixed");function ef(n){let{top:e}=n.getBoundingClientRect();return e<0?-e:0}l(ef,"getHeightOfCroppedElementAboveViewport");function tf(n){let{bottom:e}=n.getBoundingClientRect(),t=window.innerHeight;return e>t?e-t:0}l(tf,"getHeightsOfCroppedElementBelowViewport");var dt=class{static{l(this,"ScrollHelper")}constructor(e){this.element=e,this.elRect=this.element.getBoundingClientRect()}scrollIntoView({dontScrollIfAlreadyInView:e=!0}={}){if(e&&hs(this.element))return this;if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!hs(this.element))for(let t of this.initialScrollPositions){let r=t.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){let i=this.elRect.top-r.top+t.element.scrollTop;t.element.scrollTop=i}}return this}restore(){this.initialScrollPositions&&this.initialScrollPositions.forEach(({element:e,top:t,left:r})=>{try{e.scroll(r,t)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:e,top:t,left:r},i)}})}static getScrollData(e){let t=l(u=>{let f=u==="top"?"scrollTop":"scrollLeft",d=e[f];try{if(e[f]=d+1,e[f]!==d||(e[f]=d-1,e[f]!==d))return!0}finally{e[f]=d}return!1},"tryScroll"),i=e.scrollHeight>e.clientHeight&&t("top"),a=e.scrollWidth>e.clientWidth&&t("left");return{canScrollY:i,canScrollX:a,progressY:i?e.scrollTop/(e.scrollHeight-e.clientHeight):void 0,progressX:a?e.scrollLeft/(e.scrollWidth-e.clientWidth):void 0}}static scrollScrollableElement(e,t,r){let i=t==="y",o=i?e.scrollHeight:e.scrollWidth,a=i?e.clientHeight:e.clientWidth,u=i?e.scrollTop:e.scrollLeft,f;switch(r){case"forward":f=u+a;break;case"backwards":f=Math.max(0,u-a);break;case"end":f=o-a;break;case"start":f=0;break;default:if(typeof r=="number"){let d=Math.max(0,Math.min(r,100));f=(o-a)*d/100}else return console.log(`Invalid length parameter: expected "next", "end", "start", or a number, but received ${r}`),{result:!1,error:`Invalid parameter: expected "next", "end", "start", or a number, but received ${r}`};break}if(f=Math.max(0,Math.min(f,o-a)),console.log("ScrollHelper/scrollScrollableElement: new, left, top",f,e.scrollLeft,e.scrollTop),i){if(e.scrollTop===f)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollTop=f}else{if(e.scrollLeft===f)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollLeft=f}return{result:!0}}getScrollableParentsPositions(){this.initialScrollPositions=[];let e=hr(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=hr(e)}};function vt(n,e={}){let{markTransparentElementsAsHidden:t=!0,markElementsHiddenByTransparentElementAsVisible:r=!1,scrollIntoView:i=!0,useCache:o=!1}=e;if(o){let y=xR(n,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r,scrollIntoView:i});if(y)return y}let a,u={isHidden:!0},f=l((y,w=!0)=>(w&&a&&a.restore(),o&&MR(n,y,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r}),{...u,...y}),"prepareResult");if(!n)return f({isHidden:!0});n=n.tagName==="OPTION"&&(n.closest("select")||n.closest("datalist"))||n;let{visible:d,isTransparent:p}=ra(n,t);if(u.isTransparent=p,!d)return f({isHidden:!0});if(TR(n,{scrollIntoView:i}))return f({isHidden:!0});try{let S=function(T){let L=T;for(;L;){if(L.nodeType===11)return[L,L.ownerDocument.defaultView];L=L.parentNode}};var g=S;l(S,"findShadowDocument"),i&&(a=new dt(n).scrollIntoView());let y=Qg(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)]],[C,v]=S(n)??[n.ownerDocument,n.ownerDocument.defaultView],M,A=ti(n);if(A&&n instanceof A.HTMLInputElement&&n.id&&n.type&&["checkbox","radio"].includes(n.type)){let T=he(`label[for="${n.id}"]`,C);T.length&&(M=T[0])}for(let[T,L,V]of w){let U=y.left+T>=0&&y.left+T<=v.innerWidth?y.left+T:T,Z=y.top+L>=0&&y.top+L<=v.innerHeight?y.top+L:L,W=C.elementFromPoint(U,Z);if(W===n)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L}});if(!W)continue;if(V===!0&&W.shadowRoot)return f(vt(W,e));let G=W;for(;G;){if(G===n||M&&M===G)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L}});G=hr(G)}if(r)try{let re=C.elementsFromPoint(U,Z);for(let B of re){if(B===n)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L},isBehindTransparentElement:!0});let j=v.getComputedStyle(B),k=B.getBoundingClientRect(),Q=n.getBoundingClientRect(),ee=ey(Q,k);if(!(ey(k,Q)&&!RR(k,Q)&&!ty(j))&&(ty(j)||IR(k,y)))break}}catch(re){console.error("Error while checking transparent elements over interactable",re)}}return a&&(a.restore(),a=void 0),M?vt(M,e):f({isHidden:!0})}catch(y){throw y}}l(vt,"isElementHidden");var ny=l(n=>{let e=Lt.getInstance("isElementHidden",{log:!1,flags:n}),t=e.get();return t||(t=new Map,e.set(t)),t},"getIsHiddenMapFromCache");function xR(n,e={}){let t=ny(e);return t.has(n)?t.get(n):void 0}l(xR,"getIsElementHiddenFromCache");var MR=l((n,e,t={})=>{ny(t).set(n,e)},"setIsElemenetHiddenInCache");function TR(n,{scrollIntoView:e=!0}={}){let t=n.parentElement,r=window.getComputedStyle(n);if(r.position==="absolute"||r.position==="fixed")return!1;let i;e&&(i=new dt(n).scrollIntoView());let o=l(u=>(i&&i.restore(),u),"restoreAndReturn"),a=ti(n);if(!a)return o(!1);for(;t;){if(!(t instanceof a.Element))return o(!1);let u=window.getComputedStyle(t);if(u.position==="absolute"||u.position==="fixed")return o(!1);let f=u.overflowX==="hidden",d=u.overflowY==="hidden";if((f||d)&&!Jg(t,n,f,d))return o(!0);t=t.parentElement}return o(!1)}l(TR,"isHiddenByOverflow");function ey(n,e){try{let t=Math.max(0,Math.min(n.right,e.right)-Math.max(n.left,e.left)),r=Math.max(0,Math.min(n.bottom,e.bottom)-Math.max(n.top,e.top)),i=t*r,o=n.width*n.height,a=e.width*e.height,u=Math.min(o,a)*.5;return i>u}catch(t){return console.error("Error while checking large overlap",t),!1}}l(ey,"isSignificantOverlap");function ty(n){return!(n.opacity==="0"||n.visibility==="hidden"||/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(n.backgroundColor))}l(ty,"isNotTransparent");function IR(n,e,t=.2){let r=ry(n),i=ry(e),o=r.widthRatio/i.widthRatio,a=r.heightRatio/i.heightRatio;return o>1+t||a>1+t}l(IR,"isElementSignificantlyLarger");function ry(n){let e={width:window.innerWidth,height:window.innerHeight,top:0,left:0,bottom:window.innerHeight,right:window.innerWidth},t=n.width/e.width,r=n.height/e.height;return{widthRatio:t,heightRatio:r}}l(ry,"getNormalizedElementSize");function RR(n,e,t=.2){let r=n.width/e.width,i=n.height/e.height,o=n.width-e.width,a=n.height-e.height,u=window.innerWidth,f=window.innerHeight,d=o/u,p=a/f,g=(r-1+(i-1))/2,y=(d+p)/2;return g*y>t}l(RR,"isSignificantlyLargerNormalized");var Rn=l(n=>vt(n,{useCache:!0}).isHidden,"getIsElementHidden"),na=l((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:Rn(n)};case"svg":return{type:6,tag:t,components:new ii(document).extract(n)[0],isRoot:e,isHidden:Rn(n)};case"a":return{type:2,tag:t,href:n.getAttribute("href"),text:n.innerText,isRoot:e,isHidden:Rn(n)};case"button":return{type:3,tag:t,text:n.innerText,buttonType:n.getAttribute("type")||"button",isRoot:e,isHidden:Rn(n)};case"input":return{type:4,tag:t,inputType:n.getAttribute("type"),placeholder:n.getAttribute("placeholder"),isRoot:e,isHidden:Rn(n)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:1,tag:t,isRoot:e,isHidden:Rn(n)}}if(n.innerHTML.trim()===n.innerText&&n.innerHTML.length)return{type:5,tag:t,text:AR(n.innerHTML),isRoot:e,isHidden:Rn(n)}},"extractFeatureFromElement"),AR=l(n=>n.length>256?n.substring(0,256)+"...":n,"shortenText");var ds=l(n=>Object.keys(n||{}).reduce((e,t)=>{let r=n[t];return r&&(e[t]=r),e},{}),"sanitizeStaticMetadata"),iy=l((n,e)=>{let t=ds(n),r=ds(e),i=l(u=>!u||Object.keys(u).length===0,"isEmpty");if(i(t)&&i(r))return!0;if(i(t)||i(r))return!1;let o=Object.keys(t).sort(),a=Object.keys(r).sort();if(o.length!==a.length||!o.every((u,f)=>u===a[f]))return!1;for(let u in t)if(t[u]!==r[u])return!1;return!0},"staticDataMatch"),ia=l(n=>{let e=ds(n);return!(!e||!Object.keys(e).length)},"hasStaticData");function sy(n,e){let t=n.filter(u=>!u.isRoot);t.length>10&&(t=Object.values(t.reduce((u,f)=>{let d=`${f.type}_${f.tag}`;return u[d]?u:{...u,[d]:f}},{})));let r=Math.min(Math.ceil(t.length*e.innerFeatures.mandatoryPercentage),e.innerFeatures.mandatoryMax),o=l(u=>u.reduce((f,d)=>{let p=f.map(g=>[...g,d]).filter(g=>g.length<=r);return f.concat(p)},[[]]),"combinations")(t).filter(u=>u.length===r),a=[];return o.forEach(u=>{let f=[];u.forEach(p=>f.push(si(p))),sa(f).forEach(p=>a.push(p.map(g=>`:has(${g})`).join("")))}),a}l(sy,"getInnerFeaturesQueries");function sa(n){if(!n.length)return[];let e=[],t=n.length-1;function r(i,o){for(let a=0,u=n[o].length;a<u;a++){let f=i.slice(0);f.push(n[o][a]),o===t?e.push(f):r(f,o+1)}}return l(r,"helper"),r([],0),e}l(sa,"cartesian");function si(n){let e=[n.tag];switch(n.type){case 0:n.src&&e.push(`${n.tag}[src="${n.src}"]`);break;case 2:e.push(`${n.tag}[href="${n.href}"]`);break;case 3:break;case 4:e.push(`${n.tag}[type="${n.inputType}"]`),n.placeholder&&e.push(`${n.tag}[placeholder="${n.placeholder}"]`);break}return e}l(si,"getFeatureSelector");var oy=l((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>(e=e.replaceAll(`
|
|
23
|
-
`,"\\A ").replaceAll('"','\\"'),t?r?`[${n}="${e}"],[${n}*="${e} "],[${n}*=" ${e} "],[${n}*=" ${e}"]`:`[${n}*="${e}"]`:`[${n}="${e}"]`),"buildAttributeEqualityQuerySelector"),rf=l((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>t?r?n===e||n.startsWith(e)||n.includes(` ${e} `)||n.endsWith(e):n.includes(e):n===e,"checkStringEquality");var oi=class{constructor(e){this.document=e;this.elementsByQueryCache={}}static{l(this,"AttributesExtractor")}getElementsByQuery(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=he(e,this.document)),this.elementsByQueryCache[e]}extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){for(let a=0;a<e.attributes.length;++a){let{name:u,value:f}=e.attributes[a];if(ni.attributesToExtract.includes(u)&&typeof f=="string"){if(u==="class"){f.split(" ").forEach(d=>{d.length&&t(d,this.processAttribute({element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o},u,d,{contains:!0,matchWholeWord:!0}))});continue}r(u,this.processAttribute({element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o},u,f))}}}processAttribute({element:e,getElementsInStructuralVicinity:t,getElementsInVisualVicinity:r},i,o,a={}){let u=this.getElementsByQuery("*"),f=oy(i,o,a),d=this.getElementsByQuery(f),p=this.getElementsByQuery(`${e.tagName.toLowerCase()}`),g=d.filter(v=>v.tagName===e.tagName),y=t?t():[],w=y.filter(v=>v.element.attributes[i]&&rf(v.element.attributes[i].value,o,a)),S=r?r():[],C=S.filter(v=>v.element.attributes[i]&&rf(v.element.attributes[i].value,o,a));return{value:o,globalUniqueness:1-d.length/u.length,tagUniqueness:1-g.length/p.length,structuralVicinityUniqueness:t?1-w.length/y.length:void 0,visualVicinityUniqueness:r?1-C.length/S.length:void 0}}};var oa=class{constructor(e){this.el=null;this.serializedElement="";this.attributes={};this.classes={};this.getElementsInStructuralVicinity=l(()=>this.structuralVicinityData.elementsInStructuralVicinity,"getElementsInStructuralVicinity");this.setElementStructuralVicinityData=l(e=>{this.structuralVicinityData=e},"setElementStructuralVicinityData");this.setElementVisualVicinityData=l(e=>{this.visualVicinityData=e},"setElementVisualVicinityData");this.getElementsInVisualVicinity=l(()=>this.visualVicinityData,"getElementsInVisualVicinity");this.setSerializedElement=l(e=>{this.serializedElement=e},"setSerializedElement");this.setAttribute=l((e,t)=>{this.attributes[e]=t},"setAttribute");this.setClass=l((e,t)=>{this.classes[e]=t},"setClass");this.setInnerText=l(e=>{this.innerText=e},"setInnerText");this.setStyle=l(e=>{this.style=e},"setStyle");this.setTag=l(e=>{this.tag=e},"setTag");this.setReact=l(e=>{this.react=e},"setReact");this.setInnerFeatures=l(e=>{this.innerFeatures=e},"setInnerFeatures");this.setPositioning=l(e=>{this.positioning=e},"setPositioning");this.setSVGs=l(e=>{this.svgs=e},"setSVGs");this.el=e,this.attributesExtractor=new oi(this.el.ownerDocument)}static{l(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 ds({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}makeVicinityMetadata(e,t){return e.reduce((r,i)=>{let{qualified:o,feature:a}=this.isVicinityQualifiedElement(i.element);if(!o)return r;let u={},f={};this.attributesExtractor.extract({element:i.element,setClass:l((p,g)=>u[p]=g,"setClass"),setAttribute:l((p,g)=>f[p]=g,"setAttribute")});let d={tag:i.element.tagName.toLowerCase(),classes:u,attributes:f,text:this.extractTextForMetadata(i.element),feature:a,relativePosition:this.element.compareDocumentPosition(i.element),...t(i)};return r.push(d),r},[])}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(!ni.vicinityFeatureElementsOnly)return{qualified:!0};let t=na(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 pr(this.element);let e=Tn(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return pr(e);try{if(this.element.id&&this.element.id.length&&he(`[aria-labelledby="${this.element.id}"]`).length)return pr(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=Tn(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return pr(t);if(this.element.id&&this.element.id.length)try{let i=he(`label[for=${this.element.id}]`);if(i.length)return pr(i[0])}catch{return}let r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){let i=he(r.split(" ").map(o=>`#${o}`).join(","));if(i.length)return pr(i[0])}}extractSVGTitle(){try{if(this.element.tagName.toLowerCase()!=="svg")return;let e=this.element.querySelector("title");return e?pr(e):void 0}catch(e){console.error("extractSVGTitle error",e)}}attributeExists(e){return e&&e.length>0}};var aa=class{constructor(e,t){this.structuralVicinityData={elementsInStructuralVicinity:[],html:""};this.element=e,this.config=t}static{l(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,r){let{runId:i,step:o,limit:a}=r;if(!e||o>a||e.attributes[`checksum-radial-traverse-${i}`]!==void 0)return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute(`checksum-radial-traverse-${i}`,o.toString());let d={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},p=this.populateStructuralVicinity(hr(e),[...t,"parent"],d),g=this.populateStructuralVicinity(e.previousElementSibling,[...t,"left-sibling"],d),y=this.populateStructuralVicinity(e.nextElementSibling,[...t,"right-sibling"],d),w=[];Bg(e).map((C,v)=>w.push(this.populateStructuralVicinity(C,[...t,"child"],d)));let S=g+e.outerHTML.replace(e.innerHTML,w.join(""))+y;return p&&!p.includes(e.outerHTML)?p.replace("></",`>${S}</`):p?p.replace(e.outerHTML,S):S}};var ps=class{constructor(e,t){this.document=e;this.config=t;this.debug=!1;this.sampleBoxColors={0:"green",1:"orange",2:"red",3:"blue"}}static{l(this,"VisualVicinityExtractor")}calculate(e){let t=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect();for(let a=o.left-r;a<o.left+o.width+r;a+=i)for(let u=o.top-r;u<o.top+o.height+r;u+=i){let f=a+i/2,d=u+i/2;if(this.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i})){this.addTrace(f,d,i,3);continue}let p=this.document.elementFromPoint(f,d);if(!p)continue;let g=p.getBoundingClientRect();if(g.width>r*2&&g.height>r*2||this.doesRectContain(g,o)){this.addTrace(f,d,i,2);continue}if(!!t.find(({element:C})=>C===p)){this.addTrace(f,d,i,1);continue}let{position:w,distance:S}=this.getPosition(o,g);t.push({element:p,position:w,distance:S}),this.addTrace(f,d,i,0)}return t}getPosition(e,t){let{x:r,y:i}=this.getCenter(t),{x:o,y:a}=this.getCenter(e),u=l(()=>{let d=r-o,p=i-a;return d<0&&p<0?"top-left":d>0&&p<0?"top-right":d<0&&p>0?"bottom-left":d>0&&p>0?"bottom-right":d===0&&p<0?"top":d===0&&p>0?"bottom":d<0&&p===0?"left":d>0&&p===0?"right":"center"},"calcPosition");return{distance:l(()=>Number(Math.sqrt(Math.pow(o-r,2)+Math.pow(a-i,2)).toFixed(2)),"calcDistance")(),position:u()}}getCenter(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}addTrace(e,t,r,i){if(!this.debug)return;let o=this.document.createElement("xdiv");o.setAttribute("style",`position: absolute; width: ${r}px; height: ${r}px; top: ${t}px; left: ${e}px; background: ${this.sampleBoxColors[i]}; z-index: 999999999999;opacity:0.4`),this.document.getElementsByTagName("body")[0].prepend(o)}doesRectContain(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}doRectsOverlap(e,t){let r=e.right<t.left,i=e.left>t.right,o=e.top>t.bottom,a=e.top<t.top;return!(r||i||o||a)}};window.vve=new ps({radius:50,scanStep:10});var ms=Yu(ay());window.resq$=ms.resq$;window.resq$$=ms.resq$$;var sf=class{static{l(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:r=void 0}={}){let i=(0,ms.resq$$)("*",e.parentElement).find(o=>o.children.length===1&&o.children[0].node===e);return r=r??e,i&&(t||i.node!==r)?this.parseRESQresult(i):this.findParentComponent(e.parentElement,{baseElement:r,ignoreBaseElement:t})}parseRESQresult(e){if(!e)return;let t=l(r=>{switch(typeof r){case"string":return[r];case"object":return Array.isArray(r)?r.map(t):Object.keys(r)}},"parseState");return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:t(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}},ly=new sf;var ca=class{constructor(e,t){this.provider=ly;this.element=e,this.config=t}static{l(this,"ReactMetadataExtractor")}extract(){return this.provider.extract(this.element)}};var ua=class{constructor(e){this.document=e;this.tagBaseComputedStyle={}}static{l(this,"StyleExtractor")}extract({element:e,setStyle:t}){let r=e.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){let i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(i){if(console.error("Failed to extract style for tag",r,i),!this.tagBaseComputedStyle[r])return}t({inline:this.sanitzieStyle(e.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(e)))})}diffComputedStyle(e,t){return l((o,a)=>Object.keys(a).reduce((u,f)=>o[f]===a[f]?u:{...u,[f]:a[f]},{}),"oneWayDiff")(e,t)}sanitzieStyle(e,{acceptEmptyValue:t=!0}={}){return Object.keys(e).reduce((r,i)=>{if(!isNaN(i))return r;let o=e[i];return!t&&!o||(r[i]=o),r},{})}};var Nr=class{constructor(){this.makeFeatureNode=l((e,t=void 0)=>{let r=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:r?e.tagName.toLowerCase():void 0,feature:r?na(e,t):void 0,children:[],isRoot:t}},"makeFeatureNode");this.includeRootElements=!0;this.rootElementsTypeExceptions=[5];this.cache=Lt.getInstance("innerFeaturesExtractor",{log:!1})}static{l(this,"InnerFeaturesExtractor")}extract(e){let t=[],r=this.makeFeatureNode(e,!0);return this.walk(e,r,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 r=this.getMapFromCache();r.set(e,t),this.cache.set(r)}walk(e,t,r){let i=!1;ei(e).forEach(a=>{let u=this.getFeatureNodeFromCache(a)??this.makeFeatureNode(a),f=this.walk(a,u,r);f&&t.children.push(u),i||=f});let o=!!t.feature;return o&&(!t.isRoot||this.shouldIncludeRootNode(t))&&r.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}shouldIncludeRootNode(e){return!(!this.includeRootElements||this.rootElementsTypeExceptions.includes(e.type))}};window.inner_features_extractor=new Nr;var ai=class{static{l(this,"InnerTextExtractor")}constructor(){}extract(e){return{content:pr(e)??void 0}}};var fa=class{constructor(e){this.document=e}static{l(this,"PositioningExtractor")}extract(e){let{top:t,bottom:r,left:i,right:o}=e.getBoundingClientRect(),a=document.documentElement.scrollHeight,u=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(t,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:u},element:{top:this.normalize(t+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,u),right:this.normalize(o+window.scrollX,u)}}}}normalize(e,t){return e/t}};var Dr=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??ni,this.visualVicinityExtractor=new ps(this.document,this.config.visualVicinity),this.styleExtractor=new ua(this.document),this.innerFeaturesExtractor=new Nr,this.innerTextExtractor=new ai,this.positioningExtractor=new fa(this.document)}static{l(this,"ESRAElementMetadataExtractor")}isSameDocument(e){return this.document===e}extract(e){let t=new dt(e).scrollIntoView(),r=Date.now(),i=new oa(e);return this.serializeElement(i),this.stats.serializeElement+=Date.now()-r,r=Date.now(),this.populateElementsInStructuralVicinity(i),this.stats.populateElementsInStructuralVicinity+=Date.now()-r,r=Date.now(),this.populateElementsInVisualVicinity(i),this.stats.populateElementsInVisualVicinity+=Date.now()-r,r=Date.now(),this.extractAttributes(i),this.stats.extractAttributes+=Date.now()-r,r=Date.now(),this.extractInnerText(i),this.stats.extractInnerText+=Date.now()-r,r=Date.now(),this.extractStyle(i),this.stats.extractStyle+=Date.now()-r,r=Date.now(),this.extractTag(i),this.stats.extractTag+=Date.now()-r,r=Date.now(),this.extractInnerFeatures(i),this.stats.extractInnerFeatures+=Date.now()-r,r=Date.now(),this.extractPositioning(i),this.stats.extractPositioning+=Date.now()-r,r=Date.now(),this.extractSVGComponents(i),this.stats.extractSVGComponents+=Date.now()-r,r=Date.now(),t.restore(),this.stats.final+=Date.now()-r,i}extractReact({element:e,setReact:t}){t(new ca(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 ii(this.document).extract(e))}serializeElement({element:e,setSerializedElement:t}){}extractAttributes({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){return new oi(this.document).extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}populateElementsInStructuralVicinity({element:e,setElementStructuralVicinityData:t}){t(new aa(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 tn=class extends Error{static{l(this,"TimeoutError")}constructor(){super("Timeout")}};var rn=l(n=>{},"consoleTime"),nn=l(n=>{},"consoleTimeEnd");var cy=l((n,e=[])=>{if(!n)return n;let t=window.getComputedStyle(n).cursor,r=l((o,a=()=>!1)=>{let u=o;for(;u;){let f=u.parentElement;if(!f||f.nodeType!==Node.ELEMENT_NODE)return u;if(a(f))break;if(window.getComputedStyle(f).cursor!==t)return u;u=f}},"getClosestElementWithCursor"),i=l(o=>{try{if(o.matches("label[for]")&&!o.matches(ls.concat(e).filter(a=>!!a&&a!=="label[for]").join(","))){let a=o.getAttribute("for");if(!a)return!1;let u=document.getElementById(a);if(!u)return!1;let f=u.getAttribute("type");return f?u.tagName.toLowerCase()==="input"&&["checkbox","radio"].includes(f):!1}}catch(a){console.error("interactableParentIsValid",o,a)}return!0},"interactableParentIsValid");try{if("isContentEditable"in n&&n.isContentEditable)return n;if("closest"in n){let a=Tn(n,ls.concat(e).filter(u=>!!u).join(","));if(a&&i(a)){if(a===n)return n;let u=r(n,f=>f===a);return u||a}}if(["auto","default","context-menu","help","progress","wait"].includes(t))return n;let o=r(n);return o||n}catch(o){return console.error("getCompoundInteractableRootElement",n,o),n}},"getCompoundInteractableRootElement");var An=l((n=document,e={},{allowDisabled:t=!1,useDataVisibleAttributes:r=!0,excludeCrossOriginIframes:i=!1,includeCompoundInnerElements:o=!0}={})=>{let a=Lt.getInstance("getAllInteractableHTMLElements",{target:n,log:!1}),u=Date.now(),f=l(w=>{let S=w.reduce((C,v)=>!t&&v.state.disabled?C:[...C,v.element],[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-u,"ms"),S},"makeResponse");if(a.hasCache())return f(a.get());let d=he("*",n,{excludeCrossOriginIframes:i});rn("[getAllInteractableHTMLElements] items");let p=d.reduce((w,S)=>{let C="disabled"in S&&!!S.disabled;return S.matches(ls.concat(e.appSpecificInteractableElementsSelectors||[]).filter(M=>!!M).join(","))||zg.includes(window.getComputedStyle(S).cursor)||S.isContentEditable&&!S.parentElement?.isContentEditable||!e.ignoreEventListenersWhenDeterminingInteractability&&(Xu.some(M=>S[M])||_R(S))?[...w,{element:S,disabled:C}]:w},[]);nn("[getAllInteractableHTMLElements] items"),rn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");let g=p.reduce((w,S)=>{let C=cy(S.element,e.appSpecificInteractableElementsSelectors||[]),v=w.find(M=>M.element===C);return v?!S.disabled&&v.state.disabled&&(v.state.disabled=!1):w.push({element:C,state:{disabled:S.disabled}}),o&&S.element!==C&&OR(S.element)&&w.push({...S,state:{disabled:S.disabled}}),w},[]);nn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),rn("[getAllInteractableHTMLElements] isElementHidden");let y=g.filter(({element:w})=>{if(r){if(!w)return!1;let S=w.getAttribute("checksum-data-visible");if(S){let C=S==="true",v=w.getAttribute("checksum-data-visible-under-transparent-element")==="true",M=w.getAttribute("checksum-data-transparently-visible")==="true";return C&&!v||M}}return!vt(w,{markTransparentElementsAsHidden:!1}).isHidden});return nn("[getAllInteractableHTMLElements] isElementHidden"),a.set(y),f(y)},"getAllInteractableHTMLElements"),OR=l(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"),_R=l(n=>{if(n._checksum_eventListenerList){let r=n._checksum_eventListenerList;if(Xu.some(i=>r[i.slice(2)]))return!0}let e=Object.keys(n).find(r=>r.startsWith("__reactFiber")),t=e?n[e]:void 0;return!t||!t.memoizedProps?!1:Gg.some(r=>t.memoizedProps[r])},"hasFrameworkInteractionListener");var On=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=l(e=>{let t=Lt.getInstance("getElementSelectionResult",{log:!1}),r=t.get();if(r||(r=new Map,t.set(r)),r.has(e))return r.get(e);this.checkTimeout();let i=this.extractMetadata(e),{score:o,scores:a}=this.similarity.rank(i),u={score:o,candidate:e,scores:a,esraMetadata:i};return r.set(e,u),t.set(r),u},"getSelectionResultForCandidate");this.targetElementESRAMetadata=e,this.targetElementStaticData=t||e.staticMetadata,this.similarity=new ta(this.targetElementESRAMetadata),this.esraMetadataExtractor=new Dr(document)}static{l(this,"ESRASelector")}makeWeight(e){return this.weightsSum+=e,e}getWeight(e){return e/this.weightsSum}extractMetadata(e){return new Qo(this.esraMetadataExtractor.extract(e).toMetadata())}getLastSelectionLogs(e=5){if(!this.candidates?.length)return{};let t=new XMLSerializer,r=l((a,u=50)=>a.slice(0,u).map(f=>({score:f.score,metadata:f.metadata,element:t.serializeToString(f.candidate).substring(0,200)})),"printCandidates"),i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,e)].score,o=l(a=>r(a,e).filter(u=>u.score>=i),"filterByScore");return{candidatesQuery:this.candidateQueries.filter(a=>!!a.length).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,e),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(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),r=this.extractMetadata(t),{score:i}=this.similarity.rank(r);return i>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:i,esraMetadata:r}: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=he(e)),this.interactableCandidates=[],this.elementsFiltering!==0&&(this.interactableCandidates=An())}select(){console.log("selecting elements, filtering: ",cs[this.elementsFiltering]);let e=l(o=>{switch(o){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 ${cs[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((o,a,u)=>u.indexOf(o)===a);let t=n.limitChildren;t?.length&&(t=t.map(o=>({...o,parent:document.querySelector(o.selector)})),this.uniqueCandidates=this.uniqueCandidates.filter(o=>{for(var a of t)if(a.parent&&this.isDescendant(a.parent,o)&&a.limit--<=0)return!1;return!0})),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter(o=>o instanceof ti(o).HTMLElement||o instanceof ti(o).SVGElement).map(this.getSelectionResultForCandidate).sort((o,a)=>a.score-o.score),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter(o=>{let{isHidden:a,clickOffset:u}=this.isHidden(o.candidate);return a===!0?(this.removedCandidates.hidden.push(o),!1):(u&&(o.clickOffset=u),ia(this.targetElementStaticData)&&!iy(this.formatStaticCandidates(o.esraMetadata.staticCandidates),this.targetElementStaticData)?(o.metadata=JSON.stringify(o.esraMetadata.staticCandidates),this.removedCandidates.static.push(o),!1):!0)}),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((o,a,u)=>{o.candidate.tagName==="INPUT"&&this.filteredAndSortedRankedCandidates.find(f=>f.score>.1&&f.candidate.contains(o.candidate))&&(this.removedCandidates.hidden.splice(u.length-1-a,1),this.filteredAndSortedRankedCandidates.push(o))}),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((o,a)=>a.score-o.score);let r=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];let i=null;for(let o=0;o<this.filteredAndSortedRankedCandidates.length;++o){let a=this.filteredAndSortedRankedCandidates[o];if(o>=r&&(!i||i.score-a.score>this.config.results.epsilon))break;i=a,this.finalCandidates.push(a)}return this.finalCandidates}intersectElements(e,t){let r=l((u,{useElementSize:f=!1}={})=>{let d=new Set;return u.forEach(p=>{let g=2,y=p;for(;y&&g-- >0&&(d.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}),d},"normalize"),i=r(e),o=r(t),a=new Set;return i.forEach(u=>{o.has(u)&&a.add(u)}),Array.from(a)}checkTimeout(){if(n.timeout&&Date.now()-this.processStartTime>n.timeout)throw new tn}selectOne({elementsFiltering:e=1,minSelectionScore:t=.3}={}){try{if(this.elementsFiltering=e,this.processStartTime=Date.now(),this.targetElementESRAMetadata.tag==="html"){let i=document.querySelector("html");return{candidate:i,score:1,esraMetadata:this.extractMetadata(i)}}let r=this.selectByPositioning();if(r)return console.log("Found element by positioning"),r;for(this.collectCandidates();;){let i=this.select();if(!i.length)break;let{score:o}=i[0];if(o<t&&this.elementsFiltering!==3){this.elementsFiltering++,console.log(`Best matching element is below threshold (${o}/${t}), expanding selection to ${cs[this.elementsFiltering]}`);continue}return i[0]}}catch(r){r instanceof tn?console.error("ESRA selection timeout"):console.error("ESRA selection error",r)}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(e=[]){this.candidateQueries.push(this.similarity.getQualifiedClasses().map(t=>`.${t}`).join(","))}setInnerFeaturesQueries(){let e=sy(this.targetElementESRAMetadata.innerFeatures,this.config).map(t=>`*${t}`);this.candidateQueries.push(...e)}getInnerTextCandidates(){let e=this.similarity.getQualifiedInnerText();if(!e)return[];let t=qg(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}getTagCandidates(){return he(this.targetElementESRAMetadata.tag)}isDescendant(e,t){return e.contains(t)}formatStaticCandidates(e){let t={};return Object.keys(e).forEach(r=>{t[r]=e[r]}),t}isHidden(e){return vt(e,{useCache:!0})}};var LR=Object.defineProperty,NR=l((n,e,t)=>e in n?LR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),P=l((n,e,t)=>NR(n,typeof e!="symbol"?e+"":e,t),"__publicField"),uy,DR=Object.defineProperty,kR=l((n,e,t)=>e in n?DR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$1"),fy=l((n,e,t)=>kR(n,typeof e!="symbol"?e+"":e,t),"__publicField$1"),de=(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",n))(de||{}),hy={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},dy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ha={},PR=l(()=>!!globalThis.Zone,"isAngularZonePresent$1");function Ch(n){if(ha[n])return ha[n];let e=globalThis[n],t=e.prototype,r=n in hy?hy[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in dy?dy[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!PR())return ha[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?ha[n]=d:t}catch{return t}}l(Ch,"getUntaintedPrototype$1");var of={};function cn(n,e,t){var r;let i=`${n}.${String(t)}`;if(of[i])return of[i].call(e);let o=Ch(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(of[i]=a,a.call(e)):e[t]}l(cn,"getUntaintedAccessor$1");var af={};function Cb(n,e,t){let r=`${n}.${String(t)}`;if(af[r])return af[r].bind(e);let o=Ch(n)[t];return typeof o!="function"?e[t]:(af[r]=o,o.bind(e))}l(Cb,"getUntaintedMethod$1");function FR(n){return cn("Node",n,"childNodes")}l(FR,"childNodes$1");function $R(n){return cn("Node",n,"parentNode")}l($R,"parentNode$1");function HR(n){return cn("Node",n,"parentElement")}l(HR,"parentElement$1");function BR(n){return cn("Node",n,"textContent")}l(BR,"textContent$1");function WR(n,e){return Cb("Node",n,"contains")(e)}l(WR,"contains$1");function UR(n){return Cb("Node",n,"getRootNode")()}l(UR,"getRootNode$1");function VR(n){return!n||!("host"in n)?null:cn("ShadowRoot",n,"host")}l(VR,"host$1");function zR(n){return n.styleSheets}l(zR,"styleSheets$1");function GR(n){return!n||!("shadowRoot"in n)?null:cn("Element",n,"shadowRoot")}l(GR,"shadowRoot$1");function jR(n,e){return cn("Element",n,"querySelector")(e)}l(jR,"querySelector$1");function qR(n,e){return cn("Element",n,"querySelectorAll")(e)}l(qR,"querySelectorAll$1");function YR(){return Ch("MutationObserver").constructor}l(YR,"mutationObserverCtor$1");var wt={childNodes:FR,parentNode:$R,parentElement:HR,textContent:BR,contains:WR,getRootNode:UR,host:VR,styleSheets:zR,shadowRoot:GR,querySelector:jR,querySelectorAll:qR,mutationObserver:YR};function xh(n){return n.nodeType===n.ELEMENT_NODE}l(xh,"isElement");function Cs(n){let e=n&&"host"in n&&"mode"in n&&wt.host(n)||null;return!!(e&&"shadowRoot"in e&&wt.shadowRoot(e)===n)}l(Cs,"isShadowRoot");function xs(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}l(xs,"isNativeShadowDom");function KR(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}l(KR,"fixBrowserCompatibilityIssuesInCSS");function XR(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(" ")+";"}l(XR,"escapeImportStatement");function Cf(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>xb(i,t)).join("");return KR(r)}catch{return null}}l(Cf,"stringifyStylesheet");function xb(n,e){if(JR(n)){let t;try{t=Cf(n.styleSheet)||XR(n)}catch{t=n.cssText}return n.styleSheet.href?Wa(t,n.styleSheet.href):t}else{let t=n.cssText;return QR(n)&&n.selectorText.includes(":")&&(t=ZR(t)),e?Wa(t,e):t}}l(xb,"stringifyRule");function ZR(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}l(ZR,"fixSafariColons");function JR(n){return"styleSheet"in n}l(JR,"isCSSImportRule");function QR(n){return"selectorText"in n}l(QR,"isCSSStyleRule");var Rs=class{static{l(this,"Mirror")}constructor(){fy(this,"idNodeMap",new Map),fy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Mb(){return new Rs}l(Mb,"createMirror$2");function Mh({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let a=i||"",u=r&&ln(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?a=o(a,n):a="*".repeat(a.length)),a}l(Mh,"maskInputValue");function ln(n){return n.toLowerCase()}l(ln,"toLowerCase");var py="__rrweb_original__";function eA(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,a=py in o?o[py]:o;if(new Uint32Array(a.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}l(eA,"is2DCanvasBlank");function tA(n,e){return!n||!e||n.type!==e.type?!1:n.type===de.Document?n.compatMode===e.compatMode:n.type===de.DocumentType?n.name===e.name&&n.publicId===e.publicId&&n.systemId===e.systemId:n.type===de.Comment||n.type===de.Text||n.type===de.CDATA?n.textContent===e.textContent:n.type===de.Element?n.tagName===e.tagName&&JSON.stringify(n.attributes)===JSON.stringify(e.attributes)&&n.isSVG===e.isSVG&&n.needBlock===e.needBlock:!1}l(tA,"isNodeMetaEqual");function Th(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?ln(e):null}l(Th,"getInputType");function Tb(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}l(Tb,"extractFileExtension");function rA(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}l(rA,"extractOrigin");var nA=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,iA=/^(?:[a-z+]+:)?\/\//i,sA=/^www\..*/i,oA=/^(data:)([^,]*),(.*)/i;function Wa(n,e){return(n||"").replace(nA,(t,r,i,o,a,u)=>{let f=i||a||u,d=r||o||"";if(!f)return t;if(iA.test(f)||sA.test(f))return`url(${d}${f}${d})`;if(oA.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${rA(e)+f}${d})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${d}${p.join("/")}${d})`})}l(Wa,"absolutifyURLs");function lf(n){return n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}l(lf,"normalizeCssString");function aA(n,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&n&&typeof n=="string"){let i=lf(n);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){let a=lf(t[o].textContent);for(let u=3;u<a.length;u++){let f=a.substring(0,u);if(i.split(f).length===2){let d=i.indexOf(f);for(let p=d;p<n.length;p++)if(lf(n.substring(0,p)).length===d){r.push(n.substring(0,p)),n=n.substring(p);break}break}}}}return r.push(n),r}l(aA,"splitCssText");function lA(n,e){return aA(n,e).join("/* rr_split */")}l(lA,"markCssSplits");var cA=1,uA=new RegExp("[^a-z0-9-_:]"),As=-2;function Ib(){return cA++}l(Ib,"genId");function fA(n){if(n instanceof HTMLFormElement)return"form";let e=ln(n.tagName);return uA.test(e)?"div":e}l(fA,"getValidTagName$1");var li,my,hA=/^[^ \t\n\r\u000c]+/,dA=/^[, \t\n\r\u000c]+/;function pA(n,e){if(e.trim()==="")return e;let t=0;function r(o){let a,u=o.exec(e.substring(t));return u?(a=u[0],t+=a.length,a):""}l(r,"collectCharacters");let i=[];for(;r(dA),!(t>=e.length);){let o=r(hA);if(o.slice(-1)===",")o=hi(n,o.substring(0,o.length-1)),i.push(o);else{let a="";o=hi(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,t+=1}}}return i.join(", ")}l(pA,"getAbsoluteSrcsetString");var gy=new WeakMap;function hi(n,e){return!e||e.trim()===""?e:Ih(n,e)}l(hi,"absoluteToDoc");function mA(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}l(mA,"isSVGElement");function Ih(n,e){let t=gy.get(n);if(t||(t=n.createElement("a"),gy.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}l(Ih,"getHref");function Rb(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?hi(n,r):t==="srcset"?pA(n,r):t==="style"?Wa(r,Ih(n)):e==="object"&&t==="data"?hi(n,r):r)}l(Rb,"transformAttribute");function Ab(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}l(Ab,"ignoreAttribute");function gA(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}l(gA,"_isBlockedElement");function Ua(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Ua(wt.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?Ua(wt.parentNode(n),e,t):!1}l(Ua,"classMatchesRegex");function Ob(n,e,t,r){let i;if(xh(n)){if(i=n,!wt.childNodes(i).length)return!1}else{if(wt.parentElement(n)===null)return!1;i=wt.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ua(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}l(Ob,"needMaskingText");function yA(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let a="about:blank";if(r.location.href!==a||n.src===a||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}l(yA,"onceIframeLoaded");function bA(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}l(bA,"onceStylesheetLoaded");function vA(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:C=!1,cssCaptured:v=!1}=e,M=wA(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:de.Document,childNodes:[],compatMode:n.compatMode}:{type:de.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:de.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return EA(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case n.TEXT_NODE:return SA(n,{doc:t,needsMask:a,maskTextFn:d,rootId:M,cssCaptured:v});case n.CDATA_SECTION_NODE:return{type:de.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:de.Comment,textContent:wt.textContent(n)||"",rootId:M};default:return!1}}l(vA,"serializeNode");function wA(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}l(wA,"getRootId");function SA(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,a=wt.parentNode(n),u=a&&a.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=wt.textContent(n),d&&f&&(f=Wa(f,Ih(e.doc)))),!d&&!p&&f&&t&&(f=r?r(f,wt.parentElement(n)):f.replace(/[\S]/g,"*")),{type:de.Text,textContent:f||"",rootId:i}}l(SA,"serializeTextNode");function EA(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:w}=e,S=gA(n,r,i),C=fA(n),v={},M=n.attributes.length;for(let T=0;T<M;T++){let L=n.attributes[T];Ab(C,L.name,L.value)||(v[L.name]=Rb(t,C,ln(L.name),L.value))}if(C==="link"&&o){let T=Array.from(t.styleSheets).find(V=>V.href===n.href),L=null;T&&(L=Cf(T)),L&&(delete v.rel,delete v.href,v._cssText=L)}if(C==="style"&&n.sheet){let T=Cf(n.sheet);T&&(n.childNodes.length>1&&(T=lA(T,n)),v._cssText=T)}if(C==="input"||C==="textarea"||C==="select"){let T=n.value,L=n.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&T?v.value=Mh({element:n,type:Th(n),tagName:C,value:T,maskInputOptions:a,maskInputFn:u}):L&&(v.checked=L)}if(C==="option"&&(n.selected&&!a.select?v.selected=!0:delete v.selected),C==="dialog"&&n.open&&(v.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),C==="canvas"&&p){if(n.__context==="2d")eA(n)||(v.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let T=n.toDataURL(f.type,f.quality),L=t.createElement("canvas");L.width=n.width,L.height=n.height;let V=L.toDataURL(f.type,f.quality);T!==V&&(v.rr_dataURL=T)}}if(C==="img"&&d){li||(li=t.createElement("canvas"),my=li.getContext("2d"));let T=n,L=T.currentSrc||T.getAttribute("src")||"<unknown-src>",V=T.crossOrigin,U=l(()=>{T.removeEventListener("load",U);try{li.width=T.naturalWidth,li.height=T.naturalHeight,my.drawImage(T,0,0),v.rr_dataURL=li.toDataURL(f.type,f.quality)}catch(Z){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${L}! Error: ${Z}`)}T.crossOrigin==="anonymous"&&(V?v.crossOrigin=V:T.removeAttribute("crossorigin"))},"recordInlineImage");T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U)}if(C==="audio"||C==="video"){let T=v;T.rr_mediaState=n.paused?"paused":"played",T.rr_mediaCurrentTime=n.currentTime,T.rr_mediaPlaybackRate=n.playbackRate,T.rr_mediaMuted=n.muted,T.rr_mediaLoop=n.loop,T.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(v.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(v.rr_scrollTop=n.scrollTop)),S){let{width:T,height:L}=n.getBoundingClientRect();v={class:v.class,rr_width:`${T}px`,rr_height:`${L}px`}}C==="iframe"&&!g(v.src)&&(n.contentDocument||(v.rr_src=v.src),delete v.src);let A;try{customElements.get(C)&&(A=!0)}catch{}return{type:de.Element,tagName:C,attributes:v,childNodes:[],isSVG:mA(n)||void 0,needBlock:S,rootId:w,isCustom:A}}l(EA,"serializeElementNode");function $e(n){return n==null?"":n.toLowerCase()}l($e,"lowerIfExists");function CA(n,e){if(e.comment&&n.type===de.Comment)return!0;if(n.type===de.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"&&Tb(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&($e(n.attributes.name).match(/^msapplication-tile(image|color)$/)||$e(n.attributes.name)==="application-name"||$e(n.attributes.rel)==="icon"||$e(n.attributes.rel)==="apple-touch-icon"||$e(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&$e(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($e(n.attributes.property).match(/^(og|twitter|fb):/)||$e(n.attributes.name).match(/^(og|twitter):/)||$e(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&($e(n.attributes.name)==="robots"||$e(n.attributes.name)==="googlebot"||$e(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&($e(n.attributes.name)==="author"||$e(n.attributes.name)==="generator"||$e(n.attributes.name)==="framework"||$e(n.attributes.name)==="publisher"||$e(n.attributes.name)==="progid"||$e(n.attributes.property).match(/^article:/)||$e(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&($e(n.attributes.name)==="google-site-verification"||$e(n.attributes.name)==="yandex-verification"||$e(n.attributes.name)==="csrf-token"||$e(n.attributes.name)==="p:domain_verify"||$e(n.attributes.name)==="verify-v1"||$e(n.attributes.name)==="verification"||$e(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}l(CA,"slimDOMExcluded");function di(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:v=!1,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T=5e3,onStylesheetLoad:L,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:U=l(()=>!1,"keepIframeSrcFn"),newlyAddedElement:Z=!1,cssCaptured:W=!1}=e,{needsMask:G}=e,{preserveWhiteSpace:re=!0}=e;G||(G=Ob(n,a,u,G===void 0));let B=vA(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:C,recordCanvas:v,keepIframeSrcFn:U,newlyAddedElement:Z,cssCaptured:W});if(!B)return console.warn(n,"not serialized"),null;let j;r.hasNode(n)?j=r.getId(n):CA(B,w)||!re&&B.type===de.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?j=As:j=Ib();let k=Object.assign(B,{id:j});if(r.add(n,k),j===As)return null;M&&M(n);let Q=!f;if(k.type===de.Element){Q=Q&&!k.needBlock,delete k.needBlock;let q=wt.shadowRoot(n);q&&xs(q)&&(k.isShadowHost=!0)}if((k.type===de.Document||k.type===de.Element)&&Q){w.headWhitespace&&k.type===de.Element&&k.tagName==="head"&&(re=!1);let q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U,cssCaptured:!1};if(!(k.type===de.Element&&k.tagName==="textarea"&&k.attributes.value!==void 0)){k.type===de.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText=="string"&&(q.cssCaptured=!0);for(let rt of Array.from(wt.childNodes(n))){let De=di(rt,q);De&&k.childNodes.push(De)}}let ae=null;if(xh(n)&&(ae=wt.shadowRoot(n)))for(let rt of Array.from(wt.childNodes(ae))){let De=di(rt,q);De&&(xs(ae)&&(De.isShadow=!0),k.childNodes.push(De))}}let ee=wt.parentNode(n);return ee&&Cs(ee)&&xs(ee)&&(k.isShadow=!0),k.type===de.Element&&k.tagName==="iframe"&&yA(n,()=>{let q=n.contentDocument;if(q&&A){let ae=di(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});ae&&A(n,ae)}},T),k.type===de.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&Tb(k.attributes.href)==="css")&&bA(n,()=>{if(L){let q=di(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});q&&L(n,q)}},V),k}l(di,"serializeNodeWithId");function xA(n,e){let{mirror:t=new Rs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V=l(()=>!1,"keepIframeSrcFn")}=e||{};return di(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,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:g,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:S,inlineImages:f,recordCanvas:d,preserveWhiteSpace:C,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V,newlyAddedElement:!1})}l(xA,"snapshot");var MA=/(max|min)-device-(width|height)/,yy=new RegExp(MA.source,"g"),TA={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:l(function(n){n.params.match(yy)&&(n.params=n.params.replace(yy,"$1-$2"))},"AtRule")}}},IA={postcssPlugin:"postcss-hover-classes",prepare:l(function(){let n=[];return{Rule:l(function(e){n.indexOf(e)===-1&&(n.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
24
|
-
`+t.replace(/:hover/g,".\\:hover"))}))},"Rule")}},"prepare")};function
|
|
20
|
+
}`;var he=Fg(function(){return Te(x,te+"return "+H).apply(n,I)});if(he.source=H,$u(he))throw he;return he}l(SI,"template");function EI(s){return Re(s).toLowerCase()}l(EI,"toLower");function CI(s){return Re(s).toUpperCase()}l(CI,"toUpper");function xI(s,c,h){if(s=Re(s),s&&(h||c===n))return Gp(s);if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=Qt(c),x=jp(m,b),I=qp(m,b)+1;return Qr(m,x,I).join("")}l(xI,"trim");function MI(s,c,h){if(s=Re(s),s&&(h||c===n))return s.slice(0,Kp(s)+1);if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=qp(m,Qt(c))+1;return Qr(m,0,b).join("")}l(MI,"trimEnd");function TI(s,c,h){if(s=Re(s),s&&(h||c===n))return s.replace($c,"");if(!s||!(c=Ft(c)))return s;var m=Qt(s),b=jp(m,Qt(c));return Qr(m,b).join("")}l(TI,"trimStart");function II(s,c){var h=G,m=re;if(Je(c)){var b="separator"in c?c.separator:b;h="length"in c?fe(c.length):h,m="omission"in c?Ft(c.omission):m}s=Re(s);var x=s.length;if(zn(s)){var I=Qt(s);x=I.length}if(h>=x)return s;var R=h-Gn(m);if(R<1)return m;var _=I?Qr(I,0,R).join(""):s.slice(0,R);if(b===n)return _+m;if(I&&(R+=_.length-R),Hu(b)){if(s.slice(R).search(b)){var F,$=_;for(b.global||(b=tu(b.source,Re(dp.exec(b))+"g")),b.lastIndex=0;F=b.exec($);)var H=F.index;_=_.slice(0,H===n?R:H)}}else if(s.indexOf(Ft(b),R)!=R){var K=_.lastIndexOf(b);K>-1&&(_=_.slice(0,K))}return _+m}l(II,"truncate");function RI(s){return s=Re(s),s&&WE.test(s)?s.replace(cp,ix):s}l(RI,"unescape");var AI=Zn(function(s,c,h){return s+(h?" ":"")+c.toUpperCase()}),Vu=Fm("toUpperCase");function Pg(s,c,h){return s=Re(s),c=h?n:c,c===n?QC(s)?ax(s):zC(s):s.match(c)||[]}l(Pg,"words");var Fg=me(function(s,c){try{return Dt(s,n,c)}catch(h){return $u(h)?h:new le(h)}}),OI=Rr(function(s,c){return kt(c,function(h){h=tr(h),cr(s,h,Pu(s[h],s))}),s});function _I(s){var c=s==null?0:s.length,h=se();return s=c?qe(s,function(m){if(typeof m[1]!="function")throw new Gt(i);return[h(m[0]),m[1]]}):[],me(function(m){for(var b=-1;++b<c;){var x=s[b];if(Dt(x[0],this,m))return Dt(x[1],this,m)}})}l(_I,"cond");function LI(s){return i0(qt(s,p))}l(LI,"conforms");function zu(s){return function(){return s}}l(zu,"constant");function NI(s,c){return s==null||s!==s?c:s}l(NI,"defaultTo");var DI=Hm(),kI=Hm(!0);function _t(s){return s}l(_t,"identity");function Gu(s){return mm(typeof s=="function"?s:qt(s,p))}l(Gu,"iteratee");function PI(s){return ym(qt(s,p))}l(PI,"matches");function FI(s,c){return bm(s,qt(c,p))}l(FI,"matchesProperty");var $I=me(function(s,c){return function(h){return es(h,s,c)}}),HI=me(function(s,c){return function(h){return es(s,h,c)}});function ju(s,c,h){var m=ft(c),b=No(c,m);h==null&&!(Je(c)&&(b.length||!m.length))&&(h=c,c=s,s=this,b=No(c,ft(c)));var x=!(Je(h)&&"chain"in h)||!!h.chain,I=Or(s);return kt(b,function(R){var _=c[R];s[R]=_,I&&(s.prototype[R]=function(){var F=this.__chain__;if(x||F){var $=s(this.__wrapped__),H=$.__actions__=Rt(this.__actions__);return H.push({func:_,args:arguments,thisArg:s}),$.__chain__=F,$}return _.apply(s,jr([this.value()],arguments))})}),s}l(ju,"mixin");function BI(){return ut._===this&&(ut._=dx),this}l(BI,"noConflict");function qu(){}l(qu,"noop");function WI(s){return s=fe(s),me(function(c){return vm(c,s)})}l(WI,"nthArg");var UI=Cu(qe),VI=Cu(Bp),zI=Cu(Yc);function $g(s){return Ou(s)?Kc(tr(s)):S0(s)}l($g,"property");function GI(s){return function(c){return s==null?n:En(s,c)}}l(GI,"propertyOf");var jI=Wm(),qI=Wm(!0);function Yu(){return[]}l(Yu,"stubArray");function Ku(){return!1}l(Ku,"stubFalse");function YI(){return{}}l(YI,"stubObject");function KI(){return""}l(KI,"stubString");function XI(){return!0}l(XI,"stubTrue");function ZI(s,c){if(s=fe(s),s<1||s>ae)return[];var h=Pe,m=yt(s,Pe);c=se(c),s-=Pe;for(var b=Jc(m,c);++h<s;)c(h);return b}l(ZI,"times");function JI(s){return ce(s)?qe(s,tr):$t(s)?[s]:Rt(ng(Re(s)))}l(JI,"toPath");function QI(s){var c=++fx;return Re(s)+c}l(QI,"uniqueId");var eR=Ho(function(s,c){return s+c},0),tR=xu("ceil"),rR=Ho(function(s,c){return s/c},1),nR=xu("floor");function iR(s){return s&&s.length?Lo(s,_t,cu):n}l(iR,"max");function sR(s,c){return s&&s.length?Lo(s,se(c,2),cu):n}l(sR,"maxBy");function oR(s){return Vp(s,_t)}l(oR,"mean");function aR(s,c){return Vp(s,se(c,2))}l(aR,"meanBy");function lR(s){return s&&s.length?Lo(s,_t,du):n}l(lR,"min");function cR(s,c){return s&&s.length?Lo(s,se(c,2),du):n}l(cR,"minBy");var uR=Ho(function(s,c){return s*c},1),fR=xu("round"),hR=Ho(function(s,c){return s-c},0);function dR(s){return s&&s.length?Zc(s,_t):0}l(dR,"sum");function pR(s,c){return s&&s.length?Zc(s,se(c,2)):0}return l(pR,"sumBy"),C.after=FM,C.ary=pg,C.assign=xT,C.assignIn=Rg,C.assignInWith=Ag,C.assignWith=Bu,C.at=MT,C.before=mg,C.bind=Pu,C.bindAll=OI,C.bindKey=gg,C.castArray=KM,C.chain=fg,C.chunk=i1,C.compact=s1,C.concat=o1,C.cond=_I,C.conforms=LI,C.constant=zu,C.countBy=pM,C.create=TT,C.curry=yg,C.curryRight=bg,C.debounce=vg,C.defaults=IT,C.defaultsDeep=RT,C.defer=$M,C.delay=HM,C.difference=a1,C.differenceBy=l1,C.differenceWith=c1,C.drop=u1,C.dropRight=f1,C.dropRightWhile=h1,C.dropWhile=d1,C.fill=p1,C.filter=gM,C.flatMap=vM,C.flatMapDeep=wM,C.flatMapDepth=SM,C.flatten=ag,C.flattenDeep=m1,C.flattenDepth=g1,C.flip=BM,C.flow=DI,C.flowRight=kI,C.fromPairs=y1,C.functions=kT,C.functionsIn=PT,C.groupBy=EM,C.initial=v1,C.intersection=w1,C.intersectionBy=S1,C.intersectionWith=E1,C.invert=$T,C.invertBy=HT,C.invokeMap=xM,C.iteratee=Gu,C.keyBy=MM,C.keys=ft,C.keysIn=Ot,C.map=jo,C.mapKeys=WT,C.mapValues=UT,C.matches=PI,C.matchesProperty=FI,C.memoize=Yo,C.merge=VT,C.mergeWith=Og,C.method=$I,C.methodOf=HI,C.mixin=ju,C.negate=Ko,C.nthArg=WI,C.omit=zT,C.omitBy=GT,C.once=WM,C.orderBy=TM,C.over=UI,C.overArgs=UM,C.overEvery=VI,C.overSome=zI,C.partial=Fu,C.partialRight=wg,C.partition=IM,C.pick=jT,C.pickBy=_g,C.property=$g,C.propertyOf=GI,C.pull=T1,C.pullAll=cg,C.pullAllBy=I1,C.pullAllWith=R1,C.pullAt=A1,C.range=jI,C.rangeRight=qI,C.rearg=VM,C.reject=OM,C.remove=O1,C.rest=zM,C.reverse=Du,C.sampleSize=LM,C.set=YT,C.setWith=KT,C.shuffle=NM,C.slice=_1,C.sortBy=PM,C.sortedUniq=$1,C.sortedUniqBy=H1,C.split=bI,C.spread=GM,C.tail=B1,C.take=W1,C.takeRight=U1,C.takeRightWhile=V1,C.takeWhile=z1,C.tap=sM,C.throttle=jM,C.thru=Go,C.toArray=Mg,C.toPairs=Lg,C.toPairsIn=Ng,C.toPath=JI,C.toPlainObject=Ig,C.transform=XT,C.unary=qM,C.union=G1,C.unionBy=j1,C.unionWith=q1,C.uniq=Y1,C.uniqBy=K1,C.uniqWith=X1,C.unset=ZT,C.unzip=ku,C.unzipWith=ug,C.update=JT,C.updateWith=QT,C.values=ei,C.valuesIn=eI,C.without=Z1,C.words=Pg,C.wrap=YM,C.xor=J1,C.xorBy=Q1,C.xorWith=eM,C.zip=tM,C.zipObject=rM,C.zipObjectDeep=nM,C.zipWith=iM,C.entries=Lg,C.entriesIn=Ng,C.extend=Rg,C.extendWith=Ag,ju(C,C),C.add=eR,C.attempt=Fg,C.camelCase=iI,C.capitalize=Dg,C.ceil=tR,C.clamp=tI,C.clone=XM,C.cloneDeep=JM,C.cloneDeepWith=QM,C.cloneWith=ZM,C.conformsTo=eT,C.deburr=kg,C.defaultTo=NI,C.divide=rR,C.endsWith=sI,C.eq=rr,C.escape=oI,C.escapeRegExp=aI,C.every=mM,C.find=yM,C.findIndex=sg,C.findKey=AT,C.findLast=bM,C.findLastIndex=og,C.findLastKey=OT,C.floor=nR,C.forEach=hg,C.forEachRight=dg,C.forIn=_T,C.forInRight=LT,C.forOwn=NT,C.forOwnRight=DT,C.get=Wu,C.gt=tT,C.gte=rT,C.has=FT,C.hasIn=Uu,C.head=lg,C.identity=_t,C.includes=CM,C.indexOf=b1,C.inRange=rI,C.invoke=BT,C.isArguments=Mn,C.isArray=ce,C.isArrayBuffer=nT,C.isArrayLike=At,C.isArrayLikeObject=nt,C.isBoolean=iT,C.isBuffer=en,C.isDate=sT,C.isElement=oT,C.isEmpty=aT,C.isEqual=lT,C.isEqualWith=cT,C.isError=$u,C.isFinite=uT,C.isFunction=Or,C.isInteger=Sg,C.isLength=Xo,C.isMap=Eg,C.isMatch=fT,C.isMatchWith=hT,C.isNaN=dT,C.isNative=pT,C.isNil=gT,C.isNull=mT,C.isNumber=Cg,C.isObject=Je,C.isObjectLike=et,C.isPlainObject=os,C.isRegExp=Hu,C.isSafeInteger=yT,C.isSet=xg,C.isString=Zo,C.isSymbol=$t,C.isTypedArray=Qn,C.isUndefined=bT,C.isWeakMap=vT,C.isWeakSet=wT,C.join=C1,C.kebabCase=lI,C.last=Kt,C.lastIndexOf=x1,C.lowerCase=cI,C.lowerFirst=uI,C.lt=ST,C.lte=ET,C.max=iR,C.maxBy=sR,C.mean=oR,C.meanBy=aR,C.min=lR,C.minBy=cR,C.stubArray=Yu,C.stubFalse=Ku,C.stubObject=YI,C.stubString=KI,C.stubTrue=XI,C.multiply=uR,C.nth=M1,C.noConflict=BI,C.noop=qu,C.now=qo,C.pad=fI,C.padEnd=hI,C.padStart=dI,C.parseInt=pI,C.random=nI,C.reduce=RM,C.reduceRight=AM,C.repeat=mI,C.replace=gI,C.result=qT,C.round=fR,C.runInContext=O,C.sample=_M,C.size=DM,C.snakeCase=yI,C.some=kM,C.sortedIndex=L1,C.sortedIndexBy=N1,C.sortedIndexOf=D1,C.sortedLastIndex=k1,C.sortedLastIndexBy=P1,C.sortedLastIndexOf=F1,C.startCase=vI,C.startsWith=wI,C.subtract=hR,C.sum=dR,C.sumBy=pR,C.template=SI,C.times=ZI,C.toFinite=_r,C.toInteger=fe,C.toLength=Tg,C.toLower=EI,C.toNumber=Xt,C.toSafeInteger=CT,C.toString=Re,C.toUpper=CI,C.trim=xI,C.trimEnd=MI,C.trimStart=TI,C.truncate=II,C.unescape=RI,C.uniqueId=QI,C.upperCase=AI,C.upperFirst=Vu,C.each=hg,C.eachRight=dg,C.first=lg,ju(C,function(){var s={};return ur(C,function(c,h){Ie.call(C.prototype,h)||(s[h]=c)}),s}(),{chain:!1}),C.VERSION=e,kt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){C[s].placeholder=C}),kt(["drop","take"],function(s,c){be.prototype[s]=function(h){h=h===n?1:at(fe(h),0);var m=this.__filtered__&&!c?new be(this):this.clone();return m.__filtered__?m.__takeCount__=yt(h,m.__takeCount__):m.__views__.push({size:yt(h,Pe),type:s+(m.__dir__<0?"Right":"")}),m},be.prototype[s+"Right"]=function(h){return this.reverse()[s](h).reverse()}}),kt(["filter","map","takeWhile"],function(s,c){var h=c+1,m=h==k||h==ee;be.prototype[s]=function(b){var x=this.clone();return x.__iteratees__.push({iteratee:se(b,3),type:h}),x.__filtered__=x.__filtered__||m,x}}),kt(["head","last"],function(s,c){var h="take"+(c?"Right":"");be.prototype[s]=function(){return this[h](1).value()[0]}}),kt(["initial","tail"],function(s,c){var h="drop"+(c?"":"Right");be.prototype[s]=function(){return this.__filtered__?new be(this):this[h](1)}}),be.prototype.compact=function(){return this.filter(_t)},be.prototype.find=function(s){return this.filter(s).head()},be.prototype.findLast=function(s){return this.reverse().find(s)},be.prototype.invokeMap=me(function(s,c){return typeof s=="function"?new be(this):this.map(function(h){return es(h,s,c)})}),be.prototype.reject=function(s){return this.filter(Ko(se(s)))},be.prototype.slice=function(s,c){s=fe(s);var h=this;return h.__filtered__&&(s>0||c<0)?new be(h):(s<0?h=h.takeRight(-s):s&&(h=h.drop(s)),c!==n&&(c=fe(c),h=c<0?h.dropRight(-c):h.take(c-s)),h)},be.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},be.prototype.toArray=function(){return this.take(Pe)},ur(be.prototype,function(s,c){var h=/^(?:filter|find|map|reject)|While$/.test(c),m=/^(?:head|last)$/.test(c),b=C[m?"take"+(c=="last"?"Right":""):c],x=m||/^find/.test(c);b&&(C.prototype[c]=function(){var I=this.__wrapped__,R=m?[1]:arguments,_=I instanceof be,F=R[0],$=_||ce(I),H=l(function(ye){var Se=b.apply(C,jr([ye],R));return m&&K?Se[0]:Se},"interceptor");$&&h&&typeof F=="function"&&F.length!=1&&(_=$=!1);var K=this.__chain__,te=!!this.__actions__.length,oe=x&&!K,he=_&&!te;if(!x&&$){I=he?I:new be(this);var ne=s.apply(I,R);return ne.__actions__.push({func:Go,args:[H],thisArg:n}),new jt(ne,K)}return oe&&he?s.apply(this,R):(ne=this.thru(H),oe?m?ne.value()[0]:ne.value():ne)})}),kt(["pop","push","shift","sort","splice","unshift"],function(s){var c=yo[s],h=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",m=/^(?:pop|shift)$/.test(s);C.prototype[s]=function(){var b=arguments;if(m&&!this.__chain__){var x=this.value();return c.apply(ce(x)?x:[],b)}return this[h](function(I){return c.apply(ce(I)?I:[],b)})}}),ur(be.prototype,function(s,c){var h=C[c];if(h){var m=h.name+"";Ie.call(Yn,m)||(Yn[m]=[]),Yn[m].push({name:c,func:h})}}),Yn[$o(n,v).name]=[{name:"wrapper",func:n}],be.prototype.clone=Ax,be.prototype.reverse=Ox,be.prototype.value=_x,C.prototype.at=oM,C.prototype.chain=aM,C.prototype.commit=lM,C.prototype.next=cM,C.prototype.plant=fM,C.prototype.reverse=hM,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=dM,C.prototype.first=C.prototype.head,qi&&(C.prototype[qi]=uM),C},"runInContext"),Yr=lx();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(ut._=Yr,define(function(){return Yr})):yn?((yn.exports=Yr)._=Yr,zc._=Yr):ut._=Yr}).call(ni)});var Xg=Jo(In=>{var ea=Kg();function fs(n){return n.reduce(function(e,t,r,i){return e+t})}l(fs,"sum");function mr(n){if(ea.isArray(n))return n;if(typeof n=="string")return n.split("");throw Error("Parameter must be a string or array.")}l(mr,"ensureArr");In.jarowinkler=function(n,e,U){n=mr(n),e=mr(e);var r,i;n.length>e.length?(r=n,i=e):(r=e,i=n);var o=U||.7,a=.1,u=Math.floor(Math.max(r.length/2-1,0)),f=[],d=[],p,g,y,w,S=0;for(p=0;p<i.length;p++)for(w=i[p],g=Math.max(p-u,0),y=Math.min(p+u+1,r.length);g<y;g++)if(!d[g]&&w===r[g]){f[p]=g,d[g]=!0,S++;break}var E=[],v=[],M,A,T=0,L=0;for(M=0,A=0;M<i.length;M++)f[M]>-1&&(E[A]=i[M],A++);for(M=0,A=0;M<r.length;M++)d[M]&&(v[A]=r[M],A++);for(p=0;p<E.length;p++)E[p]!==v[p]&&T++;for(p=0;p<i.length&&n[p]===e[p];p++)L++;var V=S,U=T/2;if(V){var Z=(V/n.length+V/e.length+(V-U)/V)/3,W=Z<o?Z:Z+Math.min(a,1/r.length)*L*(1-Z);return W}else return 0};In.levenshtein=function(n,e,t){if(n=mr(n),e=mr(e),n.length===0)return e.length;if(e.length===0)return n.length;var r=t||{d:1,i:1,s:1},i=[],o=[],a=e.length+1,u,f,d,p;for(u=0;u<a;u++)i[u]=u;for(u=0;u<n.length;u++){for(o[0]=u+1,f=0;f<e.length;f++)d=n[u]===e[f]?0:r.s,o[f+1]=Math.min(o[f]+r.d,i[f+1]+r.i,i[f]+d);for(f=0;f<a;f++)i[f]=o[f]}return p=Math.max(n.length,e.length),(p-o[e.length])/p};In.ngram=function(n,e,t){n=mr(n),e=mr(e);var r=n.length,i=e.length,o=t||2,a,u,f,d,p,g,y,w=[],S=[],E=[],v=[],M=[],A=r+1;if(r===0||i===0)return r===i?1:0;if(a=0,r<o||i<o){for(u=0,d=Math.min(r,i);u<d;u++)n[u]===e[u]&&a++;return a/Math.max(r,i)}for(u=0;u<r+o-1;u++)u<o-1?w[u]=0:w[u]=n[u-o+1];for(u=0;u<=r;u++)S[u]=u;for(f=1;f<=i;f++){if(f<o){for(p=0;p<o-f;p++)M[p]=0;for(p=o-f;p<o;p++)M[p]=e[p-(o-f)]}else M=e.slice(f-o,f);for(E[0]=f,u=1;u<=r;u++){for(a=0,g=o,d=0;d<o;d++)w[u-1+d]!==M[d]?a++:w[u-1+d]===0&&g--;y=a/g,E[u]=Math.min(Math.min(E[u-1]+1,S[u]+1),S[u-1]+y)}v=S,S=E,E=v}return 1-S[r]/Math.max(r,i)};In.pearson=function(n,e){var t=[];Object.keys(n).forEach(function(g){e[g]&&t.push(g)});var r=t.length;if(r===0)return 0;var i=fs(t.map(function(g){return n[g]})),o=fs(t.map(function(g){return e[g]})),a=fs(t.map(function(g){return Math.pow(n[g],2)})),u=fs(t.map(function(g){return Math.pow(e[g],2)})),f=fs(t.map(function(g){return n[g]*e[g]})),d=f-i*o/r,p=Math.sqrt((a-Math.pow(i,2)/r)*(u-Math.pow(o,2)/r));return p===0?0:d/p};In.jaccard=function(n,e){return n=mr(n),e=mr(e),ea.intersection(n,e).length/ea.union(n,e).length};In.tanimoto=function(n,e){n=mr(n),e=mr(e);var t=ea.intersection(n,e).length;return t/(n.length+e.length-t)}});var ly=Jo((la,af)=>{(function(n,e){typeof la=="object"&&typeof af=="object"?af.exports=e():typeof define=="function"&&define.amd?define([],e):typeof la=="object"?la.resq=e():(n.window=n.window||{},n.window.resq=e())})(window,function(){return function(n){var e={};function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return l(t,"r"),t.m=n,t.c=e,t.d=function(r,i,o){t.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},t.r=function(r){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t.t=function(r,i){if(1&i&&(r=t(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var a in r)t.d(o,a,function(u){return r[u]}.bind(null,a));return o},t.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(i,"a",i),i},t.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},t.p="",t(t.s=16)}([function(n,e,t){"use strict";t.d(e,"a",function(){return L}),t.d(e,"d",function(){return W}),t.d(e,"b",function(){return G}),t.d(e,"c",function(){return re});var r=t(1),i=t.n(r),o=t(14),a=t.n(o),u=t(2),f=t.n(u),d=t(15),p=t.n(d);function g(B,j){var k=Object.keys(B);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(B);j&&(Q=Q.filter(function(ee){return Object.getOwnPropertyDescriptor(B,ee).enumerable})),k.push.apply(k,Q)}return k}l(g,"l");var y=Array.isArray,w=Object.keys;function S(B){return typeof B=="function"}l(S,"x");function E(B){return B instanceof HTMLElement||B instanceof Text}l(E,"y");function v(B){return f()(B)==="object"&&!y(B)}l(v,"h");function M(B){if(!B||typeof B=="string")return B;var j=function(k){for(var Q=1;Q<arguments.length;Q++){var ee=arguments[Q]!=null?arguments[Q]:{};Q%2?g(Object(ee),!0).forEach(function(q){a()(k,q,ee[q])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(ee)):g(Object(ee)).forEach(function(q){Object.defineProperty(k,q,Object.getOwnPropertyDescriptor(ee,q))})}return k}({},B);return delete j.children,j}l(M,"b");function A(B,j){var k=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return!(!y(B)||!y(j))&&(k?B.length===j.length&&!B.find(function(Q){return!j.includes(Q)}):B.some(function(Q){return j.includes(Q)}))}l(A,"v");function T(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=arguments.length>2&&arguments[2]!==void 0&&arguments[2],Q=[];if(!w(B).length)return!0;if(j===null||!w(j).length)return!1;if(k)return p()(B,j);var ee=w(B).filter(function(q){return w(j).includes(q)});return ee.forEach(function(q){v(B[q])&&v(j[q])&&(Q=Q.concat(T(B[q],j[q]))),(B[q]===j[q]||A(B[q],j[q]))&&Q.push(j)}),Q.length>0&&Q.filter(function(q){return q}).length===ee.length}l(T,"_");function L(B){var j,k={children:[]};if(!B)return k;k.name=S(j=B.type)?j.displayName||j.name:j,k.props=M(B.memoizedProps),k.state=function(ee){if(ee){var q=ee.baseState;return q||ee}}(B.memoizedState);var Q=B.child;if(Q)for(k.children.push(Q);Q.sibling;)k.children.push(Q.sibling),Q=Q.sibling;return k.children=k.children.map(function(ee){return L(ee)}),S(B.type)&&function(ee){return ee.children.length>1}(k)?(k.node=function(ee){return ee.children.map(function(q){return q.node}).filter(function(q){return!!q})}(k),k.isFragment=!0):k.node=function(ee){return E(ee.stateNode)?ee.stateNode:ee.child&&E(ee.child.stateNode)?ee.child.stateNode:null}(B),k}l(L,"m");function V(B){for(;B.length;){var j=B.shift();if(j.node)return j.node;j.children&&Array.isArray(j.children)&&B.push.apply(B,i()(j.children))}}l(V,"g");function U(B,j){for(var k=[];B.length;){var Q=B.shift().children;Q&&Array.isArray(Q)&&Q.forEach(function(ee){j(ee)&&(!ee.node&&Array.isArray(ee.children)&&(ee.node=V(ee.children.concat([]))),k.push(ee)),B.push(ee)})}return k}l(U,"O");function Z(B,j){var k=function(Q){if(Q){var ee=Q.split("(");return ee.length===1?Q:ee.find(function(q){return q.includes(")")}).replace(/\)*/g,"")}}(j);return new RegExp("^"+B.split("*").map(function(Q){return Q.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}).join(".+")+"$").test(k)}l(Z,"w");function W(B,j){var k=arguments.length>3?arguments[3]:void 0;return B.reduce(function(Q,ee){return Q.concat(U(Q,k&&typeof k=="function"?k:function(q){return typeof q.name=="string"?Z(ee,q.name):q.name!==null&&f()(q.name)==="object"&&Z(ee,q.name.displayName)}))},[j])}l(W,"j");function G(B,j,k){var Q=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return S(k)?(console.warn("Functions are not supported as filter matchers"),[]):B.filter(function(ee){return v(k)&&T(k,ee[j],Q)||y(k)&&A(k,ee[j],Q)||ee[j]===k})}l(G,"M");function re(B){if(B.hasOwnProperty("_reactRootContainer"))return B._reactRootContainer._internalRoot.current;var j=Object.keys(B).find(function(k){return k.startsWith("__reactInternalInstance")||k.startsWith("__reactFiber")||k.startsWith("__reactContainer")});return j?B[j]:void 0}l(re,"P")},function(n,e,t){var r=t(17),i=t(18),o=t(19),a=t(20);n.exports=function(u){return r(u)||i(u)||o(u)||a()},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?(n.exports=t=l(function(i){return typeof i},"r"),n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=t=l(function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},"r"),n.exports.default=n.exports,n.exports.__esModule=!0),t(r)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r){return n.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},n.exports.default=n.exports,n.exports.__esModule=!0,t(r)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r,i){for(var o=0;o<i.length;o++){var a=i[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(r,a.key,a)}}l(t,"r"),n.exports=function(r,i,o){return i&&t(r.prototype,i),o&&t(r,o),r},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){function t(r,i){return n.exports=t=Object.setPrototypeOf||function(o,a){return o.__proto__=a,o},n.exports.default=n.exports,n.exports.__esModule=!0,t(r,i)}l(t,"r"),n.exports=t,n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(6);n.exports=function(i,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(o&&o.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),o&&r(i,o)},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){var r=t(3),i=t(6),o=t(22),a=t(23);function u(f){var d=typeof Map=="function"?new Map:void 0;return n.exports=u=l(function(p){if(p===null||!o(p))return p;if(typeof p!="function")throw new TypeError("Super expression must either be null or a function");if(d!==void 0){if(d.has(p))return d.get(p);d.set(p,g)}function g(){return a(p,arguments,r(this).constructor)}return l(g,"e"),g.prototype=Object.create(p.prototype,{constructor:{value:g,enumerable:!1,writable:!0,configurable:!0}}),i(g,p)},"c"),n.exports.default=n.exports,n.exports.__esModule=!0,u(f)}l(u,"c"),n.exports=u,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,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,o=new Array(r);i<r;i++)o[i]=t[i];return o},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";(function(r){t.d(e,"a",function(){return o});var i=t(0);function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3,u=arguments.length>1?arguments[1]:void 0;if(r.isReactLoaded)return Promise.resolve("React already loaded");var f=l(function(){var d=document.createTreeWalker(document);if(u)return document.querySelector(u);for(;d.nextNode();)if(d.currentNode.hasOwnProperty("_reactRootContainer"))return d.currentNode},"o");return new Promise(function(d,p){var g=!1,y=null;l(function w(){var S=f();if(S&&(r.isReactLoaded=!0,r.rootReactElement=Object(i.c)(S),r.rootReactElement))return clearTimeout(y),d();g||setTimeout(w,200)},"e")(),y=setTimeout(function(){g=!0,p("Timed out")},a)})}l(o,"o")}).call(this,t(9))},function(n,e,t){"use strict";t.d(e,"a",function(){return V});var r=t(1),i=t.n(r),o=t(4),a=t.n(o),u=t(5),f=t.n(u),d=t(7),p=t.n(d),g=t(13),y=t.n(g),w=t(3),S=t.n(w),E=t(8),v=t.n(E),M=t(0);function A(U){var Z=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 W,G=S()(U);if(Z){var re=S()(this).constructor;W=Reflect.construct(G,arguments,re)}else W=G.apply(this,arguments);return y()(this,W)}}l(A,"v");var T=function(U){p()(W,U);var Z=A(W);function W(G){return a()(this,W),G||(G=[]),Z.call.apply(Z,[this].concat(i()(G)))}return l(W,"r"),f()(W,[{key:"byProps",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this,"props",G,B);return new W(j)},"value")},{key:"byState",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this,"state",G,B);return new W(j)},"value")}]),W}(v()(Array)),L=function(U){p()(W,U);var Z=A(W);function W(G,re){var B;for(var j in a()(this,W),(B=Z.call(this,G))._nodes=re,G)B[j]=G[j];return B}return l(W,"r"),f()(W,[{key:"byProps",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this._nodes,"props",G,B)[0];return new W(j,this._nodes)},"value")},{key:"byState",value:l(function(G){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{exact:!1},B=re.exact,j=Object(M.b)(this._nodes,"state",G,B)[0];return new W(j,this._nodes)},"value")}]),W}(v()(Object)),V=function(){function U(Z,W){a()(this,U),this.selectors=Z.split(" ").filter(function(G){return!!G}).map(function(G){return G.trim()}),this.rootComponent=W,this.tree=Object(M.a)(this.rootComponent)}return l(U,"t"),f()(U,[{key:"find",value:l(function(){return this.nodes=new T(Object(M.d)(this.selectors,this.tree,!0)),new L(this.nodes[0],this.nodes)},"value")},{key:"findAll",value:l(function(){return new T(Object(M.d)(this.selectors,this.tree))},"value")}]),U}()},function(n,e,t){var r=t(2).default,i=t(21);n.exports=function(o,a){return!a||r(a)!=="object"&&typeof a!="function"?i(o):a},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e){n.exports=function(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t},n.exports.default=n.exports,n.exports.__esModule=!0},function(n,e,t){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;n.exports=l(function a(u,f){if(u===f)return!0;if(u&&f&&typeof u=="object"&&typeof f=="object"){var d,p,g,y=r(u),w=r(f);if(y&&w){if((p=u.length)!=f.length)return!1;for(d=p;d--!=0;)if(!a(u[d],f[d]))return!1;return!0}if(y!=w)return!1;var S=u instanceof Date,E=f instanceof Date;if(S!=E)return!1;if(S&&E)return u.getTime()==f.getTime();var v=u instanceof RegExp,M=f instanceof RegExp;if(v!=M)return!1;if(v&&M)return u.toString()==f.toString();var A=i(u);if((p=A.length)!==i(f).length)return!1;for(d=p;d--!=0;)if(!o.call(f,A[d]))return!1;for(d=p;d--!=0;)if(!a(u[g=A[d]],f[g]))return!1;return!0}return u!=u&&f!=f},"t")},function(n,e,t){"use strict";t.r(e),function(r){t.d(e,"resq$",function(){return f}),t.d(e,"resq$$",function(){return d});var i=t(12),o=t(11);t.d(e,"waitToLoadReact",function(){return o.a});var a=t(0);function u(p,g,y){if(!y&&!r.isReactLoaded)throw new Error("Could not find the root element of your application");var w=r.rootReactElement;if(y instanceof HTMLElement&&(w=Object(a.c)(y)),!w)throw new Error("Could not find instance of React in given element");return new i.a(p,w)[g]()}l(u,"i");function f(p,g){return u(p,"find",g)}l(f,"c");function d(p,g){return u(p,"findAll",g)}l(d,"f")}.call(this,t(9))},function(n,e,t){var r=t(10);n.exports=function(i){if(Array.isArray(i))return r(i)},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 r=t(10);n.exports=function(i,o){if(i){if(typeof i=="string")return r(i,o);var a=Object.prototype.toString.call(i).slice(8,-1);return a==="Object"&&i.constructor&&(a=i.constructor.name),a==="Map"||a==="Set"?Array.from(i):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(i,o):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.
|
|
21
|
+
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 r=t(6),i=t(24);function o(a,u,f){return i()?(n.exports=o=Reflect.construct,n.exports.default=n.exports,n.exports.__esModule=!0):(n.exports=o=l(function(d,p,g){var y=[null];y.push.apply(y,p);var w=new(Function.bind.apply(d,y));return g&&r(w,g.prototype),w},"u"),n.exports.default=n.exports,n.exports.__esModule=!0),o.apply(null,arguments)}l(o,"u"),n.exports=o,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}])})});function Bg(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}}l(Bg,"isCrossOriginIframe");var de=l((n,e=document,{excludeCrossOriginIframes:t=!1,includeHTML:r=!1}={})=>{let i=[],o=l(u=>{u.querySelectorAll(n).forEach(f=>i.push(f))},"queryElement"),a=l(u=>{o(u);let f=[],d=l(p=>{p.shadowRoot&&f.push(p.shadowRoot),p.childNodes?.forEach(g=>d(g))},"findShadowRoots");d(u),f.forEach(p=>a(p)),u.querySelectorAll("iframe").forEach(p=>{if(!(t&&Bg(p)))try{let g=p.contentDocument;g&&a(g)}catch{return}})},"queryNode");return a(e),r&&e instanceof Document&&e.documentElement.matches(n)&&i.push(e.documentElement),i},"querySelectorAllExtended"),Tn=l((n,e)=>{if(n.matches(e))return n;let t=n.slot;if(t){let o=n.parentElement;for(;o;){if(o.shadowRoot){let a=o.shadowRoot.querySelector(`slot[name="${t}"]`);if(a)return Tn(a,e)}o=o.parentElement}return null}let r=n.closest(e);if(r)return r;let i=n.getRootNode();return i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Tn(i.host,e):null},"closestExtended"),ti=l((n,{flattenShadowRootChildren:e=!1}={})=>{if(!n)return[];let t=Array.from(n.childNodes);if(n.nodeType===Node.ELEMENT_NODE){let r=n;r.shadowRoot&&(t=t.filter(i=>!i.assignedSlot),e?t=t.concat(Array.from(r.shadowRoot.childNodes)):t.push(r.shadowRoot)),r.tagName.toLowerCase()==="slot"&&t.push(...r.assignedNodes())}return t},"childNodesExtended"),Wg=l(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 hr=l(n=>{let e=n.parentElement;if(e)return e;switch(n.nodeType){case Node.ELEMENT_NODE:let r=n;if(r.assignedSlot)return r.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 i=Array.from(window.document.querySelectorAll("iframe")).find(o=>o.contentDocument===t);if(i)return i}return null},"parentElementExtended");var as=l((n,{includeComments:e=!0,includeCDATA:t=!0,trim:r=!0,limitAttributeLength:i=!1}={})=>{if(!n)return"";function o(d){switch(d.nodeType){case Node.ELEMENT_NODE:return f(d);case Node.TEXT_NODE:return d.nodeValue;case Node.CDATA_SECTION_NODE:return t&&d.nodeValue.trim().length>0?`<![CDATA[${d.nodeValue}]]>`:"";case Node.COMMENT_NODE:return e&&d.nodeValue.trim().length>0?`<!--${d.nodeValue}-->`:"";default:return""}}l(o,"serializeNode");function a(d){return Array.from(d.childNodes).map(o).join("")}l(a,"serializeShadowRoot");function u(d){try{let p=d.contentDocument||d.contentWindow.document;return as(p.documentElement)}catch{return""}}l(u,"serializeIframe");function f(d){let p=d.tagName.toLowerCase(),g=`<${p}`;return Array.from(d.attributes).forEach(y=>{let w=y.value.slice(0,i?100:void 0);g+=` ${y.name}="${w}"`}),g+=">",d.shadowRoot?g+=a(d.shadowRoot):["script","style","svg"].includes(p)||Array.from(d.childNodes).forEach(y=>{y instanceof Element&&y.tagName.toLowerCase()==="iframe"?g+=u(y):g+=o(y)}),g+=`</${p}>`,g}return l(f,"serializeElementNode"),n.tagName.toLowerCase()==="iframe"?u(n):o(n)},"serializeElement");var Lt=class n{constructor({target:e=document,disabled:t=!1,log:r=!0,name:i,monitorInput:o=!1}){this.ignoreMutationsWithAttributes=["checksum-data-visible","checksum-data-transparently-visible","checksum-data-visible-under-transparent-element","checksum-data-click-offset","checksum-target-node","checksumid","data-scrollable-x","data-scrollable-y","data-scrollable-x-progress","data-scrollable-y-progress","rrwebid"];this.ignoreMutationsWithAttributeRegexPatterns=["checksum-radial-traverse-.+"];this.ignoreElementsWithClasses=["checksum-dom-cache-ignore"];this.inputEnabledSelectors=["input","textarea","select","[contenteditable=true]"].join(",");this.shouldIgnoreMutationRecord=l(e=>{try{if(e.type==="attributes"&&this.ignoreMutationsWithAttributes.includes(e.attributeName)||e.type==="attributes"&&this.ignoreMutationsWithAttributeRegexPatterns.some(r=>new RegExp("^"+r+"$").test(e.attributeName)))return!0;if(e.type==="attributes"&&e.attributeName==="class"){let r=l(i=>i?i.split(" ").filter(o=>![":hover","rrweb-paused"].includes(o)).sort().join(" "):"","standardizeClassName");return r(e.oldValue)===r(e.target.className)}let t=l(r=>this.ignoreElementsWithClasses.some(i=>r.classList.contains(i)),"doesElementHaveIgnoredClass");if(e.type==="childList"&&Array.from(e.addedNodes).every(r=>t(r))&&Array.from(e.removedNodes).every(r=>t(r)))return!0}catch{}return!1},"shouldIgnoreMutationRecord");this.monitoredTextElements=[];this.monitorInputEnabledElement=l(e=>{e.addEventListener("input",t=>{this.invalidate()})},"monitorInputEnabledElement");this.target=e,this.name=i,this.disabled=t,this.logActivity=r,this.monitorInput=o,this.startObserver()}static{l(this,"DOMMutationDependentCache")}static{this.instances={}}static getInstance(e,t){let r=this.makeNameForCache(e,t?.flags);n.instances[r]||(n.instances[r]=new n({...t,name:t?.name??e}),t?.initialValue&&n.instances[r].set(t?.initialValue));let i=n.instances[r];return t?.invalidate&&i.invalidate(),i}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(r=>{if(r.nodeType===Node.ELEMENT_NODE&&r.nodeType===Node.ELEMENT_NODE){let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(i.querySelectorAll("*")).filter(o=>o.matches&&o.matches(this.inputEnabledSelectors)||o.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=de(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 Ye(n,e,t=!0){try{if(!n.ownerDocument)return!1;let r=n.ownerDocument.defaultView;return r?n instanceof r[e]||n instanceof r.top?.[e]||t&&SR(n,e.toString()):!1}catch{}return!1}l(Ye,"isNodeInstanceOf");function SR(n,e){if(typeof n!="object"||n===null)return!1;let t=Object.getPrototypeOf(n);for(;t!==null;){if(t.constructor&&t.constructor.name===e)return!0;t=Object.getPrototypeOf(t)}return!1}l(SR,"isNodeInstanceOfAlt");function ri(n,e){return e??n?.ownerDocument?.defaultView??window}l(ri,"getElementWindow");async function Ju(n,e,t){if(!e.length)return[];let r=n.ownerDocument;if(r===document)return[];let i=e.find(a=>a.contentDocument===r);if(!i)return[];let o=await t(i);return[...await Ju(i,e,t),o]}l(Ju,"getParentFramesSelectors");function Ug({rootDocument:n=document,ignoredIframesSelectors:e=[],flags:t={}}={}){let r=l(u=>u.filter(f=>!e.some(d=>f.matches(d))),"makeReturnValue"),i=Lt.getInstance("playwrightElementSelectorGeneratorIframes",{log:!1,flags:t});if(i.hasCache())return r(i.get());let o=n.defaultView,a=de("iframe",o?.document);return i.set(a),r(a)}l(Ug,"getIframes");var qg=Zu(zg());var ls=["button","select","input","textarea","option","a","[role=button]","[role=checkbox]","[role=radio]","[role=link]","[type=button]","[aria-disabled=false]",'[id^="react-select"]',"label[for]","canvas"],Gg=["pointer","grab","text","vertical-text","zoom-in","zoom-out","help"],jg=["onClick","onMouseDown","onKeyDown","onKeyPress","onInput","onSelect","onDoubleClick","onDragStart","onDrag","onDragEnd","onDragOver","onDrop","onToggle","onMouseEnter"],Qu=["onclick","onmousedown","onkeydown","onkeypress","oninput","onselect","ondblclick","ondragstart","ondrag","ondragend","ondragover","ondrop","ontoggle","onmouseenter"],dr=[":hover",":focus",":active","\\:hover","\\:focus","\\:active"];var Wt=class{static{l(this,"PlaywrightElementSelectorGenerator")}async injectSelectorsAndLocators(e,{testIdSelector:t,searchParentFrames:r=!0}={}){let i=e.map(o=>({container:o,removedAttributes:this.stripNodeAttributes(o.element)}));return i=await Promise.all(i.map(async o=>{let{selector:a,locator:u,parentFramesSelectors:f}=await this.getSelectorAndLocator(o.container.element,{testIdSelector:t,searchParentFrames:r,stripAttributes:!0});return{...o,selector:a,locator:u,parentFramesSelectors:f}})),i=await Promise.all(i.map(async o=>{if(!o.removedAttributes.id&&!o.removedAttributes.originalClasses||(this.restoreNodeAttributes(o.container.element,o.removedAttributes),window.playwright.$(o.selector)!==void 0))return o;let a=await this.getSelectorAndLocator(o.container.element,{testIdSelector:t,searchParentFrames:r,stripAttributes:!1});return console.log(`Selector ${o.selector} is not valid, generated new one: ${a.selector}`),Object.assign(o,a),o})),i.map(o=>{let{container:a,selector:u,locator:f,parentFramesSelectors:d}=o;return{...a,selector:u,locator:f,parentFramesSelectors:d}})}stripNodeAttributes(e){let t=e,r,i;t.id&&(r=t.id,t.removeAttribute("id"));try{if(i=t.getAttribute("class"),i&&typeof i=="string"){let o=i.split(" ").filter(a=>!a.startsWith("css-")&&!a.startsWith("jss-")&&!dr.includes(a)).join(" ");t.setAttribute("class",o)}else i=void 0}catch(o){return console.warn("[playwright selector generator] error with class filtering",o),{}}return{id:r,originalClasses:i}}restoreNodeAttributes(e,t){let r=e,{id:i,originalClasses:o}=t;i&&r.setAttribute("id",i),o&&r.setAttribute("class",o)}getElementWindowPlaywright(e){let t=e.ownerDocument.defaultView;return t?(t!==window&&!t.playwright&&(t.playwright=window.playwright),t.playwright):window.playwright}async safeGetSelectorAndLocator(e,{retriesLeft:t=3}={}){try{try{return window.playwright.generateSelectorAndLocator(e)}catch{return this.getElementWindowPlaywright(e).generateSelectorAndLocator(e)}}catch{return t>0?(await(0,qg.default)(500),this.safeGetSelectorAndLocator(e,{retriesLeft:t-1})):{selector:"",locator:""}}}async getSelectorAndLocator(e,{testIdSelector:t,searchParentFrames:r=!0,stripAttributes:i=!0,ignoredIframesSelectors:o=[],rootDocument:a=document,flags:u={}}={}){try{if(!e)return null;let f=r?await Ju(e,Ug({rootDocument:a,ignoredIframesSelectors:o,flags:u}),async S=>(await this.getSelectorAndLocator(S,{searchParentFrames:!1})).selector):[],d=e,p=this.getTestAttributeSelector(d,t);if(p)return{selector:p,locator:`locator("${p}")`,parentFramesSelectors:f};let g;i&&(g=this.stripNodeAttributes(e));let{selector:y,locator:w}=await this.safeGetSelectorAndLocator(d);return g&&(this.restoreNodeAttributes(e,g),await this.getElementWindowPlaywright(e).$(y)!==e&&({selector:y,locator:w}=await this.safeGetSelectorAndLocator(d))),{selector:y,locator:w,parentFramesSelectors:f}}catch(f){return console.log("get selector and locator error",e,f),{selector:"",locator:""}}}async findIframeWindowByParentFrameSelectors(e=[]){let t=window.top;try{if(e&&e.length>0)for(let r of e){let i=await t.playwright.$(r);i||(i=await window.playwright.$(r)),i||(i=de(r)[0]),i?t=i.contentWindow:console.warn("Failed to find iframe window by parent frame selectors",r)}}catch(r){console.log("find iframe window by parent frame selectors error",r,e)}return t}async selector(e,t){let r;try{r=await((await this.findIframeWindowByParentFrameSelectors(t)).playwright??window.playwright).$(e)}catch(i){console.log("selector error",e,i)}return r??this.selectFromFirstIframe(e)}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 r=["data-cy","data-testid","data-test-id","data-test"];for(let o of[t,...r])if(o&&e.getAttribute(o)){let a=`[${o}='${e.getAttribute(o)}']`;if(de(a).length===1)return a;if(de(a).length>1){let f=Array.from(de(a)).indexOf(e);return`${a} >> nth=${f}`}}}escapeBackslash(e){return e.replace(/\\/g,"\\\\")}};var Qo=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 r in t)this[r]=t[r]}}static{l(this,"ESRAElementMetadata")}serialize(){return JSON.stringify(this)}};var cs=(i=>(i[i.Query=0]="Query",i[i.Intersection=1]="Intersection",i[i.Interactables=2]="Interactables",i[i.All=3]="All",i))(cs||{});var Yg=l((n,{tag:e="*"}={})=>de(e).filter(t=>t.innerText?.trim()===n.trim()),"findElementsWithText");function pr(n){let e=n.getRootNode();switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return ER(n,e);default:return n.innerText}}l(pr,"getInnerText");function ER(n,e){let t=n.querySelectorAll("slot");if(!t.length)return n.innerText;let r=n.cloneNode(!0),i=r.querySelectorAll("slot");return t.forEach((o,a)=>{let u=o.assignedNodes();i[a].innerText=u.map(f=>{switch(f.nodeType){case Node.TEXT_NODE:return f.textContent;case Node.ELEMENT_NODE:return f.innerText}}).filter(f=>!!f).join(`
|
|
22
|
+
`)}),r.innerText.trim()}l(ER,"extractInnerTextForElementInShadowDOM");var Zg=Zu(Xg());var ef=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{l(this,"ESRASimilarityConfigClass")}makeWeight(e){return this.weightsSum+=e,e}get(){return this.config}weight(e){return e/this.weightsSum}},Ue=new ef;var ta=class{constructor(e){this.qualifiedAttributes=[];this.qualifiedAttributesMap={};this.qualifiedClasses=[];this.unqualifiedClasses=[];this.qualifiedInnerText=void 0;this.visualVicinityComparable=[];this.structuralVicinityComparable=[];this.innerFeaturesComparable=[];this.rank=l(e=>{if(this.isDealBreaker(e))return{score:0,scores:{}};let t=this.tagSimilarity(e),r=this.attributesSimilarity(e),i=this.classSimilarity(e),o=this.styleSimilarity(e),a=this.innerTextSimilarity(e),u=this.innerFeaturesSimilarity(e),f=this.visualVicinitySimilarity(e),d=this.structuralVicinitySimilarity(e),p=this.svgsSimilarity(e),g={tagScore:t,attributesScore:r,classesScore:i,styleScore:o,innerTextScore:a,innerFeaturesScore:u,visualVicinityScore:f,structuralVicinityScore:d,svgsScore:p},y={tagScore:Ue.weight(Ue.get().tagName.decisionWeight)*t,attributesScore:Ue.weight(Ue.get().attributes.decisionWeight)*r,classesScore:Ue.weight(Ue.get().classes.decisionWeight)*i,innerTextScore:Ue.weight(Ue.get().innerText.decisionWeight)*a,innerFeaturesScore:Ue.weight(Ue.get().innerFeatures.decisionWeight)*u,styleScore:Ue.weight(Ue.get().style.decisionWeight)*o,visualVicinityScore:Ue.weight(Ue.get().visualVicinity.decisionWeight)*f,structuralVicinityScore:Ue.weight(Ue.get().structuralVicinity.decisionWeight)*d};return{score:Object.values(y).reduce((S,E)=>S+E,0),scores:g}},"rank");this.targetElementESRAMetadata=e,this.setQualifiedAttributes(),this.setQualifiedClasses(),this.setQualifiedInnerText(),this.setVisualVicinityComparable(),this.setStructuralVicinityComparable(),this.setInnerFeaturesComparable()}static{l(this,"ESRASimilarity")}getQualifiedAttributes(){return this.qualifiedAttributes}getQualifiedClasses(){return this.qualifiedClasses}getQualifiedInnerText(){return this.qualifiedInnerText}setQualifiedAttributes(){let e=this.targetElementESRAMetadata.attributes,{qualifiedAttributes:t,qualifiedAttributesMap:r}=this.makeQualifiedAttributes(e);this.qualifiedAttributes=t,this.qualifiedAttributesMap=r}makeQualifiedAttributes(e,t){let r=Object.keys(e).filter(o=>{switch(t){case"input":if(o==="value")return!1;break}let a=e[o];for(let u in a)u.endsWith("Uniqenuess")&&(a[u.replace("Uniqenuess","Uniqueness")]=a[u]);return a.globalUniqueness>Ue.get().attributes.qualification.globalUniquenessThreshold||a.tagUniqueness>Ue.get().attributes.qualification.tagUniquenessThreshold}),i=r.reduce((o,a)=>(o[a]=e[a].value,o),{});return{qualifiedAttributes:r,qualifiedAttributesMap:i}}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 r=e[t];return!this.isValidClass(t)||t.startsWith("jss")||t.startsWith("css-")||t===":hover"?!1:r.globalUniqueness>Ue.get().classes.qualification.globalUniquenessThreshold||r.tagUniqueness>Ue.get().classes.qualification.tagUniquenessThreshold})}setQualifiedInnerText(){this.qualifiedInnerText=this.makeQualifiedInnerText(this.targetElementESRAMetadata.innerText)}makeQualifiedInnerText(e){return e&&e.content?.length<=Ue.get().innerText.qualification.maxLength&&e.content?.length>=Ue.get().innerText.qualification.minLength?e:null}makeBasicElementPropertiesComparable(e){return e.reduce((t,r)=>{let i=r.position?`${r.tag}.${r.position.slice(0,2).join(",")}`:r.tag,o=`${i}+${r.relativePosition}`,a=this.makeQualifiedClasses(r.classes).map(p=>`${i}.${p}`),u=[];this.makeQualifiedAttributes(r.attributes).qualifiedAttributes.forEach(p=>{u.push(`${i}[${p}]`),u.push(`${i}[${p}]=${r.attributes[p].value}`)});let f=r.feature?this.makeInnerFeaturesComparable([r.feature],{customTag:i,includeTag:!1,featureTypeWhiteList:[6]}):[],d=[...t,i,o,...a,...u,...f];return r.text&&(d.push(`${i}<>`),d.push(`${i}<${r.text}>`)),r.distance&&(d.push(`${i}->${r.distance}`),d.push(`${i}->[]${this.getDistanceRange(r.distance)}`)),d},[])}getDistanceRange(e){let t=[10,20,30,40,50,60,70,80,90,100];for(let r of t)if(e<r)return r;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:r=!0,featureTypeWhiteList:i=void 0}={}){return e.reduce((o,a)=>{if(i&&!i.includes(a.type)||a.isHidden)return o;let u=t??a.tag,f=r?[...o,u]:o;switch(a.type){case 3:f.push(`${u}[type=${a.buttonType}]`);break;case 4:a.inputType&&f.push(`${u}[type=${a.inputType}]`),a.placeholder&&f.push(`${u}[placeholder=${a.placeholder}]`);break;case 6:a.components.forEach(d=>{let p=[];for(let g in d.attributes)p.push(`[${g}=${d.attributes[g]}]`);f.push(`${u}${p.join("")}`)});break}return"text"in a&&a.text&&(f.push(`${u}<>`),f.push(`${u}<${a.text}>`)),f},[])}setInnerFeaturesComparable(){this.innerFeaturesComparable=this.makeInnerFeaturesComparable(this.targetElementESRAMetadata.innerFeatures)}isDealBreaker(e){if(this.targetElementESRAMetadata.tag==="input"&&e.tag==="input"){let t=l(o=>o.type?o.type.value:"text","getType"),r=t(this.targetElementESRAMetadata.attributes),i=t(e.attributes);if(r!==i)return!0}return!1}tagSimilarity(e){return e.tag===this.targetElementESRAMetadata.tag?1:0}attributesSimilarity(e){let t=l(i=>[...this.keyValueObjectToArray(i),...Object.keys(i)],"makeJaccardParam"),{qualifiedAttributesMap:r}=this.makeQualifiedAttributes(e.attributes);return this.jaccard(t(this.qualifiedAttributesMap),t(r))}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(o=>{if(o.test(this.qualifiedInnerText.content)&&o.test(t.content))return .5});try{return new Date(this.qualifiedInnerText.content),new Date(t.content),.5}catch{}let i=l(o=>o.replace(/\d/g,"d").replace(/[a-zA-Z]/g,"s"),"template");return i(this.qualifiedInnerText.content)===i(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=l(o=>[...this.keyValueObjectToArray(o),...Object.keys(o)],"makeJaccardParam"),r=this.jaccard(t(this.targetElementESRAMetadata.style.inline??{}),t(e.style.inline??{})),i=this.jaccard(t(this.targetElementESRAMetadata.style.computed??{}),t(e.style.computed??{}));return r*Ue.get().style.inlineWeight+i*Ue.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="=",r=void 0){let i=l(o=>r?r(e,o):e[o],"getValue");return Object.keys(e).map(o=>`${o}${t}${i(o)}`)}jaccard(e,t){return Array.isArray(e)&&Array.isArray(t)&&!e.length&&!t.length?1:(0,Zg.jaccard)(e,t)}};var Jg={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 ii={attributesToExtract:Jg.examinedAttributes,structuralVicinity:{type:"fixed",value:6,useDecayingLimit:!0},visualVicinity:{radius:50,scanStep:10},vicinityFeatureElementsOnly:!0,react:{}};var CR={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"]},si=class{constructor(e){this.document=e;this.limit=5;this.extractSVG=l(e=>Array.from(e.children).map(t=>{let r=CR[t.tagName.toLowerCase()];if(!r)return null;let i=r.reduce((a,u)=>{let f=t.getAttribute(u);return{...a,[u]:f}},{});return{tagName:t.tagName.toLowerCase(),attributes:i}}).filter(t=>!!t),"extractSVG")}static{l(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 hs(n){if(!n)return!1;let e=n.getBoundingClientRect();return e.top<=window.innerHeight&&e.left<=window.innerWidth&&e.bottom>=0&&e.right>=0}l(hs,"isElementInViewport");function ra(n,e=!0){let t=window.getComputedStyle(n),r=t.opacity==="0";return{visible:t.visibility!=="hidden"&&t.display!=="none"&&(!e||!r),isTransparent:r}}l(ra,"isElementVisibleByStyles");function Qg(n,e,t=!0,r=!0){let i=n.getBoundingClientRect(),o=e.getBoundingClientRect(),a=i.left<o.right&&i.right>o.left,u=i.top<o.bottom&&i.bottom>o.top;return(!t||a)&&(!r||u)}l(Qg,"elementsOverlap");function ey(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView;if(!t)return null;let r=n.ownerDocument,i={top:0,left:0,right:t.innerWidth||r.documentElement.clientWidth,bottom:t.innerHeight||r.documentElement.clientHeight},o={top:Math.max(e.top,i.top),left:Math.max(e.left,i.left),right:Math.min(e.right,i.right),bottom:Math.min(e.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}l(ey,"getOverlappingRectangleWithViewport");function rf(n){try{return getComputedStyle(n).position==="fixed"?!0:!n.parentElement||n.parentElement===document.body?!1:rf(n.parentElement)}catch(e){return console.error("isAncestorOrSelfFixed",e),!1}}l(rf,"isAncestorOrSelfFixed");function nf(n){let{top:e}=n.getBoundingClientRect();return e<0?-e:0}l(nf,"getHeightOfCroppedElementAboveViewport");function sf(n){let{bottom:e}=n.getBoundingClientRect(),t=window.innerHeight;return e>t?e-t:0}l(sf,"getHeightsOfCroppedElementBelowViewport");var dt=class{static{l(this,"ScrollHelper")}constructor(e){this.element=e,this.elRect=this.element.getBoundingClientRect()}scrollIntoView({dontScrollIfAlreadyInView:e=!0}={}){if(e&&hs(this.element))return this;if(this.getScrollableParentsPositions(),!this.initialScrollPositions.length)return this;if(this.element.scrollIntoView({block:"center",inline:"center"}),!hs(this.element))for(let t of this.initialScrollPositions){let r=t.element.getBoundingClientRect();if(this.elRect.top<r.top||this.elRect.bottom>r.bottom){let i=this.elRect.top-r.top+t.element.scrollTop;t.element.scrollTop=i}}return this}restore(){this.initialScrollPositions&&this.initialScrollPositions.forEach(({element:e,top:t,left:r})=>{try{e.scroll(r,t)}catch(i){console.warn("[ScrollHelper/restore] couldn't restore initial scroll for",{element:e,top:t,left:r},i)}})}static getScrollData(e){let t=l(u=>{let f=u==="top"?"scrollTop":"scrollLeft",d=e[f];try{if(e[f]=d+1,e[f]!==d||(e[f]=d-1,e[f]!==d))return!0}finally{e[f]=d}return!1},"tryScroll"),i=e.scrollHeight>e.clientHeight&&t("top"),a=e.scrollWidth>e.clientWidth&&t("left");return{canScrollY:i,canScrollX:a,progressY:i?e.scrollTop/(e.scrollHeight-e.clientHeight):void 0,progressX:a?e.scrollLeft/(e.scrollWidth-e.clientWidth):void 0}}static scrollScrollableElement(e,t,r){let i=t==="y",o=i?e.scrollHeight:e.scrollWidth,a=i?e.clientHeight:e.clientWidth,u=i?e.scrollTop:e.scrollLeft,f;switch(r){case"forward":f=u+a;break;case"backwards":f=Math.max(0,u-a);break;case"end":f=o-a;break;case"start":f=0;break;default:if(typeof r=="number"){let d=Math.max(0,Math.min(r,100));f=(o-a)*d/100}else return console.log(`Invalid length parameter: expected "next", "end", "start", or a number, but received ${r}`),{result:!1,error:`Invalid parameter: expected "next", "end", "start", or a number, but received ${r}`};break}if(f=Math.max(0,Math.min(f,o-a)),console.log("ScrollHelper/scrollScrollableElement: new, left, top",f,e.scrollLeft,e.scrollTop),i){if(e.scrollTop===f)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollTop=f}else{if(e.scrollLeft===f)return{result:!1,error:"The element is already scrolled to the desired position"};e.scrollLeft=f}return{result:!0}}getScrollableParentsPositions(){this.initialScrollPositions=[];let e=hr(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=hr(e)}};function vt(n,e={}){let{markTransparentElementsAsHidden:t=!0,markElementsHiddenByTransparentElementAsVisible:r=!1,scrollIntoView:i=!0,useCache:o=!1}=e;if(o){let y=xR(n,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r,scrollIntoView:i});if(y)return y}let a,u={isHidden:!0},f=l((y,w=!0)=>(w&&a&&a.restore(),o&&MR(n,y,{markTransparentElementsAsHidden:t,markElementsHiddenByTransparentElementAsVisible:r}),{...u,...y}),"prepareResult");if(!n)return f({isHidden:!0});n=n.tagName==="OPTION"&&(n.closest("select")||n.closest("datalist"))||n;let{visible:d,isTransparent:p}=ra(n,t);if(u.isTransparent=p,!d)return f({isHidden:!0});if(TR(n,{scrollIntoView:i}))return f({isHidden:!0});try{let S=function(T){let L=T;for(;L;){if(L.nodeType===11)return[L,L.ownerDocument.defaultView];L=L.parentNode}};var g=S;l(S,"findShadowDocument"),i&&(a=new dt(n).scrollIntoView());let y=ey(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)]],[E,v]=S(n)??[n.ownerDocument,n.ownerDocument.defaultView],M,A=ri(n);if(A&&n instanceof A.HTMLInputElement&&n.id&&n.type&&["checkbox","radio"].includes(n.type)){let T=de(`label[for="${n.id}"]`,E);T.length&&(M=T[0])}for(let[T,L,V]of w){let U=y.left+T>=0&&y.left+T<=v.innerWidth?y.left+T:T,Z=y.top+L>=0&&y.top+L<=v.innerHeight?y.top+L:L,W=E.elementFromPoint(U,Z);if(W===n)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L}});if(!W)continue;if(V===!0&&W.shadowRoot)return f(vt(W,e));let G=W;for(;G;){if(G===n||M&&M===G)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L}});G=hr(G)}if(r)try{let re=E.elementsFromPoint(U,Z);for(let B of re){if(B===n)return f({isHidden:!1,clickOffset:V?void 0:{x:T,y:L},isBehindTransparentElement:!0});let j=v.getComputedStyle(B),k=B.getBoundingClientRect(),Q=n.getBoundingClientRect(),ee=ty(Q,k);if(!(ty(k,Q)&&!RR(k,Q)&&!ry(j))&&(ry(j)||IR(k,y)))break}}catch(re){console.error("Error while checking transparent elements over interactable",re)}}return a&&(a.restore(),a=void 0),M?vt(M,e):f({isHidden:!0})}catch(y){throw y}}l(vt,"isElementHidden");var iy=l(n=>{let e=Lt.getInstance("isElementHidden",{log:!1,flags:n}),t=e.get();return t||(t=new Map,e.set(t)),t},"getIsHiddenMapFromCache");function xR(n,e={}){let t=iy(e);return t.has(n)?t.get(n):void 0}l(xR,"getIsElementHiddenFromCache");var MR=l((n,e,t={})=>{iy(t).set(n,e)},"setIsElemenetHiddenInCache");function TR(n,{scrollIntoView:e=!0}={}){let t=n.parentElement,r=window.getComputedStyle(n);if(r.position==="absolute"||r.position==="fixed")return!1;let i;e&&(i=new dt(n).scrollIntoView());let o=l(u=>(i&&i.restore(),u),"restoreAndReturn"),a=ri(n);if(!a)return o(!1);for(;t;){if(!(t instanceof a.Element))return o(!1);let u=window.getComputedStyle(t);if(u.position==="absolute"||u.position==="fixed")return o(!1);let f=u.overflowX==="hidden",d=u.overflowY==="hidden";if((f||d)&&!Qg(t,n,f,d))return o(!0);t=t.parentElement}return o(!1)}l(TR,"isHiddenByOverflow");function ty(n,e){try{let t=Math.max(0,Math.min(n.right,e.right)-Math.max(n.left,e.left)),r=Math.max(0,Math.min(n.bottom,e.bottom)-Math.max(n.top,e.top)),i=t*r,o=n.width*n.height,a=e.width*e.height,u=Math.min(o,a)*.5;return i>u}catch(t){return console.error("Error while checking large overlap",t),!1}}l(ty,"isSignificantOverlap");function ry(n){return!(n.opacity==="0"||n.visibility==="hidden"||/rgba\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*0\s*\)/.test(n.backgroundColor))}l(ry,"isNotTransparent");function IR(n,e,t=.2){let r=ny(n),i=ny(e),o=r.widthRatio/i.widthRatio,a=r.heightRatio/i.heightRatio;return o>1+t||a>1+t}l(IR,"isElementSignificantlyLarger");function ny(n){let e={width:window.innerWidth,height:window.innerHeight,top:0,left:0,bottom:window.innerHeight,right:window.innerWidth},t=n.width/e.width,r=n.height/e.height;return{widthRatio:t,heightRatio:r}}l(ny,"getNormalizedElementSize");function RR(n,e,t=.2){let r=n.width/e.width,i=n.height/e.height,o=n.width-e.width,a=n.height-e.height,u=window.innerWidth,f=window.innerHeight,d=o/u,p=a/f,g=(r-1+(i-1))/2,y=(d+p)/2;return g*y>t}l(RR,"isSignificantlyLargerNormalized");var Rn=l(n=>vt(n,{useCache:!0}).isHidden,"getIsElementHidden"),na=l((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:Rn(n)};case"svg":return{type:6,tag:t,components:new si(document).extract(n)[0],isRoot:e,isHidden:Rn(n)};case"a":return{type:2,tag:t,href:n.getAttribute("href"),text:n.innerText,isRoot:e,isHidden:Rn(n)};case"button":return{type:3,tag:t,text:n.innerText,buttonType:n.getAttribute("type")||"button",isRoot:e,isHidden:Rn(n)};case"input":return{type:4,tag:t,inputType:n.getAttribute("type"),placeholder:n.getAttribute("placeholder"),isRoot:e,isHidden:Rn(n)};case"table":case"form":case"textarea":case"iframe":case"select":return{type:1,tag:t,isRoot:e,isHidden:Rn(n)}}if(n.innerHTML.trim()===n.innerText&&n.innerHTML.length)return{type:5,tag:t,text:AR(n.innerHTML),isRoot:e,isHidden:Rn(n)}},"extractFeatureFromElement"),AR=l(n=>n.length>256?n.substring(0,256)+"...":n,"shortenText");var ds=l(n=>Object.keys(n||{}).reduce((e,t)=>{let r=n[t];return r&&(e[t]=r),e},{}),"sanitizeStaticMetadata"),sy=l((n,e)=>{let t=ds(n),r=ds(e),i=l(u=>!u||Object.keys(u).length===0,"isEmpty");if(i(t)&&i(r))return!0;if(i(t)||i(r))return!1;let o=Object.keys(t).sort(),a=Object.keys(r).sort();if(o.length!==a.length||!o.every((u,f)=>u===a[f]))return!1;for(let u in t)if(t[u]!==r[u])return!1;return!0},"staticDataMatch"),ia=l(n=>{let e=ds(n);return!(!e||!Object.keys(e).length)},"hasStaticData");function oy(n,e){let t=n.filter(u=>!u.isRoot);t.length>10&&(t=Object.values(t.reduce((u,f)=>{let d=`${f.type}_${f.tag}`;return u[d]?u:{...u,[d]:f}},{})));let r=Math.min(Math.ceil(t.length*e.innerFeatures.mandatoryPercentage),e.innerFeatures.mandatoryMax),o=l(u=>u.reduce((f,d)=>{let p=f.map(g=>[...g,d]).filter(g=>g.length<=r);return f.concat(p)},[[]]),"combinations")(t).filter(u=>u.length===r),a=[];return o.forEach(u=>{let f=[];u.forEach(p=>f.push(oi(p))),sa(f).forEach(p=>a.push(p.map(g=>`:has(${g})`).join("")))}),a}l(oy,"getInnerFeaturesQueries");function sa(n){if(!n.length)return[];let e=[],t=n.length-1;function r(i,o){for(let a=0,u=n[o].length;a<u;a++){let f=i.slice(0);f.push(n[o][a]),o===t?e.push(f):r(f,o+1)}}return l(r,"helper"),r([],0),e}l(sa,"cartesian");function oi(n){let e=[n.tag];switch(n.type){case 0:n.src&&e.push(`${n.tag}[src="${n.src}"]`);break;case 2:e.push(`${n.tag}[href="${n.href}"]`);break;case 3:break;case 4:e.push(`${n.tag}[type="${n.inputType}"]`),n.placeholder&&e.push(`${n.tag}[placeholder="${n.placeholder}"]`);break}return e}l(oi,"getFeatureSelector");var ay=l((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>(e=e.replaceAll(`
|
|
23
|
+
`,"\\A ").replaceAll('"','\\"'),t?r?`[${n}="${e}"],[${n}*="${e} "],[${n}*=" ${e} "],[${n}*=" ${e}"]`:`[${n}*="${e}"]`:`[${n}="${e}"]`),"buildAttributeEqualityQuerySelector"),of=l((n,e,{contains:t=!1,matchWholeWord:r=!1}={})=>t?r?n===e||n.startsWith(e)||n.includes(` ${e} `)||n.endsWith(e):n.includes(e):n===e,"checkStringEquality");var ai=class{constructor(e){this.document=e;this.elementsByQueryCache={}}static{l(this,"AttributesExtractor")}getElementsByQuery(e){return this.elementsByQueryCache[e]||(this.elementsByQueryCache[e]=de(e,this.document)),this.elementsByQueryCache[e]}extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){for(let a=0;a<e.attributes.length;++a){let{name:u,value:f}=e.attributes[a];if(ii.attributesToExtract.includes(u)&&typeof f=="string"){if(u==="class"){f.split(" ").forEach(d=>{d.length&&t(d,this.processAttribute({element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o},u,d,{contains:!0,matchWholeWord:!0}))});continue}r(u,this.processAttribute({element:e,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o},u,f))}}}processAttribute({element:e,getElementsInStructuralVicinity:t,getElementsInVisualVicinity:r},i,o,a={}){let u=this.getElementsByQuery("*"),f=ay(i,o,a),d=this.getElementsByQuery(f),p=this.getElementsByQuery(`${e.tagName.toLowerCase()}`),g=d.filter(v=>v.tagName===e.tagName),y=t?t():[],w=y.filter(v=>v.element.attributes[i]&&of(v.element.attributes[i].value,o,a)),S=r?r():[],E=S.filter(v=>v.element.attributes[i]&&of(v.element.attributes[i].value,o,a));return{value:o,globalUniqueness:1-d.length/u.length,tagUniqueness:1-g.length/p.length,structuralVicinityUniqueness:t?1-w.length/y.length:void 0,visualVicinityUniqueness:r?1-E.length/S.length:void 0}}};var oa=class{constructor(e){this.el=null;this.serializedElement="";this.attributes={};this.classes={};this.getElementsInStructuralVicinity=l(()=>this.structuralVicinityData.elementsInStructuralVicinity,"getElementsInStructuralVicinity");this.setElementStructuralVicinityData=l(e=>{this.structuralVicinityData=e},"setElementStructuralVicinityData");this.setElementVisualVicinityData=l(e=>{this.visualVicinityData=e},"setElementVisualVicinityData");this.getElementsInVisualVicinity=l(()=>this.visualVicinityData,"getElementsInVisualVicinity");this.setSerializedElement=l(e=>{this.serializedElement=e},"setSerializedElement");this.setAttribute=l((e,t)=>{this.attributes[e]=t},"setAttribute");this.setClass=l((e,t)=>{this.classes[e]=t},"setClass");this.setInnerText=l(e=>{this.innerText=e},"setInnerText");this.setStyle=l(e=>{this.style=e},"setStyle");this.setTag=l(e=>{this.tag=e},"setTag");this.setReact=l(e=>{this.react=e},"setReact");this.setInnerFeatures=l(e=>{this.innerFeatures=e},"setInnerFeatures");this.setPositioning=l(e=>{this.positioning=e},"setPositioning");this.setSVGs=l(e=>{this.svgs=e},"setSVGs");this.el=e,this.attributesExtractor=new ai(this.el.ownerDocument)}static{l(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 ds({text:this.extractStaticTextCandidate(),labeled:this.extractLabeled(),labeling:this.extractLabeling(),svgTitle:this.extractSVGTitle()})}makeVicinityMetadata(e,t){return e.reduce((r,i)=>{let{qualified:o,feature:a}=this.isVicinityQualifiedElement(i.element);if(!o)return r;let u={},f={};this.attributesExtractor.extract({element:i.element,setClass:l((p,g)=>u[p]=g,"setClass"),setAttribute:l((p,g)=>f[p]=g,"setAttribute")});let d={tag:i.element.tagName.toLowerCase(),classes:u,attributes:f,text:this.extractTextForMetadata(i.element),feature:a,relativePosition:this.element.compareDocumentPosition(i.element),...t(i)};return r.push(d),r},[])}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(!ii.vicinityFeatureElementsOnly)return{qualified:!0};let t=na(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 pr(this.element);let e=Tn(this.element,"label");if(e&&this.attributeExists(e.getAttribute("for")))return pr(e);try{if(this.element.id&&this.element.id.length&&de(`[aria-labelledby="${this.element.id}"]`).length)return pr(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=Tn(this.element,"label");if(t&&!this.attributeExists(t.getAttribute("for")))return pr(t);if(this.element.id&&this.element.id.length)try{let i=de(`label[for=${this.element.id}]`);if(i.length)return pr(i[0])}catch{return}let r=this.element.getAttribute("aria-labelledby");if(this.attributeExists(r)){let i=de(r.split(" ").map(o=>`#${o}`).join(","));if(i.length)return pr(i[0])}}extractSVGTitle(){try{if(this.element.tagName.toLowerCase()!=="svg")return;let e=this.element.querySelector("title");return e?pr(e):void 0}catch(e){console.error("extractSVGTitle error",e)}}attributeExists(e){return e&&e.length>0}};var aa=class{constructor(e,t){this.structuralVicinityData={elementsInStructuralVicinity:[],html:""};this.element=e,this.config=t}static{l(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,r){let{runId:i,step:o,limit:a}=r;if(!e||o>a||e.attributes[`checksum-radial-traverse-${i}`]!==void 0)return"";this.structuralVicinityData.elementsInStructuralVicinity.push({element:e,position:t}),e.setAttribute(`checksum-radial-traverse-${i}`,o.toString());let d={runId:i,step:o+1,limit:this.config.useDecayingLimit?a-1:a},p=this.populateStructuralVicinity(hr(e),[...t,"parent"],d),g=this.populateStructuralVicinity(e.previousElementSibling,[...t,"left-sibling"],d),y=this.populateStructuralVicinity(e.nextElementSibling,[...t,"right-sibling"],d),w=[];Wg(e).map((E,v)=>w.push(this.populateStructuralVicinity(E,[...t,"child"],d)));let S=g+e.outerHTML.replace(e.innerHTML,w.join(""))+y;return p&&!p.includes(e.outerHTML)?p.replace("></",`>${S}</`):p?p.replace(e.outerHTML,S):S}};var ps=class{constructor(e,t){this.document=e;this.config=t;this.debug=!1;this.sampleBoxColors={0:"green",1:"orange",2:"red",3:"blue"}}static{l(this,"VisualVicinityExtractor")}calculate(e){let t=[],r=this.config.radius,i=this.config.scanStep,o=e.getBoundingClientRect();for(let a=o.left-r;a<o.left+o.width+r;a+=i)for(let u=o.top-r;u<o.top+o.height+r;u+=i){let f=a+i/2,d=u+i/2;if(this.doesRectContain(o,{left:a,top:u,right:a+i,bottom:u+i})){this.addTrace(f,d,i,3);continue}let p=this.document.elementFromPoint(f,d);if(!p)continue;let g=p.getBoundingClientRect();if(g.width>r*2&&g.height>r*2||this.doesRectContain(g,o)){this.addTrace(f,d,i,2);continue}if(!!t.find(({element:E})=>E===p)){this.addTrace(f,d,i,1);continue}let{position:w,distance:S}=this.getPosition(o,g);t.push({element:p,position:w,distance:S}),this.addTrace(f,d,i,0)}return t}getPosition(e,t){let{x:r,y:i}=this.getCenter(t),{x:o,y:a}=this.getCenter(e),u=l(()=>{let d=r-o,p=i-a;return d<0&&p<0?"top-left":d>0&&p<0?"top-right":d<0&&p>0?"bottom-left":d>0&&p>0?"bottom-right":d===0&&p<0?"top":d===0&&p>0?"bottom":d<0&&p===0?"left":d>0&&p===0?"right":"center"},"calcPosition");return{distance:l(()=>Number(Math.sqrt(Math.pow(o-r,2)+Math.pow(a-i,2)).toFixed(2)),"calcDistance")(),position:u()}}getCenter(e){return{x:e.width/2+e.left,y:e.height/2+e.top}}addTrace(e,t,r,i){if(!this.debug)return;let o=this.document.createElement("xdiv");o.setAttribute("style",`position: absolute; width: ${r}px; height: ${r}px; top: ${t}px; left: ${e}px; background: ${this.sampleBoxColors[i]}; z-index: 999999999999;opacity:0.4`),this.document.getElementsByTagName("body")[0].prepend(o)}doesRectContain(e,t){return t.left>=e.left&&t.right<=e.right&&t.top>=e.top&&t.bottom<=e.bottom}doRectsOverlap(e,t){let r=e.right<t.left,i=e.left>t.right,o=e.top>t.bottom,a=e.top<t.top;return!(r||i||o||a)}};window.vve=new ps({radius:50,scanStep:10});var ms=Zu(ly());window.resq$=ms.resq$;window.resq$$=ms.resq$$;var lf=class{static{l(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:r=void 0}={}){let i=(0,ms.resq$$)("*",e.parentElement).find(o=>o.children.length===1&&o.children[0].node===e);return r=r??e,i&&(t||i.node!==r)?this.parseRESQresult(i):this.findParentComponent(e.parentElement,{baseElement:r,ignoreBaseElement:t})}parseRESQresult(e){if(!e)return;let t=l(r=>{switch(typeof r){case"string":return[r];case"object":return Array.isArray(r)?r.map(t):Object.keys(r)}},"parseState");return{name:e.name,node:e.node,isFragment:e.isFragment,stateTokens:t(e.state),propsNames:Object.keys(e.props),hasChildren:!!e.children.length}}},cy=new lf;var ca=class{constructor(e,t){this.provider=cy;this.element=e,this.config=t}static{l(this,"ReactMetadataExtractor")}extract(){return this.provider.extract(this.element)}};var ua=class{constructor(e){this.document=e;this.tagBaseComputedStyle={}}static{l(this,"StyleExtractor")}extract({element:e,setStyle:t}){let r=e.tagName.toLowerCase();try{if(!this.tagBaseComputedStyle[r]){let i=this.document.createElement(r);this.document.getElementsByTagName("body")[0].prepend(i),this.tagBaseComputedStyle[r]=this.sanitzieStyle(window.getComputedStyle(i)),i.remove()}}catch(i){if(console.error("Failed to extract style for tag",r,i),!this.tagBaseComputedStyle[r])return}t({inline:this.sanitzieStyle(e.style,{acceptEmptyValue:!1}),computed:this.diffComputedStyle(this.tagBaseComputedStyle[r],this.sanitzieStyle(window.getComputedStyle(e)))})}diffComputedStyle(e,t){return l((o,a)=>Object.keys(a).reduce((u,f)=>o[f]===a[f]?u:{...u,[f]:a[f]},{}),"oneWayDiff")(e,t)}sanitzieStyle(e,{acceptEmptyValue:t=!0}={}){return Object.keys(e).reduce((r,i)=>{if(!isNaN(i))return r;let o=e[i];return!t&&!o||(r[i]=o),r},{})}};var Nr=class{constructor(){this.makeFeatureNode=l((e,t=void 0)=>{let r=e.nodeType===Node.ELEMENT_NODE;return{type:e.nodeType,tag:r?e.tagName.toLowerCase():void 0,feature:r?na(e,t):void 0,children:[],isRoot:t}},"makeFeatureNode");this.includeRootElements=!0;this.rootElementsTypeExceptions=[5];this.cache=Lt.getInstance("innerFeaturesExtractor",{log:!1})}static{l(this,"InnerFeaturesExtractor")}extract(e){let t=[],r=this.makeFeatureNode(e,!0);return this.walk(e,r,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 r=this.getMapFromCache();r.set(e,t),this.cache.set(r)}walk(e,t,r){let i=!1;ti(e).forEach(a=>{let u=this.getFeatureNodeFromCache(a)??this.makeFeatureNode(a),f=this.walk(a,u,r);f&&t.children.push(u),i||=f});let o=!!t.feature;return o&&(!t.isRoot||this.shouldIncludeRootNode(t))&&r.push(t.feature),this.addFeatureNodeToCache(e,t),o||i}shouldIncludeRootNode(e){return!(!this.includeRootElements||this.rootElementsTypeExceptions.includes(e.type))}};window.inner_features_extractor=new Nr;var li=class{static{l(this,"InnerTextExtractor")}constructor(){}extract(e){return{content:pr(e)??void 0}}};var fa=class{constructor(e){this.document=e}static{l(this,"PositioningExtractor")}extract(e){let{top:t,bottom:r,left:i,right:o}=e.getBoundingClientRect(),a=document.documentElement.scrollHeight,u=document.documentElement.scrollWidth;return{viewport:{size:{height:window.innerHeight,width:window.innerWidth},element:{top:this.normalize(t,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:u},element:{top:this.normalize(t+window.scrollY,a),bottom:this.normalize(r+window.scrollY,a),left:this.normalize(i+window.scrollX,u),right:this.normalize(o+window.scrollX,u)}}}}normalize(e,t){return e/t}};var Dr=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??ii,this.visualVicinityExtractor=new ps(this.document,this.config.visualVicinity),this.styleExtractor=new ua(this.document),this.innerFeaturesExtractor=new Nr,this.innerTextExtractor=new li,this.positioningExtractor=new fa(this.document)}static{l(this,"ESRAElementMetadataExtractor")}isSameDocument(e){return this.document===e}extract(e){let t=new dt(e).scrollIntoView(),r=Date.now(),i=new oa(e);return this.serializeElement(i),this.stats.serializeElement+=Date.now()-r,r=Date.now(),this.populateElementsInStructuralVicinity(i),this.stats.populateElementsInStructuralVicinity+=Date.now()-r,r=Date.now(),this.populateElementsInVisualVicinity(i),this.stats.populateElementsInVisualVicinity+=Date.now()-r,r=Date.now(),this.extractAttributes(i),this.stats.extractAttributes+=Date.now()-r,r=Date.now(),this.extractInnerText(i),this.stats.extractInnerText+=Date.now()-r,r=Date.now(),this.extractStyle(i),this.stats.extractStyle+=Date.now()-r,r=Date.now(),this.extractTag(i),this.stats.extractTag+=Date.now()-r,r=Date.now(),this.extractInnerFeatures(i),this.stats.extractInnerFeatures+=Date.now()-r,r=Date.now(),this.extractPositioning(i),this.stats.extractPositioning+=Date.now()-r,r=Date.now(),this.extractSVGComponents(i),this.stats.extractSVGComponents+=Date.now()-r,r=Date.now(),t.restore(),this.stats.final+=Date.now()-r,i}extractReact({element:e,setReact:t}){t(new ca(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 si(this.document).extract(e))}serializeElement({element:e,setSerializedElement:t}){}extractAttributes({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o}){return new ai(this.document).extract({element:e,setClass:t,setAttribute:r,getElementsInStructuralVicinity:i,getElementsInVisualVicinity:o})}populateElementsInStructuralVicinity({element:e,setElementStructuralVicinityData:t}){t(new aa(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 tn=class extends Error{static{l(this,"TimeoutError")}constructor(){super("Timeout")}};var rn=l(n=>{},"consoleTime"),nn=l(n=>{},"consoleTimeEnd");var uy=l((n,e=[])=>{if(!n)return n;let t=window.getComputedStyle(n).cursor,r=l((o,a=()=>!1)=>{let u=o;for(;u;){let f=u.parentElement;if(!f||f.nodeType!==Node.ELEMENT_NODE)return u;if(a(f))break;if(window.getComputedStyle(f).cursor!==t)return u;u=f}},"getClosestElementWithCursor"),i=l(o=>{try{if(o.matches("label[for]")&&!o.matches(ls.concat(e).filter(a=>!!a&&a!=="label[for]").join(","))){let a=o.getAttribute("for");if(!a)return!1;let u=document.getElementById(a);if(!u)return!1;let f=u.getAttribute("type");return f?u.tagName.toLowerCase()==="input"&&["checkbox","radio"].includes(f):!1}}catch(a){console.error("interactableParentIsValid",o,a)}return!0},"interactableParentIsValid");try{if("isContentEditable"in n&&n.isContentEditable)return n;if("closest"in n){let a=Tn(n,ls.concat(e).filter(u=>!!u).join(","));if(a&&i(a)){if(a===n)return n;let u=r(n,f=>f===a);return u||a}}if(["auto","default","context-menu","help","progress","wait"].includes(t))return n;let o=r(n);return o||n}catch(o){return console.error("getCompoundInteractableRootElement",n,o),n}},"getCompoundInteractableRootElement");var An=l((n=document,e={},{allowDisabled:t=!1,useDataVisibleAttributes:r=!0,excludeCrossOriginIframes:i=!1,includeCompoundInnerElements:o=!0}={})=>{let a=Lt.getInstance("getAllInteractableHTMLElements",{target:n,log:!1}),u=Date.now(),f=l(w=>{let S=w.reduce((E,v)=>!t&&v.state.disabled?E:[...E,v.element],[]);return console.log("[getAllInteractableHTMLElements] done, took",Date.now()-u,"ms"),S},"makeResponse");if(a.hasCache())return f(a.get());let d=de("*",n,{excludeCrossOriginIframes:i});rn("[getAllInteractableHTMLElements] items");let p=d.reduce((w,S)=>{let E="disabled"in S&&!!S.disabled;return S.matches(ls.concat(e.appSpecificInteractableElementsSelectors||[]).filter(M=>!!M).join(","))||Gg.includes(window.getComputedStyle(S).cursor)||S.isContentEditable&&!S.parentElement?.isContentEditable||!e.ignoreEventListenersWhenDeterminingInteractability&&(Qu.some(M=>S[M])||_R(S))?[...w,{element:S,disabled:E}]:w},[]);nn("[getAllInteractableHTMLElements] items"),rn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement");let g=p.reduce((w,S)=>{let E=uy(S.element,e.appSpecificInteractableElementsSelectors||[]),v=w.find(M=>M.element===E);return v?!S.disabled&&v.state.disabled&&(v.state.disabled=!1):w.push({element:E,state:{disabled:S.disabled}}),o&&S.element!==E&&OR(S.element)&&w.push({...S,state:{disabled:S.disabled}}),w},[]);nn("[getAllInteractableHTMLElements] getCompoundInteractableRootElement"),rn("[getAllInteractableHTMLElements] isElementHidden");let y=g.filter(({element:w})=>{if(r){if(!w)return!1;let S=w.getAttribute("checksum-data-visible");if(S){let E=S==="true",v=w.getAttribute("checksum-data-visible-under-transparent-element")==="true",M=w.getAttribute("checksum-data-transparently-visible")==="true";return E&&!v||M}}return!vt(w,{markTransparentElementsAsHidden:!1}).isHidden});return nn("[getAllInteractableHTMLElements] isElementHidden"),a.set(y),f(y)},"getAllInteractableHTMLElements"),OR=l(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"),_R=l(n=>{if(n._checksum_eventListenerList){let r=n._checksum_eventListenerList;if(Qu.some(i=>r[i.slice(2)]))return!0}let e=Object.keys(n).find(r=>r.startsWith("__reactFiber")),t=e?n[e]:void 0;return!t||!t.memoizedProps?!1:jg.some(r=>t.memoizedProps[r])},"hasFrameworkInteractionListener");var On=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=l(e=>{let t=Lt.getInstance("getElementSelectionResult",{log:!1}),r=t.get();if(r||(r=new Map,t.set(r)),r.has(e))return r.get(e);this.checkTimeout();let i=this.extractMetadata(e),{score:o,scores:a}=this.similarity.rank(i),u={score:o,candidate:e,scores:a,esraMetadata:i};return r.set(e,u),t.set(r),u},"getSelectionResultForCandidate");this.targetElementESRAMetadata=e,this.targetElementStaticData=t||e.staticMetadata,this.similarity=new ta(this.targetElementESRAMetadata),this.esraMetadataExtractor=new Dr(document)}static{l(this,"ESRASelector")}makeWeight(e){return this.weightsSum+=e,e}getWeight(e){return e/this.weightsSum}extractMetadata(e){return new Qo(this.esraMetadataExtractor.extract(e).toMetadata())}getLastSelectionLogs(e=5){if(!this.candidates?.length)return{};let t=new XMLSerializer,r=l((a,u=50)=>a.slice(0,u).map(f=>({score:f.score,metadata:f.metadata,element:t.serializeToString(f.candidate).substring(0,200)})),"printCandidates"),i=this.rankedCandidates[Math.min(this.rankedCandidates.length-1,e)].score,o=l(a=>r(a,e).filter(u=>u.score>=i),"filterByScore");return{candidatesQuery:this.candidateQueries.filter(a=>!!a.length).join(","),totalUniqueCandidates:this.uniqueCandidates.length,topRankingCandidates:r(this.rankedCandidates,e),topRemovedCandidates:{hidden:o(this.removedCandidates.hidden),staticData:o(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),r=this.extractMetadata(t),{score:i}=this.similarity.rank(r);return i>=this.POSITIONING_SATISFACTORY_SCORE?{candidate:t,score:i,esraMetadata:r}: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=de(e)),this.interactableCandidates=[],this.elementsFiltering!==0&&(this.interactableCandidates=An())}select(){console.log("selecting elements, filtering: ",cs[this.elementsFiltering]);let e=l(o=>{switch(o){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 ${cs[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((o,a,u)=>u.indexOf(o)===a);let t=n.limitChildren;t?.length&&(t=t.map(o=>({...o,parent:document.querySelector(o.selector)})),this.uniqueCandidates=this.uniqueCandidates.filter(o=>{for(var a of t)if(a.parent&&this.isDescendant(a.parent,o)&&a.limit--<=0)return!1;return!0})),this.checkTimeout(),this.rankedCandidates=this.uniqueCandidates.filter(o=>o instanceof ri(o).HTMLElement||o instanceof ri(o).SVGElement).map(this.getSelectionResultForCandidate).sort((o,a)=>a.score-o.score),this.removedCandidates={hidden:[],static:[]},this.filteredAndSortedRankedCandidates=this.rankedCandidates.filter(o=>{let{isHidden:a,clickOffset:u}=this.isHidden(o.candidate);return a===!0?(this.removedCandidates.hidden.push(o),!1):(u&&(o.clickOffset=u),ia(this.targetElementStaticData)&&!sy(this.formatStaticCandidates(o.esraMetadata.staticCandidates),this.targetElementStaticData)?(o.metadata=JSON.stringify(o.esraMetadata.staticCandidates),this.removedCandidates.static.push(o),!1):!0)}),this.checkTimeout(),this.removedCandidates.hidden.slice().reverse().forEach((o,a,u)=>{o.candidate.tagName==="INPUT"&&this.filteredAndSortedRankedCandidates.find(f=>f.score>.1&&f.candidate.contains(o.candidate))&&(this.removedCandidates.hidden.splice(u.length-1-a,1),this.filteredAndSortedRankedCandidates.push(o))}),this.filteredAndSortedRankedCandidates=this.filteredAndSortedRankedCandidates.sort((o,a)=>a.score-o.score);let r=this.filteredAndSortedRankedCandidates.length*(1-this.config.results.scorePercentile);this.finalCandidates=[];let i=null;for(let o=0;o<this.filteredAndSortedRankedCandidates.length;++o){let a=this.filteredAndSortedRankedCandidates[o];if(o>=r&&(!i||i.score-a.score>this.config.results.epsilon))break;i=a,this.finalCandidates.push(a)}return this.finalCandidates}intersectElements(e,t){let r=l((u,{useElementSize:f=!1}={})=>{let d=new Set;return u.forEach(p=>{let g=2,y=p;for(;y&&g-- >0&&(d.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}),d},"normalize"),i=r(e),o=r(t),a=new Set;return i.forEach(u=>{o.has(u)&&a.add(u)}),Array.from(a)}checkTimeout(){if(n.timeout&&Date.now()-this.processStartTime>n.timeout)throw new tn}selectOne({elementsFiltering:e=1,minSelectionScore:t=.3}={}){try{if(this.elementsFiltering=e,this.processStartTime=Date.now(),this.targetElementESRAMetadata.tag==="html"){let i=document.querySelector("html");return{candidate:i,score:1,esraMetadata:this.extractMetadata(i)}}let r=this.selectByPositioning();if(r)return console.log("Found element by positioning"),r;for(this.collectCandidates();;){let i=this.select();if(!i.length)break;let{score:o}=i[0];if(o<t&&this.elementsFiltering!==3){this.elementsFiltering++,console.log(`Best matching element is below threshold (${o}/${t}), expanding selection to ${cs[this.elementsFiltering]}`);continue}return i[0]}}catch(r){r instanceof tn?console.error("ESRA selection timeout"):console.error("ESRA selection error",r)}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(e=[]){this.candidateQueries.push(this.similarity.getQualifiedClasses().map(t=>`.${t}`).join(","))}setInnerFeaturesQueries(){let e=oy(this.targetElementESRAMetadata.innerFeatures,this.config).map(t=>`*${t}`);this.candidateQueries.push(...e)}getInnerTextCandidates(){let e=this.similarity.getQualifiedInnerText();if(!e)return[];let t=Yg(e.content);return t.length>this.config.innerText.dropIfMoreThanNCandidates?[]:t}getTagCandidates(){return de(this.targetElementESRAMetadata.tag)}isDescendant(e,t){return e.contains(t)}formatStaticCandidates(e){let t={};return Object.keys(e).forEach(r=>{t[r]=e[r]}),t}isHidden(e){return vt(e,{useCache:!0})}};var LR=Object.defineProperty,NR=l((n,e,t)=>e in n?LR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),P=l((n,e,t)=>NR(n,typeof e!="symbol"?e+"":e,t),"__publicField"),fy,DR=Object.defineProperty,kR=l((n,e,t)=>e in n?DR(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp$1"),hy=l((n,e,t)=>kR(n,typeof e!="symbol"?e+"":e,t),"__publicField$1"),ue=(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",n))(ue||{}),dy={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},py={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ha={},PR=l(()=>!!globalThis.Zone,"isAngularZonePresent$1");function Mh(n){if(ha[n])return ha[n];let e=globalThis[n],t=e.prototype,r=n in dy?dy[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in py?py[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!PR())return ha[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?ha[n]=d:t}catch{return t}}l(Mh,"getUntaintedPrototype$1");var cf={};function cn(n,e,t){var r;let i=`${n}.${String(t)}`;if(cf[i])return cf[i].call(e);let o=Mh(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(cf[i]=a,a.call(e)):e[t]}l(cn,"getUntaintedAccessor$1");var uf={};function xb(n,e,t){let r=`${n}.${String(t)}`;if(uf[r])return uf[r].bind(e);let o=Mh(n)[t];return typeof o!="function"?e[t]:(uf[r]=o,o.bind(e))}l(xb,"getUntaintedMethod$1");function FR(n){return cn("Node",n,"childNodes")}l(FR,"childNodes$1");function $R(n){return cn("Node",n,"parentNode")}l($R,"parentNode$1");function HR(n){return cn("Node",n,"parentElement")}l(HR,"parentElement$1");function BR(n){return cn("Node",n,"textContent")}l(BR,"textContent$1");function WR(n,e){return xb("Node",n,"contains")(e)}l(WR,"contains$1");function UR(n){return xb("Node",n,"getRootNode")()}l(UR,"getRootNode$1");function VR(n){return!n||!("host"in n)?null:cn("ShadowRoot",n,"host")}l(VR,"host$1");function zR(n){return n.styleSheets}l(zR,"styleSheets$1");function GR(n){return!n||!("shadowRoot"in n)?null:cn("Element",n,"shadowRoot")}l(GR,"shadowRoot$1");function jR(n,e){return cn("Element",n,"querySelector")(e)}l(jR,"querySelector$1");function qR(n,e){return cn("Element",n,"querySelectorAll")(e)}l(qR,"querySelectorAll$1");function YR(){return Mh("MutationObserver").constructor}l(YR,"mutationObserverCtor$1");function KR(n,e,t){try{if(!(e in n))return()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r}}catch{return()=>{}}}l(KR,"patch$1");var wt={childNodes:FR,parentNode:$R,parentElement:HR,textContent:BR,contains:WR,getRootNode:UR,host:VR,styleSheets:zR,shadowRoot:GR,querySelector:jR,querySelectorAll:qR,mutationObserver:YR,patch:KR};function Th(n){return n.nodeType===n.ELEMENT_NODE}l(Th,"isElement");function Cs(n){let e=n&&"host"in n&&"mode"in n&&wt.host(n)||null;return!!(e&&"shadowRoot"in e&&wt.shadowRoot(e)===n)}l(Cs,"isShadowRoot");function xs(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}l(xs,"isNativeShadowDom");function XR(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}l(XR,"fixBrowserCompatibilityIssuesInCSS");function ZR(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(" ")+";"}l(ZR,"escapeImportStatement");function Mf(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>Mb(i,t)).join("");return XR(r)}catch{return null}}l(Mf,"stringifyStylesheet");function Mb(n,e){if(QR(n)){let t;try{t=Mf(n.styleSheet)||ZR(n)}catch{t=n.cssText}return n.styleSheet.href?za(t,n.styleSheet.href):t}else{let t=n.cssText;return eA(n)&&n.selectorText.includes(":")&&(t=JR(t)),e?za(t,e):t}}l(Mb,"stringifyRule");function JR(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}l(JR,"fixSafariColons");function QR(n){return"styleSheet"in n}l(QR,"isCSSImportRule");function eA(n){return"selectorText"in n}l(eA,"isCSSStyleRule");var Rs=class{static{l(this,"Mirror")}constructor(){hy(this,"idNodeMap",new Map),hy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Tb(){return new Rs}l(Tb,"createMirror$2");function Ua({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let a=i||"",u=r&&ln(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?a=o(a,n):a="*".repeat(a.length)),a}l(Ua,"maskInputValue");function ln(n){return n.toLowerCase()}l(ln,"toLowerCase");var my="__rrweb_original__";function tA(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,a=my in o?o[my]:o;if(new Uint32Array(a.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}l(tA,"is2DCanvasBlank");function rA(n,e){return!n||!e||n.type!==e.type?!1:n.type===ue.Document?n.compatMode===e.compatMode:n.type===ue.DocumentType?n.name===e.name&&n.publicId===e.publicId&&n.systemId===e.systemId:n.type===ue.Comment||n.type===ue.Text||n.type===ue.CDATA?n.textContent===e.textContent:n.type===ue.Element?n.tagName===e.tagName&&JSON.stringify(n.attributes)===JSON.stringify(e.attributes)&&n.isSVG===e.isSVG&&n.needBlock===e.needBlock:!1}l(rA,"isNodeMetaEqual");function Va(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?ln(e):null}l(Va,"getInputType");function Ih(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}l(Ih,"extractFileExtension");function nA(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}l(nA,"extractOrigin");var iA=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,sA=/^(?:[a-z+]+:)?\/\//i,oA=/^www\..*/i,aA=/^(data:)([^,]*),(.*)/i;function za(n,e){return(n||"").replace(iA,(t,r,i,o,a,u)=>{let f=i||a||u,d=r||o||"";if(!f)return t;if(sA.test(f)||oA.test(f))return`url(${d}${f}${d})`;if(aA.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${nA(e)+f}${d})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${d}${p.join("/")}${d})`})}l(za,"absolutifyURLs");function da(n,e=!1){return e?n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}l(da,"normalizeCssString");function lA(n,e,t=!1){let r=Array.from(e.childNodes),i=[],o=0;if(r.length>1&&n&&typeof n=="string"){let a=da(n,t),u=a.length/n.length;for(let f=1;f<r.length;f++)if(r[f].textContent&&typeof r[f].textContent=="string"){let d=da(r[f].textContent,t),p=100,g=3;for(;g<d.length&&(d[g].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,g),1)!==-1);g++);for(;g<d.length;g++){let y=d.substring(0,g),w=a.split(y),S=-1;if(w.length===2)S=w[0].length;else if(w.length>2&&w[0]===""&&r[f-1].textContent!=="")S=a.indexOf(y,1);else if(w.length===1){if(y=y.substring(0,y.length-1),w=a.split(y),w.length<=1)return i.push(n),i;g=p+1}else g===d.length-1&&(S=a.indexOf(y));if(w.length>=2&&g>p){let E=r[f-1].textContent;if(E&&typeof E=="string"){let v=da(E).length;S=a.indexOf(y,v)}S===-1&&(S=w[0].length)}if(S!==-1){let E=Math.floor(S/u);for(;E>0&&E<n.length;){if(o+=1,o>50*r.length)return i.push(n),i;let v=da(n.substring(0,E),t);if(v.length===S){i.push(n.substring(0,E)),n=n.substring(E),a=a.substring(S);break}else v.length<S?E+=Math.max(1,Math.floor((S-v.length)/u)):E-=Math.max(1,Math.floor((v.length-S)*u))}break}}}}return i.push(n),i}l(lA,"splitCssText");function cA(n,e){return lA(n,e).join("/* rr_split */")}l(cA,"markCssSplits");var uA=1,fA=new RegExp("[^a-z0-9-_:]"),As=-2;function Ib(){return uA++}l(Ib,"genId");function hA(n){if(n instanceof HTMLFormElement)return"form";let e=ln(n.tagName);return fA.test(e)?"div":e}l(hA,"getValidTagName$1");var ci,gy,dA=/^[^ \t\n\r\u000c]+/,pA=/^[, \t\n\r\u000c]+/;function mA(n,e){if(e.trim()==="")return e;let t=0;function r(o){let a,u=o.exec(e.substring(t));return u?(a=u[0],t+=a.length,a):""}l(r,"collectCharacters");let i=[];for(;r(pA),!(t>=e.length);){let o=r(dA);if(o.slice(-1)===",")o=di(n,o.substring(0,o.length-1)),i.push(o);else{let a="";o=di(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,t+=1}}}return i.join(", ")}l(mA,"getAbsoluteSrcsetString");var yy=new WeakMap;function di(n,e){return!e||e.trim()===""?e:Rh(n,e)}l(di,"absoluteToDoc");function gA(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}l(gA,"isSVGElement");function Rh(n,e){let t=yy.get(n);if(t||(t=n.createElement("a"),yy.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}l(Rh,"getHref");function Rb(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?di(n,r):t==="srcset"?mA(n,r):t==="style"?za(r,Rh(n)):e==="object"&&t==="data"?di(n,r):r)}l(Rb,"transformAttribute");function Ab(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}l(Ab,"ignoreAttribute");function yA(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}l(yA,"_isBlockedElement");function Ga(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Ga(wt.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?Ga(wt.parentNode(n),e,t):!1}l(Ga,"classMatchesRegex");function Ob(n,e,t,r){let i;if(Th(n)){if(i=n,!wt.childNodes(i).length)return!1}else{if(wt.parentElement(n)===null)return!1;i=wt.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Ga(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}l(Ob,"needMaskingText");function bA(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let a="about:blank";if(r.location.href!==a||n.src===a||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}l(bA,"onceIframeLoaded");function vA(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}l(vA,"onceStylesheetLoaded");function wA(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:v=!1}=e,M=SA(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:ue.Document,childNodes:[],compatMode:n.compatMode}:{type:ue.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:ue.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return CA(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E,rootId:M});case n.TEXT_NODE:return EA(n,{doc:t,needsMask:a,maskTextFn:d,rootId:M,cssCaptured:v});case n.CDATA_SECTION_NODE:return{type:ue.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:ue.Comment,textContent:wt.textContent(n)||"",rootId:M};default:return!1}}l(wA,"serializeNode");function SA(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}l(SA,"getRootId");function EA(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,a=wt.parentNode(n),u=a&&a.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=wt.textContent(n),d&&f&&(f=za(f,Rh(e.doc)))),!d&&!p&&f&&t&&(f=r?r(f,wt.parentElement(n)):f.replace(/[\S]/g,"*")),{type:ue.Text,textContent:f||"",rootId:i}}l(EA,"serializeTextNode");function CA(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:w}=e,S=yA(n,r,i),E=hA(n),v={},M=n.attributes.length;for(let T=0;T<M;T++){let L=n.attributes[T];Ab(E,L.name,L.value)||(v[L.name]=Rb(t,E,ln(L.name),L.value))}if(E==="link"&&o){let T=Array.from(t.styleSheets).find(V=>V.href===n.href),L=null;T&&(L=Mf(T)),L&&(delete v.rel,delete v.href,v._cssText=L)}if(E==="style"&&n.sheet){let T=Mf(n.sheet);T&&(n.childNodes.length>1&&(T=cA(T,n)),v._cssText=T)}if(E==="input"||E==="textarea"||E==="select"){let T=n.value,L=n.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&T?v.value=Ua({element:n,type:Va(n),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):L&&(v.checked=L)}if(E==="option"&&(n.selected&&!a.select?v.selected=!0:delete v.selected),E==="dialog"&&n.open&&(v.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(n.__context==="2d")tA(n)||(v.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let T=n.toDataURL(f.type,f.quality),L=t.createElement("canvas");L.width=n.width,L.height=n.height;let V=L.toDataURL(f.type,f.quality);T!==V&&(v.rr_dataURL=T)}}if(E==="img"&&d){ci||(ci=t.createElement("canvas"),gy=ci.getContext("2d"));let T=n,L=T.currentSrc||T.getAttribute("src")||"<unknown-src>",V=T.crossOrigin,U=l(()=>{T.removeEventListener("load",U);try{ci.width=T.naturalWidth,ci.height=T.naturalHeight,gy.drawImage(T,0,0),v.rr_dataURL=ci.toDataURL(f.type,f.quality)}catch(Z){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${L}! Error: ${Z}`)}T.crossOrigin==="anonymous"&&(V?v.crossOrigin=V:T.removeAttribute("crossorigin"))},"recordInlineImage");T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U)}if(E==="audio"||E==="video"){let T=v;T.rr_mediaState=n.paused?"paused":"played",T.rr_mediaCurrentTime=n.currentTime,T.rr_mediaPlaybackRate=n.playbackRate,T.rr_mediaMuted=n.muted,T.rr_mediaLoop=n.loop,T.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(v.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(v.rr_scrollTop=n.scrollTop)),S){let{width:T,height:L}=n.getBoundingClientRect();v={class:v.class,rr_width:`${T}px`,rr_height:`${L}px`}}E==="iframe"&&!g(v.src)&&(n.contentDocument||(v.rr_src=v.src),delete v.src);let A;try{customElements.get(E)&&(A=!0)}catch{}return{type:ue.Element,tagName:E,attributes:v,childNodes:[],isSVG:gA(n)||void 0,needBlock:S,rootId:w,isCustom:A}}l(CA,"serializeElementNode");function $e(n){return n==null?"":n.toLowerCase()}l($e,"lowerIfExists");function xA(n,e){if(e.comment&&n.type===ue.Comment)return!0;if(n.type===ue.Element){if(e.script&&(n.tagName==="script"||n.tagName==="link"&&(n.attributes.rel==="preload"&&n.attributes.as==="script"||n.attributes.rel==="modulepreload")||n.tagName==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&Ih(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&($e(n.attributes.name).match(/^msapplication-tile(image|color)$/)||$e(n.attributes.name)==="application-name"||$e(n.attributes.rel)==="icon"||$e(n.attributes.rel)==="apple-touch-icon"||$e(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&$e(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($e(n.attributes.property).match(/^(og|twitter|fb):/)||$e(n.attributes.name).match(/^(og|twitter):/)||$e(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&($e(n.attributes.name)==="robots"||$e(n.attributes.name)==="googlebot"||$e(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&($e(n.attributes.name)==="author"||$e(n.attributes.name)==="generator"||$e(n.attributes.name)==="framework"||$e(n.attributes.name)==="publisher"||$e(n.attributes.name)==="progid"||$e(n.attributes.property).match(/^article:/)||$e(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&($e(n.attributes.name)==="google-site-verification"||$e(n.attributes.name)==="yandex-verification"||$e(n.attributes.name)==="csrf-token"||$e(n.attributes.name)==="p:domain_verify"||$e(n.attributes.name)==="verify-v1"||$e(n.attributes.name)==="verification"||$e(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}l(xA,"slimDOMExcluded");function pi(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:v=!1,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T=5e3,onStylesheetLoad:L,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:U=l(()=>!1,"keepIframeSrcFn"),newlyAddedElement:Z=!1,cssCaptured:W=!1}=e,{needsMask:G}=e,{preserveWhiteSpace:re=!0}=e;G||(G=Ob(n,a,u,G===void 0));let B=wA(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:E,recordCanvas:v,keepIframeSrcFn:U,newlyAddedElement:Z,cssCaptured:W});if(!B)return console.warn(n,"not serialized"),null;let j;r.hasNode(n)?j=r.getId(n):xA(B,w)||!re&&B.type===ue.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?j=As:j=Ib();let k=Object.assign(B,{id:j});if(r.add(n,k),j===As)return null;M&&M(n);let Q=!f;if(k.type===ue.Element){Q=Q&&!k.needBlock,delete k.needBlock;let q=wt.shadowRoot(n);q&&xs(q)&&(k.isShadowHost=!0)}if((k.type===ue.Document||k.type===ue.Element)&&Q){w.headWhitespace&&k.type===ue.Element&&k.tagName==="head"&&(re=!1);let q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U,cssCaptured:!1};if(!(k.type===ue.Element&&k.tagName==="textarea"&&k.attributes.value!==void 0)){k.type===ue.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText=="string"&&(q.cssCaptured=!0);for(let rt of Array.from(wt.childNodes(n))){let De=pi(rt,q);De&&k.childNodes.push(De)}}let ae=null;if(Th(n)&&(ae=wt.shadowRoot(n)))for(let rt of Array.from(wt.childNodes(ae))){let De=pi(rt,q);De&&(xs(ae)&&(De.isShadow=!0),k.childNodes.push(De))}}let ee=wt.parentNode(n);return ee&&Cs(ee)&&xs(ee)&&(k.isShadow=!0),k.type===ue.Element&&k.tagName==="iframe"&&bA(n,()=>{let q=n.contentDocument;if(q&&A){let ae=pi(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});ae&&A(n,ae)}},T),k.type===ue.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&Ih(k.attributes.href)==="css")&&vA(n,()=>{if(L){let q=pi(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});q&&L(n,q)}},V),k}l(pi,"serializeNodeWithId");function MA(n,e){let{mirror:t=new Rs,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V=l(()=>!1,"keepIframeSrcFn")}=e||{};return pi(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,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:g,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:S,inlineImages:f,recordCanvas:d,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V,newlyAddedElement:!1})}l(MA,"snapshot");var TA=/(max|min)-device-(width|height)/,by=new RegExp(TA.source,"g"),IA={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:l(function(n){n.params.match(by)&&(n.params=n.params.replace(by,"$1-$2"))},"AtRule")}}},RA={postcssPlugin:"postcss-hover-classes",prepare:l(function(){let n=[];return{Rule:l(function(e){n.indexOf(e)===-1&&(n.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
|
|
24
|
+
`+t.replace(/:hover/g,".\\:hover"))}))},"Rule")}},"prepare")};function AA(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}l(AA,"getDefaultExportFromCjs$1");function OA(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=l(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:l(function(){return n[r]},"get")})}),t}l(OA,"getAugmentedNamespace$1");var Ah={exports:{}},Ve=String,_b=l(function(){return{isColorSupported:!1,reset:Ve,bold:Ve,dim:Ve,italic:Ve,underline:Ve,inverse:Ve,hidden:Ve,strikethrough:Ve,black:Ve,red:Ve,green:Ve,yellow:Ve,blue:Ve,magenta:Ve,cyan:Ve,white:Ve,gray:Ve,bgBlack:Ve,bgRed:Ve,bgGreen:Ve,bgYellow:Ve,bgBlue:Ve,bgMagenta:Ve,bgCyan:Ve,bgWhite:Ve}},"create$1");Ah.exports=_b();Ah.exports.createColors=_b;var _A=Ah.exports,LA={},NA=Object.freeze(Object.defineProperty({__proto__:null,default:LA},Symbol.toStringTag,{value:"Module"})),or=OA(NA),vy=_A,wy=or,Tf=class Lb extends Error{static{l(this,"CssSyntaxError")}constructor(e,t,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Lb)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=vy.isColorSupported),wy&&e&&(t=wy(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=vy.createColors(!0);u=l(y=>d(g(y)),"mark"),f=l(y=>p(y),"aside")}else u=f=l(d=>d,"aside");return r.slice(i,o).map((d,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let w=f(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+d+`
|
|
25
25
|
`+w+u("^")}return" "+f(y)+d}).join(`
|
|
26
26
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
27
27
|
|
|
28
28
|
`+e+`
|
|
29
|
-
`),this.name+": "+this.message+e}},
|
|
29
|
+
`),this.name+": "+this.message+e}},Oh=Tf;Tf.default=Tf;var Hs={};Hs.isClean=Symbol("isClean");Hs.my=Symbol("my");var Sy={after:`
|
|
30
30
|
`,beforeClose:`
|
|
31
31
|
`,beforeComment:`
|
|
32
32
|
`,beforeDecl:`
|
|
33
33
|
`,beforeOpen:" ",beforeRule:`
|
|
34
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
35
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return
|
|
34
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function DA(n){return n[0].toUpperCase()+n.slice(1)}l(DA,"capitalize$1");var If=class{static{l(this,"Stringifier")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
35
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Sy[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+DA(r);this[u]?i=this[u](a,e):a.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Sy[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
36
36
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
37
37
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
38
38
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
39
39
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
40
|
-
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Nb=
|
|
41
|
-
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
42
|
-
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[
|
|
40
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Nb=If;If.default=If;var kA=Nb;function Rf(n,e){new kA(e).stringify(n)}l(Rf,"stringify$4$1");var dl=Rf;Rf.default=Rf;var{isClean:pa,my:PA}=Hs,FA=Oh,$A=Nb,HA=dl;function Af(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>Af(a,t)):(o==="object"&&i!==null&&(i=Af(i)),t[r]=i)}return t}l(Af,"cloneNode$1");var Of=class{static{l(this,"Node2")}constructor(e={}){this.raws={},this[pa]=!1,this[PA]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Af(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new FA(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[pa]){this[pa]=!1;let e=this;for(;e=e.parent;)e[pa]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
|
|
41
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new $A().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,t);else if(a==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[a]={end:u.end,inputId:f,start:u.start}}else r[a]=u}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=HA){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},pl=Of;Of.default=Of;var BA=pl,_f=class extends BA{static{l(this,"Declaration")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},ml=_f;_f.default=_f;var WA="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",UA=l((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet$1"),VA=l((n=21)=>{let e="",t=n;for(;t--;)e+=WA[Math.random()*64|0];return e},"nanoid$1$1"),zA={nanoid:VA,customAlphabet:UA},{SourceMapConsumer:Ey,SourceMapGenerator:Cy}=or,{existsSync:GA,readFileSync:jA}=or,{dirname:ff,join:qA}=or;function YA(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}l(YA,"fromBase64$1");var Lf=class{static{l(this,"PreviousMap")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ff(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Ey(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return YA(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=ff(e),GA(e))return this.mapFile=e,jA(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Ey)return Cy.fromSourceMap(t).toString();if(t instanceof Cy)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=qA(ff(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Db=Lf;Lf.default=Lf;var{SourceMapConsumer:KA,SourceMapGenerator:XA}=or,{fileURLToPath:xy,pathToFileURL:ma}=or,{isAbsolute:Nf,resolve:Df}=or,{nanoid:ZA}=zA,hf=or,My=Oh,JA=Db,df=Symbol("fromOffsetCache"),QA=!!(KA&&XA),Ty=!!(Df&&Nf),ja=class{static{l(this,"Input")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ty||/^\w+:\/\//.test(t.from)||Nf(t.from)?this.file=t.from:this.file=Df(t.from)),Ty&&QA){let r=new JA(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+ZA(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,a,u;if(t&&typeof t=="object"){let d=t,p=r;if(typeof d.offset=="number"){let g=this.fromOffset(d.offset);t=g.line,r=g.col}else t=d.line,r=d.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let d=this.fromOffset(t);t=d.line,r=d.col}let f=this.origin(t,r,a,u);return f?o=new My(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new My(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:u,line:a},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:a,line:t,source:this.css},this.file&&(ma&&(o.input.url=ma(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[df])r=this[df];else{let o=this.css.split(`
|
|
42
|
+
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[df]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,a;for(;i<o;)if(a=i+(o-i>>1),e<r[a])o=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Df(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;Nf(a.source)?f=ma(a.source):f=new URL(a.source,this.map.consumer().sourceRoot||ma(this.map.mapFile));let d={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:f.toString()};if(f.protocol==="file:")if(xy)d.file=xy(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},gl=ja;ja.default=ja;hf&&hf.registerInput&&hf.registerInput(ja);var{SourceMapConsumer:kb,SourceMapGenerator:Pa}=or,{dirname:Fa,relative:Pb,resolve:Fb,sep:$b}=or,{pathToFileURL:Iy}=or,eO=gl,tO=!!(kb&&Pa),rO=!!(Fa&&Fb&&Pb&&$b),nO=class{static{l(this,"MapGenerator")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
43
43
|
`;this.css.includes(`\r
|
|
44
44
|
`)&&(t=`\r
|
|
45
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
46
|
-
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Pa(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Pa(Fb(r,this.mapOpts.annotation)));let i=Pb(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new QA(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ty){let r=Ty(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;$b==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Hb=rO,nO=fl,Nf=class extends nO{static{l(this,"Comment")}constructor(e){super(e),this.type="comment"}},pl=Nf;Nf.default=Nf;var{isClean:Bb,my:Wb}=Hs,Ub=hl,Vb=pl,iO=fl,zb,Oh,_h,Gb;function jb(n){return n.map(e=>(e.nodes&&(e.nodes=jb(e.nodes)),delete e.source,e))}l(jb,"cleanSource$1");function qb(n){if(n[Bb]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)qb(e)}l(qb,"markDirtyUp$1");var Fr=class Yb extends iO{static{l(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=jb(zb(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ub(e)]}else if(e.selector)e=[new Oh(e)];else if(e.name)e=[new _h(e)];else if(e.text)e=[new Vb(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Wb]||Yb.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Bb]&&qb(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Fr.registerParse=n=>{zb=n};Fr.registerRule=n=>{Oh=n};Fr.registerAtRule=n=>{_h=n};Fr.registerRoot=n=>{Gb=n};var Nn=Fr;Fr.default=Fr;Fr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,_h.prototype):n.type==="rule"?Object.setPrototypeOf(n,Oh.prototype):n.type==="decl"?Object.setPrototypeOf(n,Ub.prototype):n.type==="comment"?Object.setPrototypeOf(n,Vb.prototype):n.type==="root"&&Object.setPrototypeOf(n,Gb.prototype),n[Wb]=!0,n.nodes&&n.nodes.forEach(e=>{Fr.rebuild(e)})};var sO=Nn,Kb,Xb,Os=class extends sO{static{l(this,"Document2")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Kb(new Xb,this,e).stringify()}};Os.registerLazyResult=n=>{Kb=n};Os.registerProcessor=n=>{Xb=n};var Lh=Os;Os.default=Os;var Df=class{static{l(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Zb=Df;Df.default=Df;var oO=Zb,kf=class{static{l(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new oO(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Nh=kf;kf.default=kf;var hf=39,Iy=34,ma=92,Ry=47,ga=10,gs=32,ya=12,ba=9,va=13,aO=91,lO=93,cO=40,uO=41,fO=123,hO=125,dO=59,pO=42,mO=58,gO=64,wa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Sa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,yO=/.[\r\n"'(/\\]/,Ay=/[\da-f]/i,bO=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,C=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=C}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=C)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case ga:case gs:case ba:case va:case ya:{a=v;do a+=1,o=r.charCodeAt(a);while(o===gs||o===ga||o===ba||o===va||o===ya);S=["space",r.slice(v,a)],v=a-1;break}case aO:case lO:case fO:case hO:case mO:case dO:case uO:{let re=String.fromCharCode(o);S=[re,re,v];break}case cO:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==hf&&w!==Iy&&w!==gs&&w!==ga&&w!==ba&&w!==ya&&w!==va){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===ma;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||yO.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case hf:case Iy:{u=o===hf?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===ma;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case gO:{wa.lastIndex=v+1,wa.test(r),wa.lastIndex===0?a=r.length-1:a=wa.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case ma:{for(a=v,d=!0;r.charCodeAt(a+1)===ma;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==Ry&&o!==gs&&o!==ga&&o!==ba&&o!==va&&o!==ya&&(a+=1,Ay.test(r.charAt(a)))){for(;Ay.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===gs&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===Ry&&r.charCodeAt(v+1)===pO?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(Sa.lastIndex=v+1,Sa.test(r),Sa.lastIndex===0?a=r.length-1:a=Sa.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer"),Jb=Nn,za=class extends Jb{static{l(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Dh=za;za.default=za;Jb.registerAtRule(za);var Qb=Nn,ev,tv,gi=class extends Qb{static{l(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ev(new tv,this,e).stringify()}};gi.registerLazyResult=n=>{ev=n};gi.registerProcessor=n=>{tv=n};var Bs=gi;gi.default=gi;Qb.registerRoot(gi);var _s={comma(n){return _s.split(n,[","],!0)},space(n){let e=[" ",`
|
|
47
|
-
`," "];return _s.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},rv=_s;_s.default=_s;var nv=Nn,vO=rv,Ga=class extends nv{static{l(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},kh=Ga;Ga.default=Ga;nv.registerRule(Ga);var wO=hl,SO=bO,EO=pl,CO=Dh,xO=Bs,Oy=kh,_y={empty:!0,space:!0};function MO(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(MO,"findLastWithPosition$1");var TO=class{static{l(this,"Parser")}constructor(e){this.input=e,this.root=new xO,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new CO;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new EO;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=SO(this.input)}decl(e,t){let r=new wO;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||MO(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Oy;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!_y[g]&&!_y[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new Oy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},IO=TO,RO=Nn,AO=IO,OO=dl;function ja(n,e){let t=new OO(n,e),r=new AO(t);try{r.parse()}catch(i){throw i}return r.root}l(ja,"parse$3$1");var Ph=ja;ja.default=ja;RO.registerParse(ja);var{isClean:gr,my:_O}=Hs,LO=Hb,NO=ul,DO=Nn,kO=Lh;var Ly=Nh,PO=Ph,FO=Bs,$O={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},HO={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},BO={Once:!0,postcssPlugin:!0,prepare:!0},yi=0;function ys(n){return typeof n=="object"&&typeof n.then=="function"}l(ys,"isPromise$1");function iv(n){let e=!1,t=$O[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,yi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,yi,t+"Exit"]:[t,t+"Exit"]}l(iv,"getEvents$1");function Ny(n){let e;return n.type==="document"?e=["Document",yi,"DocumentExit"]:n.type==="root"?e=["Root",yi,"RootExit"]:e=iv(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(Ny,"toStack$1");function Pf(n){return n[gr]=!1,n.nodes&&n.nodes.forEach(e=>Pf(e)),n}l(Pf,"cleanMarks$1");var Ff={},bi=class sv{static{l(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Pf(t);else if(t instanceof sv||t instanceof Ly)i=Pf(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=PO;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[_O]&&DO.rebuild(i)}this.result=new Ly(e,i,r),this.helpers={...Ff,postcss:Ff,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!HO[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!BO[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(ys(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[gr];){e[gr]=!0;let t=[Ny(e)];for(;t.length>0;){let r=this.visitTick(t);if(ys(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ys(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=NO;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new LO(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ys(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[gr];)e[gr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ys(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[gr]){u[gr]=!0,e.push(Ny(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===yi){r.nodes&&r.nodes.length&&(r[gr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[gr]=!0;let t=iv(e);for(let r of t)if(r===yi)e.nodes&&e.each(i=>{i[gr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};bi.registerPostcss=n=>{Ff=n};var ov=bi;bi.default=bi;FO.registerLazyResult(bi);kO.registerLazyResult(bi);var WO=Hb,UO=ul;var VO=Ph,zO=Nh,$f=class{static{l(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=UO;this.result=new zO(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new WO(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=VO;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},GO=$f;$f.default=$f;var jO=GO,qO=ov,YO=Lh,KO=Bs,Ls=class{static{l(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new jO(this,e,t):new qO(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},XO=Ls;Ls.default=Ls;KO.registerProcessor(Ls);YO.registerProcessor(Ls);var ZO=hl,JO=Db,QO=pl,e_=Dh,t_=dl,r_=Bs,n_=kh;function Ns(n,e){if(Array.isArray(n))return n.map(i=>Ns(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:t_.prototype};o.map&&(o.map={...o.map,__proto__:JO.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>Ns(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new r_(r);if(r.type==="decl")return new ZO(r);if(r.type==="rule")return new n_(r);if(r.type==="comment")return new QO(r);if(r.type==="atrule")return new e_(r);throw new Error("Unknown node type: "+n.type)}l(Ns,"fromJSON$1$1");var i_=Ns;Ns.default=Ns;var s_=Ah,av=hl,o_=ov,a_=Nn,Fh=XO,l_=ul,c_=i_,lv=Lh,u_=Zb,cv=pl,uv=Dh,f_=Nh,h_=dl,d_=Ph,p_=rv,fv=kh,hv=Bs,m_=fl;function Ae(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Fh(n)}l(Ae,"postcss$3");Ae.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
45
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Fa(e.file),i;this.mapOpts.sourcesContent===!1?(i=new kb(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),rO&&tO&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Pa.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pa({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Pa({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,f,d)=>{if(this.css+=u,f&&d!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
|
|
46
|
+
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Fa(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Fa(Fb(r,this.mapOpts.annotation)));let i=Pb(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new eO(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Iy){let r=Iy(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;$b==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Hb=nO,iO=pl,kf=class extends iO{static{l(this,"Comment")}constructor(e){super(e),this.type="comment"}},yl=kf;kf.default=kf;var{isClean:Bb,my:Wb}=Hs,Ub=ml,Vb=yl,sO=pl,zb,_h,Lh,Gb;function jb(n){return n.map(e=>(e.nodes&&(e.nodes=jb(e.nodes)),delete e.source,e))}l(jb,"cleanSource$1");function qb(n){if(n[Bb]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)qb(e)}l(qb,"markDirtyUp$1");var Fr=class Yb extends sO{static{l(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=jb(zb(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Ub(e)]}else if(e.selector)e=[new _h(e)];else if(e.name)e=[new Lh(e)];else if(e.text)e=[new Vb(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Wb]||Yb.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Bb]&&qb(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Fr.registerParse=n=>{zb=n};Fr.registerRule=n=>{_h=n};Fr.registerAtRule=n=>{Lh=n};Fr.registerRoot=n=>{Gb=n};var Nn=Fr;Fr.default=Fr;Fr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Lh.prototype):n.type==="rule"?Object.setPrototypeOf(n,_h.prototype):n.type==="decl"?Object.setPrototypeOf(n,Ub.prototype):n.type==="comment"?Object.setPrototypeOf(n,Vb.prototype):n.type==="root"&&Object.setPrototypeOf(n,Gb.prototype),n[Wb]=!0,n.nodes&&n.nodes.forEach(e=>{Fr.rebuild(e)})};var oO=Nn,Kb,Xb,Os=class extends oO{static{l(this,"Document2")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Kb(new Xb,this,e).stringify()}};Os.registerLazyResult=n=>{Kb=n};Os.registerProcessor=n=>{Xb=n};var Nh=Os;Os.default=Os;var Pf=class{static{l(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Zb=Pf;Pf.default=Pf;var aO=Zb,Ff=class{static{l(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new aO(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Dh=Ff;Ff.default=Ff;var pf=39,Ry=34,ga=92,Ay=47,ya=10,gs=32,ba=12,va=9,wa=13,lO=91,cO=93,uO=40,fO=41,hO=123,dO=125,pO=59,mO=42,gO=58,yO=64,Sa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ea=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bO=/.[\r\n"'(/\\]/,Oy=/[\da-f]/i,vO=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,E=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=E}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=E)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case ya:case gs:case va:case wa:case ba:{a=v;do a+=1,o=r.charCodeAt(a);while(o===gs||o===ya||o===va||o===wa||o===ba);S=["space",r.slice(v,a)],v=a-1;break}case lO:case cO:case hO:case dO:case gO:case pO:case fO:{let re=String.fromCharCode(o);S=[re,re,v];break}case uO:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==pf&&w!==Ry&&w!==gs&&w!==ya&&w!==va&&w!==ba&&w!==wa){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===ga;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||bO.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case pf:case Ry:{u=o===pf?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===ga;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case yO:{Sa.lastIndex=v+1,Sa.test(r),Sa.lastIndex===0?a=r.length-1:a=Sa.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case ga:{for(a=v,d=!0;r.charCodeAt(a+1)===ga;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==Ay&&o!==gs&&o!==ya&&o!==va&&o!==wa&&o!==ba&&(a+=1,Oy.test(r.charAt(a)))){for(;Oy.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===gs&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===Ay&&r.charCodeAt(v+1)===mO?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(Ea.lastIndex=v+1,Ea.test(r),Ea.lastIndex===0?a=r.length-1:a=Ea.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer"),Jb=Nn,qa=class extends Jb{static{l(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},kh=qa;qa.default=qa;Jb.registerAtRule(qa);var Qb=Nn,ev,tv,yi=class extends Qb{static{l(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new ev(new tv,this,e).stringify()}};yi.registerLazyResult=n=>{ev=n};yi.registerProcessor=n=>{tv=n};var Bs=yi;yi.default=yi;Qb.registerRoot(yi);var _s={comma(n){return _s.split(n,[","],!0)},space(n){let e=[" ",`
|
|
47
|
+
`," "];return _s.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},rv=_s;_s.default=_s;var nv=Nn,wO=rv,Ya=class extends nv{static{l(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return wO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Ph=Ya;Ya.default=Ya;nv.registerRule(Ya);var SO=ml,EO=vO,CO=yl,xO=kh,MO=Bs,_y=Ph,Ly={empty:!0,space:!0};function TO(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(TO,"findLastWithPosition$1");var IO=class{static{l(this,"Parser")}constructor(e){this.input=e,this.root=new MO,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new xO;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new CO;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=EO(this.input)}decl(e,t){let r=new SO;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||TO(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new _y;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!Ly[g]&&!Ly[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new _y;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},RO=IO,AO=Nn,OO=RO,_O=gl;function Ka(n,e){let t=new _O(n,e),r=new OO(t);try{r.parse()}catch(i){throw i}return r.root}l(Ka,"parse$3$1");var Fh=Ka;Ka.default=Ka;AO.registerParse(Ka);var{isClean:gr,my:LO}=Hs,NO=Hb,DO=dl,kO=Nn,PO=Nh;var Ny=Dh,FO=Fh,$O=Bs,HO={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},BO={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},WO={Once:!0,postcssPlugin:!0,prepare:!0},bi=0;function ys(n){return typeof n=="object"&&typeof n.then=="function"}l(ys,"isPromise$1");function iv(n){let e=!1,t=HO[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,bi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,bi,t+"Exit"]:[t,t+"Exit"]}l(iv,"getEvents$1");function Dy(n){let e;return n.type==="document"?e=["Document",bi,"DocumentExit"]:n.type==="root"?e=["Root",bi,"RootExit"]:e=iv(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(Dy,"toStack$1");function $f(n){return n[gr]=!1,n.nodes&&n.nodes.forEach(e=>$f(e)),n}l($f,"cleanMarks$1");var Hf={},vi=class sv{static{l(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=$f(t);else if(t instanceof sv||t instanceof Ny)i=$f(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=FO;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[LO]&&kO.rebuild(i)}this.result=new Ny(e,i,r),this.helpers={...Hf,postcss:Hf,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!BO[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!WO[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(ys(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[gr];){e[gr]=!0;let t=[Dy(e)];for(;t.length>0;){let r=this.visitTick(t);if(ys(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ys(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=DO;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new NO(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ys(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[gr];)e[gr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ys(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[gr]){u[gr]=!0,e.push(Dy(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===bi){r.nodes&&r.nodes.length&&(r[gr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[gr]=!0;let t=iv(e);for(let r of t)if(r===bi)e.nodes&&e.each(i=>{i[gr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};vi.registerPostcss=n=>{Hf=n};var ov=vi;vi.default=vi;$O.registerLazyResult(vi);PO.registerLazyResult(vi);var UO=Hb,VO=dl;var zO=Fh,GO=Dh,Bf=class{static{l(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=VO;this.result=new GO(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new UO(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=zO;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},jO=Bf;Bf.default=Bf;var qO=jO,YO=ov,KO=Nh,XO=Bs,Ls=class{static{l(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new qO(this,e,t):new YO(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},ZO=Ls;Ls.default=Ls;XO.registerProcessor(Ls);KO.registerProcessor(Ls);var JO=ml,QO=Db,e_=yl,t_=kh,r_=gl,n_=Bs,i_=Ph;function Ns(n,e){if(Array.isArray(n))return n.map(i=>Ns(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:r_.prototype};o.map&&(o.map={...o.map,__proto__:QO.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>Ns(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new n_(r);if(r.type==="decl")return new JO(r);if(r.type==="rule")return new i_(r);if(r.type==="comment")return new e_(r);if(r.type==="atrule")return new t_(r);throw new Error("Unknown node type: "+n.type)}l(Ns,"fromJSON$1$1");var s_=Ns;Ns.default=Ns;var o_=Oh,av=ml,a_=ov,l_=Nn,$h=ZO,c_=dl,u_=s_,lv=Nh,f_=Zb,cv=yl,uv=kh,h_=Dh,d_=gl,p_=Fh,m_=rv,fv=Ph,hv=Bs,g_=pl;function Ae(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new $h(n)}l(Ae,"postcss$3");Ae.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
48
48
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
49
|
-
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new Fh().version,u}l(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,u,f){return Ae([i(f)]).process(a,u)},i},"plugin");Ae.stringify=l_;Ae.parse=d_;Ae.fromJSON=c_;Ae.list=p_;Ae.comment=n=>new cv(n);Ae.atRule=n=>new uv(n);Ae.decl=n=>new av(n);Ae.rule=n=>new fv(n);Ae.root=n=>new hv(n);Ae.document=n=>new lv(n);Ae.CssSyntaxError=s_;Ae.Declaration=av;Ae.Container=a_;Ae.Processor=Fh;Ae.Document=lv;Ae.Comment=cv;Ae.Warning=u_;Ae.AtRule=uv;Ae.Result=f_;Ae.Input=h_;Ae.Rule=fv;Ae.Root=hv;Ae.Node=m_;o_.registerPostcss(Ae);var g_=Ae;Ae.default=Ae;var Ge=RA(g_);Ge.stringify;Ge.fromJSON;Ge.plugin;Ge.parse;Ge.list;Ge.document;Ge.comment;Ge.atRule;Ge.rule;Ge.decl;Ge.root;Ge.CssSyntaxError;Ge.Declaration;Ge.Container;Ge.Processor;Ge.Document;Ge.Comment;Ge.Warning;Ge.AtRule;Ge.Result;Ge.Input;Ge.Rule;Ge.Root;Ge.Node;var Dy={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 y_(n){let e=Dy[n.tagName]?Dy[n.tagName]:n.tagName;return e==="link"&&n.attributes._cssText&&(e="style"),e}l(y_,"getTagName");function ml(n,e){let t=e?.stylesWithHoverClass.get(n);if(t)return t;let i=Ge([TA,IA]).process(n).css;return e?.stylesWithHoverClass.set(n,i),i}l(ml,"adaptCssForReplay");function ky(){return{stylesWithHoverClass:new Map}}l(ky,"createCache");function b_(n,e,t,r){let i=[];for(let a of n.childNodes)a.type===de.Text&&i.push(a);let o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));for(let a=0;a<i.length;a++){let u=i[a],f=o[a];u&&f&&(u.textContent=t?ml(f,r):f)}}l(b_,"applyCssSplits");function v_(n,e,t,r){let{doc:i,hackCss:o,cache:a}=r;n.childNodes.length?b_(n,t,o,a):(o&&(t=ml(t,a)),e.appendChild(i.createTextNode(t)))}l(v_,"buildStyleNode");function w_(n,e){var t;let{doc:r,hackCss:i,cache:o}=e;switch(n.type){case de.Document:return r.implementation.createDocument(null,"",null);case de.DocumentType:return r.implementation.createDocumentType(n.name||"html",n.publicId,n.systemId);case de.Element:{let a=y_(n),u;n.isSVG?u=r.createElementNS("http://www.w3.org/2000/svg",a):(n.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(n.tagName)&&r.defaultView.customElements.define(n.tagName,class extends r.defaultView.HTMLElement{}),u=r.createElement(a));let f={};for(let d in n.attributes){if(!Object.prototype.hasOwnProperty.call(n.attributes,d))continue;let p=n.attributes[d];if(!(a==="option"&&d==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),d.startsWith("rr_")){f[d]=p;continue}if(typeof p=="string"){if(a==="style"&&d==="_cssText"){v_(n,u,p,e);continue}else if(a==="textarea"&&d==="value"){u.appendChild(r.createTextNode(p)),n.childNodes=[];continue}}try{if(n.isSVG&&d==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",d,p.toString());else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")u.setAttribute("_"+d,p.toString());else if(a==="meta"&&n.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content"){u.setAttribute("csp-content",p.toString());continue}else a==="link"&&(n.attributes.rel==="preload"||n.attributes.rel==="modulepreload")&&n.attributes.as==="script"||a==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&n.attributes.href.endsWith(".js")||(a==="img"&&n.attributes.srcset&&n.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",n.attributes.srcset):u.setAttribute(d,p.toString()))}catch{}}}for(let d in f){let p=f[d];if(a==="canvas"&&d==="rr_dataURL"){let g=r.createElement("img");g.onload=()=>{let y=u.getContext("2d");y&&y.drawImage(g,0,0,g.width,g.height)},g.src=p.toString(),u.RRNodeType&&(u.rr_dataURL=p.toString())}else if(a==="img"&&d==="rr_dataURL"){let g=u;g.currentSrc.startsWith("data:")||(g.setAttribute("rrweb-original-src",n.attributes.src),g.src=p.toString())}if(d==="rr_width")u.style.setProperty("width",p.toString());else if(d==="rr_height")u.style.setProperty("height",p.toString());else if(d==="rr_mediaCurrentTime"&&typeof p=="number")u.currentTime=p;else if(d==="rr_mediaState")switch(p){case"played":u.play().catch(g=>console.warn("media playback error",g));break;case"paused":u.pause();break}else d==="rr_mediaPlaybackRate"&&typeof p=="number"?u.playbackRate=p:d==="rr_mediaMuted"&&typeof p=="boolean"?u.muted=p:d==="rr_mediaLoop"&&typeof p=="boolean"?u.loop=p:d==="rr_mediaVolume"&&typeof p=="number"?u.volume=p:d==="rr_open_mode"&&u.setAttribute("rr_open_mode",p)}if(n.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case de.Text:return n.isStyle&&i?r.createTextNode(ml(n.textContent,o)):r.createTextNode(n.textContent);case de.CDATA:return r.createCDATASection(n.textContent);case de.Comment:return r.createComment(n.textContent);default:return null}}l(w_,"buildNode");function Ms(n,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:u}=e;if(r.has(n.id)){let d=r.getNode(n.id),p=r.getMeta(d);if(tA(p,n))return r.getNode(n.id)}let f=w_(n,{doc:t,hackCss:o,cache:u});if(!f)return null;if(n.rootId&&r.getNode(n.rootId)!==t&&r.replace(n.rootId,t),n.type===de.Document&&(t.close(),t.open(),n.compatMode==="BackCompat"&&n.childNodes&&n.childNodes[0].type!==de.DocumentType&&(n.childNodes[0].type===de.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),r.add(f,n),(n.type===de.Document||n.type===de.Element)&&!i)for(let d of n.childNodes){let p=Ms(d,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:a,cache:u});if(!p){console.warn("Failed to rebuild",d);continue}if(d.isShadow&&xh(f)&&f.shadowRoot)f.shadowRoot.appendChild(p);else if(n.type===de.Document&&d.type==de.Element){let g=p,y=null;g.childNodes.forEach(w=>{w.nodeName==="BODY"&&(y=w)}),y?(g.removeChild(y),f.appendChild(p),g.appendChild(y)):f.appendChild(p)}else f.appendChild(p);a&&a(p,d.id)}return f}l(Ms,"buildNodeWithSN");function S_(n,e){function t(r){e(r)}l(t,"walk");for(let r of n.getIds())n.has(r)&&t(n.getNode(r))}l(S_,"visit");function E_(n,e){let t=e.getMeta(n);if(t?.type!==de.Element)return;let r=n;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}l(E_,"handleScroll");function C_(n,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:a,mirror:u=new Rs}=e,f=Ms(n,{doc:t,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return S_(u,d=>{r&&r(d),E_(d,u)}),f}l(C_,"rebuild");var x_=Object.defineProperty,M_=l((n,e,t)=>e in n?x_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp2"),J=l((n,e,t)=>M_(n,typeof e!="symbol"?e+"":e,t),"__publicField2"),T_=Object.defineProperty,I_=l((n,e,t)=>e in n?T_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp22"),Py=l((n,e,t)=>I_(n,typeof e!="symbol"?e+"":e,t),"__publicField22"),R_=class{static{l(this,"Mirror2")}constructor(){Py(this,"idNodeMap",new Map),Py(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function A_(){return new R_}l(A_,"createMirror$1");function O_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}l(O_,"getDefaultExportFromCjs");function __(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=l(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:l(function(){return n[r]},"get")})}),t}l(__,"getAugmentedNamespace");var $h={exports:{}},ze=String,dv=l(function(){return{isColorSupported:!1,reset:ze,bold:ze,dim:ze,italic:ze,underline:ze,inverse:ze,hidden:ze,strikethrough:ze,black:ze,red:ze,green:ze,yellow:ze,blue:ze,magenta:ze,cyan:ze,white:ze,gray:ze,bgBlack:ze,bgRed:ze,bgGreen:ze,bgYellow:ze,bgBlue:ze,bgMagenta:ze,bgCyan:ze,bgWhite:ze}},"create");$h.exports=dv();$h.exports.createColors=dv;var L_=$h.exports,N_={},D_=Object.freeze(Object.defineProperty({__proto__:null,default:N_},Symbol.toStringTag,{value:"Module"})),ar=__(D_),Fy=L_,$y=ar,Hf=class pv extends Error{static{l(this,"CssSyntaxError2")}constructor(e,t,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,pv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Fy.isColorSupported),$y&&e&&(t=$y(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=Fy.createColors(!0);u=l(y=>d(g(y)),"mark"),f=l(y=>p(y),"aside")}else u=f=l(d=>d,"aside");return r.slice(i,o).map((d,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let w=f(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+d+`
|
|
49
|
+
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new $h().version,u}l(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,u,f){return Ae([i(f)]).process(a,u)},i},"plugin");Ae.stringify=c_;Ae.parse=p_;Ae.fromJSON=u_;Ae.list=m_;Ae.comment=n=>new cv(n);Ae.atRule=n=>new uv(n);Ae.decl=n=>new av(n);Ae.rule=n=>new fv(n);Ae.root=n=>new hv(n);Ae.document=n=>new lv(n);Ae.CssSyntaxError=o_;Ae.Declaration=av;Ae.Container=l_;Ae.Processor=$h;Ae.Document=lv;Ae.Comment=cv;Ae.Warning=f_;Ae.AtRule=uv;Ae.Result=h_;Ae.Input=d_;Ae.Rule=fv;Ae.Root=hv;Ae.Node=g_;a_.registerPostcss(Ae);var y_=Ae;Ae.default=Ae;var Ge=AA(y_);Ge.stringify;Ge.fromJSON;Ge.plugin;Ge.parse;Ge.list;Ge.document;Ge.comment;Ge.atRule;Ge.rule;Ge.decl;Ge.root;Ge.CssSyntaxError;Ge.Declaration;Ge.Container;Ge.Processor;Ge.Document;Ge.Comment;Ge.Warning;Ge.AtRule;Ge.Result;Ge.Input;Ge.Rule;Ge.Root;Ge.Node;var ky={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 b_(n){let e=ky[n.tagName]?ky[n.tagName]:n.tagName;return e==="link"&&n.attributes._cssText&&(e="style"),e}l(b_,"getTagName");function bl(n,e){let t=e?.stylesWithHoverClass.get(n);if(t)return t;let r=n;try{r=Ge([IA,RA]).process(n).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e?.stylesWithHoverClass.set(n,r),r}l(bl,"adaptCssForReplay");function Py(){return{stylesWithHoverClass:new Map}}l(Py,"createCache");function v_(n,e,t,r){let i=[];for(let f of n.childNodes)f.type===ue.Text&&i.push(f);let o=e.split("/* rr_split */");for(;o.length>1&&o.length>i.length;)o.splice(-2,2,o.slice(-2).join(""));let a="";t&&(a=bl(o.join(""),r));let u=0;for(let f=0;f<i.length&&f!==o.length;f++){let d=i[f];if(!t)d.textContent=o[f];else if(f<o.length-1){let p=u,g=o[f+1].length;g=Math.min(g,30);let y=!1;for(;g>2;g--){let w=o[f+1].substring(0,g),S=a.substring(u).indexOf(w);if(y=S!==-1,y){p+=S;break}}y||(p+=o[f].length),d.textContent=a.substring(u,p),u=p}else d.textContent=a.substring(u)}}l(v_,"applyCssSplits");function w_(n,e,t,r){let{doc:i,hackCss:o,cache:a}=r;n.childNodes.length?v_(n,t,o,a):(o&&(t=bl(t,a)),e.appendChild(i.createTextNode(t)))}l(w_,"buildStyleNode");function S_(n,e){var t;let{doc:r,hackCss:i,cache:o}=e;switch(n.type){case ue.Document:return r.implementation.createDocument(null,"",null);case ue.DocumentType:return r.implementation.createDocumentType(n.name||"html",n.publicId,n.systemId);case ue.Element:{let a=b_(n),u;n.isSVG?u=r.createElementNS("http://www.w3.org/2000/svg",a):(n.isCustom&&((t=r.defaultView)!=null&&t.customElements)&&!r.defaultView.customElements.get(n.tagName)&&r.defaultView.customElements.define(n.tagName,class extends r.defaultView.HTMLElement{}),u=r.createElement(a));let f={};for(let d in n.attributes){if(!Object.prototype.hasOwnProperty.call(n.attributes,d))continue;let p=n.attributes[d];if(!(a==="option"&&d==="selected"&&p===!1)&&p!==null){if(p===!0&&(p=""),d.startsWith("rr_")){f[d]=p;continue}if(typeof p=="string"){if(a==="style"&&d==="_cssText"){w_(n,u,p,e);continue}else if(a==="textarea"&&d==="value"){u.appendChild(r.createTextNode(p)),n.childNodes=[];continue}}try{if(n.isSVG&&d==="xlink:href")u.setAttributeNS("http://www.w3.org/1999/xlink",d,p.toString());else if(d==="onload"||d==="onclick"||d.substring(0,7)==="onmouse")u.setAttribute("_"+d,p.toString());else if(a==="meta"&&n.attributes["http-equiv"]==="Content-Security-Policy"&&d==="content"){u.setAttribute("csp-content",p.toString());continue}else a==="link"&&(n.attributes.rel==="preload"&&n.attributes.as==="script"||n.attributes.rel==="modulepreload")||a==="link"&&n.attributes.rel==="prefetch"&&typeof n.attributes.href=="string"&&Ih(n.attributes.href)==="js"||(a==="img"&&n.attributes.srcset&&n.attributes.rr_dataURL?u.setAttribute("rrweb-original-srcset",n.attributes.srcset):u.setAttribute(d,p.toString()))}catch{}}}for(let d in f){let p=f[d];if(a==="canvas"&&d==="rr_dataURL"){let g=r.createElement("img");g.onload=()=>{let y=u.getContext("2d");y&&y.drawImage(g,0,0,g.width,g.height)},g.src=p.toString(),u.RRNodeType&&(u.rr_dataURL=p.toString())}else if(a==="img"&&d==="rr_dataURL"){let g=u;g.currentSrc.startsWith("data:")||(g.setAttribute("rrweb-original-src",n.attributes.src),g.src=p.toString())}if(d==="rr_width")u.style.setProperty("width",p.toString());else if(d==="rr_height")u.style.setProperty("height",p.toString());else if(d==="rr_mediaCurrentTime"&&typeof p=="number")u.currentTime=p;else if(d==="rr_mediaState")switch(p){case"played":u.play().catch(g=>console.warn("media playback error",g));break;case"paused":u.pause();break}else d==="rr_mediaPlaybackRate"&&typeof p=="number"?u.playbackRate=p:d==="rr_mediaMuted"&&typeof p=="boolean"?u.muted=p:d==="rr_mediaLoop"&&typeof p=="boolean"?u.loop=p:d==="rr_mediaVolume"&&typeof p=="number"?u.volume=p:d==="rr_open_mode"&&u.setAttribute("rr_open_mode",p)}if(n.isShadowHost)if(!u.shadowRoot)u.attachShadow({mode:"open"});else for(;u.shadowRoot.firstChild;)u.shadowRoot.removeChild(u.shadowRoot.firstChild);return u}case ue.Text:return n.isStyle&&i?r.createTextNode(bl(n.textContent,o)):r.createTextNode(n.textContent);case ue.CDATA:return r.createCDATASection(n.textContent);case ue.Comment:return r.createComment(n.textContent);default:return null}}l(S_,"buildNode");function Ms(n,e){let{doc:t,mirror:r,skipChild:i=!1,hackCss:o=!0,afterAppend:a,cache:u}=e;if(r.has(n.id)){let d=r.getNode(n.id),p=r.getMeta(d);if(rA(p,n))return r.getNode(n.id)}let f=S_(n,{doc:t,hackCss:o,cache:u});if(!f)return null;if(n.rootId&&r.getNode(n.rootId)!==t&&r.replace(n.rootId,t),n.type===ue.Document&&(t.close(),t.open(),n.compatMode==="BackCompat"&&n.childNodes&&n.childNodes[0].type!==ue.DocumentType&&(n.childNodes[0].type===ue.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),r.add(f,n),(n.type===ue.Document||n.type===ue.Element)&&!i)for(let d of n.childNodes){let p=Ms(d,{doc:t,mirror:r,skipChild:!1,hackCss:o,afterAppend:a,cache:u});if(!p){console.warn("Failed to rebuild",d);continue}if(d.isShadow&&Th(f)&&f.shadowRoot)f.shadowRoot.appendChild(p);else if(n.type===ue.Document&&d.type==ue.Element){let g=p,y=null;g.childNodes.forEach(w=>{w.nodeName==="BODY"&&(y=w)}),y?(g.removeChild(y),f.appendChild(p),g.appendChild(y)):f.appendChild(p)}else if(n.type===ue.Document&&d.type===ue.DocumentType)try{f.firstChild&&f.firstChild.nodeType===1?f.insertBefore(p,f.firstChild):f.appendChild(p)}catch{console.error("fix for DOCTYPE inserting failed")}else f.appendChild(p);a&&a(p,d.id)}return f}l(Ms,"buildNodeWithSN");function E_(n,e){function t(r){e(r)}l(t,"walk");for(let r of n.getIds())n.has(r)&&t(n.getNode(r))}l(E_,"visit");function C_(n,e){let t=e.getMeta(n);if(t?.type!==ue.Element)return;let r=n;for(let i in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,i)&&i.startsWith("rr_")))continue;let o=t.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=o),i==="rr_scrollTop"&&(r.scrollTop=o)}}l(C_,"handleScroll");function x_(n,e){let{doc:t,onVisit:r,hackCss:i=!0,afterAppend:o,cache:a,mirror:u=new Rs}=e,f=Ms(n,{doc:t,mirror:u,skipChild:!1,hackCss:i,afterAppend:o,cache:a});return E_(u,d=>{r&&r(d),C_(d,u)}),f}l(x_,"rebuild");var M_=Object.defineProperty,T_=l((n,e,t)=>e in n?M_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp2"),J=l((n,e,t)=>T_(n,typeof e!="symbol"?e+"":e,t),"__publicField2"),I_=Object.defineProperty,R_=l((n,e,t)=>e in n?I_(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp22"),Fy=l((n,e,t)=>R_(n,typeof e!="symbol"?e+"":e,t),"__publicField22"),A_=class{static{l(this,"Mirror2")}constructor(){Fy(this,"idNodeMap",new Map),Fy(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function O_(){return new A_}l(O_,"createMirror$1");function __(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}l(__,"getDefaultExportFromCjs");function L_(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=l(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a22");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:l(function(){return n[r]},"get")})}),t}l(L_,"getAugmentedNamespace");var Hh={exports:{}},ze=String,dv=l(function(){return{isColorSupported:!1,reset:ze,bold:ze,dim:ze,italic:ze,underline:ze,inverse:ze,hidden:ze,strikethrough:ze,black:ze,red:ze,green:ze,yellow:ze,blue:ze,magenta:ze,cyan:ze,white:ze,gray:ze,bgBlack:ze,bgRed:ze,bgGreen:ze,bgYellow:ze,bgBlue:ze,bgMagenta:ze,bgCyan:ze,bgWhite:ze}},"create");Hh.exports=dv();Hh.exports.createColors=dv;var N_=Hh.exports,D_={},k_=Object.freeze(Object.defineProperty({__proto__:null,default:D_},Symbol.toStringTag,{value:"Module"})),ar=L_(k_),$y=N_,Hy=ar,Wf=class pv extends Error{static{l(this,"CssSyntaxError2")}constructor(e,t,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,pv)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=$y.isColorSupported),Hy&&e&&(t=Hy(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=$y.createColors(!0);u=l(y=>d(g(y)),"mark"),f=l(y=>p(y),"aside")}else u=f=l(d=>d,"aside");return r.slice(i,o).map((d,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let w=f(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+d+`
|
|
50
50
|
`+w+u("^")}return" "+f(y)+d}).join(`
|
|
51
51
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
52
52
|
|
|
53
53
|
`+e+`
|
|
54
|
-
`),this.name+": "+this.message+e}},
|
|
54
|
+
`),this.name+": "+this.message+e}},Bh=Wf;Wf.default=Wf;var Ws={};Ws.isClean=Symbol("isClean");Ws.my=Symbol("my");var By={after:`
|
|
55
55
|
`,beforeClose:`
|
|
56
56
|
`,beforeComment:`
|
|
57
57
|
`,beforeDecl:`
|
|
58
58
|
`,beforeOpen:" ",beforeRule:`
|
|
59
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
60
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return
|
|
59
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function P_(n){return n[0].toUpperCase()+n.slice(1)}l(P_,"capitalize");var Uf=class{static{l(this,"Stringifier2")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
60
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return By[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+P_(r);this[u]?i=this[u](a,e):a.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=By[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
61
61
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
62
62
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
63
63
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
64
64
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
65
|
-
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},mv=
|
|
66
|
-
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
67
|
-
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[
|
|
65
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},mv=Uf;Uf.default=Uf;var F_=mv;function Vf(n,e){new F_(e).stringify(n)}l(Vf,"stringify$4");var vl=Vf;Vf.default=Vf;var{isClean:Ca,my:$_}=Ws,H_=Bh,B_=mv,W_=vl;function zf(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>zf(a,t)):(o==="object"&&i!==null&&(i=zf(i)),t[r]=i)}return t}l(zf,"cloneNode");var Gf=class{static{l(this,"Node3")}constructor(e={}){this.raws={},this[Ca]=!1,this[$_]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=zf(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new H_(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ca]){this[Ca]=!1;let e=this;for(;e=e.parent;)e[Ca]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
|
|
66
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new B_().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,t);else if(a==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[a]={end:u.end,inputId:f,start:u.start}}else r[a]=u}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=W_){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},wl=Gf;Gf.default=Gf;var U_=wl,jf=class extends U_{static{l(this,"Declaration2")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Sl=jf;jf.default=jf;var V_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",z_=l((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet"),G_=l((n=21)=>{let e="",t=n;for(;t--;)e+=V_[Math.random()*64|0];return e},"nanoid$1"),j_={nanoid:G_,customAlphabet:z_},{SourceMapConsumer:Wy,SourceMapGenerator:Uy}=ar,{existsSync:q_,readFileSync:Y_}=ar,{dirname:mf,join:K_}=ar;function X_(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}l(X_,"fromBase64");var qf=class{static{l(this,"PreviousMap2")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=mf(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Wy(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return X_(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=mf(e),q_(e))return this.mapFile=e,Y_(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Wy)return Uy.fromSourceMap(t).toString();if(t instanceof Uy)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=K_(mf(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},gv=qf;qf.default=qf;var{SourceMapConsumer:Z_,SourceMapGenerator:J_}=ar,{fileURLToPath:Vy,pathToFileURL:xa}=ar,{isAbsolute:Yf,resolve:Kf}=ar,{nanoid:Q_}=j_,gf=ar,zy=Bh,eL=gv,yf=Symbol("fromOffsetCache"),tL=!!(Z_&&J_),Gy=!!(Kf&&Yf),Xa=class{static{l(this,"Input2")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Gy||/^\w+:\/\//.test(t.from)||Yf(t.from)?this.file=t.from:this.file=Kf(t.from)),Gy&&tL){let r=new eL(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Q_(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,a,u;if(t&&typeof t=="object"){let d=t,p=r;if(typeof d.offset=="number"){let g=this.fromOffset(d.offset);t=g.line,r=g.col}else t=d.line,r=d.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let d=this.fromOffset(t);t=d.line,r=d.col}let f=this.origin(t,r,a,u);return f?o=new zy(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new zy(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:u,line:a},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:a,line:t,source:this.css},this.file&&(xa&&(o.input.url=xa(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[yf])r=this[yf];else{let o=this.css.split(`
|
|
67
|
+
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[yf]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,a;for(;i<o;)if(a=i+(o-i>>1),e<r[a])o=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Kf(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;Yf(a.source)?f=xa(a.source):f=new URL(a.source,this.map.consumer().sourceRoot||xa(this.map.mapFile));let d={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:f.toString()};if(f.protocol==="file:")if(Vy)d.file=Vy(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},El=Xa;Xa.default=Xa;gf&&gf.registerInput&&gf.registerInput(Xa);var{SourceMapConsumer:yv,SourceMapGenerator:$a}=ar,{dirname:Ha,relative:bv,resolve:vv,sep:wv}=ar,{pathToFileURL:jy}=ar,rL=El,nL=!!(yv&&$a),iL=!!(Ha&&vv&&bv&&wv),sL=class{static{l(this,"MapGenerator2")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
68
68
|
`;this.css.includes(`\r
|
|
69
69
|
`)&&(t=`\r
|
|
70
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root
|
|
71
|
-
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?$a(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=$a(vv(r,this.mapOpts.annotation)));let i=bv(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new tL(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Gy){let r=Gy(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;wv==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Sv=iL,sL=yl,Yf=class extends sL{static{l(this,"Comment2")}constructor(e){super(e),this.type="comment"}},wl=Yf;Yf.default=Yf;var{isClean:Ev,my:Cv}=Ws,xv=bl,Mv=wl,oL=yl,Tv,Bh,Wh,Iv;function Rv(n){return n.map(e=>(e.nodes&&(e.nodes=Rv(e.nodes)),delete e.source,e))}l(Rv,"cleanSource");function Av(n){if(n[Ev]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Av(e)}l(Av,"markDirtyUp");var $r=class Ov extends oL{static{l(this,"Container2")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Rv(Tv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xv(e)]}else if(e.selector)e=[new Bh(e)];else if(e.name)e=[new Wh(e)];else if(e.text)e=[new Mv(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Cv]||Ov.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ev]&&Av(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};$r.registerParse=n=>{Tv=n};$r.registerRule=n=>{Bh=n};$r.registerAtRule=n=>{Wh=n};$r.registerRoot=n=>{Iv=n};var Dn=$r;$r.default=$r;$r.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Wh.prototype):n.type==="rule"?Object.setPrototypeOf(n,Bh.prototype):n.type==="decl"?Object.setPrototypeOf(n,xv.prototype):n.type==="comment"?Object.setPrototypeOf(n,Mv.prototype):n.type==="root"&&Object.setPrototypeOf(n,Iv.prototype),n[Cv]=!0,n.nodes&&n.nodes.forEach(e=>{$r.rebuild(e)})};var aL=Dn,_v,Lv,Ds=class extends aL{static{l(this,"Document23")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _v(new Lv,this,e).stringify()}};Ds.registerLazyResult=n=>{_v=n};Ds.registerProcessor=n=>{Lv=n};var Uh=Ds;Ds.default=Ds;var Kf=class{static{l(this,"Warning2")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Nv=Kf;Kf.default=Kf;var lL=Nv,Xf=class{static{l(this,"Result2")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new lL(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Vh=Xf;Xf.default=Xf;var gf=39,jy=34,xa=92,qy=47,Ma=10,bs=32,Ta=12,Ia=9,Ra=13,cL=91,uL=93,fL=40,hL=41,dL=123,pL=125,mL=59,gL=42,yL=58,bL=64,Aa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Oa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vL=/.[\r\n"'(/\\]/,Yy=/[\da-f]/i,wL=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,C=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=C}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=C)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case Ma:case bs:case Ia:case Ra:case Ta:{a=v;do a+=1,o=r.charCodeAt(a);while(o===bs||o===Ma||o===Ia||o===Ra||o===Ta);S=["space",r.slice(v,a)],v=a-1;break}case cL:case uL:case dL:case pL:case yL:case mL:case hL:{let re=String.fromCharCode(o);S=[re,re,v];break}case fL:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==gf&&w!==jy&&w!==bs&&w!==Ma&&w!==Ia&&w!==Ta&&w!==Ra){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===xa;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||vL.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case gf:case jy:{u=o===gf?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===xa;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case bL:{Aa.lastIndex=v+1,Aa.test(r),Aa.lastIndex===0?a=r.length-1:a=Aa.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case xa:{for(a=v,d=!0;r.charCodeAt(a+1)===xa;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==qy&&o!==bs&&o!==Ma&&o!==Ia&&o!==Ra&&o!==Ta&&(a+=1,Yy.test(r.charAt(a)))){for(;Yy.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===bs&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===qy&&r.charCodeAt(v+1)===gL?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(Oa.lastIndex=v+1,Oa.test(r),Oa.lastIndex===0?a=r.length-1:a=Oa.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer2"),Dv=Dn,Ya=class extends Dv{static{l(this,"AtRule2")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},zh=Ya;Ya.default=Ya;Dv.registerAtRule(Ya);var kv=Dn,Pv,Fv,vi=class extends kv{static{l(this,"Root2")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Pv(new Fv,this,e).stringify()}};vi.registerLazyResult=n=>{Pv=n};vi.registerProcessor=n=>{Fv=n};var Us=vi;vi.default=vi;kv.registerRoot(vi);var ks={comma(n){return ks.split(n,[","],!0)},space(n){let e=[" ",`
|
|
72
|
-
`," "];return ks.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},$v=ks;ks.default=ks;var Hv=Dn,SL=$v,Ka=class extends Hv{static{l(this,"Rule2")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return SL.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Gh=Ka;Ka.default=Ka;Hv.registerRule(Ka);var EL=bl,CL=wL,xL=wl,ML=zh,TL=Us,Ky=Gh,Xy={empty:!0,space:!0};function IL(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(IL,"findLastWithPosition");var RL=class{static{l(this,"Parser2")}constructor(e){this.input=e,this.root=new TL,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ML;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new xL;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=CL(this.input)}decl(e,t){let r=new EL;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||IL(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Ky;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!Xy[g]&&!Xy[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new Ky;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},AL=RL,OL=Dn,_L=AL,LL=vl;function Xa(n,e){let t=new LL(n,e),r=new _L(t);try{r.parse()}catch(i){throw i}return r.root}l(Xa,"parse$3");var jh=Xa;Xa.default=Xa;OL.registerParse(Xa);var{isClean:yr,my:NL}=Ws,DL=Sv,kL=gl,PL=Dn,FL=Uh;var Zy=Vh,$L=jh,HL=Us,BL={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},WL={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},UL={Once:!0,postcssPlugin:!0,prepare:!0},wi=0;function vs(n){return typeof n=="object"&&typeof n.then=="function"}l(vs,"isPromise");function Bv(n){let e=!1,t=BL[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,wi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,wi,t+"Exit"]:[t,t+"Exit"]}l(Bv,"getEvents");function Jy(n){let e;return n.type==="document"?e=["Document",wi,"DocumentExit"]:n.type==="root"?e=["Root",wi,"RootExit"]:e=Bv(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(Jy,"toStack");function Zf(n){return n[yr]=!1,n.nodes&&n.nodes.forEach(e=>Zf(e)),n}l(Zf,"cleanMarks");var Jf={},Si=class Wv{static{l(this,"LazyResult2")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Zf(t);else if(t instanceof Wv||t instanceof Zy)i=Zf(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=$L;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[NL]&&PL.rebuild(i)}this.result=new Zy(e,i,r),this.helpers={...Jf,postcss:Jf,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!WL[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!UL[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(vs(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];){e[yr]=!0;let t=[Jy(e)];for(;t.length>0;){let r=this.visitTick(t);if(vs(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return vs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=kL;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new DL(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(vs(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];)e[yr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(vs(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yr]){u[yr]=!0,e.push(Jy(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===wi){r.nodes&&r.nodes.length&&(r[yr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yr]=!0;let t=Bv(e);for(let r of t)if(r===wi)e.nodes&&e.each(i=>{i[yr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Si.registerPostcss=n=>{Jf=n};var Uv=Si;Si.default=Si;HL.registerLazyResult(Si);FL.registerLazyResult(Si);var VL=Sv,zL=gl;var GL=jh,jL=Vh,Qf=class{static{l(this,"NoWorkResult2")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=zL;this.result=new jL(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new VL(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=GL;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},qL=Qf;Qf.default=Qf;var YL=qL,KL=Uv,XL=Uh,ZL=Us,Ps=class{static{l(this,"Processor2")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new YL(this,e,t):new KL(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},JL=Ps;Ps.default=Ps;ZL.registerProcessor(Ps);XL.registerProcessor(Ps);var QL=bl,eN=gv,tN=wl,rN=zh,nN=vl,iN=Us,sN=Gh;function Fs(n,e){if(Array.isArray(n))return n.map(i=>Fs(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:nN.prototype};o.map&&(o.map={...o.map,__proto__:eN.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>Fs(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new iN(r);if(r.type==="decl")return new QL(r);if(r.type==="rule")return new sN(r);if(r.type==="comment")return new tN(r);if(r.type==="atrule")return new rN(r);throw new Error("Unknown node type: "+n.type)}l(Fs,"fromJSON$1");var oN=Fs;Fs.default=Fs;var aN=Hh,Vv=bl,lN=Uv,cN=Dn,qh=JL,uN=gl,fN=oN,zv=Uh,hN=Nv,Gv=wl,jv=zh,dN=Vh,pN=vl,mN=jh,gN=$v,qv=Gh,Yv=Us,yN=yl;function Oe(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new qh(n)}l(Oe,"postcss");Oe.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
70
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Ha(e.file),i;this.mapOpts.sourcesContent===!1?(i=new yv(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),iL&&nL&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=$a.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new $a({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new $a({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,f,d)=>{if(this.css+=u,f&&d!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
|
|
71
|
+
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ha(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ha(vv(r,this.mapOpts.annotation)));let i=bv(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new rL(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(jy){let r=jy(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;wv==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Sv=sL,oL=wl,Xf=class extends oL{static{l(this,"Comment2")}constructor(e){super(e),this.type="comment"}},Cl=Xf;Xf.default=Xf;var{isClean:Ev,my:Cv}=Ws,xv=Sl,Mv=Cl,aL=wl,Tv,Wh,Uh,Iv;function Rv(n){return n.map(e=>(e.nodes&&(e.nodes=Rv(e.nodes)),delete e.source,e))}l(Rv,"cleanSource");function Av(n){if(n[Ev]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)Av(e)}l(Av,"markDirtyUp");var $r=class Ov extends aL{static{l(this,"Container2")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Rv(Tv(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new xv(e)]}else if(e.selector)e=[new Wh(e)];else if(e.name)e=[new Uh(e)];else if(e.text)e=[new Mv(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Cv]||Ov.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Ev]&&Av(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};$r.registerParse=n=>{Tv=n};$r.registerRule=n=>{Wh=n};$r.registerAtRule=n=>{Uh=n};$r.registerRoot=n=>{Iv=n};var Dn=$r;$r.default=$r;$r.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,Uh.prototype):n.type==="rule"?Object.setPrototypeOf(n,Wh.prototype):n.type==="decl"?Object.setPrototypeOf(n,xv.prototype):n.type==="comment"?Object.setPrototypeOf(n,Mv.prototype):n.type==="root"&&Object.setPrototypeOf(n,Iv.prototype),n[Cv]=!0,n.nodes&&n.nodes.forEach(e=>{$r.rebuild(e)})};var lL=Dn,_v,Lv,Ds=class extends lL{static{l(this,"Document23")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new _v(new Lv,this,e).stringify()}};Ds.registerLazyResult=n=>{_v=n};Ds.registerProcessor=n=>{Lv=n};var Vh=Ds;Ds.default=Ds;var Zf=class{static{l(this,"Warning2")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Nv=Zf;Zf.default=Zf;var cL=Nv,Jf=class{static{l(this,"Result2")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new cL(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},zh=Jf;Jf.default=Jf;var bf=39,qy=34,Ma=92,Yy=47,Ta=10,bs=32,Ia=12,Ra=9,Aa=13,uL=91,fL=93,hL=40,dL=41,pL=123,mL=125,gL=59,yL=42,bL=58,vL=64,Oa=/[\t\n\f\r "#'()/;[\\\]{}]/g,_a=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wL=/.[\r\n"'(/\\]/,Ky=/[\da-f]/i,SL=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,E=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=E}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=E)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case Ta:case bs:case Ra:case Aa:case Ia:{a=v;do a+=1,o=r.charCodeAt(a);while(o===bs||o===Ta||o===Ra||o===Aa||o===Ia);S=["space",r.slice(v,a)],v=a-1;break}case uL:case fL:case pL:case mL:case bL:case gL:case dL:{let re=String.fromCharCode(o);S=[re,re,v];break}case hL:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==bf&&w!==qy&&w!==bs&&w!==Ta&&w!==Ra&&w!==Ia&&w!==Aa){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===Ma;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||wL.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case bf:case qy:{u=o===bf?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===Ma;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case vL:{Oa.lastIndex=v+1,Oa.test(r),Oa.lastIndex===0?a=r.length-1:a=Oa.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case Ma:{for(a=v,d=!0;r.charCodeAt(a+1)===Ma;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==Yy&&o!==bs&&o!==Ta&&o!==Ra&&o!==Aa&&o!==Ia&&(a+=1,Ky.test(r.charAt(a)))){for(;Ky.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===bs&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===Yy&&r.charCodeAt(v+1)===yL?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(_a.lastIndex=v+1,_a.test(r),_a.lastIndex===0?a=r.length-1:a=_a.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer2"),Dv=Dn,Za=class extends Dv{static{l(this,"AtRule2")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Gh=Za;Za.default=Za;Dv.registerAtRule(Za);var kv=Dn,Pv,Fv,wi=class extends kv{static{l(this,"Root2")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Pv(new Fv,this,e).stringify()}};wi.registerLazyResult=n=>{Pv=n};wi.registerProcessor=n=>{Fv=n};var Us=wi;wi.default=wi;kv.registerRoot(wi);var ks={comma(n){return ks.split(n,[","],!0)},space(n){let e=[" ",`
|
|
72
|
+
`," "];return ks.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},$v=ks;ks.default=ks;var Hv=Dn,EL=$v,Ja=class extends Hv{static{l(this,"Rule2")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return EL.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},jh=Ja;Ja.default=Ja;Hv.registerRule(Ja);var CL=Sl,xL=SL,ML=Cl,TL=Gh,IL=Us,Xy=jh,Zy={empty:!0,space:!0};function RL(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(RL,"findLastWithPosition");var AL=class{static{l(this,"Parser2")}constructor(e){this.input=e,this.root=new IL,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new TL;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new ML;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=xL(this.input)}decl(e,t){let r=new CL;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||RL(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Xy;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!Zy[g]&&!Zy[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new Xy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},OL=AL,_L=Dn,LL=OL,NL=El;function Qa(n,e){let t=new NL(n,e),r=new LL(t);try{r.parse()}catch(i){throw i}return r.root}l(Qa,"parse$3");var qh=Qa;Qa.default=Qa;_L.registerParse(Qa);var{isClean:yr,my:DL}=Ws,kL=Sv,PL=vl,FL=Dn,$L=Vh;var Jy=zh,HL=qh,BL=Us,WL={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},UL={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},VL={Once:!0,postcssPlugin:!0,prepare:!0},Si=0;function vs(n){return typeof n=="object"&&typeof n.then=="function"}l(vs,"isPromise");function Bv(n){let e=!1,t=WL[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Si,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Si,t+"Exit"]:[t,t+"Exit"]}l(Bv,"getEvents");function Qy(n){let e;return n.type==="document"?e=["Document",Si,"DocumentExit"]:n.type==="root"?e=["Root",Si,"RootExit"]:e=Bv(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(Qy,"toStack");function Qf(n){return n[yr]=!1,n.nodes&&n.nodes.forEach(e=>Qf(e)),n}l(Qf,"cleanMarks");var eh={},Ei=class Wv{static{l(this,"LazyResult2")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Qf(t);else if(t instanceof Wv||t instanceof Jy)i=Qf(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=HL;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[DL]&&FL.rebuild(i)}this.result=new Jy(e,i,r),this.helpers={...eh,postcss:eh,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!UL[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!VL[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(vs(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];){e[yr]=!0;let t=[Qy(e)];for(;t.length>0;){let r=this.visitTick(t);if(vs(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return vs(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=PL;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new kL(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(vs(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[yr];)e[yr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(vs(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[yr]){u[yr]=!0,e.push(Qy(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===Si){r.nodes&&r.nodes.length&&(r[yr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[yr]=!0;let t=Bv(e);for(let r of t)if(r===Si)e.nodes&&e.each(i=>{i[yr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ei.registerPostcss=n=>{eh=n};var Uv=Ei;Ei.default=Ei;BL.registerLazyResult(Ei);$L.registerLazyResult(Ei);var zL=Sv,GL=vl;var jL=qh,qL=zh,th=class{static{l(this,"NoWorkResult2")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=GL;this.result=new qL(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new zL(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=jL;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},YL=th;th.default=th;var KL=YL,XL=Uv,ZL=Vh,JL=Us,Ps=class{static{l(this,"Processor2")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new KL(this,e,t):new XL(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},QL=Ps;Ps.default=Ps;JL.registerProcessor(Ps);ZL.registerProcessor(Ps);var eN=Sl,tN=gv,rN=Cl,nN=Gh,iN=El,sN=Us,oN=jh;function Fs(n,e){if(Array.isArray(n))return n.map(i=>Fs(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:iN.prototype};o.map&&(o.map={...o.map,__proto__:tN.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>Fs(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new sN(r);if(r.type==="decl")return new eN(r);if(r.type==="rule")return new oN(r);if(r.type==="comment")return new rN(r);if(r.type==="atrule")return new nN(r);throw new Error("Unknown node type: "+n.type)}l(Fs,"fromJSON$1");var aN=Fs;Fs.default=Fs;var lN=Bh,Vv=Sl,cN=Uv,uN=Dn,Yh=QL,fN=vl,hN=aN,zv=Vh,dN=Nv,Gv=Cl,jv=Gh,pN=zh,mN=El,gN=qh,yN=$v,qv=jh,Yv=Us,bN=wl;function Oe(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new Yh(n)}l(Oe,"postcss");Oe.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
73
73
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
74
|
-
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new qh().version,u}l(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,u,f){return Oe([i(f)]).process(a,u)},i},"plugin2");Oe.stringify=uN;Oe.parse=mN;Oe.fromJSON=fN;Oe.list=gN;Oe.comment=n=>new Gv(n);Oe.atRule=n=>new jv(n);Oe.decl=n=>new Vv(n);Oe.rule=n=>new qv(n);Oe.root=n=>new Yv(n);Oe.document=n=>new zv(n);Oe.CssSyntaxError=aN;Oe.Declaration=Vv;Oe.Container=cN;Oe.Processor=qh;Oe.Document=zv;Oe.Comment=Gv;Oe.Warning=hN;Oe.AtRule=jv;Oe.Result=dN;Oe.Input=pN;Oe.Rule=qv;Oe.Root=Yv;Oe.Node=yN;lN.registerPostcss(Oe);var bN=Oe;Oe.default=Oe;var Ke=O_(bN);Ke.stringify;Ke.fromJSON;Ke.plugin;Ke.parse;Ke.list;Ke.document;Ke.comment;Ke.atRule;Ke.rule;Ke.decl;Ke.root;Ke.CssSyntaxError;Ke.Declaration;Ke.Container;Ke.Processor;Ke.Document;Ke.Comment;Ke.Warning;Ke.AtRule;Ke.Result;Ke.Input;Ke.Rule;Ke.Root;Ke.Node;var Ce=(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",n))(Ce||{});function vN(n){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return n.replace(i,"").split(t).forEach(function(o){if(o){let a=o.split(r);a.length>1&&(e[eh(a[0].trim())]=a[1].trim())}}),e}l(vN,"parseCSSText");function Qy(n){let e=[];for(let t in n){let r=n[t];if(typeof r!="string")continue;let i=CN(t);e.push(`${i}: ${r};`)}return e.join(" ")}l(Qy,"toCSSText");var wN=/-([a-z])/g,SN=/^--[a-zA-Z0-9-]+$/,eh=l(n=>SN.test(n)?n:n.replace(wN,(e,t)=>t?t.toUpperCase():""),"camelize"),EN=/\B([A-Z])/g,CN=l(n=>n.replace(EN,"-$1").toLowerCase(),"hyphenate"),sr=class n{static{l(this,"BaseRRNode")}constructor(...e){J(this,"parentElement",null),J(this,"parentNode",null),J(this,"ownerDocument"),J(this,"firstChild",null),J(this,"lastChild",null),J(this,"previousSibling",null),J(this,"nextSibling",null),J(this,"ELEMENT_NODE",1),J(this,"TEXT_NODE",3),J(this,"nodeType"),J(this,"nodeName"),J(this,"RRNodeType")}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"}},th=class n extends sr{static{l(this,"BaseRRDocument")}constructor(...e){super(e),J(this,"nodeType",9),J(this,"nodeName","#document"),J(this,"compatMode","CSS1Compat"),J(this,"RRNodeType",Ce.Document),J(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===Ce.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===Ce.Element||t===Ce.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=Yh(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===Ce.Element||r===Ce.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=Kv(this,e,t);return i.parentElement=null,i}removeChild(e){return Xv(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new Za(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new Ei(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new Ja(e);return t.ownerDocument=this,t}createComment(e){let t=new Qa(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new el(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},Za=class extends sr{static{l(this,"BaseRRDocumentType")}constructor(e,t,r){super(),J(this,"nodeType",10),J(this,"RRNodeType",Ce.DocumentType),J(this,"name"),J(this,"publicId"),J(this,"systemId"),J(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},Ei=class extends sr{static{l(this,"BaseRRElement")}constructor(e){super(),J(this,"nodeType",1),J(this,"RRNodeType",Ce.Element),J(this,"tagName"),J(this,"attributes",{}),J(this,"shadowRoot",null),J(this,"scrollLeft"),J(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new ih(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?vN(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;let a=eh(r);i?e[a]=i:delete e[a],o==="important"&&(e[a]+=" !important"),this.attributes.style=Qy(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=eh(r),o=e[i]||"";return delete e[i],this.attributes.style=Qy(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Yh(this,e)}insertBefore(e,t){return Kv(this,e,t)}removeChild(e){return Xv(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},rh=class extends Ei{static{l(this,"BaseRRMediaElement")}constructor(){super(...arguments),J(this,"currentTime"),J(this,"volume"),J(this,"paused"),J(this,"muted"),J(this,"playbackRate"),J(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},nh=class extends Ei{static{l(this,"BaseRRDialogElement")}constructor(){super(...arguments),J(this,"tagName","DIALOG"),J(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},Ja=class extends sr{static{l(this,"BaseRRText")}constructor(e){super(),J(this,"nodeType",3),J(this,"nodeName","#text"),J(this,"RRNodeType",Ce.Text),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Qa=class extends sr{static{l(this,"BaseRRComment")}constructor(e){super(),J(this,"nodeType",8),J(this,"nodeName","#comment"),J(this,"RRNodeType",Ce.Comment),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},el=class extends sr{static{l(this,"BaseRRCDATASection")}constructor(e){super(),J(this,"nodeName","#cdata-section"),J(this,"nodeType",4),J(this,"RRNodeType",Ce.CDATA),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},ih=class{static{l(this,"ClassList")}constructor(e,t){if(J(this,"onChange"),J(this,"classes",[]),J(this,"add",(...r)=>{for(let i of r){let o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),J(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};function Yh(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}l(Yh,"appendChild");function Kv(n,e,t){if(!t)return Yh(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}l(Kv,"insertBefore");function Xv(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}l(Xv,"removeChild");var Ut=(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",n))(Ut||{}),sh={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},xN={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"},br=null;function tl(n,e,t,r=e.mirror||e.ownerDocument.mirror){n=MN(n,e,t,r),Zv(n,e,t,r),TN(n,e,t)}l(tl,"diff");function MN(n,e,t,r){var i;if(t.afterAppend&&!br&&(br=new WeakSet,setTimeout(()=>{br=null},0)),!Kh(n,e)){let o=rl(e,t.mirror,r);(i=n.parentNode)==null||i.replaceChild(o,n),n=o}switch(e.RRNodeType){case Ce.Document:{if(!ci(n,e,t.mirror,r)){let o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(n),n.close(),n.open(),t.mirror.add(n,o),br?.add(n))}break}case Ce.Element:{let o=n,a=e;switch(a.tagName){case"IFRAME":{let u=n.contentDocument;if(!u)break;tl(u,e.contentDocument,t,r);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Zv(o.shadowRoot,a.shadowRoot,t,r)),IN(o,a,r);break}}return n}l(MN,"diffBeforeUpdatingChildren");function TN(n,e,t){var r;switch(e.RRNodeType){case Ce.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case Ce.Element:{let i=n,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{let a=n,u=o;u.paused!==void 0&&(u.paused?a.pause():a.play()),u.muted!==void 0&&(a.muted=u.muted),u.volume!==void 0&&(a.volume=u.volume),u.currentTime!==void 0&&(a.currentTime=u.currentTime),u.playbackRate!==void 0&&(a.playbackRate=u.playbackRate),u.loop!==void 0&&(a.loop=u.loop);break}case"CANVAS":{let a=e;if(a.rr_dataURL!==null){let u=document.createElement("img");u.onload=()=>{let f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=a.rr_dataURL}a.canvasMutations.forEach(u=>t.applyCanvas(u.event,u.mutation,n));break}case"STYLE":{let a=i.sheet;a&&e.rules.forEach(u=>t.applyStyleSheetMutation(u,a));break}case"DIALOG":{let a=i,u=o,f=a.open,d=a.matches("dialog:modal"),p=u.open,g=u.isModal,y=d!==g,w=f!==p;if((y||f&&w)&&a.close(),p&&(w||y))try{g?a.showModal():a.show()}catch(S){console.warn(S)}break}}break}case Ce.Text:case Ce.Comment:case Ce.CDATA:{n.textContent!==e.data&&(n.textContent=e.data);break}}br?.has(n)&&(br.delete(n),(r=t.afterAppend)==null||r.call(t,n,t.mirror.getId(n)))}l(TN,"diffAfterUpdatingChildren");function IN(n,e,t){let r=n.attributes,i=e.attributes;for(let o in i){let a=i[o],u=t.getMeta(e);if(u?.isSVG&&sh[o])n.setAttributeNS(sh[o],o,a);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){let f=document.createElement("img");f.src=a,f.onload=()=>{let d=n.getContext("2d");d&&d.drawImage(f,0,0,f.width,f.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{n.setAttribute(o,a)}catch(f){console.warn(f)}}}for(let{name:o}of Array.from(r))o in i||n.removeAttribute(o);e.scrollLeft&&(n.scrollLeft=e.scrollLeft),e.scrollTop&&(n.scrollTop=e.scrollTop)}l(IN,"diffProps");function Zv(n,e,t,r){let i=Array.from(n.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let a=0,u=i.length-1,f=0,d=o.length-1,p=i[a],g=i[u],y=o[f],w=o[d],S,C;for(;a<=u&&f<=d;)if(p===void 0)p=i[++a];else if(g===void 0)g=i[--u];else if(ci(p,y,t.mirror,r))p=i[++a],y=o[++f];else if(ci(g,w,t.mirror,r))g=i[--u],w=o[--d];else if(ci(p,w,t.mirror,r)){try{n.insertBefore(p,g.nextSibling)}catch(A){console.warn(A)}p=i[++a],w=o[--d]}else if(ci(g,y,t.mirror,r)){try{n.insertBefore(g,p)}catch(A){console.warn(A)}g=i[--u],y=o[++f]}else{if(!S){S={};for(let T=a;T<=u;T++){let L=i[T];L&&t.mirror.hasNode(L)&&(S[t.mirror.getId(L)]=T)}}C=S[r.getId(y)];let A=i[C];if(C!==void 0&&A&&ci(A,y,t.mirror,r)){try{n.insertBefore(A,p)}catch(T){console.warn(T)}i[C]=void 0}else{let T=rl(y,t.mirror,r);n.nodeName==="#document"&&p&&(T.nodeType===T.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||T.nodeType===T.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(n.removeChild(p),t.mirror.removeNodeFromMap(p),p=i[++a]);try{n.insertBefore(T,p||null)}catch(L){console.warn(L)}}y=o[++f]}if(a>u){let A=o[d+1],T=null;for(A&&(T=t.mirror.getNode(r.getId(A)));f<=d;++f){let L=rl(o[f],t.mirror,r);try{n.insertBefore(L,T)}catch(V){console.warn(V)}}}else if(f>d)for(;a<=u;a++){let A=i[a];if(!(!A||A.parentNode!==n))try{n.removeChild(A),t.mirror.removeNodeFromMap(A)}catch(T){console.warn(T)}}let v=n.firstChild,M=e.firstChild;for(;v!==null&&M!==null;)tl(v,M,t,r),v=v.nextSibling,M=M.nextSibling}l(Zv,"diffChildren");function rl(n,e,t){let r=t.getId(n),i=t.getMeta(n),o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Kh(o,n))return o;switch(n.RRNodeType){case Ce.Document:o=new Document;break;case Ce.DocumentType:o=document.implementation.createDocumentType(n.name,n.publicId,n.systemId);break;case Ce.Element:{let a=n.tagName.toLowerCase();a=xN[a]||a,i&&"isSVG"in i&&i?.isSVG?o=document.createElementNS(sh.svg,a):o=document.createElement(n.tagName);break}case Ce.Text:o=document.createTextNode(n.data);break;case Ce.Comment:o=document.createComment(n.data);break;case Ce.CDATA:o=document.createCDATASection(n.data);break}i&&e.add(o,{...i});try{br?.add(o)}catch{}return o}l(rl,"createOrGetNode");function Kh(n,e){return n.nodeType!==e.nodeType?!1:n.nodeType!==n.ELEMENT_NODE||n.tagName.toUpperCase()===e.tagName}l(Kh,"sameNodeType");function ci(n,e,t,r){let i=t.getId(n),o=r.getId(e);return i===-1||i!==o?!1:Kh(n,e)}l(ci,"nodeMatching");var Ci=class n extends th{static{l(this,"RRDocument")}constructor(e){super(),J(this,"UNSERIALIZED_STARTING_ID",-2),J(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),J(this,"mirror",DN()),J(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new RN(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new oh(t);break;case"IFRAME":r=new uh(t,this.mirror);break;case"CANVAS":r=new lh(t);break;case"STYLE":r=new ch(t);break;case"DIALOG":r=new ah(t);break;default:r=new xi(t);break}return r.ownerDocument=this,r}createComment(e){let t=new ON(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new _N(e);return t.ownerDocument=this,t}createTextNode(e){let t=new AN(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}},RN=Za,xi=class extends Ei{static{l(this,"RRElement")}constructor(){super(...arguments),J(this,"inputData",null),J(this,"scrollData",null)}},oh=class extends rh{static{l(this,"RRMediaElement")}},ah=class extends nh{static{l(this,"RRDialogElement")}},lh=class extends xi{static{l(this,"RRCanvasElement")}constructor(){super(...arguments),J(this,"rr_dataURL",null),J(this,"canvasMutations",[])}getContext(){return null}},ch=class extends xi{static{l(this,"RRStyleElement")}constructor(){super(...arguments),J(this,"rules",[])}},uh=class extends xi{static{l(this,"RRIFrameElement")}constructor(e,t){super(e),J(this,"contentDocument",new Ci),this.contentDocument.mirror=t}},AN=Ja,ON=Qa,_N=el;function LN(n){return n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}l(LN,"getValidTagName");function Jv(n,e,t,r){let i;switch(n.nodeType){case Ut.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=n.compatMode);break;case Ut.DOCUMENT_TYPE_NODE:{let a=n;i=e.createDocumentType(a.name,a.publicId,a.systemId);break}case Ut.ELEMENT_NODE:{let a=n,u=LN(a);i=e.createElement(u);let f=i;for(let{name:d,value:p}of Array.from(a.attributes))f.attributes[d]=p;a.scrollLeft&&(f.scrollLeft=a.scrollLeft),a.scrollTop&&(f.scrollTop=a.scrollTop);break}case Ut.TEXT_NODE:i=e.createTextNode(n.textContent||"");break;case Ut.CDATA_SECTION_NODE:i=e.createCDATASection(n.data);break;case Ut.COMMENT_NODE:i=e.createComment(n.textContent||"");break;case Ut.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(n);return e instanceof Ci&&(o||(o=Qv(i,e.unserializedId),t.add(n,o)),e.mirror.add(i,{...o})),i}l(Jv,"buildFromNode");function NN(n,e=A_(),t=new Ci){function r(i,o){let a=Jv(i,t,e,o);if(a!==null)if(o?.nodeName!=="IFRAME"&&i.nodeType!==Ut.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){let u=i.contentDocument;u&&r(u,a)}else(i.nodeType===Ut.DOCUMENT_NODE||i.nodeType===Ut.ELEMENT_NODE||i.nodeType===Ut.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Ut.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(u=>r(u,a)))}return l(r,"walk2"),r(n,null),t}l(NN,"buildFromDom");function DN(){return new fh}l(DN,"createMirror");var fh=class{static{l(this,"Mirror22")}constructor(){J(this,"idNodeMap",new Map),J(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Qv(n,e){switch(n.RRNodeType){case Ce.Document:return{id:e,type:n.RRNodeType,childNodes:[]};case Ce.DocumentType:{let t=n;return{id:e,type:n.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case Ce.Element:return{id:e,type:n.RRNodeType,tagName:n.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ce.Text:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case Ce.Comment:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case Ce.CDATA:return{id:e,type:n.RRNodeType,textContent:""}}}l(Qv,"getDefaultSN");var eb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_a={},kN=l(()=>!!globalThis.Zone,"isAngularZonePresent");function Xh(n){if(_a[n])return _a[n];let e=globalThis[n],t=e.prototype,r=n in eb?eb[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in tb?tb[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!kN())return _a[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?_a[n]=d:t}catch{return t}}l(Xh,"getUntaintedPrototype");var yf={};function un(n,e,t){var r;let i=`${n}.${String(t)}`;if(yf[i])return yf[i].call(e);let o=Xh(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(yf[i]=a,a.call(e)):e[t]}l(un,"getUntaintedAccessor");var bf={};function ew(n,e,t){let r=`${n}.${String(t)}`;if(bf[r])return bf[r].bind(e);let o=Xh(n)[t];return typeof o!="function"?e[t]:(bf[r]=o,o.bind(e))}l(ew,"getUntaintedMethod");function PN(n){return un("Node",n,"childNodes")}l(PN,"childNodes");function FN(n){return un("Node",n,"parentNode")}l(FN,"parentNode");function $N(n){return un("Node",n,"parentElement")}l($N,"parentElement");function HN(n){return un("Node",n,"textContent")}l(HN,"textContent");function BN(n,e){return ew("Node",n,"contains")(e)}l(BN,"contains");function WN(n){return ew("Node",n,"getRootNode")()}l(WN,"getRootNode");function UN(n){return!n||!("host"in n)?null:un("ShadowRoot",n,"host")}l(UN,"host");function VN(n){return n.styleSheets}l(VN,"styleSheets");function zN(n){return!n||!("shadowRoot"in n)?null:un("Element",n,"shadowRoot")}l(zN,"shadowRoot");function GN(n,e){return un("Element",n,"querySelector")(e)}l(GN,"querySelector");function jN(n,e){return un("Element",n,"querySelectorAll")(e)}l(jN,"querySelectorAll");function tw(){return Xh("MutationObserver").constructor}l(tw,"mutationObserverCtor");var ve={childNodes:PN,parentNode:FN,parentElement:$N,textContent:HN,contains:BN,getRootNode:WN,host:UN,styleSheets:VN,shadowRoot:zN,querySelector:GN,querySelectorAll:jN,mutationObserver:tw};function Mt(n,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}l(Mt,"on");var ui=`Please stop import mirror directly. Instead of that,\r
|
|
74
|
+
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new Yh().version,u}l(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,u,f){return Oe([i(f)]).process(a,u)},i},"plugin2");Oe.stringify=fN;Oe.parse=gN;Oe.fromJSON=hN;Oe.list=yN;Oe.comment=n=>new Gv(n);Oe.atRule=n=>new jv(n);Oe.decl=n=>new Vv(n);Oe.rule=n=>new qv(n);Oe.root=n=>new Yv(n);Oe.document=n=>new zv(n);Oe.CssSyntaxError=lN;Oe.Declaration=Vv;Oe.Container=uN;Oe.Processor=Yh;Oe.Document=zv;Oe.Comment=Gv;Oe.Warning=dN;Oe.AtRule=jv;Oe.Result=pN;Oe.Input=mN;Oe.Rule=qv;Oe.Root=Yv;Oe.Node=bN;cN.registerPostcss(Oe);var vN=Oe;Oe.default=Oe;var Ke=__(vN);Ke.stringify;Ke.fromJSON;Ke.plugin;Ke.parse;Ke.list;Ke.document;Ke.comment;Ke.atRule;Ke.rule;Ke.decl;Ke.root;Ke.CssSyntaxError;Ke.Declaration;Ke.Container;Ke.Processor;Ke.Document;Ke.Comment;Ke.Warning;Ke.AtRule;Ke.Result;Ke.Input;Ke.Rule;Ke.Root;Ke.Node;var Ce=(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",n))(Ce||{});function wN(n){let e={},t=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return n.replace(i,"").split(t).forEach(function(o){if(o){let a=o.split(r);a.length>1&&(e[rh(a[0].trim())]=a[1].trim())}}),e}l(wN,"parseCSSText");function eb(n){let e=[];for(let t in n){let r=n[t];if(typeof r!="string")continue;let i=xN(t);e.push(`${i}: ${r};`)}return e.join(" ")}l(eb,"toCSSText");var SN=/-([a-z])/g,EN=/^--[a-zA-Z0-9-]+$/,rh=l(n=>EN.test(n)?n:n.replace(SN,(e,t)=>t?t.toUpperCase():""),"camelize"),CN=/\B([A-Z])/g,xN=l(n=>n.replace(CN,"-$1").toLowerCase(),"hyphenate"),sr=class n{static{l(this,"BaseRRNode")}constructor(...e){J(this,"parentElement",null),J(this,"parentNode",null),J(this,"ownerDocument"),J(this,"firstChild",null),J(this,"lastChild",null),J(this,"previousSibling",null),J(this,"nextSibling",null),J(this,"ELEMENT_NODE",1),J(this,"TEXT_NODE",3),J(this,"nodeType"),J(this,"nodeName"),J(this,"RRNodeType")}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"}},nh=class n extends sr{static{l(this,"BaseRRDocument")}constructor(...e){super(e),J(this,"nodeType",9),J(this,"nodeName","#document"),J(this,"compatMode","CSS1Compat"),J(this,"RRNodeType",Ce.Document),J(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===Ce.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===Ce.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){let t=e.RRNodeType;if((t===Ce.Element||t===Ce.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let r=Kh(this,e);return r.parentElement=null,r}insertBefore(e,t){let r=e.RRNodeType;if((r===Ce.Element||r===Ce.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===Ce.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let i=Kv(this,e,t);return i.parentElement=null,i}removeChild(e){return Xv(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){let r=this.createDocumentType("html",t,"");this.open(),this.appendChild(r)}}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new el(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=new Ci(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){let t=new tl(e);return t.ownerDocument=this,t}createComment(e){let t=new rl(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new nl(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}},el=class extends sr{static{l(this,"BaseRRDocumentType")}constructor(e,t,r){super(),J(this,"nodeType",10),J(this,"RRNodeType",Ce.DocumentType),J(this,"name"),J(this,"publicId"),J(this,"systemId"),J(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=r,this.nodeName=e}toString(){return"RRDocumentType"}},Ci=class extends sr{static{l(this,"BaseRRElement")}constructor(e){super(),J(this,"nodeType",1),J(this,"RRNodeType",Ce.Element),J(this,"tagName"),J(this,"attributes",{}),J(this,"shadowRoot",null),J(this,"scrollLeft"),J(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new oh(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let e=this.attributes.style?wN(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(r,i,o)=>{if(t.test(r))return;let a=rh(r);i?e[a]=i:delete e[a],o==="important"&&(e[a]+=" !important"),this.attributes.style=eb(e)},e.removeProperty=r=>{if(t.test(r))return"";let i=rh(r),o=e[i]||"";return delete e[i],this.attributes.style=eb(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,r){this.setAttribute(t,r)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return Kh(this,e)}insertBefore(e,t){return Kv(this,e,t)}removeChild(e){return Xv(this,e)}attachShadow(e){let t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(let t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}},ih=class extends Ci{static{l(this,"BaseRRMediaElement")}constructor(){super(...arguments),J(this,"currentTime"),J(this,"volume"),J(this,"paused"),J(this,"muted"),J(this,"playbackRate"),J(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},sh=class extends Ci{static{l(this,"BaseRRDialogElement")}constructor(){super(...arguments),J(this,"tagName","DIALOG"),J(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},tl=class extends sr{static{l(this,"BaseRRText")}constructor(e){super(),J(this,"nodeType",3),J(this,"nodeName","#text"),J(this,"RRNodeType",Ce.Text),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}},rl=class extends sr{static{l(this,"BaseRRComment")}constructor(e){super(),J(this,"nodeType",8),J(this,"nodeName","#comment"),J(this,"RRNodeType",Ce.Comment),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},nl=class extends sr{static{l(this,"BaseRRCDATASection")}constructor(e){super(),J(this,"nodeName","#cdata-section"),J(this,"nodeType",4),J(this,"RRNodeType",Ce.CDATA),J(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},oh=class{static{l(this,"ClassList")}constructor(e,t){if(J(this,"onChange"),J(this,"classes",[]),J(this,"add",(...r)=>{for(let i of r){let o=String(i);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),J(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){let r=e.trim().split(/\s+/);this.classes.push(...r)}this.onChange=t}};function Kh(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}l(Kh,"appendChild");function Kv(n,e,t){if(!t)return Kh(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}l(Kv,"insertBefore");function Xv(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}l(Xv,"removeChild");var Ut=(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",n))(Ut||{}),ah={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},MN={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"},br=null;function il(n,e,t,r=e.mirror||e.ownerDocument.mirror){n=TN(n,e,t,r),Zv(n,e,t,r),IN(n,e,t)}l(il,"diff");function TN(n,e,t,r){var i;if(t.afterAppend&&!br&&(br=new WeakSet,setTimeout(()=>{br=null},0)),!Xh(n,e)){let o=sl(e,t.mirror,r);(i=n.parentNode)==null||i.replaceChild(o,n),n=o}switch(e.RRNodeType){case Ce.Document:{if(!ui(n,e,t.mirror,r)){let o=r.getMeta(e);o&&(t.mirror.removeNodeFromMap(n),n.close(),n.open(),t.mirror.add(n,o),br?.add(n))}break}case Ce.Element:{let o=n,a=e;switch(a.tagName){case"IFRAME":{let u=n.contentDocument;if(!u)break;il(u,e.contentDocument,t,r);break}}a.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),Zv(o.shadowRoot,a.shadowRoot,t,r)),RN(o,a,r);break}}return n}l(TN,"diffBeforeUpdatingChildren");function IN(n,e,t){var r;switch(e.RRNodeType){case Ce.Document:{let i=e.scrollData;i&&t.applyScroll(i,!0);break}case Ce.Element:{let i=n,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{let a=n,u=o;u.paused!==void 0&&(u.paused?a.pause():a.play()),u.muted!==void 0&&(a.muted=u.muted),u.volume!==void 0&&(a.volume=u.volume),u.currentTime!==void 0&&(a.currentTime=u.currentTime),u.playbackRate!==void 0&&(a.playbackRate=u.playbackRate),u.loop!==void 0&&(a.loop=u.loop);break}case"CANVAS":{let a=e;if(a.rr_dataURL!==null){let u=document.createElement("img");u.onload=()=>{let f=i.getContext("2d");f&&f.drawImage(u,0,0,u.width,u.height)},u.src=a.rr_dataURL}a.canvasMutations.forEach(u=>t.applyCanvas(u.event,u.mutation,n));break}case"STYLE":{let a=i.sheet;a&&e.rules.forEach(u=>t.applyStyleSheetMutation(u,a));break}case"DIALOG":{let a=i,u=o,f=a.open,d=a.matches("dialog:modal"),p=u.open,g=u.isModal,y=d!==g,w=f!==p;if((y||f&&w)&&a.close(),p&&(w||y))try{g?a.showModal():a.show()}catch(S){console.warn(S)}break}}break}case Ce.Text:case Ce.Comment:case Ce.CDATA:{n.textContent!==e.data&&(n.textContent=e.data);break}}br?.has(n)&&(br.delete(n),(r=t.afterAppend)==null||r.call(t,n,t.mirror.getId(n)))}l(IN,"diffAfterUpdatingChildren");function RN(n,e,t){let r=n.attributes,i=e.attributes;for(let o in i){let a=i[o],u=t.getMeta(e);if(u?.isSVG&&ah[o])n.setAttributeNS(ah[o],o,a);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){let f=document.createElement("img");f.src=a,f.onload=()=>{let d=n.getContext("2d");d&&d.drawImage(f,0,0,f.width,f.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{n.setAttribute(o,a)}catch(f){console.warn(f)}}}for(let{name:o}of Array.from(r))o in i||n.removeAttribute(o);e.scrollLeft&&(n.scrollLeft=e.scrollLeft),e.scrollTop&&(n.scrollTop=e.scrollTop)}l(RN,"diffProps");function Zv(n,e,t,r){let i=Array.from(n.childNodes),o=e.childNodes;if(i.length===0&&o.length===0)return;let a=0,u=i.length-1,f=0,d=o.length-1,p=i[a],g=i[u],y=o[f],w=o[d],S,E;for(;a<=u&&f<=d;)if(p===void 0)p=i[++a];else if(g===void 0)g=i[--u];else if(ui(p,y,t.mirror,r))p=i[++a],y=o[++f];else if(ui(g,w,t.mirror,r))g=i[--u],w=o[--d];else if(ui(p,w,t.mirror,r)){try{n.insertBefore(p,g.nextSibling)}catch(A){console.warn(A)}p=i[++a],w=o[--d]}else if(ui(g,y,t.mirror,r)){try{n.insertBefore(g,p)}catch(A){console.warn(A)}g=i[--u],y=o[++f]}else{if(!S){S={};for(let T=a;T<=u;T++){let L=i[T];L&&t.mirror.hasNode(L)&&(S[t.mirror.getId(L)]=T)}}E=S[r.getId(y)];let A=i[E];if(E!==void 0&&A&&ui(A,y,t.mirror,r)){try{n.insertBefore(A,p)}catch(T){console.warn(T)}i[E]=void 0}else{let T=sl(y,t.mirror,r);n.nodeName==="#document"&&p&&(T.nodeType===T.DOCUMENT_TYPE_NODE&&p.nodeType===p.DOCUMENT_TYPE_NODE||T.nodeType===T.ELEMENT_NODE&&p.nodeType===p.ELEMENT_NODE)&&(n.removeChild(p),t.mirror.removeNodeFromMap(p),p=i[++a]);try{n.insertBefore(T,p||null)}catch(L){console.warn(L)}}y=o[++f]}if(a>u){let A=o[d+1],T=null;for(A&&(T=t.mirror.getNode(r.getId(A)));f<=d;++f){let L=sl(o[f],t.mirror,r);try{n.insertBefore(L,T)}catch(V){console.warn(V)}}}else if(f>d)for(;a<=u;a++){let A=i[a];if(!(!A||A.parentNode!==n))try{n.removeChild(A),t.mirror.removeNodeFromMap(A)}catch(T){console.warn(T)}}let v=n.firstChild,M=e.firstChild;for(;v!==null&&M!==null;)il(v,M,t,r),v=v.nextSibling,M=M.nextSibling}l(Zv,"diffChildren");function sl(n,e,t){let r=t.getId(n),i=t.getMeta(n),o=null;if(r>-1&&(o=e.getNode(r)),o!==null&&Xh(o,n))return o;switch(n.RRNodeType){case Ce.Document:o=new Document;break;case Ce.DocumentType:o=document.implementation.createDocumentType(n.name,n.publicId,n.systemId);break;case Ce.Element:{let a=n.tagName.toLowerCase();a=MN[a]||a,i&&"isSVG"in i&&i?.isSVG?o=document.createElementNS(ah.svg,a):o=document.createElement(n.tagName);break}case Ce.Text:o=document.createTextNode(n.data);break;case Ce.Comment:o=document.createComment(n.data);break;case Ce.CDATA:o=document.createCDATASection(n.data);break}i&&e.add(o,{...i});try{br?.add(o)}catch{}return o}l(sl,"createOrGetNode");function Xh(n,e){return n.nodeType!==e.nodeType?!1:n.nodeType!==n.ELEMENT_NODE||n.tagName.toUpperCase()===e.tagName}l(Xh,"sameNodeType");function ui(n,e,t,r){let i=t.getId(n),o=r.getId(e);return i===-1||i!==o?!1:Xh(n,e)}l(ui,"nodeMatching");var xi=class n extends nh{static{l(this,"RRDocument")}constructor(e){super(),J(this,"UNSERIALIZED_STARTING_ID",-2),J(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),J(this,"mirror",kN()),J(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,r){return new n}createDocumentType(e,t,r){let i=new AN(e,t,r);return i.ownerDocument=this,i}createElement(e){let t=e.toUpperCase(),r;switch(t){case"AUDIO":case"VIDEO":r=new lh(t);break;case"IFRAME":r=new hh(t,this.mirror);break;case"CANVAS":r=new uh(t);break;case"STYLE":r=new fh(t);break;case"DIALOG":r=new ch(t);break;default:r=new Mi(t);break}return r.ownerDocument=this,r}createComment(e){let t=new _N(e);return t.ownerDocument=this,t}createCDATASection(e){let t=new LN(e);return t.ownerDocument=this,t}createTextNode(e){let t=new ON(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}},AN=el,Mi=class extends Ci{static{l(this,"RRElement")}constructor(){super(...arguments),J(this,"inputData",null),J(this,"scrollData",null)}},lh=class extends ih{static{l(this,"RRMediaElement")}},ch=class extends sh{static{l(this,"RRDialogElement")}},uh=class extends Mi{static{l(this,"RRCanvasElement")}constructor(){super(...arguments),J(this,"rr_dataURL",null),J(this,"canvasMutations",[])}getContext(){return null}},fh=class extends Mi{static{l(this,"RRStyleElement")}constructor(){super(...arguments),J(this,"rules",[])}},hh=class extends Mi{static{l(this,"RRIFrameElement")}constructor(e,t){super(e),J(this,"contentDocument",new xi),this.contentDocument.mirror=t}},ON=tl,_N=rl,LN=nl;function NN(n){return n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}l(NN,"getValidTagName");function Jv(n,e,t,r){let i;switch(n.nodeType){case Ut.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=e,i.compatMode=n.compatMode);break;case Ut.DOCUMENT_TYPE_NODE:{let a=n;i=e.createDocumentType(a.name,a.publicId,a.systemId);break}case Ut.ELEMENT_NODE:{let a=n,u=NN(a);i=e.createElement(u);let f=i;for(let{name:d,value:p}of Array.from(a.attributes))f.attributes[d]=p;a.scrollLeft&&(f.scrollLeft=a.scrollLeft),a.scrollTop&&(f.scrollTop=a.scrollTop);break}case Ut.TEXT_NODE:i=e.createTextNode(n.textContent||"");break;case Ut.CDATA_SECTION_NODE:i=e.createCDATASection(n.data);break;case Ut.COMMENT_NODE:i=e.createComment(n.textContent||"");break;case Ut.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(n);return e instanceof xi&&(o||(o=Qv(i,e.unserializedId),t.add(n,o)),e.mirror.add(i,{...o})),i}l(Jv,"buildFromNode");function DN(n,e=O_(),t=new xi){function r(i,o){let a=Jv(i,t,e,o);if(a!==null)if(o?.nodeName!=="IFRAME"&&i.nodeType!==Ut.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(a),a.parentNode=o,a.parentElement=o),i.nodeName==="IFRAME"){let u=i.contentDocument;u&&r(u,a)}else(i.nodeType===Ut.DOCUMENT_NODE||i.nodeType===Ut.ELEMENT_NODE||i.nodeType===Ut.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Ut.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(u=>r(u,a)))}return l(r,"walk2"),r(n,null),t}l(DN,"buildFromDom");function kN(){return new dh}l(kN,"createMirror");var dh=class{static{l(this,"Mirror22")}constructor(){J(this,"idNodeMap",new Map),J(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Qv(n,e){switch(n.RRNodeType){case Ce.Document:return{id:e,type:n.RRNodeType,childNodes:[]};case Ce.DocumentType:{let t=n;return{id:e,type:n.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case Ce.Element:return{id:e,type:n.RRNodeType,tagName:n.tagName.toLowerCase(),attributes:{},childNodes:[]};case Ce.Text:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case Ce.Comment:return{id:e,type:n.RRNodeType,textContent:n.textContent||""};case Ce.CDATA:return{id:e,type:n.RRNodeType,textContent:""}}}l(Qv,"getDefaultSN");var tb={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},rb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},La={},PN=l(()=>!!globalThis.Zone,"isAngularZonePresent");function Zh(n){if(La[n])return La[n];let e=globalThis[n],t=e.prototype,r=n in tb?tb[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in rb?rb[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!PN())return La[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?La[n]=d:t}catch{return t}}l(Zh,"getUntaintedPrototype");var vf={};function un(n,e,t){var r;let i=`${n}.${String(t)}`;if(vf[i])return vf[i].call(e);let o=Zh(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(vf[i]=a,a.call(e)):e[t]}l(un,"getUntaintedAccessor");var wf={};function ew(n,e,t){let r=`${n}.${String(t)}`;if(wf[r])return wf[r].bind(e);let o=Zh(n)[t];return typeof o!="function"?e[t]:(wf[r]=o,o.bind(e))}l(ew,"getUntaintedMethod");function FN(n){return un("Node",n,"childNodes")}l(FN,"childNodes");function $N(n){return un("Node",n,"parentNode")}l($N,"parentNode");function HN(n){return un("Node",n,"parentElement")}l(HN,"parentElement");function BN(n){return un("Node",n,"textContent")}l(BN,"textContent");function WN(n,e){return ew("Node",n,"contains")(e)}l(WN,"contains");function UN(n){return ew("Node",n,"getRootNode")()}l(UN,"getRootNode");function VN(n){return!n||!("host"in n)?null:un("ShadowRoot",n,"host")}l(VN,"host");function zN(n){return n.styleSheets}l(zN,"styleSheets");function GN(n){return!n||!("shadowRoot"in n)?null:un("Element",n,"shadowRoot")}l(GN,"shadowRoot");function jN(n,e){return un("Element",n,"querySelector")(e)}l(jN,"querySelector");function qN(n,e){return un("Element",n,"querySelectorAll")(e)}l(qN,"querySelectorAll");function tw(){return Zh("MutationObserver").constructor}l(tw,"mutationObserverCtor");function kn(n,e,t){try{if(!(e in n))return()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r}}catch{return()=>{}}}l(kn,"patch");var ve={childNodes:FN,parentNode:$N,parentElement:HN,textContent:BN,contains:WN,getRootNode:UN,host:VN,styleSheets:zN,shadowRoot:GN,querySelector:jN,querySelectorAll:qN,mutationObserver:tw,patch:kn};function Mt(n,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(n,e,r),()=>t.removeEventListener(n,e,r)}l(Mt,"on");var fi=`Please stop import mirror directly. Instead of that,\r
|
|
75
75
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
76
|
-
or you can use record.mirror to access the mirror instance during recording.`,rb={map:{},getId(){return console.error(ui),-1},getNode(){return console.error(ui),null},removeNodeFromMap(){console.error(ui)},has(){return console.error(ui),!1},reset(){console.error(ui)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(rb=new Proxy(rb,{get(n,e,t){return e==="map"&&console.error(ui),Reflect.get(n,e,t)}}));function $s(n,e,t={}){let r=null,i=0;return function(...o){let a=Date.now();!i&&t.leading===!1&&(i=a);let u=e-(a-i),f=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),i=a,n.apply(f,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,n.apply(f,o)},u))}}l($s,"throttle");function Sl(n,e,t,r,i=window){let o=i.Object.getOwnPropertyDescriptor(n,e);return i.Object.defineProperty(n,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>Sl(n,e,o||{},!0)}l(Sl,"hookSetter");function Mi(n,e,t){try{if(!(e in n))return()=>{};let r=n[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),n[e]=i,()=>{n[e]=r}}catch{return()=>{}}}l(Mi,"patch");var nl=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(nl=l(()=>new Date().getTime(),"nowTimestamp"));function rw(n){var e,t,r,i;let o=n.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=ve.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o?.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=ve.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}l(rw,"getWindowScroll");function nw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}l(nw,"getWindowHeight");function iw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}l(iw,"getWindowWidth");function sw(n){return n?n.nodeType===n.ELEMENT_NODE?n:ve.parentElement(n):null}l(sw,"closestElementOfNode");function Tt(n,e,t,r){if(!n)return!1;let i=sw(n);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Ua(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}l(Tt,"isBlocked");function qN(n,e){return e.getId(n)!==-1}l(qN,"isSerialized");function vf(n,e,t){return n.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(n)===As}l(vf,"isIgnored");function ow(n,e){if(Cs(n))return!1;let t=e.getId(n);if(!e.has(t))return!0;let r=ve.parentNode(n);return r&&r.nodeType===n.DOCUMENT_NODE?!1:r?ow(r,e):!0}l(ow,"isAncestorRemoved");function hh(n){return!!n.changedTouches}l(hh,"legacy_isTouchEvent");function aw(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)}l(aw,"polyfill$1");function YN(n){let e={},t=l((i,o)=>{let a={value:i,parent:o,children:[]};return e[i.node.id]=a,a},"putIntoMap"),r=[];for(let i of n){let{nextId:o,parentId:a}=i;if(o&&o in e){let u=e[o];if(u.parent){let f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,t(i,u.parent))}else{let f=r.indexOf(u);r.splice(f,0,t(i,null))}continue}if(a in e){let u=e[a];u.children.push(t(i,u));continue}r.push(t(i,null))}return r}l(YN,"queueToResolveTrees");function lw(n,e){e(n.value);for(let t=n.children.length-1;t>=0;t--)lw(n.children[t],e)}l(lw,"iterateResolveTree");function Ts(n,e){return!!(n.nodeName==="IFRAME"&&e.getMeta(n))}l(Ts,"isSerializedIframe");function cw(n,e){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}l(cw,"isSerializedStylesheet");function uw(n,e){var t,r;let i=(r=(t=n.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),a=uw(i,e),u=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:u,absoluteScale:a.absoluteScale*u}}l(uw,"getBaseDimension");function _n(n){return n?n instanceof sr&&"shadowRoot"in n?!!n.shadowRoot:!!ve.shadowRoot(n):!1}l(_n,"hasShadowRoot");function Ss(n,e){let t=n[e[0]];return e.length===1?t:Ss(t.cssRules[e[1]].cssRules,e.slice(2))}l(Ss,"getNestedRule");function nb(n){let e=[...n],t=e.pop();return{positions:e,index:t}}l(nb,"getPositionsAndIndex");function KN(n){let e=new Set,t=[];for(let r=n.length;r--;){let i=n[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}l(KN,"uniqueTextMutations");var il=class{static{l(this,"StyleSheetMirror")}constructor(){P(this,"id",1),P(this,"styleIDMap",new WeakMap),P(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 fw(n){var e;let t=null;return"getRootNode"in n&&((e=ve.getRootNode(n))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ve.host(ve.getRootNode(n))&&(t=ve.host(ve.getRootNode(n))),t}l(fw,"getShadowHost");function XN(n){let e=n,t;for(;t=fw(e);)e=t;return e}l(XN,"getRootShadowHost");function ZN(n){let e=n.ownerDocument;if(!e)return!1;let t=XN(n);return ve.contains(e,t)}l(ZN,"shadowHostInDom");function hw(n){let e=n.ownerDocument;return e?ve.contains(e,n)||ZN(n):!1}l(hw,"inDom");var Y=(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))(Y||{}),z=(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))(z||{}),ie=(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))(ie||{}),kr=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(kr||{}),Hr=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(Hr||{}),on=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(on||{}),Ee=(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))(Ee||{}),Pr=(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",n))(Pr||{});function ib(n){return"__ln"in n}l(ib,"isNodeInLinkedList");var dh=class{static{l(this,"DoubleLinkedList")}constructor(){P(this,"length",0),P(this,"head",null),P(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ib(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&ib(e.nextSibling)&&e.nextSibling.__ln.previous){let 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;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--)}},sb=l((n,e)=>`${n}@${e}`,"moveKey"),ph=class{static{l(this,"MutationBuffer")}constructor(){P(this,"frozen",!1),P(this,"locked",!1),P(this,"texts",[]),P(this,"attributes",[]),P(this,"attributeMap",new WeakMap),P(this,"removes",[]),P(this,"mapRemoves",[]),P(this,"movedMap",{}),P(this,"addedSet",new Set),P(this,"movedSet",new Set),P(this,"droppedSet",new Set),P(this,"removesSubTreeCache",new Set),P(this,"mutationCb"),P(this,"blockClass"),P(this,"blockSelector"),P(this,"maskTextClass"),P(this,"maskTextSelector"),P(this,"inlineStylesheet"),P(this,"maskInputOptions"),P(this,"maskTextFn"),P(this,"maskInputFn"),P(this,"keepIframeSrcFn"),P(this,"recordCanvas"),P(this,"inlineImages"),P(this,"slimDOMOptions"),P(this,"dataURLOptions"),P(this,"doc"),P(this,"mirror"),P(this,"iframeManager"),P(this,"stylesheetManager"),P(this,"shadowDomManager"),P(this,"canvasManager"),P(this,"processedNodeManager"),P(this,"unattachedDoc"),P(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),P(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new dh,i=l(f=>{let d=f,p=As;for(;p===As;)d=d&&d.nextSibling,p=d&&this.mirror.getId(d);return p},"getNextId"),o=l(f=>{let d=ve.parentNode(f);if(!d||!hw(f))return;let p=!1;if(f.nodeType===Node.TEXT_NODE){let S=d.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(d)&&(p=!0)}let g=Cs(d)?this.mirror.getId(fw(f)):this.mirror.getId(d),y=i(f);if(g===-1||y===-1)return r.addNode(f);let w=di(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:l(S=>{Ts(S,this.mirror)&&this.iframeManager.addIframe(S),cw(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),_n(f)&&this.shadowDomManager.addShadowRoot(ve.shadowRoot(f),this.doc)},"onSerialize"),onIframeLoad:l((S,C)=>{this.iframeManager.attachIframe(S,C),this.shadowDomManager.observeAttachShadow(S)},"onIframeLoad"),onStylesheetLoad:l((S,C)=>{this.stylesheetManager.attachLinkElement(S,C)},"onStylesheetLoad"),cssCaptured:p});w&&(e.push({parentId:g,nextId:y,node:w}),t.add(w.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let f of this.movedSet)ob(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(ve.parentNode(f))||o(f);for(let f of this.addedSet)!ab(this.droppedSet,f)&&!ob(this.removesSubTreeCache,f,this.mirror)||ab(this.movedSet,f)?o(f):this.droppedSet.add(f);let a=null;for(;r.length;){let f=null;if(a){let d=this.mirror.getId(ve.parentNode(a.value)),p=i(a.value);d!==-1&&p!==-1&&(f=a)}if(!f){let d=r.tail;for(;d;){let p=d;if(d=d.previous,p){let g=this.mirror.getId(ve.parentNode(p.value));if(i(p.value)===-1)continue;if(g!==-1){f=p;break}else{let w=p.value,S=ve.parentNode(w);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let C=ve.host(S);if(this.mirror.getId(C)!==-1){f=p;break}}}}}}if(!f){for(;r.head;)r.removeNode(r.head.value);break}a=f.previous,r.removeNode(f.value),o(f.value)}let u={texts:this.texts.map(f=>{let d=f.node,p=ve.parentNode(d);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(d),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{let{attributes:d}=f;if(typeof d.style=="string"){let p=JSON.stringify(f.styleDiff),g=JSON.stringify(f._unchangedStyles);p.length<d.style.length&&(p+g).split("var(").length===d.style.split("var(").length&&(d.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:d}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),P(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(ve.childNodes(e),r=>ve.textContent(r)||"").join("")}),P(this,"processMutation",e=>{if(!vf(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=ve.textContent(e.target);!Tt(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Ob(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sw(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let a=Th(t);i=Mh({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(Tt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ab(t.tagName,r))if(o.attributes[r]=Rb(this.doc,ln(t.tagName),ln(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(let u of Array.from(t.style)){let f=t.style.getPropertyValue(u),d=t.style.getPropertyPriority(u);f!==a.style.getPropertyValue(u)||d!==a.style.getPropertyPriority(u)?d===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,d]:o._unchangedStyles[u]=[f,d]}for(let u of Array.from(a.style))t.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Tt(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 r=this.mirror.getId(t),i=Cs(e.target)?this.mirror.getId(ve.host(e.target)):this.mirror.getId(e.target);Tt(e.target,this.blockClass,this.blockSelector,!1)||vf(t,this.mirror,this.slimDOMOptions)||!qN(t,this.mirror)||(this.addedSet.has(t)?(mh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ow(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[sb(r,i)]?mh(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Cs(e.target)&&xs(e.target)?!0:void 0}),JN(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),P(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(vf(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[sb(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Tt(e,this.blockClass,this.blockSelector,!1)||(ve.childNodes(e).forEach(r=>this.genAdds(r)),_n(e)&&ve.childNodes(ve.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,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 mh(n,e){n.delete(e),ve.childNodes(e).forEach(t=>mh(n,t))}l(mh,"deepDelete");function JN(n,e){let t=[n];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),ve.childNodes(r).forEach(i=>t.push(i)))}}l(JN,"processRemoves");function ob(n,e,t){return n.size===0?!1:QN(n,e)}l(ob,"isParentRemoved");function QN(n,e,t){let r=ve.parentNode(e);return r?n.has(r):!1}l(QN,"_isParentRemoved");function ab(n,e){return n.size===0?!1:dw(n,e)}l(ab,"isAncestorInSet");function dw(n,e){let t=ve.parentNode(e);return t?n.has(t)?!0:dw(n,t):!1}l(dw,"_isAncestorInSet");var Is;function eD(n){Is=n}l(eD,"registerErrorHandler");function tD(){Is=void 0}l(tD,"unregisterErrorHandler");var Me=l(n=>Is?l((...t)=>{try{return n(...t)}catch(r){if(Is&&Is(r)===!0)return;throw r}},"rrwebWrapped"):n,"callbackWrapper"),Ln=[];function Vs(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}l(Vs,"getEventTarget");function pw(n,e){let t=new ph;Ln.push(t),t.init(n);let r=new(tw())(Me(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}l(pw,"initMutationObserver");function rD({mousemoveCb:n,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,a=[],u,f=$s(Me(g=>{let y=Date.now()-u;n(a.map(w=>(w.timeOffset-=y,w)),g),a=[],u=null}),o),d=Me($s(Me(g=>{let y=Vs(g),{clientX:w,clientY:S}=hh(g)?g.changedTouches[0]:g;u||(u=nl()),a.push({x:w,y:S,id:r.getId(y),timeOffset:nl()-u}),f(typeof DragEvent<"u"&&g instanceof DragEvent?z.Drag:g instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),p=[Mt("mousemove",d,t),Mt("touchmove",d,t),Mt("drag",d,t)];return Me(()=>{p.forEach(g=>g())})}l(rD,"initMoveObserver");function nD({mouseInteractionCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[],f=null,d=l(p=>g=>{let y=Vs(g);if(Tt(y,r,i,!0))return;let w=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":w=kr.Mouse;break;case"touch":w=kr.Touch;break;case"pen":w=kr.Pen;break}w===kr.Touch?ie[p]===ie.MouseDown?S="TouchStart":ie[p]===ie.MouseUp&&(S="TouchEnd"):kr.Pen}else hh(g)&&(w=kr.Touch);w!==null?(f=w,(S.startsWith("Touch")&&w===kr.Touch||S.startsWith("Mouse")&&w===kr.Mouse)&&(w=null)):ie[p]===ie.Click&&(w=f,f=null);let C=hh(g)?g.changedTouches[0]:g;if(!C)return;let v=t.getId(y),{clientX:M,clientY:A}=C;Me(n)({type:ie[S],id:v,x:M,y:A,...w!==null&&{pointerType:w}})},"getHandler");return Object.keys(ie).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=ln(p),y=d(p);if(window.PointerEvent)switch(ie[p]){case ie.MouseDown:case ie.MouseUp:g=g.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}u.push(Mt(g,y,e))}),Me(()=>{u.forEach(p=>p())})}l(nD,"initMouseInteractionObserver");function mw({scrollCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){let a=Me($s(Me(u=>{let f=Vs(u);if(!f||Tt(f,r,i,!0))return;let d=t.getId(f);if(f===e&&e.defaultView){let p=rw(e.defaultView);n({id:d,x:p.left,y:p.top})}else n({id:d,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return Mt("scroll",a,e)}l(mw,"initScrollObserver");function iD({viewportResizeCb:n},{win:e}){let t=-1,r=-1,i=Me($s(Me(()=>{let o=nw(),a=iw();(t!==o||r!==a)&&(n({width:Number(a),height:Number(o)}),t=o,r=a)}),200));return Mt("resize",i,e)}l(iD,"initViewportResizeObserver");var sD=["INPUT","TEXTAREA","SELECT"],lb=new WeakMap;function oD({inputCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:f,sampling:d,userTriggeredOnInput:p}){function g(A){let T=Vs(A),L=A.isTrusted,V=T&&T.tagName;if(T&&V==="OPTION"&&(T=ve.parentElement(T)),!T||!V||sD.indexOf(V)<0||Tt(T,r,i,!0)||T.classList.contains(o)||a&&T.matches(a))return;let U=T.value,Z=!1,W=Th(T)||"";W==="radio"||W==="checkbox"?Z=T.checked:(u[V.toLowerCase()]||u[W])&&(U=Mh({element:T,maskInputOptions:u,tagName:V,type:W,value:U,maskInputFn:f})),y(T,p?{text:U,isChecked:Z,userTriggered:L}:{text:U,isChecked:Z});let G=T.name;W==="radio"&&G&&Z&&e.querySelectorAll(`input[type="radio"][name="${G}"]`).forEach(re=>{if(re!==T){let B=re.value;y(re,p?{text:B,isChecked:!Z,userTriggered:!1}:{text:B,isChecked:!Z})}})}l(g,"eventHandler");function y(A,T){let L=lb.get(A);if(!L||L.text!==T.text||L.isChecked!==T.isChecked){lb.set(A,T);let V=t.getId(A);Me(n)({...T,id:V})}}l(y,"cbWithDedup");let S=(d.input==="last"?["change"]:["input","change"]).map(A=>Mt(A,Me(g),e)),C=e.defaultView;if(!C)return()=>{S.forEach(A=>A())};let v=C.Object.getOwnPropertyDescriptor(C.HTMLInputElement.prototype,"value"),M=[[C.HTMLInputElement.prototype,"value"],[C.HTMLInputElement.prototype,"checked"],[C.HTMLSelectElement.prototype,"value"],[C.HTMLTextAreaElement.prototype,"value"],[C.HTMLSelectElement.prototype,"selectedIndex"],[C.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&S.push(...M.map(A=>Sl(A[0],A[1],{set(){Me(g)({target:this,isTrusted:!1})}},!1,C))),Me(()=>{S.forEach(A=>A())})}l(oD,"initInputObserver");function sl(n){let e=[];function t(r,i){if(La("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||La("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||La("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||La("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return l(t,"recurse"),t(n,e)}l(sl,"getNestedCSSRulePositions");function sn(n,e,t){let r,i;return n?(n.ownerNode?r=e.getId(n.ownerNode):i=t.getId(n),{styleId:i,id:r}):{}}l(sn,"getIdAndStyleId");function aD({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Me((p,g,y)=>{let[w,S]=y,{id:C,styleId:v}=sn(g,e,t.styleMirror);return(C&&C!==-1||v&&v!==-1)&&n({id:C,styleId:v,adds:[{rule:w,index:S}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,y=this.cssRules.length){let w=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[w,y])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:C}=sn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,removes:[{index:w}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:C}=sn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,replace:w}),p.apply(g,y)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:C}=sn(g,e,t.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,replaceSync:w}),p.apply(g,y)})}));let f={};Na("CSSGroupingRule")?f.CSSGroupingRule=r.CSSGroupingRule:(Na("CSSMediaRule")&&(f.CSSMediaRule=r.CSSMediaRule),Na("CSSConditionRule")&&(f.CSSConditionRule=r.CSSConditionRule),Na("CSSSupportsRule")&&(f.CSSSupportsRule=r.CSSSupportsRule));let d={};return Object.entries(f).forEach(([p,g])=>{d[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(d[p].insertRule,{apply:Me((y,w,S)=>{let[C,v]=S,{id:M,styleId:A}=sn(w.parentStyleSheet,e,t.styleMirror);return(M&&M!==-1||A&&A!==-1)&&n({id:M,styleId:A,adds:[{rule:C,index:[...sl(w),v||0]}]}),y.apply(w,S)})}),g.prototype.deleteRule=new Proxy(d[p].deleteRule,{apply:Me((y,w,S)=>{let[C]=S,{id:v,styleId:M}=sn(w.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||M&&M!==-1)&&n({id:v,styleId:M,removes:[{index:[...sl(w),C]}]}),y.apply(w,S)})})}),Me(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([p,g])=>{g.prototype.insertRule=d[p].insertRule,g.prototype.deleteRule=d[p].deleteRule})})}l(aD,"initStyleSheetObserver");function gw({mirror:n,stylesheetManager:e},t){var r,i,o;let a=null;t.nodeName==="#document"?a=n.getId(t):a=n.getId(ve.host(t));let u=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var d;return(d=f.get)==null?void 0:d.call(this)},set(d){var p;let g=(p=f.set)==null?void 0:p.call(this,d);if(a!==null&&a!==-1)try{e.adoptStyleSheets(d,a)}catch{}return g}}),Me(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}l(gw,"initAdoptedStyleSheetObserver");function lD({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Me((u,f,d)=>{var p;let[g,y,w]=d;if(t.has(g))return o.apply(f,[g,y,w]);let{id:S,styleId:C}=sn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||C&&C!==-1)&&n({id:S,styleId:C,set:{property:g,value:y,priority:w},index:sl(f.parentRule)}),u.apply(f,d)})});let a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:Me((u,f,d)=>{var p;let[g]=d;if(t.has(g))return a.apply(f,[g]);let{id:y,styleId:w}=sn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||w&&w!==-1)&&n({id:y,styleId:w,remove:{property:g},index:sl(f.parentRule)}),u.apply(f,d)})}),Me(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}l(lD,"initStyleDeclarationObserver");function cD({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){let a=Me(f=>$s(Me(d=>{let p=Vs(d);if(!p||Tt(p,e,t,!0))return;let{currentTime:g,volume:y,muted:w,playbackRate:S,loop:C}=p;n({type:f,id:r.getId(p),currentTime:g,volume:y,muted:w,playbackRate:S,loop:C})}),i.media||500)),u=[Mt("play",a(on.Play),o),Mt("pause",a(on.Pause),o),Mt("seeked",a(on.Seeked),o),Mt("volumechange",a(on.VolumeChange),o),Mt("ratechange",a(on.RateChange),o)];return Me(()=>{u.forEach(f=>f())})}l(cD,"initMediaInteractionObserver");function uD({fontCb:n,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,o=t.FontFace;t.FontFace=l(function(f,d,p){let g=new o(f,d,p);return i.set(g,{family:f,buffer:typeof d!="string",descriptors:p,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),g},"FontFace2");let a=Mi(e.fonts,"add",function(u){return function(f){return setTimeout(Me(()=>{let d=i.get(f);d&&(n(d),i.delete(f))}),0),u.apply(this,[f])}});return r.push(()=>{t.FontFace=o}),r.push(a),Me(()=>{r.forEach(u=>u())})}l(uD,"initFontObserver");function fD(n){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=n,a=!0,u=Me(()=>{let f=e.getSelection();if(!f||a&&f?.isCollapsed)return;a=f.isCollapsed||!1;let d=[],p=f.rangeCount||0;for(let g=0;g<p;g++){let y=f.getRangeAt(g),{startContainer:w,startOffset:S,endContainer:C,endOffset:v}=y;Tt(w,r,i,!0)||Tt(C,r,i,!0)||d.push({start:t.getId(w),startOffset:S,end:t.getId(C),endOffset:v})}o({ranges:d})});return u(),Mt("selectionchange",u)}l(fD,"initSelectionObserver");function hD({doc:n,customElementCb:e}){let t=n.defaultView;return!t||!t.customElements?()=>{}:Mi(t.customElements,"define",function(i){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,a,u])}})}l(hD,"initCustomElementObserver");function dD(n,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:d,styleDeclarationCb:p,canvasMutationCb:g,fontCb:y,selectionCb:w,customElementCb:S}=n;n.mutationCb=(...C)=>{e.mutation&&e.mutation(...C),t(...C)},n.mousemoveCb=(...C)=>{e.mousemove&&e.mousemove(...C),r(...C)},n.mouseInteractionCb=(...C)=>{e.mouseInteraction&&e.mouseInteraction(...C),i(...C)},n.scrollCb=(...C)=>{e.scroll&&e.scroll(...C),o(...C)},n.viewportResizeCb=(...C)=>{e.viewportResize&&e.viewportResize(...C),a(...C)},n.inputCb=(...C)=>{e.input&&e.input(...C),u(...C)},n.mediaInteractionCb=(...C)=>{e.mediaInteaction&&e.mediaInteaction(...C),f(...C)},n.styleSheetRuleCb=(...C)=>{e.styleSheetRule&&e.styleSheetRule(...C),d(...C)},n.styleDeclarationCb=(...C)=>{e.styleDeclaration&&e.styleDeclaration(...C),p(...C)},n.canvasMutationCb=(...C)=>{e.canvasMutation&&e.canvasMutation(...C),g(...C)},n.fontCb=(...C)=>{e.font&&e.font(...C),y(...C)},n.selectionCb=(...C)=>{e.selection&&e.selection(...C),w(...C)},n.customElementCb=(...C)=>{e.customElement&&e.customElement(...C),S(...C)}}l(dD,"mergeHooks");function pD(n,e={}){let t=n.doc.defaultView;if(!t)return()=>{};dD(n,e);let r;n.recordDOM&&(r=pw(n,n.doc));let i=rD(n),o=nD(n),a=mw(n),u=iD(n,{win:t}),f=oD(n),d=cD(n),p=l(()=>{},"styleSheetObserver"),g=l(()=>{},"adoptedStyleSheetObserver"),y=l(()=>{},"styleDeclarationObserver"),w=l(()=>{},"fontObserver");n.recordDOM&&(p=aD(n,{win:t}),g=gw(n,n.doc),y=lD(n,{win:t}),n.collectFonts&&(w=uD(n)));let S=fD(n),C=hD(n),v=[];for(let M of n.plugins)v.push(M.observer(M.callback,t,M.options));return Me(()=>{Ln.forEach(M=>M.reset()),r?.disconnect(),i(),o(),a(),u(),f(),d(),p(),g(),y(),w(),S(),C(),v.forEach(M=>M())})}l(pD,"initObservers");function La(n){return typeof window[n]<"u"}l(La,"hasNestedCSSRule");function Na(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}l(Na,"canMonkeyPatchNestedCSSRule");var ol=class{static{l(this,"CrossOriginIframeMirror")}constructor(e){P(this,"iframeIdToRemoteIdMap",new WeakMap),P(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let o=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e),u=o.get(t);return u||(u=this.generateIdFn(),o.set(t,u),a.set(u,t)),u}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let o=i.get(t);return o||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}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}},gh=class{static{l(this,"IframeManager")}constructor(e){P(this,"iframes",new WeakMap),P(this,"crossOriginIframeMap",new WeakMap),P(this,"crossOriginIframeMirror",new ol(Ib)),P(this,"crossOriginIframeStyleMirror"),P(this,"crossOriginIframeRootIdMap",new WeakMap),P(this,"mirror"),P(this,"mutationCb"),P(this,"wrappedEmit"),P(this,"loadListener"),P(this,"stylesheetManager"),P(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ol(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 r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||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 i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Y.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Pr.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},yh=class{static{l(this,"ShadowDomManager")}constructor(e){P(this,"shadowDoms",new WeakSet),P(this,"mutationCb"),P(this,"scrollCb"),P(this,"bypassOptions"),P(this,"mirror"),P(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(!xs(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=pw({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mw({...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(ve.host(e))),this.restoreHandlers.push(gw({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 r=this;this.restoreHandlers.push(Mi(e.prototype,"attachShadow",function(i){return function(o){let a=i.call(this,o),u=ve.shadowRoot(this);return u&&hw(this)&&r.addShadowRoot(u,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},pi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Es=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ws=0;ws<pi.length;ws++)Es[pi.charCodeAt(ws)]=ws;var ws,mD=l(function(n){var e=new Uint8Array(n),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=pi[e[t]>>2],i+=pi[(e[t]&3)<<4|e[t+1]>>4],i+=pi[(e[t+1]&15)<<2|e[t+2]>>6],i+=pi[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},"encode"),gD=l(function(n){var e=n.length*.75,t=n.length,r,i=0,o,a,u,f;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);var d=new ArrayBuffer(e),p=new Uint8Array(d);for(r=0;r<t;r+=4)o=Es[n.charCodeAt(r)],a=Es[n.charCodeAt(r+1)],u=Es[n.charCodeAt(r+2)],f=Es[n.charCodeAt(r+3)],p[i++]=o<<2|a>>4,p[i++]=(a&15)<<4|u>>2,p[i++]=(u&3)<<6|f&63;return d},"decode"),cb=new Map;function yD(n,e){let t=cb.get(n);return t||(t=new Map,cb.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}l(yD,"variableListFor$1");var yw=l((n,e,t)=>{if(!n||!(vw(n,e)||typeof n=="object"))return;let r=n.constructor.name,i=yD(t,r),o=i.indexOf(n);return o===-1&&(o=i.length,i.push(n)),o},"saveWebGLVar");function Ha(n,e,t){if(n instanceof Array)return n.map(r=>Ha(r,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 r=n.constructor.name,i=mD(n);return{rr_type:r,base64:i}}else{if(n instanceof DataView)return{rr_type:n.constructor.name,args:[Ha(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){let r=n.constructor.name,{src:i}=n;return{rr_type:r,src:i}}else if(n instanceof HTMLCanvasElement){let r="HTMLImageElement",i=n.toDataURL();return{rr_type:r,src:i}}else{if(n instanceof ImageData)return{rr_type:n.constructor.name,args:[Ha(n.data,e,t),n.width,n.height]};if(vw(n,e)||typeof n=="object"){let r=n.constructor.name,i=yw(n,e,t);return{rr_type:r,index:i}}}}return n}l(Ha,"serializeArg");var bw=l((n,e,t)=>n.map(r=>Ha(r,e,t)),"serializeArgs"),vw=l((n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>n instanceof e[i]),"isInstanceOfWebGLObject");function bD(n,e,t,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;let u=Mi(e.CanvasRenderingContext2D.prototype,a,function(f){return function(...d){return Tt(this.canvas,t,r,!0)||setTimeout(()=>{let p=bw(d,e,this);n(this.canvas,{type:Hr["2D"],property:a,args:p})},0),f.apply(this,d)}});i.push(u)}catch{let u=Sl(e.CanvasRenderingContext2D.prototype,a,{set(f){n(this.canvas,{type:Hr["2D"],property:a,args:[f],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}l(bD,"initCanvas2DMutationObserver");function vD(n){return n==="experimental-webgl"?"webgl":n}l(vD,"getNormalizedContextName");function ub(n,e,t,r){let i=[];try{let o=Mi(n.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...f){if(!Tt(this,e,t,!0)){let d=vD(u);if("__context"in this||(this.__context=d),r&&["webgl","webgl2"].includes(d))if(f[0]&&typeof f[0]=="object"){let p=f[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...f])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}l(ub,"initCanvasContextObserver");function fb(n,e,t,r,i,o){let a=[],u=Object.getOwnPropertyNames(n);for(let f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof n[f]!="function")continue;let d=Mi(n,f,function(p){return function(...g){let y=p.apply(this,g);if(yw(y,o,this),"tagName"in this.canvas&&!Tt(this.canvas,r,i,!0)){let w=bw(g,o,this),S={type:e,property:f,args:w};t(this.canvas,S)}return y}});a.push(d)}catch{let d=Sl(n,f,{set(p){t(this.canvas,{type:e,property:f,args:[p],setter:!0})}});a.push(d)}return a}l(fb,"patchGLPrototype");function wD(n,e,t,r){let i=[];return i.push(...fb(e.WebGLRenderingContext.prototype,Hr.WebGL,n,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...fb(e.WebGL2RenderingContext.prototype,Hr.WebGL2,n,t,r,e)),()=>{i.forEach(o=>o())}}l(wD,"initCanvasWebGLMutationObserver");var ww="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",SD=l(n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),"decodeBase64"),hb=typeof window<"u"&&window.Blob&&new Blob([SD(ww)],{type:"text/javascript;charset=utf-8"});function ED(n){let e;try{if(e=hb&&(window.URL||window.webkitURL).createObjectURL(hb),!e)throw"";let t=new Worker(e,{name:n?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ww,{name:n?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}l(ED,"WorkerWrapper");var bh=class{static{l(this,"CanvasManager")}constructor(e){P(this,"pendingCanvasMutations",new Map),P(this,"rafStamps",{latestId:0,invokeId:null}),P(this,"mirror"),P(this,"mutationCb"),P(this,"resetObservers"),P(this,"frozen",!1),P(this,"locked",!1),P(this,"processMutation",(f,d)=>{(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(d)});let{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,o),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){let a=ub(t,r,i,!0),u=new Map,f=new ED;f.onmessage=S=>{let{id:C}=S.data;if(u.set(C,!1),!("base64"in S.data))return;let{base64:v,type:M,width:A,height:T}=S.data;this.mutationCb({id:C,type:Hr["2D"],commands:[{property:"clearRect",args:[0,0,A,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:v}],type:M}]},0,0]}]})};let d=1e3/e,p=0,g,y=l(()=>{let S=[];return t.document.querySelectorAll("canvas").forEach(C=>{Tt(C,r,i,!0)||S.push(C)}),S},"getCanvas"),w=l(S=>{if(p&&S-p<d){g=requestAnimationFrame(w);return}p=S,y().forEach(async C=>{var v;let M=this.mirror.getId(C);if(u.get(M)||C.width===0||C.height===0)return;if(u.set(M,!0),["webgl","webgl2"].includes(C.__context)){let T=C.getContext(C.__context);((v=T?.getContextAttributes())==null?void 0:v.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}let A=await createImageBitmap(C);f.postMessage({id:M,bitmap:A,width:C.width,height:C.height,dataURLOptions:o.dataURLOptions},[A])}),g=requestAnimationFrame(w)},"takeCanvasSnapshots");g=requestAnimationFrame(w),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=ub(e,t,r,!1),o=bD(this.processMutation.bind(this),e,t,r),a=wD(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=l(t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)},"setLatestRAFTimestamp");requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(a=>{let{type:u,...f}=a;return f}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},vh=class{static{l(this,"StylesheetManager")}constructor(e){P(this,"trackedLinkElements",new WeakSet),P(this,"mutationCb"),P(this,"adoptedStyleSheetCb"),P(this,"styleMirror",new il),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 r={id:t,styleIds:[]},i=[];for(let o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:xb(u,o.href),index:f}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},wh=class{static{l(this,"ProcessedNodeManager")}constructor(){P(this,"nodeMap",new WeakMap),P(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},tt,Ba,wf,al=!1;try{if(Array.from([1],n=>n*2)[0]!==2){let n=document.createElement("iframe");document.body.appendChild(n),Array.from=((uy=n.contentWindow)==null?void 0:uy.Array.from)||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}var ir=Mb();function Zt(n={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:w,maskInputFn:S,maskTextFn:C,hooks:v,packFn:M,sampling:A={},dataURLOptions:T={},mousemoveWait:L,recordDOM:V=!0,recordCanvas:U=!1,recordCrossOriginIframes:Z=!1,recordAfter:W=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:re=!1,inlineImages:B=!1,plugins:j,keepIframeSrcFn:k=l(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:Q=new Set([]),errorHandler:ee}=n;eD(ee);let q=Z?window.parent===window:!0,ae=!1;if(!q)try{window.parent.document&&(ae=!1)}catch{ae=!0}if(q&&!e)throw new Error("emit function is required");if(!q&&!ae)return()=>{};L!==void 0&&A.mousemove===void 0&&(A.mousemove=L),ir.reset();let rt=g===!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},De=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",headTitleMutations:w==="all"}:w||{};aw();let Pe,gn=0,$n=l(we=>{for(let It of j||[])It.eventProcessor&&(we=It.eventProcessor(we));return M&&!ae&&(we=M(we)),we},"eventProcessor");tt=l((we,It)=>{var xe;let Le=we;if(Le.timestamp=nl(),(xe=Ln[0])!=null&&xe.isFrozen()&&Le.type!==Y.FullSnapshot&&!(Le.type===Y.IncrementalSnapshot&&Le.data.source===z.Mutation)&&Ln.forEach(Vt=>Vt.unfreeze()),q)e?.($n(Le),It);else if(ae){let Vt={type:"rrweb",event:$n(Le),origin:window.location.origin,isCheckout:It};window.parent.postMessage(Vt,"*")}if(Le.type===Y.FullSnapshot)Pe=Le,gn=0;else if(Le.type===Y.IncrementalSnapshot){if(Le.data.source===z.Mutation&&Le.data.isAttachIframe)return;gn++;let Vt=r&&gn>=r,ge=t&&Le.timestamp-Pe.timestamp>t;(Vt||ge)&&Ba(!0)}},"wrappedEmit");let pe=l(we=>{tt({type:Y.IncrementalSnapshot,data:{source:z.Mutation,...we}})},"wrappedMutationEmit"),st=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.Scroll,...we}}),"wrappedScrollEmit"),mt=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.CanvasMutation,...we}}),"wrappedCanvasMutationEmit"),Nt=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...we}}),"wrappedAdoptedStyleSheetEmit"),gt=new vh({mutationCb:pe,adoptedStyleSheetCb:Nt}),ct=new gh({mirror:ir,mutationCb:pe,stylesheetManager:gt,recordCrossOriginIframes:Z,wrappedEmit:tt});for(let we of j||[])we.getMirror&&we.getMirror({nodeMirror:ir,crossOriginIframeMirror:ct.crossOriginIframeMirror,crossOriginIframeStyleMirror:ct.crossOriginIframeStyleMirror});let Wi=new wh;wf=new bh({recordCanvas:U,mutationCb:mt,win:window,blockClass:i,blockSelector:o,mirror:ir,sampling:A.canvas,dataURLOptions:T});let xr=new yh({mutationCb:pe,scrollCb:st,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskInputOptions:rt,dataURLOptions:T,maskTextFn:C,maskInputFn:S,recordCanvas:U,inlineImages:B,sampling:A,slimDOMOptions:De,iframeManager:ct,stylesheetManager:gt,canvasManager:wf,keepIframeSrcFn:k,processedNodeManager:Wi},mirror:ir});Ba=l((we=!1)=>{if(!V)return;tt({type:Y.Meta,data:{href:window.location.href,width:iw(),height:nw()}},we),gt.reset(),xr.init(),Ln.forEach(xe=>xe.lock());let It=xA(document,{mirror:ir,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskAllInputs:rt,maskTextFn:C,maskInputFn:S,slimDOM:De,dataURLOptions:T,recordCanvas:U,inlineImages:B,onSerialize:l(xe=>{Ts(xe,ir)&&ct.addIframe(xe),cw(xe,ir)&>.trackLinkElement(xe),_n(xe)&&xr.addShadowRoot(ve.shadowRoot(xe),document)},"onSerialize"),onIframeLoad:l((xe,Le)=>{ct.attachIframe(xe,Le),xr.observeAttachShadow(xe)},"onIframeLoad"),onStylesheetLoad:l((xe,Le)=>{gt.attachLinkElement(xe,Le)},"onStylesheetLoad"),keepIframeSrcFn:k});if(!It)return console.warn("Failed to snapshot the document");tt({type:Y.FullSnapshot,data:{node:It,initialOffset:rw(window)}},we),Ln.forEach(xe=>xe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&>.adoptStyleSheets(document.adoptedStyleSheets,ir.getId(document))},"takeFullSnapshot$1");try{let we=[],It=l(Le=>{var Vt;return Me(pD)({mutationCb:pe,mousemoveCb:l((ge,Hn)=>tt({type:Y.IncrementalSnapshot,data:{source:Hn,positions:ge}}),"mousemoveCb"),mouseInteractionCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.MouseInteraction,...ge}}),"mouseInteractionCb"),scrollCb:st,viewportResizeCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.ViewportResize,...ge}}),"viewportResizeCb"),inputCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.Input,...ge}}),"inputCb"),mediaInteractionCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.MediaInteraction,...ge}}),"mediaInteractionCb"),styleSheetRuleCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.StyleSheetRule,...ge}}),"styleSheetRuleCb"),styleDeclarationCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.StyleDeclaration,...ge}}),"styleDeclarationCb"),canvasMutationCb:mt,fontCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.Font,...ge}}),"fontCb"),selectionCb:l(ge=>{tt({type:Y.IncrementalSnapshot,data:{source:z.Selection,...ge}})},"selectionCb"),customElementCb:l(ge=>{tt({type:Y.IncrementalSnapshot,data:{source:z.CustomElement,...ge}})},"customElementCb"),blockClass:i,ignoreClass:a,ignoreSelector:u,maskTextClass:f,maskTextSelector:d,maskInputOptions:rt,inlineStylesheet:p,sampling:A,recordDOM:V,recordCanvas:U,inlineImages:B,userTriggeredOnInput:G,collectFonts:re,doc:Le,maskInputFn:S,maskTextFn:C,keepIframeSrcFn:k,blockSelector:o,slimDOMOptions:De,dataURLOptions:T,mirror:ir,iframeManager:ct,stylesheetManager:gt,shadowDomManager:xr,processedNodeManager:Wi,canvasManager:wf,ignoreCSSAttributes:Q,plugins:((Vt=j?.filter(ge=>ge.observer))==null?void 0:Vt.map(ge=>({observer:ge.observer,options:ge.options,callback:l(Hn=>tt({type:Y.Plugin,data:{plugin:ge.name,payload:Hn}}),"callback")})))||[]},v)},"observe");ct.addLoadListener(Le=>{try{we.push(It(Le.contentDocument))}catch(Vt){console.warn(Vt)}});let xe=l(()=>{Ba(),we.push(It(document)),al=!0},"init");return document.readyState==="interactive"||document.readyState==="complete"?xe():(we.push(Mt("DOMContentLoaded",()=>{tt({type:Y.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&xe()})),we.push(Mt("load",()=>{tt({type:Y.Load,data:{}}),W==="load"&&xe()},window))),()=>{we.forEach(Le=>Le()),Wi.destroy(),al=!1,tD()}}catch(we){console.warn(we)}}l(Zt,"record");Zt.addCustomEvent=(n,e)=>{if(!al)throw new Error("please add custom event after start recording");tt({type:Y.Custom,data:{tag:n,payload:e}})};Zt.freezePage=()=>{Ln.forEach(n=>n.freeze())};Zt.takeFullSnapshot=n=>{if(!al)throw new Error("please take full snapshot after start recording");Ba(n)};Zt.mirror=ir;function Sw(n){return{all:n=n||new Map,on:l(function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},"on"),off:l(function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},"off"),emit:l(function(e,t){var r=n.get(e);r&&r.slice().map(function(i){i(t)}),(r=n.get("*"))&&r.slice().map(function(i){i(e,t)})},"emit")}}l(Sw,"mitt$1");var CD=Object.freeze(Object.defineProperty({__proto__:null,default:Sw},Symbol.toStringTag,{value:"Module"}));function xD(n=window,e=document){if("scrollBehavior"in e.documentElement.style&&n.__forceSmoothScrollPolyfill__!==!0)return;let t=n.HTMLElement||n.Element,r=468,i={scroll:n.scroll||n.scrollTo,scrollBy:n.scrollBy,elementScroll:t.prototype.scroll||f,scrollIntoView:t.prototype.scrollIntoView},o=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now;function a(M){let A=["MSIE ","Trident/","Edge/"];return new RegExp(A.join("|")).test(M)}l(a,"isMicrosoftBrowser");let u=a(n.navigator.userAgent)?1:0;function f(M,A){this.scrollLeft=M,this.scrollTop=A}l(f,"scrollElement");function d(M){return .5*(1-Math.cos(Math.PI*M))}l(d,"ease");function p(M){if(M===null||typeof M!="object"||M.behavior===void 0||M.behavior==="auto"||M.behavior==="instant")return!0;if(typeof M=="object"&&M.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+M.behavior+" is not a valid value for enumeration ScrollBehavior.")}l(p,"shouldBailOut");function g(M,A){if(A==="Y")return M.clientHeight+u<M.scrollHeight;if(A==="X")return M.clientWidth+u<M.scrollWidth}l(g,"hasScrollableSpace");function y(M,A){let T=n.getComputedStyle(M,null)["overflow"+A];return T==="auto"||T==="scroll"}l(y,"canOverflow");function w(M){let A=g(M,"Y")&&y(M,"Y"),T=g(M,"X")&&y(M,"X");return A||T}l(w,"isScrollable");function S(M){for(;M!==e.body&&w(M)===!1;)M=M.parentNode||M.host;return M}l(S,"findScrollableParent");function C(M){let A=o(),T,L,V,U=(A-M.startTime)/r;U=U>1?1:U,T=d(U),L=M.startX+(M.x-M.startX)*T,V=M.startY+(M.y-M.startY)*T,M.method.call(M.scrollable,L,V),(L!==M.x||V!==M.y)&&n.requestAnimationFrame(C.bind(n,M))}l(C,"step");function v(M,A,T){let L,V,U,Z,W=o();M===e.body?(L=n,V=n.scrollX||n.pageXOffset,U=n.scrollY||n.pageYOffset,Z=i.scroll):(L=M,V=M.scrollLeft,U=M.scrollTop,Z=f),C({scrollable:L,method:Z,startTime:W,startX:V,startY:U,x:A,y:T})}l(v,"smoothScroll"),n.scroll=n.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.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}v.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])){i.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}v.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");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let M=arguments[0].left,A=arguments[0].top;v.call(this,this,typeof M>"u"?this.scrollLeft:~~M,typeof A>"u"?this.scrollTop:~~A)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let M=S(this),A=M.getBoundingClientRect(),T=this.getBoundingClientRect();M!==e.body?(v.call(this,M,M.scrollLeft+T.left-A.left,M.scrollTop+T.top-A.top),n.getComputedStyle(M).position!=="fixed"&&n.scrollBy({left:A.left,top:A.top,behavior:"smooth"})):n.scrollBy({left:T.left,top:T.top,behavior:"smooth"})}}l(xD,"polyfill");var Sh=class{static{l(this,"Timer")}constructor(e=[],t){P(this,"timeOffset",0),P(this,"speed"),P(this,"actions"),P(this,"raf",null),P(this,"lastTimestamp"),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 r=this.findActionIndex(e);this.actions.splice(r,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,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};function db(n,e){if(n.type===Y.IncrementalSnapshot&&n.data.source===z.MouseMove&&n.data.positions&&n.data.positions.length){let t=n.data.positions[0].timeOffset,r=n.timestamp+t;return n.delay=r-e,r-e}return n.delay=n.timestamp-e,n.delay}l(db,"addDelay");function pb(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r,i,o=t.call(n),a=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a}l(pb,"t");var mi;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(mi||(mi={}));var Ew={type:"xstate.init"};function Sf(n){return n===void 0?[]:[].concat(n)}l(Sf,"r");function fi(n){return{type:"xstate.assign",assignment:n}}l(fi,"o");function mb(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}l(mb,"i");function ll(n){return function(e){return n===e}}l(ll,"a");function Cw(n){return typeof n=="string"?{type:n}:n}l(Cw,"u");function gb(n,e){return{value:n,context:e,actions:[],changed:!1,matches:ll(n)}}l(gb,"c");function yb(n,e,t){var r=e,i=!1;return[n.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},r);return typeof o.assignment=="function"?a=o.assignment(r,t):Object.keys(o.assignment).forEach(function(u){a[u]=typeof o.assignment[u]=="function"?o.assignment[u](r,t):o.assignment[u]}),r=a,!1}return!0}),r,i]}l(yb,"f");function xw(n,e){e===void 0&&(e={});var t=pb(yb(Sf(n.states[n.initial].entry).map(function(a){return mb(a,e.actions)}),n.context,Ew),2),r=t[0],i=t[1],o={config:n,_options:e,initialState:{value:n.initial,actions:r,context:i,matches:ll(n.initial)},transition:l(function(a,u){var f,d,p=typeof a=="string"?{value:a,context:n.context}:a,g=p.value,y=p.context,w=Cw(u),S=n.states[g];if(S.on){var C=Sf(S.on[w.type]);try{for(var v=function(ae){var rt=typeof Symbol=="function"&&Symbol.iterator,De=rt&&ae[rt],Pe=0;if(De)return De.call(ae);if(ae&&typeof ae.length=="number")return{next:l(function(){return ae&&Pe>=ae.length&&(ae=void 0),{value:ae&&ae[Pe++],done:!ae}},"next")};throw new TypeError(rt?"Object is not iterable.":"Symbol.iterator is not defined.")}(C),M=v.next();!M.done;M=v.next()){var A=M.value;if(A===void 0)return gb(g,y);var T=typeof A=="string"?{target:A}:A,L=T.target,V=T.actions,U=V===void 0?[]:V,Z=T.cond,W=Z===void 0?function(){return!0}:Z,G=L===void 0,re=L??g,B=n.states[re];if(W(y,w)){var j=pb(yb((G?Sf(U):[].concat(S.exit,U,B.entry).filter(function(ae){return ae})).map(function(ae){return mb(ae,o._options.actions)}),y,w),3),k=j[0],Q=j[1],ee=j[2],q=L??g;return{value:q,context:Q,actions:k,changed:L!==g||k.length>0||ee,matches:ll(q)}}}}catch(ae){f={error:ae}}finally{try{M&&!M.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}}return gb(g,y)},"transition")};return o}l(xw,"s");var bb=l(function(n,e){return n.actions.forEach(function(t){var r=t.exec;return r&&r(n.context,e)})},"l");function Mw(n){var e=n.initialState,t=mi.NotStarted,r=new Set,i={_machine:n,send:l(function(o){t===mi.Running&&(e=n.transition(e,o),bb(e,Cw(o)),r.forEach(function(a){return a(e)}))},"send"),subscribe:l(function(o){return r.add(o),o(e),{unsubscribe:l(function(){return r.delete(o)},"unsubscribe")}},"subscribe"),start:l(function(o){if(o){var a=typeof o=="object"?o:{context:n.config.context,value:o};e={value:a.value,actions:[],context:a.context,matches:ll(a.value)}}return t=mi.Running,bb(e,Ew),i},"start"),stop:l(function(){return t=mi.Stopped,r.clear(),i},"stop"),get state(){return e},get status(){return t}};return i}l(Mw,"v");function MD(n,e){for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.type===Y.Meta&&r.timestamp<=e)return n.slice(t)}return n}l(MD,"discardPriorSnapshots");function TD(n,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=xw({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:fi({lastPlayedEvent:l((o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent,"lastPlayedEvent")}),recordTimeOffset:fi((o,a)=>{let u=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(u=a.payload.timeOffset),{...o,timeOffset:u,baselineTime:o.events[0].timestamp+u}}),play(o){var a;let{timer:u,events:f,baselineTime:d,lastPlayedEvent:p}=o;u.clear();for(let S of f)db(S,d);let g=MD(f,d),y=p?.timestamp;p?.type===Y.IncrementalSnapshot&&p.data.source===z.MouseMove&&(y=p.timestamp+((a=p.data.positions[0])==null?void 0:a.timeOffset)),d<(y||0)&&r.emit(Ee.PlayBack);let w=new Array;for(let S of g)if(!(y&&y<d&&(S.timestamp<=y||S===p)))if(S.timestamp<d)w.push(S);else{let C=e(S,!1);u.addAction({doAction:l(()=>{C()},"doAction"),delay:S.delay})}t(w),r.emit(Ee.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:fi(o=>({...o,lastPlayedEvent:null})),startLive:fi({baselineTime:l((o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now()),"baselineTime")}),addEvent:fi((o,a)=>{let{baselineTime:u,timer:f,events:d}=o;if(a.type==="ADD_EVENT"){let{event:p}=a.payload;db(p,u);let g=d.length-1;if(!d[g]||d[g].timestamp<=p.timestamp)d.push(p);else{let S=-1,C=0;for(;C<=g;){let v=Math.floor((C+g)/2);d[v].timestamp<=p.timestamp?C=v+1:g=v-1}S===-1&&(S=C),d.splice(S,0,p)}let y=p.timestamp<u,w=e(p,y);y?w():f.isActive()&&f.addAction({doAction:l(()=>{w()},"doAction"),delay:p.delay})}return{...o,events:d}})}});return Mw(i)}l(TD,"createPlayerService");function ID(n){let e=xw({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:l((t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},"setSpeed"),recordSpeed:fi({normalSpeed:l(t=>t.timer.speed,"normalSpeed")}),restoreSpeed:l(t=>{t.timer.setSpeed(t.normalSpeed)},"restoreSpeed")}});return Mw(e)}l(ID,"createSpeedService");var RD=l(n=>[`.${n} { background: currentColor }`,"noscript { display: none !important; }"],"rules"),vb=new Map;function Tw(n,e){let t=vb.get(n);return t||(t=new Map,vb.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}l(Tw,"variableListFor");function an(n,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await an(n,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:o}=r;return Tw(e,i)[o]}else if("args"in r){let{rr_type:i,args:o}=r,a=window[i];return new a(...await Promise.all(o.map(an(n,e,t))))}else{if("base64"in r)return gD(r.base64);if("src"in r){let i=n.get(r.src);if(i)return i;{let o=new Image;return o.src=r.src,n.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(an(n,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(an(n,e,t)));return r}}l(an,"deserializeArg");function AD(n,e){try{return e===Hr.WebGL?n.getContext("webgl")||n.getContext("experimental-webgl"):n.getContext("webgl2")}catch{return null}}l(AD,"getContext");var OD=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function _D(n,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!OD.includes(t))return;let r=Tw(n,t);r.includes(e)||r.push(e)}l(_D,"saveToWebGLVarMap");async function LD({mutation:n,target:e,type:t,imageMap:r,errorHandler:i}){try{let o=AD(e,t);if(!o)return;if(n.setter){o[n.property]=n.args[0];return}let a=o[n.property],u=await Promise.all(n.args.map(an(r,o))),f=a.apply(o,u);_D(o,f);let d=!1}catch(o){i(n,o)}}l(LD,"webglMutation");async function ND({event:n,mutations:e,target:t,imageMap:r,errorHandler:i}){let o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}let a=e.map(async f=>Promise.all(f.args.map(an(r,o))));(await Promise.all(a)).forEach((f,d)=>{let p=e[d];try{if(p.setter){o[p.property]=p.args[0];return}let g=o[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(r.get(n),g.apply(o,p.args)):g.apply(o,f)}catch(g){i(p,g)}})}l(ND,"canvasMutation$1");async function wb({event:n,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{let a=i.get(n)||e,u="commands"in a?a.commands:[a];if([Hr.WebGL,Hr.WebGL2].includes(e.type)){for(let f=0;f<u.length;f++){let d=u[f];await LD({mutation:d,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await ND({event:n,mutations:u,target:t,imageMap:r,errorHandler:o})}catch(a){o(e,a)}}l(wb,"canvasMutation");var Eh=class{static{l(this,"MediaManager")}constructor(e){P(this,"mediaMap",new Map),P(this,"warn"),P(this,"service"),P(this,"speedService"),P(this,"emitter"),P(this,"getCurrentTime"),P(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(Ee.Start,this.start.bind(this)),this.emitter.on(Ee.SkipStart,this.start.bind(this)),this.emitter.on(Ee.Pause,this.pause.bind(this)),this.emitter.on(Ee.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,a="duration"in t&&t.duration;if(Number.isNaN(a)){this.waitForMetadata(t);return}let u=r.currentTimeAtLastInteraction+o;t.loop&&a!==!1&&(u=u%a),t.currentTime=u}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=l(()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})},"onLoadedMetadata");this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let i=this.mediaMap.get(e),{type:o,playbackRate:a,currentTime:u,muted:f,volume:d,loop:p}=r;return{isPlaying:o===on.Play||o!==on.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:u??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:a??i?.playbackRate??1,volume:d??i?.volume??1,muted:f??i?.muted??e.getAttribute("muted")===null,loop:p??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:o,isPlaying:a}=t,u=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!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==f&&(e.playbackRate=f),a&&!u?e.play():e.pause()}catch(d){this.warn(`Failed to replay media interactions: ${d.message||d}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;let a=this.service.state.matches("paused"),u=o.attributes,f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&a&&i.pause();let d=1;typeof u.rr_mediaPlaybackRate=="number"&&(d=u.rr_mediaPlaybackRate);let p=!1;typeof u.rr_mediaMuted=="boolean"?p=u.rr_mediaMuted:p=i.getAttribute("muted")!==null;let g=!1;typeof u.rr_mediaLoop=="boolean"?g=u.rr_mediaLoop:g=i.getAttribute("loop")!==null;let y=1;typeof u.rr_mediaVolume=="number"&&(y=u.rr_mediaVolume);let w=0;typeof u.rr_mediaCurrentTime=="number"&&(w=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:w,lastInteractionTimeOffset:t,playbackRate:d,volume:y,muted:p,loop:g}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function Da(n,e){if(n.nodeName!=="DIALOG"||n instanceof sr)return;let t=n,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),a=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",u=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&u))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),a&&(u?t.showModal():t.show())}}l(Da,"applyDialogToTopLevel");function DD(n,e){if(n.nodeName!=="DIALOG"||n instanceof sr)return;let t=n;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}l(DD,"removeDialogFromTopLevel");var kD=5*1e3,PD=Sw||CD,Sb="[replayer]",Ef={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Eb(n){return n.type==Y.IncrementalSnapshot&&(n.data.source==z.TouchMove||n.data.source==z.MouseInteraction&&n.data.type==ie.TouchStart)}l(Eb,"indicatesTouchDevice");var cl=class{static{l(this,"Replayer")}constructor(e,t){if(P(this,"wrapper"),P(this,"iframe"),P(this,"service"),P(this,"speedService"),P(this,"config"),P(this,"usingVirtualDom",!1),P(this,"virtualDom",new Ci),P(this,"mouse"),P(this,"mouseTail",null),P(this,"tailPositions",[]),P(this,"emitter",PD()),P(this,"nextUserInteractionEvent"),P(this,"legacy_missingNodeRetryMap",{}),P(this,"cache",ky()),P(this,"imageMap",new Map),P(this,"canvasEventMap",new Map),P(this,"mirror",Mb()),P(this,"styleMirror",new il),P(this,"mediaManager"),P(this,"firstFullSnapshot",null),P(this,"newDocumentQueue",[]),P(this,"mousePos",null),P(this,"touchActive",null),P(this,"lastMouseDownEvent",null),P(this,"lastHoveredRootNode"),P(this,"lastSelectionData",null),P(this,"constructedStyleMutations",[]),P(this,"adoptedStyleSheets",[]),P(this,"handleResize",u=>{this.iframe.style.display="inherit";for(let f of[this.mouseTail,this.iframe])f&&(f.setAttribute("width",String(u.width)),f.setAttribute("height",String(u.height)))}),P(this,"applyEventsSynchronously",u=>{for(let f of u){switch(f.type){case Y.DomContentLoaded:case Y.Load:case Y.Custom:continue;case Y.FullSnapshot:case Y.Meta:case Y.Plugin:case Y.IncrementalSnapshot:break}this.getCastFn(f,!0)()}}),P(this,"getCastFn",(u,f=!1)=>{let d;switch(u.type){case Y.DomContentLoaded:case Y.Load:break;case Y.Custom:d=l(()=>{this.emitter.emit(Ee.CustomEvent,u)},"castFn");break;case Y.Meta:d=l(()=>this.emitter.emit(Ee.Resize,{width:u.data.width,height:u.data.height}),"castFn");break;case Y.FullSnapshot:d=l(()=>{var g;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,f),(g=this.iframe.contentWindow)==null||g.scrollTo(u.data.initialOffset)},"castFn");break;case Y.IncrementalSnapshot:d=l(()=>{if(this.applyIncremental(u,f),!f&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let g of this.service.state.context.events)if(!(g.timestamp<=u.timestamp)&&this.isUserInteraction(g)){g.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=g);break}if(this.nextUserInteractionEvent){let g=this.nextUserInteractionEvent.delay-u.delay,y={speed:Math.min(Math.round(g/kD),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:y}),this.emitter.emit(Ee.SkipStart,y)}}},"castFn");break}return l(()=>{d&&d();for(let y of this.config.plugins||[])y.handler&&y.handler(u,f,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});let g=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[g]){let y=l(()=>{g<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Ee.Finish))},"finish"),w=50;u.type===Y.IncrementalSnapshot&&u.data.source===z.MouseMove&&u.data.positions.length&&(w+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(y,w)}this.emitter.emit(Ee.EventCast,u)},"wrappedCastFn")}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Ef,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Ee.Resize,this.handleResize),this.setupDom();for(let u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(Ee.Flush,()=>{if(this.usingVirtualDom){let u={mirror:this.mirror,applyCanvas:l((f,d,p)=>{wb({event:f,mutation:d,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:l((f,d)=>{f.source===z.StyleSheetRule?this.applyStyleSheetRule(f,d):f.source===z.StyleDeclaration&&this.applyStyleDeclaration(f,d)},"applyStyleSheetMutation"),afterAppend:l((f,d)=>{for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend")};if(this.iframe.contentDocument)try{tl(this.iframe.contentDocument,this.virtualDom,u,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 d=this.legacy_missingNodeRetryMap[f],p=rl(d.node,this.mirror,this.virtualDom.mirror);tl(p,d.node,u,this.virtualDom.mirror),d.node=p}catch(d){this.warn(d)}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[u,f]=this.lastMouseDownEvent;u.dispatchEvent(f)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Ee.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Sh([],{speed:this.config.speed});this.service=TD({events:e.map(u=>t&&t.unpackFn?t.unpackFn(u):u).sort((u,f)=>u.timestamp-f.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(Ee.StateChange,{player:u})}),this.speedService=ID({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(Ee.StateChange,{speed:u})}),this.mediaManager=new Eh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let o=this.service.state.context.events.find(u=>u.type===Y.Meta),a=this.service.state.context.events.find(u=>u.type===Y.FullSnapshot);if(o){let{width:u,height:f}=o.data;setTimeout(()=>{this.emitter.emit(Ee.Resize,{width:u,height:f})},0)}a&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(u=this.iframe.contentWindow)==null||u.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Eb)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),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,r;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}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(Ee.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(Ee.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(Ee.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Ee.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;Eb(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=ky()}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&&(xD(this.iframe.contentWindow,this.iframe.contentDocument),aw(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 r=[],i=new Set,o=l((f,d)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(r,f),this.mediaManager.isSupportedMediaElement(f)){let{events:p}=this.service.state.context;this.mediaManager.addMediaElements(f,e.timestamp-p[0].timestamp,this.mirror)}for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend");this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),C_(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:f,builtNode:d}of r)this.attachDocumentToIframe(f,d),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==f);let{documentElement:a,head:u}=this.iframe.contentDocument;this.insertStyleRules(a,u),i.forEach(f=>Da(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Ee.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=RD(this.config.blockClass).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; }"),!!i.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Qv(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:z.StyleSheetRule,adds:i.map((a,u)=>({rule:a,index:u}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let a=0;a<i.length;a++)(r=o.sheet)==null||r.insertRule(i[a],a)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,a=l((u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);let d=r.getMeta(u);if(d?.type===Pr.Element&&d?.tagName.toUpperCase()==="HTML"){let{documentElement:p,head:g}=t.contentDocument;this.insertStyleRules(p,g)}if(!this.usingVirtualDom)for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(u,{id:f,replayer:this})},"afterAppend");Ms(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(t.contentDocument,e.node.id);for(let{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(d=>d!==u);o.forEach(u=>Da(u))}collectIframeAndAttachDocument(e,t){if(Ts(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,o=this.service.state,a=l(()=>{o=this.service.state},"stateHandler");this.emitter.on(Ee.Start,a),this.emitter.on(Ee.Pause,a);let u=l(()=>{this.emitter.off(Ee.Start,a),this.emitter.off(Ee.Pause,a)},"unsubscribe");t.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(r.add(f),f.addEventListener("load",()=>{r.delete(f),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Ee.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Ee.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===Y.IncrementalSnapshot&&t.data.source===z.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),o=i?.createImageData(r.width,r.height);i?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async o=>{let a=await Promise.all(o.args.map(an(this.imageMap,null,r)));return{...o,args:a}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(an(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,o;let{data:a}=e;switch(a.source){case z.Mutation:{try{this.applyMutation(a,t)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,a)}break}case z.Drag:case z.TouchMove:case z.MouseMove:if(t){let u=a.positions[a.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:a}}else a.positions.forEach(u=>{let f={doAction:l(()=>{this.moveAndHover(u.x,u.y,u.id,t,a)},"doAction"),delay:u.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:e.delay-((r=a.positions[0])==null?void 0:r.timeOffset)});break;case z.MouseInteraction:{if(a.id===-1)break;let u=new Event(ln(ie[a.type])),f=this.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);this.emitter.emit(Ee.MouseInteraction,{type:a.type,target:f});let{triggerFocus:d}=this.config;switch(a.type){case ie.Blur:"blur"in f&&f.blur();break;case ie.Focus:d&&f.focus&&f.focus({preventScroll:!0});break;case ie.Click:case ie.TouchStart:case ie.TouchEnd:case ie.MouseDown:case ie.MouseUp:t?(a.type===ie.TouchStart?this.touchActive=!0:a.type===ie.TouchEnd&&(this.touchActive=!1),a.type===ie.MouseDown?this.lastMouseDownEvent=[f,u]:a.type===ie.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===ie.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===ie.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===ie.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===ie.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case ie.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case z.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.scrollData=a;break}this.applyScroll(a,t);break}case z.ViewportResize:this.emitter.emit(Ee.Resize,{width:a.width,height:a.height});break;case z.Input:{if(a.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.inputData=a;break}this.applyInput(a);break}case z.MediaInteraction:{let u=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);let f=u,{events:d}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:e.timestamp-d[0].timestamp,mutation:a});break}case z.StyleSheetRule:case z.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case z.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.canvasMutations.push({event:e,mutation:a})}else{let u=this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);wb({event:e,mutation:a,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case z.Font:{try{let u=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case z.Selection:{if(t){this.lastSelectionData=a;break}this.applySelection(a);break}case z.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,NN(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let d in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[d],g=Jv(p.node,this.virtualDom,this.mirror);g&&(p.node=g)}catch(p){this.warn(p)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(d=>r.getNode(d.id)?!0:(this.warnNodeNotFound(e,d.id),!1)),e.removes.forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return;let y=r.getNode(d.parentId);if(!y)return this.warnNodeNotFound(e,d.parentId);if(d.isShadow&&_n(y)&&(y=y.shadowRoot),r.removeNodeFromMap(g),y)try{y.removeChild(g),this.usingVirtualDom&&g.nodeName==="#text"&&y.nodeName==="STYLE"&&((p=y.rules)==null?void 0:p.length)>0&&(y.rules=[])}catch(w){if(w instanceof DOMException)this.warn("parent could not remove child in mutation",y,g,e);else throw w}});let i={...this.legacy_missingNodeRetryMap},o=[],a=l(d=>{let p=null;return d.nextId&&(p=r.getNode(d.nextId)),d.nextId!==null&&d.nextId!==void 0&&d.nextId!==-1&&!p},"nextNotInDOM"),u=l(d=>{var p,g;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let y=r.getNode(d.parentId);if(!y)return d.node.type===Pr.Document?this.newDocumentQueue.push(d):o.push(d);d.node.isShadow&&(_n(y)||y.attachShadow({mode:"open"}),y=y.shadowRoot);let w=null,S=null;if(d.previousId&&(w=r.getNode(d.previousId)),d.nextId&&(S=r.getNode(d.nextId)),a(d))return o.push(d);if(d.node.rootId&&!r.getNode(d.node.rootId))return;let C=d.node.rootId?r.getNode(d.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ts(y,r)){this.attachDocumentToIframe(d,y);return}let v=l((T,L)=>{if(!this.usingVirtualDom){Da(T);for(let V of this.config.plugins||[])V.onBuild&&V.onBuild(T,{id:L,replayer:this})}},"afterAppend"),M=Ms(d.node,{doc:C,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:v});if(d.previousId===-1||d.nextId===-1){i[d.node.id]={node:M,mutation:d};return}let A=r.getMeta(y);if(A&&A.type===Pr.Element&&d.node.type===Pr.Text){let T=Array.isArray(y.childNodes)?y.childNodes:Array.from(y.childNodes);if(A.tagName==="textarea")for(let L of T)L.nodeType===y.TEXT_NODE&&y.removeChild(L);else if(A.tagName==="style"&&T.length===1)for(let L of T)L.nodeType===y.TEXT_NODE&&!r.hasNode(L)&&(M.textContent=L.textContent,y.removeChild(L))}else if(A?.type===Pr.Document){let T=y;d.node.type===Pr.DocumentType&&((p=T.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&T.removeChild(T.childNodes[0]),M.nodeName==="HTML"&&T.documentElement&&T.removeChild(T.documentElement)}if(w&&w.nextSibling&&w.nextSibling.parentNode?y.insertBefore(M,w.nextSibling):S&&S.parentNode?y.contains(S)?y.insertBefore(M,S):y.insertBefore(M,null):y.appendChild(M),v(M,d.node.id),this.usingVirtualDom&&M.nodeName==="#text"&&y.nodeName==="STYLE"&&((g=y.rules)==null?void 0:g.length)>0&&(y.rules=[]),Ts(M,this.mirror)){let T=this.mirror.getId(M),L=this.newDocumentQueue.find(V=>V.parentId===T);L&&(this.attachDocumentToIframe(L,M),this.newDocumentQueue=this.newDocumentQueue.filter(V=>V!==L))}(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(i,y,M,d)},"appendNode");e.adds.forEach(d=>{u(d)});let f=Date.now();for(;o.length;){let d=YN(o);if(o.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}for(let p of d)r.getNode(p.value.parentId)?lw(p,y=>{u(y)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),KN(e.texts).forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return e.removes.find(w=>w.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);let y=g.parentElement;if(d.value&&y&&y.tagName==="STYLE"?g.textContent=ml(d.value,this.cache):g.textContent=d.value,this.usingVirtualDom){let w=g.parentNode;((p=w?.rules)==null?void 0:p.length)>0&&(w.rules=[])}}),e.attributes.forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return e.removes.find(y=>y.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);for(let y in d.attributes)if(typeof y=="string"){let w=d.attributes[y];if(w===null)g.removeAttribute(y),y==="open"&&DD(g,d);else if(typeof w=="string")try{if(y==="_cssText"&&(g.nodeName==="LINK"||g.nodeName==="STYLE"))try{let S=r.getMeta(g);Object.assign(S.attributes,d.attributes);let C=Ms(S,{doc:g.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),v=g.nextSibling,M=g.parentNode;if(C&&M){M.removeChild(g),M.insertBefore(C,v),r.replace(d.id,C);break}}catch{}if(y==="value"&&g.nodeName==="TEXTAREA"){let S=g;S.childNodes.forEach(v=>S.removeChild(v));let C=(p=g.ownerDocument)==null?void 0:p.createTextNode(w);C&&S.appendChild(C)}else g.setAttribute(y,w);y==="rr_open_mode"&&g.nodeName==="DIALOG"&&Da(g,d)}catch(S){this.warn("An error occurred may due to the checkout feature.",S)}else if(y==="style"){let S=w,C=g;for(let v in S)if(S[v]===!1)C.style.removeProperty(v);else if(S[v]instanceof Array){let M=S[v];C.style.setProperty(v,M[0],M[1])}else{let M=S[v];C.style.setProperty(v,M)}}}})}applyScroll(e,t){var r,i;let o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);let a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(a?.type===Pr.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.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,r=e.ranges.map(({start:i,startOffset:o,end:a,endOffset:u})=>{let f=this.mirror.getNode(i),d=this.mirror.getNode(a);if(!f||!d)return;let p=new Range;p.setStart(f,o),p.setEnd(d,u);let g=f.ownerDocument,y=g?.getSelection();return y&&t.add(y),{range:p,selection:y}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===z.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===z.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,a;if((r=e.adds)==null||r.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){let{positions:d,index:p}=nb(f);Ss(t.cssRules,d).insertRule(u,p)}else{let d=f===void 0?void 0:Math.min(f,t.cssRules.length);t?.insertRule(u,d)}}catch{}}),(i=e.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){let{positions:f,index:d}=nb(u);Ss(t.cssRules,f).deleteRule(d||0)}else t?.deleteRule(u)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(a=t.replaceSync)==null||a.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&Ss(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ss(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(u=>{var f;let d=null,p=null;if(_n(r)?p=((f=r.ownerDocument)==null?void 0:f.defaultView)||null:r.nodeName==="#document"&&(p=r.defaultView),!!p)try{d=new p.CSSStyleSheet,this.styleMirror.add(d,u.styleId),this.applyStyleSheetRule({source:z.StyleSheetRule,adds:u.rules},d)}catch{}});let i=10,o=0,a=l((u,f)=>{let d=f.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);_n(u)?u.shadowRoot.adoptedStyleSheets=d:u.nodeName==="#document"&&(u.adoptedStyleSheets=d),d.length!==f.length&&o<i&&(setTimeout(()=>a(u,f),0+100*o),o++)},"adoptStyleSheets");a(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:o,nextId:a}=i,u=o&&e[o],f=a&&e[a];if(u){let{node:d,mutation:p}=u;t.insertBefore(d,r),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}if(f){let{node:d,mutation:p}=f;t.insertBefore(d,r.nextSibling),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}}moveAndHover(e,t,r,i,o){let a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(o,r);let u=uw(a,this.iframe),f=e*u.absoluteScale+u.x,d=t*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${d}px`,i||this.drawMouseTail({x:f,y:d}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?Ef:Object.assign({},Ef,this.config.mouseTail),a=l(()=>{if(!this.mouseTail)return;let u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=r,u.lineCap=t,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())},"draw");this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==e),a()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==Y.IncrementalSnapshot?!1:e.data.source>z.Mutation&&e.data.source<=z.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Ee.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(Sb,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Sb,...e)}},{addCustomEvent:XU}=Zt,{freezePage:ZU}=Zt,{takeFullSnapshot:JU}=Zt;var Rw=l(n=>{let e=l(o=>o&&(o instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(o.type||"")||o instanceof HTMLTextAreaElement)?!(o.disabled||o.readOnly):!1,"isEditableInputOrTextArea"),t=l((o,a)=>{n({key:o,eventTarget:a})},"sendKeyEvent"),r=l(o=>(o.ctrlKey?"ctrl ":"")+(o.altKey?"alt ":"")+(o.shiftKey?"shift ":"")+(o.metaKey?"meta ":"")+o.key,"formatKeyProperties"),i=l(o=>{try{if(e(o.target))return;t(r(o),o.target)}catch{}},"onKeyUp");window.addEventListener("keyup",o=>{i(o)})},"startKeyboardObserver");var El=class n{constructor(e=document,t){this.target=e;this.onEvent=t;this.monitoredTextElements=[];this.inputEnabledSelectors=["[contenteditable=true]"].join(",");this.iframeObservers=[];this.monitorInputEnabledElement=l(e=>{e.addEventListener("input",t=>{this.onEvent({text:t.target?.innerText,eventTarget:t.target})})},"monitorInputEnabledElement")}static{l(this,"ContendEditableObserver")}startObserver(){this.startIframesObserver(),this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE&&r.nodeType===Node.ELEMENT_NODE){let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(he("*",i)).filter(o=>o.matches&&o.matches(this.inputEnabledSelectors)||o.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(()=>{he("iframe",this.target).forEach(t=>{if(this.iframeObservers.find(a=>a.iframe===t))return;let r=l(a=>{if(a.iframe.contentWindow)try{a.observer=new n(a.iframe.contentWindow.document,this.onEvent),a.observer.startObserver()}catch{}},"observeIframe"),i=t,o={iframe:i,observer:null};this.iframeObservers.push(o),i.contentWindow?r(o):i.addEventListener("load",()=>{r(o)})})},500)}startInputMonitoring(){this.monitoredTextElements=he(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}};var Cl=class{constructor(e){this.onEvent=e;this.onURLChange=l(()=>{setTimeout(()=>{let e=window.location.href;if(e!==this.currentURL){this.currentURL=e;try{this.onEvent({url:e})}catch{}}})},"onURLChange")}static{l(this,"URLObserver")}start(){window.addEventListener("popstate",r=>{this.onURLChange()}),window.addEventListener("locationchange",r=>{this.onURLChange()}),window.addEventListener("hashchange",r=>{this.onURLChange()});let e=window.history.pushState;window.history.pushState=(...r)=>(this.onURLChange(),e.apply(window.history,r));let t=window.history.replaceState;window.history.replaceState=(...r)=>(this.onURLChange(),t.apply(window.history,r))}};var fn={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")},cV={defaultMerge:fn.defaultMerge};function FD(n,e){return e}l(FD,"defaultMetaDataUpdater");function $D(n,e){return n.filter(t=>t!==void 0)}l($D,"defaultFilterValues");var Aw;(function(n){n[n.NOT=0]="NOT",n[n.RECORD=1]="RECORD",n[n.ARRAY=2]="ARRAY",n[n.SET=3]="SET",n[n.MAP=4]="MAP",n[n.OTHER=5]="OTHER"})(Aw||(Aw={}));function Ow(n){return typeof n!="object"||n===null?0:Array.isArray(n)?2:WD(n)?1:n instanceof Set?3:n instanceof Map?4:5}l(Ow,"getObjectType");function HD(n){let e=new Set;for(let t of n)for(let r of[...Object.keys(t),...Object.getOwnPropertySymbols(t)])e.add(r);return e}l(HD,"getKeys");function BD(n,e){return typeof n=="object"&&Object.prototype.propertyIsEnumerable.call(n,e)}l(BD,"objectHasProperty");function Lw(n){let e=0,t=n[0]?.[Symbol.iterator]();return{[Symbol.iterator](){return{next(){do{if(t===void 0)return{done:!0,value:void 0};let r=t.next();if(r.done===!0){e+=1,t=n[e]?.[Symbol.iterator]();continue}return{done:!1,value:r.value}}while(!0)}}}}}l(Lw,"getIterableOfIterables");var _w=["[object Object]","[object Module]"];function WD(n){if(!_w.includes(Object.prototype.toString.call(n)))return!1;let{constructor:e}=n;if(e===void 0)return!0;let t=e.prototype;return!(t===null||typeof t!="object"||!_w.includes(Object.prototype.toString.call(t))||!t.hasOwnProperty("isPrototypeOf"))}l(WD,"isRecord");function UD(n,e,t){let r={};for(let i of HD(n)){let o=[];for(let f of n)BD(f,i)&&o.push(f[i]);if(o.length===0)continue;let a=e.metaDataUpdater(t,{key:i,parents:n}),u=Dw(o,e,a);u!==fn.skip&&(i==="__proto__"?Object.defineProperty(r,i,{value:u,configurable:!0,enumerable:!0,writable:!0}):r[i]=u)}return r}l(UD,"mergeRecords$1");function VD(n){return n.flat()}l(VD,"mergeArrays$1");function zD(n){return new Set(Lw(n))}l(zD,"mergeSets$1");function GD(n){return new Map(Lw(n))}l(GD,"mergeMaps$1");function jD(n){return n.at(-1)}l(jD,"mergeOthers$1");var xl={mergeRecords:UD,mergeArrays:VD,mergeSets:zD,mergeMaps:GD,mergeOthers:jD};function Nw(...n){return qD({})(...n)}l(Nw,"deepmerge");function qD(n,e){let t=YD(n,r);function r(...i){return Dw(i,t,e)}return l(r,"customizedDeepmerge"),r}l(qD,"deepmergeCustom");function YD(n,e){return{defaultMergeFunctions:xl,mergeFunctions:{...xl,...Object.fromEntries(Object.entries(n).filter(([t,r])=>Object.hasOwn(xl,t)).map(([t,r])=>r===!1?[t,xl.mergeOthers]:[t,r]))},metaDataUpdater:n.metaDataUpdater??FD,deepmerge:e,useImplicitDefaultMerging:n.enableImplicitDefaultMerging??!1,filterValues:n.filterValues===!1?void 0:n.filterValues??$D,actions:fn}}l(YD,"getUtils");function Dw(n,e,t){let r=e.filterValues?.(n,t)??n;if(r.length===0)return;if(r.length===1)return Zh(r,e,t);let i=Ow(r[0]);if(i!==0&&i!==5){for(let o=1;o<r.length;o++)if(Ow(r[o])!==i)return Zh(r,e,t)}switch(i){case 1:return KD(r,e,t);case 2:return XD(r,e,t);case 3:return ZD(r,e,t);case 4:return JD(r,e,t);default:return Zh(r,e,t)}}l(Dw,"mergeUnknowns");function KD(n,e,t){let r=e.mergeFunctions.mergeRecords(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeRecords!==e.defaultMergeFunctions.mergeRecords?e.defaultMergeFunctions.mergeRecords(n,e,t):r}l(KD,"mergeRecords");function XD(n,e,t){let r=e.mergeFunctions.mergeArrays(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeArrays!==e.defaultMergeFunctions.mergeArrays?e.defaultMergeFunctions.mergeArrays(n):r}l(XD,"mergeArrays");function ZD(n,e,t){let r=e.mergeFunctions.mergeSets(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeSets!==e.defaultMergeFunctions.mergeSets?e.defaultMergeFunctions.mergeSets(n):r}l(ZD,"mergeSets");function JD(n,e,t){let r=e.mergeFunctions.mergeMaps(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeMaps!==e.defaultMergeFunctions.mergeMaps?e.defaultMergeFunctions.mergeMaps(n):r}l(JD,"mergeMaps");function Zh(n,e,t){let r=e.mergeFunctions.mergeOthers(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeOthers!==e.defaultMergeFunctions.mergeOthers?e.defaultMergeFunctions.mergeOthers(n):r}l(Zh,"mergeOthers");var QD={sampling:{mousemove:!1},userTriggeredOnInput:!0,maskInputOptions:{password:!1}},Ml=class{constructor(e,t={}){this.eventHandler=e;this.options=t;this.logNativeMutationObserver=!1;this.stopRRWebRecording=l(()=>{},"stopRRWebRecording");this.start=l(()=>{console.log("starting with options",this.options),this.stopRRWebRecording=Zt({...this.options,emit:l((e,t)=>{this.eventHandler(e,t)},"emit")}),this.logNativeMutationObserver&&this.selfObserve(),this.startURLObserver(),this.startKeyboardObserver(),this.startContentEditableObserver()},"start");this.stop=l(()=>{this.stopRRWebRecording()},"stop");this.startURLObserver=l(()=>{this.urlObserver=new Cl(({url:e})=>{let t={url:e};this.addCustomEvent("url-change",t)}),this.urlObserver.start()},"startURLObserver");this.startContentEditableObserver=l(()=>{this.contentEditableObserver=new El(document,({text:e,eventTarget:t})=>{let r={text:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("contenteditable-input",r)}),this.contentEditableObserver.startObserver()},"startContentEditableObserver");this.startKeyboardObserver=l(()=>{Rw(({key:e,eventTarget:t})=>{let r={key:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("key-stroke",r)})},"startKeyboardObserver");this.addCustomEvent=l((e,t)=>{Zt.addCustomEvent(e,t)},"addCustomEvent");this.tryGetMetaFromEventTarget=l(e=>{try{return this.getMeta(e)}catch{}},"tryGetMetaFromEventTarget");this.selfObserve=l(()=>{let e=document.getElementsByTagName("body"),t={attributes:!0,childList:!0,subtree:!0},r=l((o,a)=>{for(let u of o)u.type==="childList"?console.log("A child node has been added or removed.",u):u.type==="attributes"&&console.log(`The ${u.attributeName} attribute was modified.`,u)},"callback");new MutationObserver(r).observe(e[0],t)},"selfObserve");this.getNodeById=l(e=>Zt.mirror.getNode(e),"getNodeById");this.getMeta=l(e=>Zt.mirror.getMeta(e),"getMeta");this.eventHandler=e,this.options=Nw(QD,t)}static{l(this,"SessionRecorder")}};var kw=[{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 ek=5*60*1e3,Tl=class{constructor(){this.flashingTextElements=[]}static{l(this,"FlashingElementsDetector")}start(){this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.length>0&&t.addedNodes.forEach(r=>{r instanceof HTMLElement&&this.includeElement(r)&&setTimeout(()=>{this.flashingTextElements.push(this.processTextElements(r))},1e3)})})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout(()=>{this.stop()},ek)}stop(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}get(){let e=this.flashingTextElements.map(r=>r.filter(i=>!i.isConnected||vt(i.parentElement).isHidden)).filter(r=>r.length).map(r=>`<span>${r.map(i=>i.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),r,i=[];for(;r=t.nextNode();)vt(r.parentNode).isHidden||i.push(r);return i}};var Ii=class{static{l(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,r){return e.substr(0,t)+r+e.substr(t+r.length)}static compare(e,t){let r=e.length,i=t.length;if(r!==i)return r-i;for(let o=0;o<r;o++){let a=e.charCodeAt(o),u=t.charCodeAt(o);if(a!==u)return a-u}return 0}};var zs="checksum-ignore",Rl="checksum-get-more-items",Pw=20,tk=.7,Il,Fw,rk=0,$w=l((n,{forceIncludeAttribute:e,forceIncludeFileInput:t,forceIncludeElements:r,limit:i})=>{n.excludedElements?.forEach(w=>{w.removeAttribute(zs)}),n.excludedElements=new Set;let o=n.element,a=i??Math.min(Math.ceil(o.children.length*.5),o.children.length-Pw),u=l(w=>e&&(w.hasAttribute(e)||Array.from(w.querySelectorAll(`[${e}]`)).length>0)||t&&w.tagName.toLowerCase()==="input"&&w.type==="file"?!0:r.includes(w),"isForceIncluded"),f=l(w=>{let S=0;if(n.elementsToKeep.includes(w))return S;let C=Jh(w);C.length>=n.attributes.length&&S++;let v=C.filter(T=>n.attributes.includes(T)).length;v===n.attributes.length?S+=3:v>0&&S++;let A=Qh(w).filter(T=>n.classes.includes(T)).length;return A===n.classes.length?S+=2:A>0&&S++,S},"scoreElement"),d=Array.from(o.children).filter(w=>w.tagName===n.tagName&&!u(w)).map(w=>({element:w,score:f(w)})).sort((w,S)=>S.score-w.score),{inViewportElements:p,outOfViewportElements:g}=d.reduce((w,S)=>{let{element:C}=S;return hs(Ye(C,"Element")?C:C?.parentElement)?w.inViewportElements.push(C):w.outOfViewportElements.push(C),w},{inViewportElements:[],outOfViewportElements:[]}),y=l(w=>{for(let S of w)if(n.excludedElements.add(S),n.excludedElements.size===a)return!0},"excludeElements");return y(g)||y(p),nk(n),Array.from(n.excludedElements)},"viewportReducer");function nk(n){let{excludedElements:e,element:t}=n;e.forEach(r=>{r.setAttribute(zs,"")}),t._getmoreitemsid||(t._getmoreitemsid="gm"+rk++),n.id=t._getmoreitemsid,t.setAttribute(Rl,n.id)}l(nk,"markTemplateElements");function Jh(n){return Array.from(n.attributes).filter(e=>!e.name.startsWith("checksum")).map(e=>e.name.replace(/[0-9]/g,""))}l(Jh,"mapAttributes");function Qh(n){return n.className?.split(" ").filter(e=>e)??[]}l(Qh,"getElementClasses");function vr(n=document.body,{nodeRepetitionsThreshold:e=Pw}={}){try{return console.time("bettertemplatize"),Il=new Set,Hw(n,e),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(Il)),Array.from(Il)}catch(t){return console.error("[bettertemplatize] failed during template processing:",t.message),[]}}l(vr,"bettertemplatize");function Hw(n,e){Array.from(n.children).forEach(t=>{if(t instanceof SVGElement)return;let r=t.children.length;if(r>=e){let i=Array.from(t.children),o=Math.ceil(r*tk);for(let a=0;a<r;a++){let u=0,f=i.slice(0,a);for(let d=a+1;d<r&&u+r-d>=o;d++)try{if(Bw(i[a],i[d])){if(u++,u>=o){Il.add({element:t,...Fw,elementsToKeep:f});return}}else f.push(i[d])}catch{return}}}Hw(t,e)})}l(Hw,"traverse");var ik=.8,sk=.5,ok=.8,ak=5;function Bw(n,e,t=1){let r,i,o=l(C=>(C&&(Fw={attributes:r,classes:i,tagName:n.nodeName}),C),"response");if(n.nodeType!==e.nodeType)return o(!1);if(n instanceof SVGElement&&e instanceof SVGElement||n.nodeType===Node.TEXT_NODE)return o(!0);if(n.nodeType!==Node.ELEMENT_NODE)return o(!1);let a=n,u=e;if(a.tagName.toLowerCase()!==u.tagName.toLowerCase())return o(!1);let f=Jh(a),d=Jh(u);if(r=f.filter(C=>d.includes(C)),r.length/Math.max(f.length,d.length)<ik)return o(!1);let p=Qh(a),g=Qh(u);if(i=p.filter(C=>g.includes(C)),i.length/Math.max(p.length,g.length)<sk)return o(!1);if(t>=ak)return o(!0);if(a.shadowRoot&&!u.shadowRoot||!a.shadowRoot&&u.shadowRoot)return o(!1);let y=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),w=Array.from(u.shadowRoot?u.shadowRoot.children:u.children);if(y.length===0&&w.length===0)return o(!0);let S=0;for(let C=0;C<Math.min(y.length,w.length);C++)Bw(y[C],w[C],t+1)&&S++;return S/Math.max(y.length,w.length)<ok?o(!1):o(!0)}l(Bw,"areSimilar");function Ww(n,e){let t=n.toLowerCase();return e?{resolvedTag:"div",dataTag:null}:t.includes("-")?{resolvedTag:"div",dataTag:t}:{resolvedTag:n,dataTag:null}}l(Ww,"resolveTagName");var Uw=16e3;var lk=!0,ed={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Al=class{constructor(){this.checksumIdToRRwebIdMap={};this.flashingElementsDetector=new Tl;this.forceIncludeElements=[];this.preMapReducedHTMLSelectors=!1;this.useRrwebIdsAsChecksumIds=!1;this.excludedNodes=0;this.reducePercentage=50;this.scrollableElements={};this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],initialChecksumId:void 0,forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:"aria-label",includeFlashingElements:!0,onForceIncludeElement:l(()=>{},"onForceIncludeElement"),limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0,fromTimeMachine:!1}}static{l(this,"HTMLReducer")}preprocessDocument(e=document){rn("[preprocessDocument] querySelectorAllExtended");let t=he("*",e,{includeHTML:!0});nn("[preprocessDocument] querySelectorAllExtended"),rn("[preprocessDocument] isElementHidden");for(let r of t){if(this.shouldIgnoreElement(r))continue;let i=vt(r,ed);r.setAttribute("checksum-data-visible",!i.isHidden&&!i.isTransparent?"true":"false"),!i.isHidden&&i.isTransparent&&r.setAttribute("checksum-data-transparently-visible","true"),i.isBehindTransparentElement&&r.setAttribute("checksum-data-visible-under-transparent-element","true"),i.clickOffset&&r.setAttribute("checksum-data-click-offset",`${i.clickOffset.x};${i.clickOffset.y}`),this.markScrollableElement(r)}nn("[preprocessDocument] isElementHidden")}markScrollableElement(e){let{canScrollX:t,canScrollY:r,progressX:i,progressY:o}=dt.getScrollData(e);if(t&&(e.setAttribute("data-scrollable-x","true"),e.setAttribute("data-scrollable-x-progress",i.toString())),r&&(e.setAttribute("data-scrollable-y","true"),e.setAttribute("data-scrollable-y-progress",o.toString())),t||r)try{let{id:a}=this.getSessionMirror().getMeta(e);a&&(this.scrollableElements[a]={x:t?i:void 0,y:r?o:void 0})}catch(a){console.error("[markScrollableElement] Error getting rrwebId and updating scrollable elements",e,a)}}setSessionRecorder(e){this.sessionRecorder=e}markInteractableElements(e,t=document,{forceIncludeAttribute:r,forceIncludeFileInput:i}={}){rn("[markInteractableElements]"),this.interactableElements=[];let o=An(t,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),a=l((d,p)=>(d._checksumid||(d._checksumid=p??this.checksumIdCounter.getAndIncrement()),d.setAttribute("checksumid",d._checksumid),d.setAttribute("checksuminteractable","true"),d._checksumid),"setChecksumIdForElement"),u=l((d,p=!1,g)=>{if(this.shouldIgnoreElement(d))return;let y=d.getAttribute("checksum-data-click-offset")?.split(";"),w=y&&{x:parseInt(y[0]),y:parseInt(y[1])},S=a(d,g);this.interactableElements.push({checksumId:S,element:d,forced:p,clickOffset:w})},"handleInteractableElement");o.forEach(d=>u(d));let f=l(d=>{he(d,t,{includeHTML:!0}).forEach(p=>u(p,!0))},"forceIncludeSelector");r&&f(`[${r}]`),i&&f("input[type='file']"),this.forceIncludeElements.filter(({element:d})=>d?.isConnected).forEach(({element:d,checksumid:p})=>u(d,!0,p)),console.log(`Marked ${this.interactableElements.length} interactable elements`),nn("[markInteractableElements]")}truthyFilter(e){return!!e}shouldIgnoreElement(e){return e.hasAttribute(zs)}getSessionMirror(e=!1){return e?window.checksum.timeMachine.sessionReplayer:this.sessionRecorder}generateSimplifiedDom(e,t,{extraAllowedAttributes:r=[],checkElementInstanceType:i=!0,forceIncludeAttribute:o=void 0,forceIncludeFileInput:a=!1,svgIntegration:u="aria-label",onForceIncludeElement:f=void 0,contentWindow:d=window,assignChecksumIdsToAllElements:p=!0,assignRrwebIdsToAllElements:g=!0,fromTimeMachine:y=!1}={}){if(!e)return null;let w=l((pe,st=pe)=>{if(pe._originalNode=st,!Ye(pe,"Element")||!Ye(st,"Element"))return pe;let mt=pe,Nt=st;if(p&&!Nt.hasAttribute("checksumid")&&(Nt._checksumid||(Nt._checksumid=this.checksumIdCounter.getAndIncrement()),mt.setAttribute("checksumid",Nt._checksumid),this.nonInteractableElementsFromSimplifiedDom.push({checksumId:Nt._checksumid,element:Nt})),g){let gt=this.getSessionMirror(y);if(gt){let ct=gt.getMeta(Nt)?.id?.toString();ct&&(mt.setAttribute("rrwebid",ct),this.useRrwebIdsAsChecksumIds&&(mt.setAttribute("checksumid",ct),mt._checksumid=ct))}}return this.checksumIdToRRwebIdMap[Nt._checksumid]=parseInt(Nt._rrwebid),pe},"processSimplifiedDOMNode"),S=l((pe,st=e)=>w(document.createTextNode(pe),st),"createTextNode"),C=l((pe,st=e)=>w(document.createElement(pe),st),"createElementNode");if(e.nodeType===Node.ELEMENT_NODE){let pe=e;if(pe.tagName.toLowerCase()==="head"||this.shouldIgnoreElement(pe))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()?S(e.textContent+" "):null;if(e.nodeType!==Node.ELEMENT_NODE||i&&!(Ye(e,"HTMLElement")||Ye(e,"SVGElement")))return null;let v=e,M=v.tagName.toLowerCase()==="iframe"&&v.contentDocument,A=ei(M?v.contentDocument.documentElement:v,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(pe=>{v.matches(pe.selector)&&A.length>pe.limit&&A.splice(pe.limit)});let T=A.map(pe=>this.generateSimplifiedDom(pe,t,{extraAllowedAttributes:r,checkElementInstanceType:i,forceIncludeAttribute:o,forceIncludeFileInput:a,svgIntegration:u,onForceIncludeElement:f,contentWindow:M?v.contentWindow:d,assignChecksumIdsToAllElements:p,assignRrwebIdsToAllElements:g,fromTimeMachine:y})).filter(this.truthyFilter),L=v.getAttribute("checksum-data-visible")!=="false",V=v.hasAttribute("checksumid"),U=v.hasAttribute("role"),{customDescription:Z,customDescriptionTarget:W}=this.getElementCustomDescription(v,{enableSVGCustomDescription:!!u}),G=!!Z,re=v.hasAttribute("aria-label")||v.hasAttribute("name")||v.hasAttribute("alt"),B=v.hasAttribute(Rl)||this.forceIncludeElements.map(pe=>pe.element).includes(v)||!!o&&v.hasAttribute(o)||a&&v.tagName.toLowerCase()==="input"&&v.getAttribute("type")==="file",j=["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"],k=V||L&&(U||re||G||v.matches(j.join(",")));if(!(k||B)){if(!T.length)return null;if(T.length===1&&!Ye(T[0],"Text"))return T[0]}!k&&B&&f?.(v);let{resolvedTag:ee,dataTag:q}=Ww(v.tagName,v.tagName.toLowerCase()==="body"&&v.ownerDocument!==document),ae=l(()=>{if(G)switch(W){case"svg":switch(u){case"aria-label":let pe=C("svg");return pe.setAttribute("aria-label",Z),{simplifiedNode:pe,appendChildren:!1};case"text":if(v.hasAttribute("checksumid")){let mt=C("div");return mt.innerText=Z,{simplifiedNode:mt,appendChildren:!1}}return{simplifiedNode:S(` [${Z}] `),appendChildren:!1}}}return{simplifiedNode:C(ee)}},"makeSimplifiedNode"),{simplifiedNode:rt,appendChildren:De=!0}=ae();if(!Ye(rt,"Element"))return rt;let Pe=rt,gn=["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(r),$n=v.attributes;for(let pe of $n)for(let st of gn)new RegExp("^"+st+"$").test(pe.name)&&Pe.setAttribute(pe.name,pe.value??!0);if(q&&Pe.setAttribute("data-tag",q),v.isContentEditable?Pe.setAttribute("contenteditable","true"):!["TEXTAREA","INPUT","SELECT"].includes(v.tagName)&&window.getComputedStyle(v).cursor==="text"&&Pe.setAttribute("contenteditable","cursor-text"),Ye(v,"HTMLInputElement")&&v.getAttribute("type")==="checkbox")v.checked&&Pe.setAttribute("checked","true");else if(Ye(v,"HTMLInputElement")||Ye(v,"HTMLSelectElement"))Pe.setAttribute("value",v.value);else if(Ye(v,"HTMLTextAreaElement")&&!v.childNodes.length&&v.value){let pe=S(v.value);Pe.appendChild(pe)}return De&&T.forEach(pe=>Pe.appendChild(pe)),Pe}getElementCustomDescription(e,{enableSVGCustomDescription:t=!0}={}){return(Ye(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 r=e.querySelector("title");if(r)return r.textContent}findSvgElementDescriptionFromBank(e){return this.getSvgBank().find(t=>e.matches(`svg:has(${t.selector})`))?.description}getSvgBank(){return kw}restoreDom(e=document){he("*",e).forEach(r=>{r.removeAttribute("checksum-data-visible"),r.removeAttribute("checksum-data-transparently-visible"),r.removeAttribute("checksum-data-visible-under-transparent-element"),r.removeAttribute("checksumid"),r.removeAttribute("checksuminteractable"),r.removeAttribute("checksum-data-click-offset"),r.removeAttribute(zs),r.removeAttribute(Rl),r.removeAttribute("data-scrollable-x"),r.removeAttribute("data-scrollable-y"),r.removeAttribute("data-scrollable-x-progress"),r.removeAttribute("data-scrollable-y-progress"),r.removeAttribute("rrwebid")})}removeAttribute(e){he("*",document).forEach(r=>{r.removeAttribute(e)})}async mapAndStoreSelectors(){let e={},t=new Wt;for(let{checksumId:r,element:i,clickOffset:o,selector:a,locator:u,parentFramesSelectors:f}of await t.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom)){if(!a){console.warn("Unable to get selector for element",i);continue}let d=i;e[r]={element:d,selector:a,locator:u,clickOffset:o,parentFramesSelectors:f,innerText:d.innerText,rrwebId:this.checksumIdToRRwebIdMap[r]}}return e}shouldFurtherReduce(e){return e?e.outerHTML.length>Uw:!0}async reduce(e=document,t,r={}){console.time("reduceHTML");let{initialChecksumId:i,forceIncludeAttribute:o,forceIncludeFileInput:a,invalidateCache:u,includeFlashingElements:f,limitNodeRepetitions:d,stopFlashingElementsDetection:p}=this.lastReduceHTMLOptions={...this.defaultReduceHTMLOptions,...r},g=Lt.getInstance("reduce",{target:e,monitorInput:!0,invalidate:u,log:!1});if(g.hasCache())return g.get();let y=f?this.flashingElementsDetector.get():void 0;p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=d,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0,this.scrollableElements={};let w=l(M=>$w(M,{forceIncludeAttribute:o,forceIncludeFileInput:a,forceIncludeElements:this.forceIncludeElements.map(A=>A.element),limit:Math.min(Math.ceil(M.element.children.length*(this.reducePercentage/100)),M.element.children.length-6)}),"templateReducer");console.log("Running pre-templatize"),this.templatize(w),console.log("Preprocessing document..."),this.preprocessDocument(e);let S;for((i||!this.checksumIdCounter)&&(this.checksumIdCounter=new Ii(i??"0")),console.log("Marking interactable elements..."),this.markInteractableElements(t,e,{forceIncludeAttribute:o,forceIncludeFileInput:a});;){if(console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],S=this.generateSimplifiedDom(e.documentElement,t,this.lastReduceHTMLOptions),!S)throw new Error("Unable to get simplified DOM");if(this.shouldFurtherReduce(S)){if(console.log(`Will further reduce (${S.outerHTML.length})...`),!this.templatize(w)){console.log(`Exceeded maximum html reduction, stopping (html size: ${S.outerHTML.length})`);break}}else break}console.log("Simplified DOM generated, length:",S.outerHTML.length);let C=new Set(Array.from(S.querySelectorAll("[checksumid]")).map(M=>M.getAttribute("checksumid")));this.interactableElementsFromSimplifiedDom=this.interactableElements.filter(M=>C.has(M.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(e),this.preMapReducedHTMLSelectors=lk?!1:!!t.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((M,A)=>(M[A.checksumId]=A,M),{});let v={reducedDomHTMLElement:S,reducedHTML:S.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:y,scrollableElements:this.scrollableElements};return g.set(v),console.timeEnd("reduceHTML"),v}templatize(e){let t=this.excludedNodes,r=l(()=>Array.from(this.templateNodes).reduce((i,o)=>i+e(o).length,0),"calcExculdedNodes");if(!this.templateNodes)this.templateNodes=vr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=r();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=vr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=r()}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 r=this.templateNodes.find(d=>d.id===e);if(!r)throw new Error("Template not found");let{element:i,excludedElements:o}=r;console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);let a=[],u=l(()=>a.map(d=>d.outerHTML).join(""),"getElementsHTML"),f=o.values();for(;u().length<Uw*.5;){let d=f.next().value;if(!d)break;let p=Array.from(d.querySelectorAll("[checksumid]")).concat(d._checksumid?[d]:[]);this.interactableElements.filter(g=>p.includes(g.element)).forEach(g=>{this.elementsInSimplifiedDomByChecksumId[g.element._checksumid]=g}),a.push(this.generateSimplifiedDom(d,t,this.lastReduceHTMLOptions)),o.delete(d)}return this.restoreDom(i),{items:u(),hasMoreItems:o.size>0}}catch(r){console.error("[getMoreElementsFromTemplate] error",r);return}}async getSelectorForChecksumId(e,{forceGenerate:t=!1}={}){let r=l(d=>({selector:e,element:d?d.element:null,locator:"",parentFramesSelectors:[],invalid:!0,rrwebId:this.checksumIdToRRwebIdMap[e],clickOffset:d?.clickOffset,innerText:d?d.element.innerText:""}),"makeDefaultResult"),i=new Wt,o=this.elementsInSimplifiedDomByChecksumId[e];if(!o||!o.element.isConnected)return this.preMapReducedHTMLSelectors&&this.selectors[e]?this.selectors[e]:r(o);let{selector:a,locator:u,parentFramesSelectors:f}=await i.getSelectorAndLocator(o.element);return{...r(o),selector:a,locator:u,parentFramesSelectors:f,invalid:!1}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]?.element}hasInnerTextByChecksumId(e,{maxLength:t=void 0,minLength:r=void 0}={}){if(!this.preMapReducedHTMLSelectors){let o=this.elementsInSimplifiedDomByChecksumId[e]?.element?.innerText;return!(!o||r&&o.length<r||t&&o.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}};function zw(n){return n._debugSource?.fileName?n._debugSource?.fileName:""}l(zw,"getComponentpath");function Vw(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=zw(e);return!(/.*\/node_modules\//.test(t)||n===t||/^(?!.*src).*$/.test(t))}l(Vw,"isComponentAllowed");function td(n,e={}){if(!n)return["",{}];let t=n.type,r=t?t.name||t:"Unknown",i="";if(Vw(r,n)){i+=`<${r}>`;let o=zw(n);e[r]=o}if(n.child){let[o,a]=td(n.child,e);i+=o,e={...e,...a}}if(Vw(r,n)&&(i+=`</${r}>`),n.sibling){let[o,a]=td(n.sibling,e);i+=o,e={...e,...a}}return[i,e]}l(td,"traverseReactTree");function Gw(n){let e=n._reactRootContainer?._internalRoot.current;return e||console.log("No react tree in element",n),td(e)}l(Gw,"getReactTree");var Ri=class n{static{l(this,"FrontendLogger")}static{this.overriddenMethods=["log","warn","error"]}static{this.original={}}static removePrefix(){this.overriddenMethods.forEach(e=>{n.original[e]&&(console[e]=n.original[e])})}static setPrefix(e){this.overriddenMethods.forEach(t=>{n.original[t]||(n.original[t]=console[t]),console[t]=(...r)=>{r.unshift(e),n.original[t].apply(console,r)}})}};var Ol=class{constructor(e=i=>i.map(o=>o.target),t={childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r={collectElement:!0}){this.filterElements=e;this.observeOptions=t;this.options=r;this.mutationEventListeners=[]}static{l(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(r=>{if(r.nodeType!==Node.ELEMENT_NODE)return;let i=r;this.mutationEventListeners.forEach(o=>{i.matches(o.selector)?o.listener(i):i.querySelectorAll(o.selector).forEach(a=>{o.listener(a)})})})})}),this.observer.observe(document.body,this.observeOptions)}stopListening(){return this.observer.disconnect(),this.elements}};function jw(n){let e=n.filter(r=>r.addedNodes.length>0).reduce((r,i)=>[...r,...i.addedNodes],[]),t=n.filter(r=>r.type==="attributes"&&r.attributeName==="style"&&r.target instanceof HTMLElement&&/display\s*:\s*none/.test(r.oldValue)&&ra(r.target).visible).map(r=>r.target);return[...e,...t]}l(jw,"poppingElementsFilter");function ck(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}l(ck,"findCommonAncestor");function rd(n,e){let t=ck(n,e),r=0,i;if(!t)return 99999;for(i=n;i&&i!==t;)r++,i=i.parentNode;for(i=e;i&&i!==t;)r++,i=i.parentNode;return r}l(rd,"distanceBetweenNodes");var nd=class{constructor(){this.lastHighlights=[]}static{l(this,"ElementHighlighter")}clearHighlights(){this.lastHighlights.length&&(this.lastHighlights.forEach(e=>e.remove()),this.lastHighlights=[])}highlightElement(e,{highlightStyle:t={},textStyle:r={},mousePosition:i,text:o,textType:a="static",textPosition:u="overlap",textWidthType:f="rect",clear:d=!0,shouldFlipHighlightTextOutsideViewport:p=!0,pointerEvents:g,classNames:y=[],renderDocument:w,scroll:S=!1}={}){if(d&&this.clearHighlights(),!e)return;let C={left:0,top:0,right:0,bottom:0},v=1,M=1;if(w!==e.ownerDocument){let G=e.ownerDocument.defaultView?.frameElement;for(;G&&G.contentDocument!==w;){let re=G.getBoundingClientRect(),B=this.getScaleFromStyles(G);v*=B.scaleX,M*=B.scaleY,C.left+=re.left,C.top+=re.top,G=G.ownerDocument.defaultView?.frameElement}}let A=w??e.ownerDocument,T=Qu(e),L=e.getBoundingClientRect(),V={top:L.top*M+C.top,left:L.left*v+C.left};if(!T){let G=A.defaultView?.scrollX||0,re=A.defaultView?.scrollY||0;V.left+=G,V.top+=re}let U=A.createElement("div");if(U.style.outline="2px dashed rgba(255,0,0,.75)",U.style.position=T?"fixed":"absolute",U.style.left=V.left+"px",U.style.top=V.top+"px",U.style.width=L.width*v+"px",U.style.height=L.height*M+"px",U.style.pointerEvents=g??"none",U.style.zIndex="2147483647",U.className=["checksum-dom-cache-ignore",...y].join(" "),this.mergeStyle(U,t),i){let G=A.createElement("div");if(G.style.position="absolute",G.style.left=+i.x-16+"px",G.style.top=+i.y-16+"px",G.style.color="#004DFF",G.className=["checksum-dom-cache-ignore","mouse-cross",...y].join(" "),G.style.zIndex="2147483648",!A.head.querySelector("style[role=mouse-location]")){var Z=A.head.appendChild(A.createElement("style"));Z.setAttribute("role","mouse-location"),Z.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);}"}A.body.appendChild(G),this.lastHighlights.push(G)}let W=A.createElement("div");o&&(W.className=["checksum-dom-cache-ignore",...y].join(" "),W.innerText=o,W.style.fontSize="12px",W.style.width=f==="rect"?`${L.width}px`:"auto",W.style.background="#000000a1",W.style.color="white",W.style.padding="5px",W.style.position="absolute",W.style.pointerEvents="none",W.style.userSelect="none",u==="above"?W.style.bottom=`${L.height}px`:u==="below"&&(W.style.top=`${L.height}px`),this.mergeStyle(W,r),U.appendChild(W),U.style.pointerEvents=g??"none",a==="hover"&&(W.style.display="none",U.addEventListener("mouseover",()=>{W.style.display="block"}),U.addEventListener("mouseout",()=>{W.style.display="none"}))),A.body.appendChild(U),u==="above"&&ef(W)>0?(W.style.bottom="initial",W.style.top=`${L.height}px`):u==="below"&&tf(W)>0&&(W.style.top="initial",W.style.bottom=`${L.height}px`),this.lastHighlights.push(U),p&&this.flipHighlightTextPositionOutsideViewport(W,u,L.height),S&&new dt(e).scrollIntoView()}getScaleFromStyles(e){let t=window.getComputedStyle(e),r=t.transform;if(r.startsWith("matrix")){let i=parseFloat(r.split(",")[0].replace("matrix(",""))||1,o=parseFloat(r.split(",")[3])||1;return{scaleX:i,scaleY:o}}else if(t.scale){let i=parseFloat(t.scale)||1,o=parseFloat(t.scale)||1;return{scaleX:i,scaleY:o}}return{scaleX:1,scaleY:1}}mergeStyle(e,t){for(let r in t)e.style[r]=t[r]}flipHighlightTextPositionOutsideViewport(e,t,r){t==="above"&&ef(e)>0?(e.style.bottom="initial",e.style.top=`${r}px`):t==="below"&&tf(e)>0&&(e.style.top="initial",e.style.bottom=`${r}px`)}},Br=new nd;function _l(n,e){return typeof n!="string"?qw(n):`${JSON.stringify(n)}${e?"s":"i"}`}l(_l,"escapeForTextSelector");function Ll(n,e=!1){return typeof n!="string"?qw(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}l(Ll,"escapeForAttributeSelector");function qw(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}l(qw,"escapeRegexForSelector");var uk=10,Oi=uk/2;var fk=100,hk=120,dk=140,pk=160,mk=180,gk=200;var d3=fk+Oi,p3=hk+Oi,m3=dk+Oi,g3=pk+Oi,y3=mk+Oi,b3=gk+Oi;function Ai(n){let e={full:"",immediate:[]};if(!yk(n)){let t="";if(n instanceof HTMLInputElement&&(n.type==="submit"||n.type==="button"))e={full:n.value,immediate:[n.value]};else{for(let r=n.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE?(e.full+=r.nodeValue||"",t+=r.nodeValue||""):(t&&e.immediate.push(t),t="",r.nodeType===Node.ELEMENT_NODE&&(e.full+=Ai(r).full));t&&e.immediate.push(t),n.shadowRoot&&(e.full+=Ai(n.shadowRoot).full)}}return e}l(Ai,"elementText");function Nl(n){return n.replace(/\u200b/g,"").trim().replace(/\s+/g," ")}l(Nl,"normalizeWhiteSpace");function yk(n){let e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}l(yk,"shouldSkipForTextMatching");function Gs(n){return n.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}l(Gs,"escapeSelector");function Wr(n){let e=n.ownerDocument.defaultView;return e!==window&&!e.playwright&&(e.playwright=window.playwright),e.playwright}l(Wr,"getElementWindowPlaywright");var Dl=["role","aria-label","aria-labelledby","aria-checked","checked","placeholder","title","alt","id","data-testid","data-test-id","data-test","class","id","style","href","src","path","type"];function _i(n){return typeof n=="object"&&n!==null&&n.nodeType===Node.ELEMENT_NODE}l(_i,"isElement");var kn={NONE:"",DESCENDANT:" ",CHILD:" > "},He={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};function Yw(n,e){return Object.values(n).includes(e)}l(Yw,"isEnumValue");var bk="CssSelectorGenerator";function Li(n="unknown problem",...e){console.warn(`${bk}: ${n}`,...e)}l(Li,"showWarning");var vk={selectors:[He.id,He.class,He.tag,He.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function wk(n){return Array.isArray(n)?n.filter(e=>Yw(He,e)):[]}l(wk,"sanitizeSelectorTypes");function id(n){return n instanceof RegExp}l(id,"isRegExp");function Sk(n){return["string","function"].includes(typeof n)||id(n)}l(Sk,"isCssSelectorMatch");function Kw(n){return Array.isArray(n)?n.filter(Sk):[]}l(Kw,"sanitizeCssSelectorMatchList");function Ek(n){return n instanceof Node}l(Ek,"isNode");function Xw(n){let e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return Ek(n)&&e.includes(n.nodeType)}l(Xw,"isParentNode");function sd(n,e){if(Xw(n))return n.contains(e)||Li("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),n;let t=e.getRootNode({composed:!1});return Xw(t)?(t!==document&&Li("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),t):js(e)}l(sd,"sanitizeRoot");function Zw(n){return typeof n=="number"?n:Number.POSITIVE_INFINITY}l(Zw,"sanitizeMaxNumber");function Jw(n,e={}){let t=Object.assign(Object.assign({},vk),e);return{selectors:wk(t.selectors),whitelist:Kw(t.whitelist),blacklist:Kw(t.blacklist),root:sd(t.root,n),combineWithinSelector:!!t.combineWithinSelector,combineBetweenSelectors:!!t.combineBetweenSelectors,includeTag:!!t.includeTag,maxCombinations:Zw(t.maxCombinations),maxCandidates:Zw(t.maxCandidates)}}l(Jw,"sanitizeOptions");function wr(n=[]){let[e=[],...t]=n;return t.length===0?e:t.reduce((r,i)=>r.filter(o=>i.includes(o)),e)}l(wr,"getIntersection");function kl(n){return[].concat(...n)}l(kl,"flattenArray");function Ck(n){return n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}l(Ck,"wildcardToRegExp");function qs(n){let e=n.map(t=>{if(id(t))return r=>t.test(r);if(typeof t=="function")return r=>{let i=t(r);return typeof i!="boolean"?(Li("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):i};if(typeof t=="string"){let r=new RegExp("^"+Ck(t)+"$");return i=>r.test(i)}return Li("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1});return t=>e.some(r=>r(t))}l(qs,"createPatternMatcher");function Ni(n,e,t){let r=Array.from(sd(t,n[0]).querySelectorAll(e));return r.length===n.length&&n.every(i=>r.includes(i))}l(Ni,"testSelector");function od(n,e){e=e??js(n);let t=[],r=n;for(;_i(r)&&r!==e;)t.push(r),r=r.parentElement;return t}l(od,"getElementParents");function Qw(n,e){return wr(n.map(t=>od(t,e)))}l(Qw,"getParents");function js(n){return n.ownerDocument.querySelector(":root")}l(js,"getRootNode");var Pl=", ",eS=new RegExp(["^$","\\s"].join("|")),tS=new RegExp(["^$"].join("|")),Fl=[He.nthoftype,He.tag,He.id,He.class,He.attribute,He.nthchild];var xk=qs(["class","id","ng-*"]);function Mk({name:n}){return`[${n}]`}l(Mk,"attributeNodeToSimplifiedSelector");function Tk({name:n,value:e}){return`[${n}='${e}']`}l(Tk,"attributeNodeToSelector");function Ik({nodeName:n,nodeValue:e},t){let r=t.tagName.toLowerCase();return["input","option"].includes(r)&&n==="value"||n==="src"&&e?.startsWith("data:")?!1:!xk(n)}l(Ik,"isValidAttributeNode");function Rk({nodeName:n,nodeValue:e}){return{name:Ur(n),value:Ur(e??void 0)}}l(Rk,"sanitizeAttributeData");function ad(n){let e=Array.from(n.attributes).filter(t=>Ik(t,n)).map(Rk);return[...e.map(Mk),...e.map(Tk)]}l(ad,"getElementAttributeSelectors");function rS(n){let e=n.map(ad);return wr(e)}l(rS,"getAttributeSelectors");function ld(n){var e;return((e=n.getAttribute("class"))!==null&&e!==void 0?e:"").trim().split(/\s+/).filter(t=>!tS.test(t)).map(t=>`.${Ur(t)}`)}l(ld,"getElementClassSelectors");function nS(n){let e=n.map(ld);return wr(e)}l(nS,"getClassSelectors");function cd(n){var e;let t=(e=n.getAttribute("id"))!==null&&e!==void 0?e:"",r=`#${Ur(t)}`,i=n.getRootNode({composed:!1});return!eS.test(t)&&Ni([n],r,i)?[r]:[]}l(cd,"getElementIdSelectors");function iS(n){return n.length===0||n.length>1?[]:cd(n[0])}l(iS,"getIdSelector");function ud(n){let e=n.parentNode;if(e){let r=Array.from(e.childNodes).filter(_i).indexOf(n);if(r>-1)return[`:nth-child(${String(r+1)})`]}return[]}l(ud,"getElementNthChildSelector");function sS(n){return wr(n.map(ud))}l(sS,"getNthChildSelector");function fd(n){return[Ur(n.tagName.toLowerCase())]}l(fd,"getElementTagSelectors");function $l(n){let e=[...new Set(kl(n.map(fd)))];return e.length===0||e.length>1?[]:[e[0]]}l($l,"getTagSelector");function hd(n){let e=$l([n])[0],t=n.parentElement;if(t){let i=Array.from(t.children).filter(o=>o.tagName.toLowerCase()===e).indexOf(n);if(i>-1)return[`${e}:nth-of-type(${String(i+1)})`]}return[]}l(hd,"getElementNthOfTypeSelector");function oS(n){return wr(n.map(hd))}l(oS,"getNthOfTypeSelector");function*Ak(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let t=0,r=dd(1);for(;r.length<=n.length&&t<e;)t+=1,yield r.map(o=>n[o]),r=Ok(r,n.length-1)}l(Ak,"powerSetGenerator");function pd(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(Ak(n,{maxResults:e}))}l(pd,"getPowerSet");function Ok(n=[],e=0){let t=n.length;if(t===0)return[];let r=[...n];r[t-1]+=1;for(let i=t-1;i>=0;i--)if(r[i]>e){if(i===0)return dd(t+1);r[i-1]++,r[i]=r[i-1]+1}return r[t-1]>e?dd(t+1):r}l(Ok,"bumpOffsets");function dd(n=1){return Array.from(Array(n).keys())}l(dd,"generateOffsets");function aS(n={}){let e=[];return Object.entries(n).forEach(([t,r])=>{e=r.flatMap(i=>e.length===0?[{[t]:i}]:e.map(o=>Object.assign(Object.assign({},o),{[t]:i})))}),e}l(aS,"getCartesianProduct");var _k="3a".toUpperCase(),Lk=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Ur(n=""){return CSS?CSS.escape(n):Nk(n)}l(Ur,"sanitizeSelectorItem");function Nk(n=""){return n.split("").map(e=>e===":"?`\\${_k} `:Lk.test(e)?`\\${e}`:escape(e).replace(/%/g,"\\")).join("")}l(Nk,"legacySanitizeSelectorItem");var Dk={tag:$l,id:iS,class:nS,attribute:rS,nthchild:sS,nthoftype:oS},kk={tag:fd,id:cd,class:ld,attribute:ad,nthchild:ud,nthoftype:hd};function lS(n,e){return kk[e](n)}l(lS,"getElementSelectorsByType");function Pk(n,e){let t=Dk[e];return t(n)}l(Pk,"getSelectorsByType");function Fk(n=[],e,t){return n.filter(r=>t(r)||!e(r))}l(Fk,"filterSelectors");function $k(n=[],e){return n.sort((t,r)=>{let i=e(t),o=e(r);return i&&!o?-1:!i&&o?1:0})}l($k,"orderSelectors");function Hk(n,e,t){let r=Bk(n,t),i=zk(r,t),o=kl(i);return[...new Set(o)]}l(Hk,"getAllSelectors");function Bk(n,e){let{blacklist:t,whitelist:r,combineWithinSelector:i,maxCombinations:o}=e,a=qs(t),u=qs(r),f=l((d,p)=>{let g=Pk(n,p),y=Fk(g,a,u),w=$k(y,u);return d[p]=i?pd(w,{maxResults:o}):w.map(S=>[S]),d},"reducer");return Wk(e).reduce(f,{})}l(Bk,"getSelectorsList");function Wk(n){let{selectors:e,includeTag:t}=n,r=[...e];return t&&!r.includes("tag")&&r.push("tag"),r}l(Wk,"getSelectorsToGet");function Uk(n){return n.includes(He.tag)||n.includes(He.nthoftype)?[...n]:[...n,He.tag]}l(Uk,"addTagTypeIfNeeded");function Vk(n){let{selectors:e,combineBetweenSelectors:t,includeTag:r,maxCandidates:i}=n,o=t?pd(e,{maxResults:i}):e.map(a=>[a]);return r?o.map(Uk):o}l(Vk,"combineSelectorTypes");function zk(n,e){return Vk(e).map(t=>Gk(t,n)).filter(t=>t.length>0)}l(zk,"getTypeCombinations");function Gk(n,e){let t={};return n.forEach(i=>{let o=e[i];o&&o.length>0&&(t[i]=o)}),aS(t).map(qk)}l(Gk,"constructSelectors");function jk(n,e){return e[n]?e[n].join(""):""}l(jk,"constructSelectorType");function qk(n={}){let e=[...Fl];return n[He.tag]&&n[He.nthoftype]&&e.splice(e.indexOf(He.tag),1),e.map(t=>jk(t,n)).join("")}l(qk,"constructSelector");function Yk(n,e){return[...n.map(t=>e+kn.DESCENDANT+t),...n.map(t=>e+kn.CHILD+t)]}l(Yk,"generateCandidateCombinations");function Kk(n,e){return e===""?n:Yk(n,e)}l(Kk,"generateCandidates");function Xk(n,e,t="",r){let i=Hk(n,e,r),o=Kk(i,t);for(let a of o)if(Ni(n,a,e))return a;return null}l(Xk,"getSelectorWithinRoot");function cS(n,e,t="",r){if(n.length===0)return null;let i=[n.length>1?n:[],...Qw(n,e).map(o=>[o])];for(let o of i){let a=Xk(o,e,t,r);if(a)return{foundElements:o,selector:a}}return null}l(cS,"getClosestIdentifiableParent");function uS(n){(n instanceof NodeList||n instanceof HTMLCollection)&&(n=Array.from(n));let e=(Array.isArray(n)?n:[n]).filter(_i);return[...new Set(e)]}l(uS,"sanitizeSelectorNeedle");function Zk(n){return{value:n,include:!1}}l(Zk,"createElementSelectorData");function fS(n,e,t=kn.NONE){let r={};return e.forEach(i=>{Reflect.set(r,i,lS(n,i).map(Zk))}),{element:n,operator:t,selectors:r}}l(fS,"createElementData");function hS({selectors:n,operator:e}){let t=[...Fl];n[He.tag]&&n[He.nthoftype]&&(t=t.filter(i=>i!==He.tag));let r="";return t.forEach(i=>{var o;((o=n[i])!==null&&o!==void 0?o:[]).forEach(({value:u,include:f})=>{f&&(r+=u)})}),e+r}l(hS,"constructElementSelector");function Jk(n){return[":root",...od(n).reverse().map(r=>{let i=fS(r,[He.nthchild],kn.CHILD);return i.selectors.nthchild.forEach(o=>{o.include=!0}),i}).map(hS)].join("")}l(Jk,"getElementFallbackSelector");function dS(n){return n.map(Jk).join(Pl)}l(dS,"getFallbackSelector");function md(n,e={}){var t;let r=uS(n),i=Jw(r[0],e),o=(t=i.root)!==null&&t!==void 0?t:js(r[0]),a="",u=o;function f(){return cS(r,u,a,i)}l(f,"updateIdentifiableParent");let d=f();for(;d;){let{foundElements:p,selector:g}=d;if(Ni(r,g,o))return g;u=p[0],a=g,d=f()}return r.length>1?r.map(p=>md(p,i)).join(Pl):dS(r)}l(md,"getCssSelector");var Hl=l(n=>new Promise(e=>setTimeout(e,n)),"awaitSleep"),pS=l(async(n,e=1e3,t)=>{if(e===null)return n;let r="guard-timed-out",i=null,o=l(async()=>new Promise(a=>{i=setTimeout(()=>{i=null,a(r)},e+1e3)}),"guard");try{let a=await Promise.race([n,o()]);if(i!==null&&(clearTimeout(i),i=null),typeof a=="string"&&a===r)throw typeof t=="function"?new Error(t()):new Error(t??"guardReturnTimedOut");return a}catch(a){throw i!==null&&(clearTimeout(i),i=null),a}},"guardReturn");var eP=!1,dn=class n{constructor(e){this.locators=[];this.elements=[];this.locators=e}static{l(this,"LocatorChain")}hasDuplicateFilters(){let e=this.locators.map(t=>t.options?.hasText).filter(t=>t);return e.length!==new Set(e).size}cloneAndAddCandidate(e){return new n([e,...this.locators.slice()])}toLocatorCandidate(){return{selector:this.getSelector(),locator:this.getLocator()}}getSelector(){return this.locators.map(e=>e.selector).join(" >> ")}getLocator(){return this.locators.map(e=>e.locator).join(".")}},pn=class n{constructor(e=document){this.rootNode=e;this.MAX_TESTING_SELECTORS=50;this.MAX_SINGLE_ELEMENT_SELECTORS=5;this.MAX_PROCESSING_TIME=15e3;this.MAX_MULTICANDIDATE_PROCESSING=5}static{l(this,"PlaywrightCustomLocatorGenerator")}async generate(e,t=[],r={}){let{isPartOfListItem:i,isForContextElement:o,useTextContent:a,addCSSSelectorGenerator:u,expandCSSKeyElements:f,bruteForceMode:d}={isPartOfListItem:!1,isForContextElement:!1,useTextContent:!0,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,bruteForceMode:!1,...r};if(Ye(e,"HTMLOptionElement")&&e.closest("select"))return this.generate(e.closest("select"),t,{isPartOfListItem:i});this.targetElement=e,this.startTimestamp=Date.now();let p=[];for(t=t.filter(y=>Array.from(document.querySelectorAll(y.selector)).includes(y.element)),f&&this.expandCSSKeyFeatures(e,t);e&&e!==this.rootNode;){await Hl(0);let y=this.getAllLocators(e,t,{useTextContent:a,bruteForceMode:d}),w=[],S=l(async C=>{if(!C.hasDuplicateFilters())try{await Hl(0);let{elements:v}=this.getLocatorBase(e).locator(C.getSelector());v?.some(M=>M===this.targetElement)&&(C.elements=v.filter(M=>hn(M)||M.constructor.name===this.targetElement.constructor.name),w.push(C))}catch(v){console.log(v,C.getSelector())}},"testCandidate");if(p.length)for(let C of y)for(let v of p)await S(v.cloneAndAddCandidate(C));else for(let C of y)await S(new dn([C]));if(w.length===0&&p.length===0){let C=e.tagName.toLowerCase();p.push(new dn([{selector:C,locator:this.getSelectorLocator(C),elements:this.getLocatorBase(e).locator(e.tagName.toLowerCase()).elements.filter(v=>hn(v))}]))}if(p.push(...w),o)return p.map(C=>C.toLocatorCandidate());if(p.length>this.MAX_TESTING_SELECTORS||p.filter(C=>C.elements.length===1).length>this.MAX_SINGLE_ELEMENT_SELECTORS||this.checkTimeout(!1))break;e=e.parentElement}if(i){let y=this.filterListItemsSelectors(p);if(y?.length)return y.map(w=>({...w.toLocatorCandidate(),isListSelector:!0}))}let g=[];try{for(let y of p)this.checkTimeout(),g.push(...y.elements.length===1?[y]:await this.reduceMultiCandidates(y))}catch(y){y instanceof tn&&console.warn("[PlaywrightCustomLocatorGenerator] Timeout error")}if(!g?.length&&(console.log("no single element selector found"),!f))return this.generate(e,t,{isPartOfListItem:i,isForContextElement:o,useTextContent:a,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0});if(u){let y=await this.addCSSSelectorGenerator();y&&g.unshift(y)}if(this.rootNode===document&&a){let{selector:y,locator:w}=await new Wt().getSelectorAndLocator(this.targetElement);g.unshift(new dn([{selector:y,locator:w}]))}return g=g.concat(await this.addOptionalParentSelector(a,u,f)),Array.from(new Map(g.map(y=>[y.toLocatorCandidate().selector,y.toLocatorCandidate()])).values())}testSelector(e,t,r,i=!0){let o=Wr(t).selector(t),a=this.getLocatorBase(t).locator(o);console.log("Locator result",a);let u=l(d=>i&&(d.elements.length!==1||t!==d.element)?!1:!!d.elements.includes(t),"testResult");if(!u(a))return{valid:!1};let f={};if(r?.locatorWithVars?.length)try{let p=new Function(`{ return function(element) { ${r.variablesCode}; return this.getLocatorBase(element).locator(\`${r.locatorWithVars}\`); } }`)().call(this,t);if(console.log("Locator with vars result",p),!u(p))return{valid:!1};f={selectorWithVars:o,locatorWithVars:r.locatorWithVars}}catch(d){return console.error("Error testing selector with variables",d.message),{valid:!1}}return{valid:!0,selector:o,locator:e,...f}}async addCSSSelectorGenerator(){try{let e=this.rootNode===document?{}:{root:this.rootNode},t=await pS(new Promise(r=>{let i=md(this.targetElement,e);r(i)}),2e3);if(t.length<50)return new dn([{selector:t,locator:`locator('${t}')`}])}catch(e){console.error("Error getting CSS selector",e)}}async addOptionalParentSelector(e,t,r){try{let i=Wr(this.targetElement),o=i.locator(i.selector(this.targetElement)).element;if(o!==this.targetElement&&o?.contains(this.targetElement))return(await this.generate(o,[],{isPartOfListItem:!1,isForContextElement:!1,useTextContent:e,addCSSSelectorGenerator:t,expandCSSKeyElements:r})).map(({selector:a,locator:u})=>new dn([{selector:a,locator:u}]))}finally{return[]}}expandCSSKeyFeatures(e,t,r=4){try{let i=[];for(;e&&e!==this.rootNode&&i.length<r&&e!==document.documentElement;)Array.from(e.attributes).filter(({name:a,value:u})=>u.length<30&&!Dl.includes(a)).forEach(a=>{try{if(i.length>r-1)return;let u=`[${a.name}${a.value?`="${a.value}"`:""}]`;try{if(!e.parentElement||e.parentElement.querySelectorAll(u).length>1)return}catch{console.warn(`Error checking selector - ${u}, continuing`);return}if(!t.some(f=>f.selector.includes(u))&&this.getLocatorBase(e).locator(u).element===e){let f={element:e,selector:u};t.push(f),i.push(f)}}catch(u){console.warn("Error processing css key feature",{name:a.name,value:a.value},u)}}),e=e.parentElement;i.length}catch(i){console.error("Error extracting CSS key features",i)}}async generateArbitraryItemListSelector(e,t=[]){console.log("generateArbitraryItemListSelector",e);try{let r=vr(document.body,{nodeRepetitionsThreshold:5});if(!r?.length)throw new Error("No templates found in the page");let i=r.find(y=>y.element.contains(e));if(!i)throw new Error("No template found for target element");console.log("Found template for target element",i);let o=await new n().generate(i.element,t,{isPartOfListItem:!1,isForContextElement:!1,useTextContent:!1});console.log("baseCustomSelectors",o);let a=o[0].selector,u=this.getSelectorLocator(a,i.element);console.log("Randomly selected baseSelector",a);let f=l(()=>{let y=[],w=new Pn,S=e;for(;S&&S!==i.element;){let C="",v=!1,M=!1,A=!1;for(;!C.length;)C=w.getSelectorPart(S,{useClasses:M,useId:v,useTag:A}),v?(M=!0,A=!0):v=!0;y.push({selector:C,element:S}),S=S.parentElement}return y},"getCSSFeatures"),d=f();console.log("cssFeatures",d);let p=(await new n(i.element).generate(e,f(),{isPartOfListItem:!0,isForContextElement:!1,useTextContent:!1})).map(y=>({...y,elements:[]})),g=p.filter(y=>(y.elements=this.getLocatorBase(e).locator(a).locator(y.selector).elements,y.elements.length>Math.ceil(i.element.children.length*.7)));return console.log("elementSelectors",p),g.map(({selector:y,locator:w})=>({selector:`${a} >> ${y}`,locator:`${u}.${w}`}))}catch(r){console.error("[findGenericItemListSelector] error",r)}}filterListItemsSelectors(e){try{let t=vr(document.body,{nodeRepetitionsThreshold:5});if(!t?.length)throw new Error("No templates found in the page");return e.filter(r=>{if(r.elements.length<2)return!1;let i=new Pn().getSmallestCommonRoot(r.elements);return!(!t.some(o=>o.element===i)||Array.from(i.children).some(o=>{r.elements.filter(a=>o.contains(a)).length>1}))})}catch(t){console.error("[filterListItemsSelectors] error",t.message)}}getLocatorBase(e){let t=Wr(e);return this.rootNode===document||this.rootNode.nodeType===9?t:t.locator(t.selector(this.rootNode))}getSelectorLocator(e,t){return Wr(t??this.targetElement).asLocator("javascript",e)}async reduceMultiCandidates(e){await Hl(0);let{elements:t}=e,r=e.getSelector().split(" >> "),i=[],o=this.getLocatorBase(this.targetElement),a=l(p=>{try{return i.push(new dn([{selector:p,locator:this.getSelectorLocator(p)}])),i.length>=this.MAX_MULTICANDIDATE_PROCESSING}catch(g){return console.error(g),!1}},"addCandidateWithSelector"),u=l(p=>e.getSelector()+(r[r.length-1]===this.targetElement.tagName.toLowerCase()?p:` >> internal:and=${tP(this.targetElement.tagName.toLowerCase()+p)}`),"addCSSFilterToLocator"),f=l(p=>o.locator(p).elements.length===1?a(p):!1,"addIfSingularAndCheckLimit");if(t.length<5){let p=t.indexOf(this.targetElement);p!==-1&&a(e.getSelector()+` >> nth=${p}`)}let d=this.targetElement.parentElement;if(t.every(p=>p.parentElement===d&&p.tagName===this.targetElement.tagName)){let p=Array.from(d.children).indexOf(this.targetElement);if(p!==-1){let g=u(`:nth-child(${p+1})`);f(g)&&a(g)}}for(let p of Array.from(this.targetElement.classList).filter(g=>!dr.includes(g))){let g=u(`.${Gs(p)}`);try{if(f(g))return i}catch(y){console.error(y)}}for(let p of Array.from(this.targetElement.attributes).filter(g=>!Dl.includes(g.name))){let g=u(`[${p.name}`+(p.value?`="${p.value}"]`:"]"));try{if(f(g))return i}catch(y){console.error(y)}}return i}getAllLocators(e,t,r={}){r={exact:!0,useTextContent:!0,...r};let i=[this.getByRoleLocator(e,r),r.useTextContent?this.getByTextLocator(e,r):null,this.getByLabelLocator(e,r),this.getByPlaceholderLocator(e,r),this.getByTitleLocator(e,r),this.getByAltLocator(e,r),this.getTestIdLocator(e,r),...e===this.targetElement?[this.getInnerFeaturesLocator(e)]:[],...t.filter(o=>o.element===e).map(o=>({selector:o.selector,locator:this.getSelectorLocator(o.selector)}))].filter(o=>o);return!i.length&&r.bruteForceMode?i.concat(this.findUniqueCSSLocatorForElement(e)):i}findUniqueCSSLocatorForElement(e,t=5){let r=[],i=l(o=>(r.push([{selector:o,locator:`locator('${o}')`}]),r.length>=t),"addCandidate");for(let o of Array.from(e.attributes).filter(({name:a,value:u})=>u.length<30&&!Dl.includes(a)))try{let a=`[${o.name}${o.value?`="${o.value}"`:""}]`;if(e.ownerDocument.querySelectorAll(a).length===1&&i(a))return r}catch{}for(let o of Array.from(e.classList).filter(a=>!dr.includes(a)))try{let a=`.${Gs(o)}`;if(e.ownerDocument.querySelectorAll(a).length===1&&i(a))return r}catch{}return r}getInnerFeaturesLocator(e){let t=e.tagName.toLowerCase();if(!hn(e)||["html","body","div"].includes(t))return;let r=new Nr().extract(e).filter(o=>!o.isRoot).slice(0,4).map(o=>si(o).pop());if(r.length<2)return;let i=t+r.map(o=>`:has(${o})`).join("");return{selector:i,locator:this.getSelectorLocator(i)}}getByRoleLocator(e,t={}){try{if(!hn(e))throw new Error("Provided element is not an HTMLElement");let r={},i={button:"button",input:l(w=>w.type==="checkbox"?"checkbox":w.type==="radio"?"radio":"textbox","input"),select:"listbox",a:"link",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",li:"listitem",option:"option",textarea:"textbox",table:"table",tr:"row",th:"columnheader",td:"cell",img:"img"},o=e.tagName.toLowerCase(),a=e.getAttribute("role")||(i[o]instanceof Function?i[o](e):i[o]);if(!a)return;let u=[];if(a==="heading"&&!e.hasAttribute("aria-level")){let w=parseInt(o.charAt(1),10);u.push(["level",String(w)])}(a==="checkbox"||a==="radio")&&u.push(["checked",String(e.getAttribute("aria-checked")??e.getAttribute("checked")??"false")]);let f=l(()=>{let w=l(T=>this.limitTextLength(this.normalize(T),t.exact),"normalize"),S={text:"",exact:!1},C=e.getAttribute("aria-label")??e.getAttribute("aria-labelledby")??e.getAttribute("title");if(C)return w(C);let v=Ai(e),M=Nl(v.full);if(!M?.length)return S;let A=w(M);return r.hasText=A.text,A},"getAccessibleName"),{text:d,exact:p}=f();d&&d.length>0&&d.length<30&&u.push(["name",Ll(d,p)]);let g=l(()=>{let w=`internal:role=${a}${u.map(([S,C])=>`[${S}=${C}]`).join("")}`;return{locator:this.getSelectorLocator(w),selector:w,options:r}},"getSelection"),y=g();if(d?.length&&p&&!this.getLocatorBase(e).locator(y.selector).elements.includes(e)){let w=u.find(S=>S[0]==="name");w&&(w[1]=Ll(d,!1),y=g())}return y}catch(r){console.error("Error getting role locator",r.message)}}getByTextLocator(e,t={}){try{if(!hn(e))return;let r=Nl(Ai(e).full);if(!r?.length||r.length>100)return;let i={};if(Array.from(e.children).filter(u=>hn(u)).some(u=>Nl(Ai(u).full)===r)){i.hasText=r;let u=`${e.tagName.toLowerCase()} >> internal:has-text=${_l(r,!1)}`;return{selector:u,locator:this.getSelectorLocator(u),options:i}}let o=l(u=>{let d="internal:text="+_l(r,u);return{selector:d,locator:this.getSelectorLocator(d),options:i}},"getSelection"),a=o(t.exact);return t.exact&&!this.getLocatorBase(e).locator(a.selector).elements.includes(e)&&(a=o(!1)),a}catch{}}getByLabelLocator(e,t={}){try{if(!hn(e)||!["input","textarea","select"].includes(e.tagName.toLowerCase()))return;let r=l(u=>({selector:`internal:label=${_l(u,t.exact)}`,locator:`getByLabel('${u}')`}),"respond"),i=e.getAttribute("aria-label");if(i)return r(i);let o=e.getAttribute("aria-labelledby");if(o){let u=document.getElementById(o);if(u){let f=u.innerText.trim();if(f)return r(f)}}let a=e.getAttribute("id");if(a){let u=document.querySelector(`label[for="${a}"]`);if(u){let f=u.innerText.trim();if(f)return r(f)}}}catch{}}getByPlaceholderLocator(e,t={}){if(["input","textarea"].includes(e.tagName?.toLowerCase()))return this.getByAttributeLocator(e,"placeholder",t)}getByTitleLocator(e,t={}){return this.getByAttributeLocator(e,"title",t)}getByAltLocator(e,t={}){return this.getByAttributeLocator(e,"alt",t)}getTestIdLocator(e,t={}){for(let r of["data-testid","data-test-id","data-test"])if(e.getAttribute(r))return this.getByAttributeLocator(e,r,{...t,locatorName:"getByTestId"})}getByAttributeLocator(e,t,r={}){try{if(!hn(e))return;let i=e.getAttribute(t);if(i)return{selector:`internal:attr=[${t}=${Ll(i,r.exact)}]`,locator:(r.locatorName??`getBy${t.charAt(0).toUpperCase()+t.slice(1)}`)+`('${i}')`}}catch{}}normalize(e){return e.replace(/\n/g,"").replace(/[ \t]+/g," ").trim()}limitTextLength(e,t=!0,r=30){for(;e?.length>30&&e.length<100&&e.includes(" ");)e=e.split(" ").slice(0,-1).join(" "),t=!1;return{text:e,exact:t}}checkTimeout(e=!0){if(eP)return!1;if(this.MAX_PROCESSING_TIME&&Date.now()-this.startTimestamp>this.MAX_PROCESSING_TIME){if(e)throw new tn;return!0}}};function tP(n,e=!1){return`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`}l(tP,"escapeForAndLocator");function hn(n){return Ye(n,"HTMLElement")}l(hn,"isInstanceOfHTMLElement");function mS(n=document,e){try{let r=function(a){let u=a.nodeName.toLowerCase(),f=!1;if(["name","label","aria-label","data-testid","role"].forEach(d=>{a.hasAttribute(d)&&(u+=`[@${d}="${a.getAttribute(d)}"]`,f=!0)}),!f){let d=1,p=a.previousSibling;for(;p;)p.nodeType===Node.ELEMENT_NODE&&p.nodeName===a.nodeName&&d++,p=p.previousSibling;d>1&&(u+=`[${d}]`)}return u};var t=r;if(l(r,"getNodeIdentifier"),!n||!e||!n.contains(e))throw new Error("Child is not a descendant of the given element.");let i=[],o=e;for(;o!==n;)o.nodeType===Node.ELEMENT_NODE&&i.unshift(r(o)),o=o.parentElement;return i.join("/")}catch(r){console.error("Failed to get relative xpath",r);return}}l(mS,"getRelativeXPath");function gS(n,e){return[new XPathEvaluator().evaluate(e,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue].filter(i=>i instanceof HTMLElement)}l(gS,"findElementsByXPath");var Pn=class{constructor(e){this.htmlReducer=e;this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION=13;this.MAX_SELECTORS_PER_CONTEXT_ELEMENT=10;this.innerFeaturesExtractor=new Nr;this.innerTextExtractor=new ai}static{l(this,"CompoundSelector")}filter(e,{isPartOfListItem:t=!1}={}){e.forEach(u=>{u.element=this.htmlReducer.getElementForChecksumId(u.selection.checksumid)});let r=e.splice(e.findIndex(u=>u.isTarget),1)[0],i=e.filter(u=>!!u.element&&!u.element.contains(r.element)&&!r.element.contains(u.element)&&!e.some(f=>f!==u&&(f.element===u.element||f.element.contains(u.element)))).concat(r);if(console.log(`filtered context elements, ${e.length+1} > ${i.length}`),!t)return i;let o=vr(document.body,{nodeRepetitionsThreshold:4});if(!o?.length)return[];let a=o.find(u=>u.element.contains(r.element));return a?(console.log("Found template for target element",a),i.filter(u=>a.element.contains(u.element))):[]}async generate(e,{isPartOfListItem:t=!1}={}){let r=e.filter(a=>a.isTarget)[0];if(e=this.filter(e,{isPartOfListItem:t}),e.length<2)throw new Error("Not enough elements found for the given checksum ids");if(!r?.element)throw new Error("Target element not found");let i=this.getSmallestCommonRoot(e.map(a=>a.element));if(!i)throw new Error("No common root found for the given elements");return this.extractFeaturesMetadata(e),{targetSelection:{xpath:mS(i,r.element),cssSelectors:this.generateAllContextualSelectors(i,r.element).filter(a=>a&&a.trim().length>0),playwrightSelectors:await new pn(i).generate(r.element,[],{addCSSSelectorGenerator:!1,expandCSSKeyElements:!1}),featuresMetadata:r.featuresMetadata},contextElements:e}}async select(e,t){e.forEach(o=>{if(o.find(a=>!a||!a.isConnected))throw new Error("One or more context elements are not connected to the DOM")});let r=l((o,a)=>{try{return o.selector(a)}catch{let f=a.ownerDocument.defaultView.parent?.document?.defaultView?.playwright;if(f)try{return f.selector(a)}catch{return}return}},"getElementSelector"),i=this.getSmallestCommonParents(e).map(this.calculateElementSize).sort((o,a)=>o.size-a.size).map(o=>o.element);return t?i.map(o=>{let a=Wr(o),{element:u}=a.locator(r(a,o)).locator(t);return u?r(a,u):null}).filter(o=>o):i.map(o=>{let a=Wr(o);if(!a){console.warn("Failed getting playwright for element",o);return}return r(a,o)}).filter(o=>o)}async selectFromMetadata(e){let{contextElements:t}=e;t.forEach(i=>this.getSelectorCandidatesForContextElement(i));let r=sa(t.map(i=>i.candidatesSelectors.map((o,a)=>a)));for(let i of r){t.forEach((a,u)=>a.selector=a.candidatesSelectors[i[u]]);let o=this.getSmallestCommonParentsFromMetadata(t).map(this.calculateElementSize).sort((a,u)=>a.size-u.size).map(a=>a.element);for(let a of o){let u=this.generateTargetSelectotionHistogram(a,e.targetSelection);if(u.size>0)return Array.from(u.keys()).slice(0,20).map(d=>Wr(d).generateSelectorAndLocator(d))}}}generateTargetSelectotionHistogram(e,t){let r=new Map,i=l(o=>{o.filter(a=>a instanceof HTMLElement).forEach(a=>{r.set(a,(r.get(a)||0)+1)})},"addElementstoHistogram");if(t.xpath)try{i(gS(e,t.xpath))}catch{}return t.cssSelectors.forEach(o=>{try{i(he(o,e))}catch{}}),new Map([...r.entries()].sort((o,a)=>a[1]-o[1]))}calculateElementSize(e){let t=e.getBoundingClientRect();return{element:e,size:t.width*t.height}}buildSelectorForContextElement(e,{useTag:t=!0,useInnerFeatures:r=!0,useClasses:i=!0,useAttributes:o=!0}){let a=t?e.featuresMetadata.tag:"";i&&e.featuresMetadata.classes.length&&(a+="."+e.featuresMetadata.classes.map(u=>u.trim().replace(/([!\"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")).join(".")),o&&(a+=Object.entries(e.featuresMetadata.attributes).map(([u,f])=>`[${u}="${f}"]`).join("")),r&&(a+=e.featuresMetadata.innerFeatures.filter(u=>!u.isRoot).map(u=>`:has(${si(u)})`).join("")),e.selector=a}getSelectorCandidatesForContextElement(e){let t=this.buildSelectorsCombination(e.featuresMetadata);e.candidatesSelectors=[];for(let r=0;r<t.length&&e.candidatesSelectors.length<this.MAX_SELECTORS_PER_CONTEXT_ELEMENT;r++)document.querySelector(t[r])&&e.candidatesSelectors.push(t[r])}buildSelectorsCombination(e){let t=this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION,r=l(y=>{let w=[[]];for(let S=0;S<y.length;S++){let C=w.length;for(let v=0;v<C;v++)w.push(w[v].concat(y[S]))}return w},"getCombinations"),i=l(y=>y.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1"),"escapeSelector"),o=e.tag,a=e.innerFeatures.filter(y=>!y.isRoot).map(y=>`:has(${si(y)})`).slice(0,4),u=e.classes.map(y=>`.${i(y)}`),f=Object.entries(e.attributes).map(([y,w])=>`[${y}="${i(w)}"]`),d=l(()=>a.length+1+u.length+f.length>t,"exceedsMaxLength");for(;d()&&(u.pop(),!!d());)f.pop();let p=r([...u,...f,...a]),g=p.map(y=>[o,...y]);return p.push(...g),p.map(y=>y.join("")).filter(y=>y).sort((y,w)=>w.length-y.length)}extractFeaturesMetadata(e){e.forEach(t=>{t.featuresMetadata={id:t.element.getAttribute("id")??void 0,tag:t.element.tagName.toLowerCase(),innerText:this.innerTextExtractor.extract(t.element),innerFeatures:this.innerFeaturesExtractor.extract(t.element),classes:Array.from(t.element.classList).filter(r=>!dr.includes(r))||[],attributes:Array.from(t.element.attributes).reduce((r,i)=>(["class","style","id"].includes(i.name)||(r[i.name]=i.value),r),{})}})}generateAllContextualSelectors(e,t){let r=[],i=[!0,!1];for(let a of i)for(let u of i)for(let f of i)r.push({useId:a,useClasses:u,useTag:f});let o=r.map(a=>this.createContextualSelector(e,t,a)).filter(a=>a).filter(a=>{try{let u=he(a,e);return u.length===1&&u[0]===t}catch{return!1}});return[...new Set(o)]}createContextualSelector(e,t,{useId:r=!1,useClasses:i=!0,useTag:o=!0}){if(!e||!t)return null;let a=[],u=t;for(;u&&u!==e;)a.unshift(this.getSelectorPart(u,{useId:r,useClasses:i,useTag:o})),u=u.parentElement;return u?a.join(" ").trim():null}getSelectorPart(e,{useId:t=!1,useClasses:r=!0,useTag:i=!0}){if(t&&e.id&&e.id.match(/^\D/))return`#${e.id}`;let o=i?e.tagName.toLowerCase():"";if(r&&e.className){let a=e.className.trim().split(/\s+/).filter(u=>!dr.includes(u)).map(Gs).join(".");a.length>0&&(o+="."+a)}return["name","label","aria-label","data-testid","role"].forEach(a=>{e.hasAttribute(a)&&(o+=`[${a}="${e.getAttribute(a)}"]`)}),o.trim()}getSmallestCommonRoot(e){let t=l(i=>{let o=[];for(;i;)o.push(i),i=i.parentElement;return o},"getAncestors"),r=t(e[0]);for(let i=1;i<e.length;i++){let o=t(e[i]);r=r.filter(a=>o.includes(a))}return r.length>0?r[0]:null}getSmallestCommonParentsFromMetadata(e){let t=e.map(r=>{try{let i=he(r.selector);return r.selection.type==="content"?i.filter(o=>o.textContent===r.selection.value):i}catch{return[]}});return t.some(r=>r.length===0)?[]:this.getSmallestCommonParents(t)}getSmallestCommonParents(e){let t=new Set;sa(e).forEach(o=>{let a=this.getSmallestCommonRoot(o);a&&t.add(a)});let i=Array.from(t);return i.filter(o=>!i.some(a=>o!==a&&o.contains(a)))}};var Bl=class{constructor(){this.MAX_SNIPPET_SIZE=12e3;this.MAX_LIONTAIL_SIZE=6e3;this.MAX_ATTRIBUTE_SIZE=100}static{l(this,"ParentChainReducer")}async reduce(e,t={useLionTail:!0,useChecksumIds:!0}){if(console.log("[ParentChainReducer] will reduce",e),!Ye(e,"HTMLElement")&&!Ye(e,"SVGElement"))throw new Error("Element is not an HTMLElement");return{reducedHTML:this.getAncestorsHTMLSnippet(e,t)}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]}getAncestorsHTMLSnippet(e,{useLionTail:t=!0,useChecksumIds:r=!0}={}){this.elementsInSimplifiedDomByChecksumId={};let i=this.MAX_LIONTAIL_SIZE,o=this.MAX_ATTRIBUTE_SIZE,a=[],u=e;e.setAttribute("checksum-selected","true");try{for(;u;)a.push(u),u.parentNode&&u.parentNode instanceof ShadowRoot?u=u.parentNode.host:u=u.parentElement;a.reverse();let f=l(y=>{for(let w=y.attributes.length-1;w>=0;w--){let S=y.attributes[w];S.name.length+S.value.length>o&&y.removeAttribute(S.name)}return y},"normalizeNode"),d,p=new Ii;do{d=a[0].cloneNode(!1);let y=d,w=as(d);for(let S=1;S<a.length;S++){if(t){let v=as(a[S]).length;if(v<=i&&w.length+v<=this.MAX_SNIPPET_SIZE){let M=this.deepCloneNode(a[S],r?p:void 0);y.appendChild(M);break}}let C=f(a[S].cloneNode(a[S]===e));if(r){let v=p.getAndIncrement();C.setAttribute("checksumid",v),this.elementsInSimplifiedDomByChecksumId[v]=a[S]}y.appendChild(C),y=C}i=Math.max(i-10,0),o=Math.max(o-10,0)}while(d.outerHTML.length>this.MAX_SNIPPET_SIZE&&o>0);return this.filterNodeClasses(d),as(d,{limitAttributeLength:!0})}catch(f){console.error("Error while getting ancestors HTML snippet",f)}finally{e.removeAttribute("checksum-selected")}}deepCloneNode(e,t){let r=e.cloneNode(!1),i=[e],o=[r];for(;i.length;){let a=i.shift(),u=o.shift();for(let f=0;f<a.childNodes.length;f++){let d=a.childNodes[f],p=d.cloneNode(!1);if(u.appendChild(p),t&&Ye(d,"HTMLElement")){let g=t.getAndIncrement();p.setAttribute("checksumid",g),this.elementsInSimplifiedDomByChecksumId[g]=d}i.push(d),o.push(p)}}return r}filterNodeClasses(e){let t=l(r=>{if("classList"in r){let i=r,o=i.classList;for(let a=0;a<o.length;a++){let u=o[a];dr.includes(u)&&i.classList.remove(u)}for(let a=0;a<i.children.length;a++)t(i.children[a])}},"filterClasses");t(e)}};var Wl=class{static{l(this,"FilesObserver")}constructor(e){this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}async getFilesByRrwebId(e){let t=this.filesMap[e]??[];try{let r=await Promise.all(t.map(async i=>({data:await rP(i),fileName:i.name})));return this.filesMap[e]=[],r}catch{console.log("Error while parsing files to base 64")}}init(){console.log("Starting observation..."),console.log(this.sessionMirror),this.observeDOMChanges(),window.addEventListener("unload",this.cleanup.bind(this))}handleFileChange(e){console.log("handleFileChange",this.sessionMirror);let t=e.target,r=Array.from(t.files||[]),i=this.sessionMirror.getMeta(t);this.filesMap[i.id]=r,console.log(`Files updated for ID: ${i.id}`,r)}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange.bind(this)),this.fileInputsWithListeners.add(t))})}observeDOMChanges(){let e=window.document,t=e.querySelectorAll('input[type="file"]');this.addFileInputListeners(t);let r=l(()=>{this.observer=new MutationObserver(o=>{o.forEach(a=>{if(a.type==="childList"){let u=a.target.querySelectorAll('input[type="file"]');this.addFileInputListeners(u)}})}),this.observer.observe(e.body,{childList:!0,subtree:!0})},"onBodyReady"),i=new MutationObserver(function(){e.body&&(i.disconnect(),r())});i.observe(e.documentElement,{childList:!0,subtree:!0})}cleanup(){console.log("Cleaning up files observer..."),this.observer&&this.observer.disconnect(),this.fileInputsWithListeners.forEach(e=>{e.removeEventListener("change",this.handleFileChange)}),this.fileInputsWithListeners.clear(),this.filesMap={}}},rP=l(n=>new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>{r.result?e(r.result.toString()):t(new Error("File reading failed"))},r.onerror=()=>{t(new Error("File reading failed"))},r.readAsDataURL(n)}),"convertFileToBase64");var Ul=class{constructor(e){this.sessionRecorder=e}static{l(this,"NativeDialogObserver")}init(){this.overrideDialog("alert"),this.overrideDialog("confirm"),this.overrideDialog("prompt")}overrideDialog(e){let t=window[e].bind(window);window[e]=r=>{let i=t(r),o=this.determineDialogAction(i,e);return this.sessionRecorder.addCustomEvent("native-dialog-event",{dialogType:e,dialogMessage:r,dialogResult:i,dialogAction:o}),i}}determineDialogAction(e,t){if(t==="alert")return"native_accept";if(t==="confirm")return e?"native_accept":"native_dismiss";if(t==="prompt")return e?"native_accept":"native_dismiss"}};var Vl=class n{constructor({rootDocument:e=document,getRenderDocument:t=l(u=>u?.document,"getRenderDocument"),defaultView:r,topLevelInspector:i,rootDocumentForSelectorGenerator:o,eventName:a}={}){this.wasHoveredElementSelected=!1;this.selected=[];this.singleSelection=!0;this.subDocumentInspector=null;this.listening=!1;this.locatorCache=gd.getInstance();this.onMouseOut=l(e=>{Br.clearHighlights()},"onMouseOut");this.onMouseOver=l(async e=>{let t=e.composedPath()[0];if("getRootNode"in t){let i=t.getRootNode();if(i!==this.rootDocument){this.handleSubDocument(i,this.defaultView);return}}if(Ye(t,"HTMLIFrameElement")){this.handleSubDocument(t.contentDocument,t.contentDocument.defaultView);return}if(this.subDocumentInspector&&this.stopSubDocumentInspector(!0),!Ye(t,"HTMLElement"))return;let r=t;if(!(r===this.hoveredElement||r.matches(".element-inspector-ignore"))){Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0});try{let{locator:i,selector:o,parentFramesSelectors:a,locatorRrwebId:u}=await this.getInspectedElementSelection(r,this.rootDocumentForSelectorGenerator);if(Br.highlightElement(r,{text:i.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"],renderDocument:this.getRenderDocument(this.defaultView)}),u){let f=window.checksum.timeMachine.sessionReplayer.getNodeById(u);f&&Br.highlightElement(f,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"],renderDocument:this.getRenderDocument(this.defaultView)})}this.hoveredElement=r,this.hoveredElementSelection={locator:i,selector:o,parentFramesSelectors:a},this.wasHoveredElementSelected=!1,t.addEventListener("click",this.onClick,{capture:!0})}catch(i){console.error("Error inspecting element",i.message)}}},"onMouseOver");this.onClick=l(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()),window.parent.postMessage({type:this.eventName,data:this.selected[this.selected.length-1]},"*"))},"onClick");this.handleSubDocument=l((e,t)=>{if(this.subDocumentInspector){if(this.subDocumentInspector.rootDocument===e)return!0;this.stopSubDocumentInspector(!0)}return this.subDocumentInspector=new n({rootDocument:e,defaultView:t,topLevelInspector:this.topLevelInspector??this,getRenderDocument:this.getRenderDocument,eventName:this.eventName}),this.subDocumentInspector.start({singleSelection:this.singleSelection,timestamp:this.currentTimestamp}),!0},"handleSubDocument");this.stopSubDocumentInspector=l(e=>{this.subDocumentInspector&&(this.subDocumentInspector.stop(e),this.subDocumentInspector=null)},"stopSubDocumentInspector");this.rootDocument=e,this.topLevelInspector=i,this.getRenderDocument=t,this.eventName=a,this.defaultView=r??this.getDefaultView(),this.playwrightElementSelectorGenerator=new Wt,this.rootDocumentForSelectorGenerator=o??this.getDefaultView().document}static{l(this,"ElementInspector")}getDefaultView(){let t=document.querySelector(".replayer-wrapper > iframe")?.contentDocument||null;return!t&&this.rootDocument.nodeType===Node.DOCUMENT_NODE&&(t=this.rootDocument),t||(t=document),t.defaultView}start({singleSelection:e,timestamp:t}={singleSelection:!0}){this.singleSelection=e,this.locatorCache.setTimestamp(t),this.currentTimestamp=t,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.rootDocument.addEventListener("mouseout",this.onMouseOut),this.listening=!0}stop(e=!1){this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.currentTimestamp=void 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}async getInspectedElementSelection(e,t){let r=this.locatorCache.getCachedLocatorForElement(e);if(!r){let{locator:i,selector:o,parentFramesSelectors:a}=await this.playwrightElementSelectorGenerator.getSelectorAndLocator(e,{rootDocument:t,ignoredIframesSelectors:[".replayer-wrapper > iframe"],flags:{origin:"element-inspector"}}).catch(d=>({locator:"",selector:"",parentFramesSelectors:[]})),u=await this.playwrightElementSelectorGenerator.selector(o,a).catch(()=>e),f=u!==e?yS(u):void 0;r={locator:i,selector:o,parentFramesSelectors:a,locatorRrwebId:f},this.locatorCache.setCachedLocatorForElement(e,r)}return r}},gd=class n{constructor(){this.locatorCache=new Map}static{l(this,"InspectedElementCache")}static getInstance(){return n.instance||(n.instance=new n),n.instance}setTimestamp(e){this.currentTimestamp=e}getCachedLocatorForElement(e){try{return this.currentTimestamp?this.locatorCache.get(this.getKeyForElement(e)):void 0}catch{return}}setCachedLocatorForElement(e,t){this.currentTimestamp&&this.locatorCache.set(this.getKeyForElement(e),t)}getKeyForElement(e){let t=yS(e);if(!t)throw new Error("Can't find rrwebId for element");return`${t}_${this.currentTimestamp}`}};function yS(n){return window.checksum.timeMachine.sessionReplayer.getMeta(n)?.id}l(yS,"getNodeRrwebId");var yd=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function bd(n,e,t,r){n.addEventListener?n.addEventListener(e,t,r):n.attachEvent&&n.attachEvent("on".concat(e),t)}l(bd,"addEvent");function Ys(n,e,t,r){n.removeEventListener?n.removeEventListener(e,t,r):n.detachEvent&&n.detachEvent("on".concat(e),t)}l(Ys,"removeEvent");function wS(n,e){let t=e.slice(0,e.length-1);for(let r=0;r<t.length;r++)t[r]=n[t[r].toLowerCase()];return t}l(wS,"getMods");function SS(n){typeof n!="string"&&(n=""),n=n.replace(/\s/g,"");let e=n.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}l(SS,"getKeys");function nP(n,e){let t=n.length>=e.length?n:e,r=n.length>=e.length?e:n,i=!0;for(let o=0;o<t.length;o++)r.indexOf(t[o])===-1&&(i=!1);return i}l(nP,"compareArray");var Xs={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":yd?173:189,"=":yd?61:187,";":yd?59:186,"'":222,"[":219,"]":221,"\\":220},Er={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Gl={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},pt={16:!1,18:!1,17:!1,91:!1},Qe={};for(let n=1;n<20;n++)Xs["f".concat(n)]=111+n;var Xe=[],Ks=null,ES="all",Vr=new Map,Js=l(n=>Xs[n.toLowerCase()]||Er[n.toLowerCase()]||n.toUpperCase().charCodeAt(0),"code"),iP=l(n=>Object.keys(Xs).find(e=>Xs[e]===n),"getKey"),sP=l(n=>Object.keys(Er).find(e=>Er[e]===n),"getModifier");function CS(n){ES=n||"all"}l(CS,"setScope");function Zs(){return ES||"all"}l(Zs,"getScope");function oP(){return Xe.slice(0)}l(oP,"getPressedKeyCodes");function aP(){return Xe.map(n=>iP(n)||sP(n)||String.fromCharCode(n))}l(aP,"getPressedKeyString");function lP(){let n=[];return Object.keys(Qe).forEach(e=>{Qe[e].forEach(t=>{let{key:r,scope:i,mods:o,shortcut:a}=t;n.push({scope:i,shortcut:a,mods:o,keys:r.split("+").map(u=>Js(u))})})}),n}l(lP,"getAllKeyCodes");function cP(n){let e=n.target||n.srcElement,{tagName:t}=e,r=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(r=!1),r}l(cP,"filter");function uP(n){return typeof n=="string"&&(n=Js(n)),Xe.indexOf(n)!==-1}l(uP,"isPressed");function fP(n,e){let t,r;n||(n=Zs());for(let i in Qe)if(Object.prototype.hasOwnProperty.call(Qe,i))for(t=Qe[i],r=0;r<t.length;)t[r].scope===n?t.splice(r,1).forEach(a=>{let{element:u}=a;return wd(u)}):r++;Zs()===n&&CS(e||"all")}l(fP,"deleteScope");function hP(n){let e=n.keyCode||n.which||n.charCode,t=Xe.indexOf(e);if(t>=0&&Xe.splice(t,1),n.key&&n.key.toLowerCase()==="meta"&&Xe.splice(0,Xe.length),(e===93||e===224)&&(e=91),e in pt){pt[e]=!1;for(let r in Er)Er[r]===e&&(Sr[r]=!1)}}l(hP,"clearModifier");function xS(n){if(typeof n>"u")Object.keys(Qe).forEach(i=>{Array.isArray(Qe[i])&&Qe[i].forEach(o=>zl(o)),delete Qe[i]}),wd(null);else if(Array.isArray(n))n.forEach(i=>{i.key&&zl(i)});else if(typeof n=="object")n.key&&zl(n);else if(typeof n=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];let[i,o]=t;typeof i=="function"&&(o=i,i=""),zl({key:n,scope:i,method:o,splitKey:"+"})}}l(xS,"unbind");var zl=l(n=>{let{key:e,scope:t,method:r,splitKey:i="+"}=n;SS(e).forEach(a=>{let u=a.split(i),f=u.length,d=u[f-1],p=d==="*"?"*":Js(d);if(!Qe[p])return;t||(t=Zs());let g=f>1?wS(Er,u):[],y=[];Qe[p]=Qe[p].filter(w=>{let C=(r?w.method===r:!0)&&w.scope===t&&nP(w.mods,g);return C&&y.push(w.element),!C}),y.forEach(w=>wd(w))})},"eachUnbind");function bS(n,e,t,r){if(e.element!==r)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in pt)Object.prototype.hasOwnProperty.call(pt,o)&&(!pt[o]&&e.mods.indexOf(+o)>-1||pt[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!pt[16]&&!pt[18]&&!pt[17]&&!pt[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(Xe),e.method(n,e)===!1&&(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.cancelBubble&&(n.cancelBubble=!0)))}}l(bS,"eventHandler");function vS(n,e){let t=Qe["*"],r=n.keyCode||n.which||n.charCode;if(!Sr.filter.call(this,n))return;if((r===93||r===224)&&(r=91),Xe.indexOf(r)===-1&&r!==229&&Xe.push(r),["metaKey","ctrlKey","altKey","shiftKey"].forEach(u=>{let f=Gl[u];n[u]&&Xe.indexOf(f)===-1?Xe.push(f):!n[u]&&Xe.indexOf(f)>-1?Xe.splice(Xe.indexOf(f),1):u==="metaKey"&&n[u]&&(Xe=Xe.filter(d=>d in Gl||d===r))}),r in pt){pt[r]=!0;for(let u in Er)Er[u]===r&&(Sr[u]=!0);if(!t)return}for(let u in pt)Object.prototype.hasOwnProperty.call(pt,u)&&(pt[u]=n[Gl[u]]);n.getModifierState&&!(n.altKey&&!n.ctrlKey)&&n.getModifierState("AltGraph")&&(Xe.indexOf(17)===-1&&Xe.push(17),Xe.indexOf(18)===-1&&Xe.push(18),pt[17]=!0,pt[18]=!0);let i=Zs();if(t)for(let u=0;u<t.length;u++)t[u].scope===i&&(n.type==="keydown"&&t[u].keydown||n.type==="keyup"&&t[u].keyup)&&bS(n,t[u],i,e);if(!(r in Qe))return;let o=Qe[r],a=o.length;for(let u=0;u<a;u++)if((n.type==="keydown"&&o[u].keydown||n.type==="keyup"&&o[u].keyup)&&o[u].key){let f=o[u],{splitKey:d}=f,p=f.key.split(d),g=[];for(let y=0;y<p.length;y++)g.push(Js(p[y]));g.sort().join("")===Xe.sort().join("")&&bS(n,f,i,e)}}l(vS,"dispatch");function Sr(n,e,t){Xe=[];let r=SS(n),i=[],o="all",a=document,u=0,f=!1,d=!0,p="+",g=!1,y=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(f=e.keyup),e.keydown!==void 0&&(d=e.keydown),e.capture!==void 0&&(g=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(y=!0)),typeof e=="string"&&(o=e),y&&xS(n,o);u<r.length;u++)n=r[u].split(p),i=[],n.length>1&&(i=wS(Er,n)),n=n[n.length-1],n=n==="*"?"*":Js(n),n in Qe||(Qe[n]=[]),Qe[n].push({keyup:f,keydown:d,scope:o,mods:i,shortcut:r[u],method:t,key:r[u],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Vr.has(a)){let w=l(function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return vS(C,a)},"keydownListener"),S=l(function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;vS(C,a),hP(C)},"keyupListenr");Vr.set(a,{keydownListener:w,keyupListenr:S,capture:g}),bd(a,"keydown",w,g),bd(a,"keyup",S,g)}if(!Ks){let w=l(()=>{Xe=[]},"listener");Ks={listener:w,capture:g},bd(window,"focus",w,g)}}}l(Sr,"hotkeys");function dP(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Qe).forEach(t=>{Qe[t].filter(i=>i.scope===e&&i.shortcut===n).forEach(i=>{i&&i.method&&i.method()})})}l(dP,"trigger");function wd(n){let e=Object.values(Qe).flat();if(e.findIndex(r=>{let{element:i}=r;return i===n})<0){let{keydownListener:r,keyupListenr:i,capture:o}=Vr.get(n)||{};r&&i&&(Ys(n,"keyup",i,o),Ys(n,"keydown",r,o),Vr.delete(n))}if((e.length<=0||Vr.size<=0)&&(Object.keys(Vr).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:u}=Vr.get(i)||{};o&&a&&(Ys(i,"keyup",a,u),Ys(i,"keydown",o,u),Vr.delete(i))}),Vr.clear(),Object.keys(Qe).forEach(i=>delete Qe[i]),Ks)){let{listener:i,capture:o}=Ks;Ys(window,"focus",i,o),Ks=null}}l(wd,"removeKeyEvent");var vd={getPressedKeyString:aP,setScope:CS,getScope:Zs,deleteScope:fP,getPressedKeyCodes:oP,getAllKeyCodes:lP,isPressed:uP,filter:cP,trigger:dP,unbind:xS,keyMap:Xs,modifier:Er,modifierMap:Gl};for(let n in vd)Object.prototype.hasOwnProperty.call(vd,n)&&(Sr[n]=vd[n]);if(typeof window<"u"){let n=window.hotkeys;Sr.noConflict=e=>(e&&window.hotkeys===Sr&&(window.hotkeys=n),Sr),window.hotkeys=Sr}var Di=class{constructor(){this.boundShortcuts=[]}static{l(this,"KeybindingsManager")}addKeybinding(e){let t=e.key.toLowerCase();if(this.boundShortcuts.includes(t))return;this.boundShortcuts.push(t),Sr(t,{capture:!0,keydown:!0},i=>{i.preventDefault(),e.callback(i)})}};var jl=class{constructor(e){this.keybindingsManager=new Di;this.createHandler=l(e=>({handlerFunc:l(t=>{try{e.handlerFunc(t)}finally{this.stopObserver()}},"handlerFunc"),handlerType:e.handlerType}),"createHandler");this.toHaveTextHandler=l(()=>e=>{let t=e?.data?.data,r=window.prompt(`Please enter the expected text for the element:
|
|
77
|
-
${t.locator}`);r!==null&&this.sessionRecorder.addCustomEvent("assertion",{matcher:`toHaveText("${r}")`,locator:t.locator})},"toHaveTextHandler");this.toBeVisibleHandler=l(()=>e=>{let t=e?.data?.data;this.sessionRecorder.addCustomEvent("assertion",{matcher:"toBeVisible()",locator:t.locator})},"toBeVisibleHandler");this.sessionRecorder=e}static{l(this,"AssertionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+a",callback:l(()=>this.toggleObserver({handlerFunc:this.toHaveTextHandler(),handlerType:"toHaveText"}),"callback")}),this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+s",callback:l(()=>this.toggleObserver({handlerFunc:this.toBeVisibleHandler(),handlerType:"toBeVisible"}),"callback")}),this.keybindingsManager.addKeybinding({key:"esc",callback:l(e=>{this.activeHandler&&(e.stopPropagation(),this.cleanUpHandler())},"callback")})}toggleObserver(e){if(this.activeHandler){this.cleanUpHandler();return}let t=this.createHandler(e);this.activeHandler=t,this.startObserver(),window.addEventListener("message",t.handlerFunc,{once:!0})}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}enableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[{type:Y.Custom,tag:"assertion"}],exclude:[]}})}disableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[],exclude:[]}})}startObserver(){this.elementInspector=new Vl({rootDocument:window.document}),this.elementInspector.start(),this.enableEventsFilter()}stopObserver(){this.isInspectorActive()&&(this.elementInspector.stop(),this.elementInspector=null,this.disableEventsFilter(),this.cleanUpHandler())}};var ql=class{constructor(e){this.keybindingsManager=new Di;this.lastMousePosition={x:0,y:0};this.sessionRecorder=e,this.listenForMouseMove()}static{l(this,"ActionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+h",callback:l(async()=>{try{await this.handleImmediateHover()}catch(e){console.error("[ActionsObserver] calling handleImmediateHover:",e)}},"callback")})}listenForMouseMove(){try{document.addEventListener("mousemove",e=>{try{this.lastMousePosition.x=e.clientX,this.lastMousePosition.y=e.clientY}catch(t){console.error("[ActionsObserver] mousemove event listener error:",t)}})}catch(e){console.error("[ActionsObserver] listenForMouseMove error:",e)}}async handleImmediateHover(){let e=document.elementFromPoint(this.lastMousePosition.x,this.lastMousePosition.y);if(!e)return;let t=new Wt,{locator:r}=await t.getSelectorAndLocator(e);r&&(this.sessionRecorder.addCustomEvent("hover",{locator:r}),this.highlightElement(e))}highlightElement(e){let t=e;if(!t.style)return;let r=t.style.backgroundColor,i=t.style.transition;t.style.transition="background-color 0.3s ease",t.style.backgroundColor="rgba(255, 255, 0, 0.3)",setTimeout(()=>{t.style.backgroundColor=r,t.style.transition=i},500)}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}stopObserver(){this.isInspectorActive()&&(this.elementInspector.stop(),this.elementInspector=null,this.cleanUpHandler())}};var Yl=class{constructor(e){this.sessionRecorder=e}static{l(this,"BlobObserver")}init(){this.overrideCreateObjectURL()}overrideCreateObjectURL(){let e=URL.createObjectURL.bind(URL);URL.createObjectURL=t=>{let r=e(t);return!this.sessionRecorder||!t||typeof t.arrayBuffer!="function"||t.arrayBuffer().then(i=>{let o=new Uint8Array(i),a=Array.from(o);this.sessionRecorder.addCustomEvent("blob-data",{blobData:a,mimeType:t.type,originalUrl:r})}).catch(i=>{console.warn("Failed to process blob data for recording:",i)}),r}}};var pP="$checksum",Kl=class{constructor(){this.testIdCounter=0;this.initialized=!1;Ri.setPrefix(pP),this.elementSelector=new Wt,this.htmlReducer=new Al,this.parentChainReducer=new Bl,this.compoundSelector=new Pn(this.htmlReducer)}static{l(this,"ChecksumTestGenerator")}getCompoundSelector(){return this.compoundSelector}betterTemplatizr(e){return vr(e)}async buildCustomPlaywrightSelectors(e,t=[],r={},i=document){typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e));let o=t.map(a=>({...a,element:this.parentChainReducer.getElementForChecksumId(a.checksumId)})).filter(({element:a})=>!!a);return await new pn(i).generate(e,o,{isPartOfListItem:!1,isForContextElement:!1,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,...r})}async buildArbitraryListItem(e){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),new pn().generateArbitraryItemListSelector(e)}testElementSelector(e,t,r,i=!0){let o=typeof t=="string"?this.htmlReducer.getElementForChecksumId(t):t;return o?new pn().testSelector(e,o,r,i):(console.error("Element not found",t),{valid:!1,error:"Element not found"})}async getParentChainHTML(e,t=!0,r=!0){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),(await this.parentChainReducer.reduce(e,{useLionTail:t,useChecksumIds:r})).reducedHTML}init(e,t={},{sessionRecorder:r=!0,filesObserver:i=!1,assertionsObserver:o=!1,actionsObserver:a=!1,nativeDialogObserver:u=!1,blobObserver:f=!0}={}){this.appSpecificRules=e,this.config=t,!this.initialized&&(this.initialized=!0,r&&(this.sessionMirror=new Ml((d,p)=>{d.isCheckout=p,window.checksumSendBroadcastMessage?.("rrweb",[d]),this.lastRrwebEventTimestamp=d.timestamp},t.recordOptions)),i&&(this.filesObserver=new Wl(this.sessionMirror),this.filesObserver.init()),o&&(this.assertionsObserver=new jl(this.sessionMirror),this.assertionsObserver.init()),a&&(this.actionsObserver=new ql(this.sessionMirror),this.actionsObserver.init()),u&&(this.nativeDialogObserver=new Ul(this.sessionMirror),this.nativeDialogObserver.init()),f&&(this.blobObserver=new Yl(this.sessionMirror),this.blobObserver.init()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),On.limitChildren=this.appSpecificRules?.esraSelectionRules?.limitChildren??[],On.timeout=this.config.esraTimeout,this.config.showFrontendLogs?Ri.removePrefix():this.config.logPrefix?.length&&Ri.setPrefix(this.config.logPrefix))}getElementSelector(){return this.elementSelector}getLastSelectionLogs(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}getBestMatchingElementSimilarityScore(e){return this.currentESRASelector=new On(e),this.currentESRASelector.selectOne().score}async extractESRAMetadata(e){return new Dr(document).extract(e).toMetadata()}async select(e,t){return await this.elementSelector.selector(e,t)}async getSelectionDataForSelector(e,t){try{let r=await this.elementSelector.selector(e,t);if(!r)return console.warn("could not find element for selector: "+e),null;let{locator:i}=await this.elementSelector.getSelectorAndLocator(r,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),o=await this.extractESRAMetadata(r);return{generatedLocator:i,esraMetadata:o,selector:e,parentFramesSelectors:t}}catch(r){console.log("getMetadataForSelector exception",r);return}}async getMatchingElementSelectionData(e,{minSelectionScore:t,cachedSelector:r,staticMetadata:i}={minSelectionScore:.3},o=!1){try{let a,u,f;if(r&&(console.log("Trying to locate using cached selector",r),a=await this.elementSelector.selector(r)),!a){console.log("Trying to locate using ESRA",e),ia(i)&&console.log("and static data",i),this.currentESRASelector=new On(e,i);let p=this.currentESRASelector.selectOne({minSelectionScore:t});p.score>=t?(a=p.candidate,u=p.score,f=p.clickOffset):console.log("Best matching element was below threshold",p)}if(console.log(a?[`Located with score ${u}`,a]:"Element not located"),!a)return;o&&new dt(a).scrollIntoView(),this.highlightElement(a);let d=await this.makeMatchingElementSelectionData(a,u);return f&&(d.clickOffset=f),d}catch(a){console.log("getMatchingElementSelectionData exception",a);return}}getAllInteractableElementsForLastSelectQuery(){let e=this.currentESRASelector.getFinalCandidates();return Promise.all(e.map(async t=>({esraMetadata:t.esraMetadata,selectionData:await this.makeMatchingElementSelectionData(t.candidate,t.score)})))}async getInteractableElementsRaw(){return An()}async getInteractableElements(){let e=An(),t=new Dr(document);return Promise.all(e.map(async r=>{let i=t.extract(r).toMetadata(),o=await this.makeMatchingElementSelectionData(r);return{esraMetadata:i,selectionData:o}}))}getCurrentESRASelector(){return this.currentESRASelector}startFlashingElementsDetection(){return this.htmlReducer.startFlashingElementsDetection()}async reduceHTML(e={},t={},r=document){let i=await this.htmlReducer.reduce(r,{...this.appSpecificRules,...e},t);if(this.lastRrwebEventTimestamp&&(i.lastRRwebEvent={timestamp:this.lastRrwebEventTimestamp}),t.extractESRAForInterpretationRequiredElements){console.log("Extracting ESRA for interpretation required elements...");let o=this.htmlReducer.getInteractableElementsInReducedHTML();i.elementsForNodeInterpretation=o.reduce((a,{checksumId:u,element:f})=>{if(!(f instanceof HTMLElement)||f.innerText?.trim().length)return a;let p=new Dr(document).extract(f).toMetadata();return[...a,{checksumId:u,esraMetadata:p}]},[]),console.log("Done with ESRA extraction for interpretation required elements")}return i}getMoreItemsForTemplate(e,t={}){return this.htmlReducer.getMoreElementsFromTemplate(e,{...this.appSpecificRules,...t})}displayInterpretationForElements(e){this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach(({checksumId:r,element:i})=>{let o=e[r];if(o){if(!i.isConnected){console.log(`Element ${r} is not connected to the DOM, skipping display`);return}this.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}})}})}async overlayInteractableElementsWithChecksumId({reduceBeforeRender:e=!1,mode:t="full",textPosition:r=t==="tag"?"above":void 0,shouldFlipHighlightTextOutsideViewport:i=!0,scrollIntoView:o=!1,checksumId:a}={}){this.clearHighlights(),e&&await this.reduceHTML();let u=l((d,p,g)=>{if(!p.isConnected){console.log(`Element ${d} is not connected to the DOM, skipping display`);return}let{width:y,height:w}=p.getBoundingClientRect();if(y<=0||w<=0)return;function S(A){switch(t){case"tag":return{background:A,width:"initial",left:"-2px",border:`3px dashed ${A}`,"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}l(S,"getTextStyleByMode");function C(A){let T=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return A?T[A%T.length]:"red"}l(C,"getColor");let v=C(g);function M(){switch(t){case"tag":return{outline:`3px dashed ${v}`};case"full":return{outline:"none"};case"selected":return{outline:"6px dashed red",opacity:"0.7"}}}l(M,"getHighlightStyle"),this.highlightElement(p,{text:d,clear:!1,highlightStyle:M(),...r?{textPosition:r}:{},textStyle:S(v),shouldFlipHighlightTextOutsideViewport:i})},"overlayElement");if(t==="selected"&&a){let d=await this.getElementForChecksumId(a);u(null,d,0);return}this.htmlReducer.getInteractableElementsInReducedHTML().filter(d=>!vt(d.element,{...ed,scrollIntoView:o}).isHidden).forEach(({checksumId:d,element:p},g)=>{u(d,p,g)})}async getElementForChecksumId(e){return this.htmlReducer.getElementForChecksumId(e)}async getSelectorForChecksumId(e){let t=await this.htmlReducer.getSelectorForChecksumId(e),{element:r,innerText:i,...o}=t;return o}hasInnerTextByChecksumId(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}async getSelectorByPosition(e,t){let r=document.elementFromPoint(e,t),{selector:i,locator:o,parentFramesSelectors:a}=await this.elementSelector.getSelectorAndLocator(r);return{selector:i,locator:o,parentFramesSelectors:a}}isInput(e){let t=he(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}querySelectorExtended(e){return he(e)}getReactTree(e){return Gw(e)}isHidden(e,t){return vt(e,t)}showGrid(){this.removeGrid();let e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML=`
|
|
76
|
+
or you can use record.mirror to access the mirror instance during recording.`,nb={map:{},getId(){return console.error(fi),-1},getNode(){return console.error(fi),null},removeNodeFromMap(){console.error(fi)},has(){return console.error(fi),!1},reset(){console.error(fi)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(nb=new Proxy(nb,{get(n,e,t){return e==="map"&&console.error(fi),Reflect.get(n,e,t)}}));function $s(n,e,t={}){let r=null,i=0;return function(...o){let a=Date.now();!i&&t.leading===!1&&(i=a);let u=e-(a-i),f=this;u<=0||u>e?(r&&(clearTimeout(r),r=null),i=a,n.apply(f,o)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,n.apply(f,o)},u))}}l($s,"throttle");function xl(n,e,t,r,i=window){let o=i.Object.getOwnPropertyDescriptor(n,e);return i.Object.defineProperty(n,e,r?t:{set(a){setTimeout(()=>{t.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>xl(n,e,o||{},!0)}l(xl,"hookSetter");var ol=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ol=l(()=>new Date().getTime(),"nowTimestamp"));function rw(n){var e,t,r,i;let o=n.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:n.pageXOffset!==void 0?n.pageXOffset:o.documentElement.scrollLeft||o?.body&&((e=ve.parentElement(o.body))==null?void 0:e.scrollLeft)||((t=o?.body)==null?void 0:t.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:n.pageYOffset!==void 0?n.pageYOffset:o?.documentElement.scrollTop||o?.body&&((r=ve.parentElement(o.body))==null?void 0:r.scrollTop)||((i=o?.body)==null?void 0:i.scrollTop)||0}}l(rw,"getWindowScroll");function nw(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}l(nw,"getWindowHeight");function iw(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}l(iw,"getWindowWidth");function sw(n){return n?n.nodeType===n.ELEMENT_NODE?n:ve.parentElement(n):null}l(sw,"closestElementOfNode");function Tt(n,e,t,r){if(!n)return!1;let i=sw(n);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Ga(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}l(Tt,"isBlocked");function YN(n,e){return e.getId(n)!==-1}l(YN,"isSerialized");function Sf(n,e,t){return n.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(n)===As}l(Sf,"isIgnored");function ow(n,e){if(Cs(n))return!1;let t=e.getId(n);if(!e.has(t))return!0;let r=ve.parentNode(n);return r&&r.nodeType===n.DOCUMENT_NODE?!1:r?ow(r,e):!0}l(ow,"isAncestorRemoved");function ph(n){return!!n.changedTouches}l(ph,"legacy_isTouchEvent");function aw(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)}l(aw,"polyfill$1");function KN(n){let e={},t=l((i,o)=>{let a={value:i,parent:o,children:[]};return e[i.node.id]=a,a},"putIntoMap"),r=[];for(let i of n){let{nextId:o,parentId:a}=i;if(o&&o in e){let u=e[o];if(u.parent){let f=u.parent.children.indexOf(u);u.parent.children.splice(f,0,t(i,u.parent))}else{let f=r.indexOf(u);r.splice(f,0,t(i,null))}continue}if(a in e){let u=e[a];u.children.push(t(i,u));continue}r.push(t(i,null))}return r}l(KN,"queueToResolveTrees");function lw(n,e){e(n.value);for(let t=n.children.length-1;t>=0;t--)lw(n.children[t],e)}l(lw,"iterateResolveTree");function Ts(n,e){return!!(n.nodeName==="IFRAME"&&e.getMeta(n))}l(Ts,"isSerializedIframe");function cw(n,e){return!!(n.nodeName==="LINK"&&n.nodeType===n.ELEMENT_NODE&&n.getAttribute&&n.getAttribute("rel")==="stylesheet"&&e.getMeta(n))}l(cw,"isSerializedStylesheet");function uw(n,e){var t,r;let i=(r=(t=n.ownerDocument)==null?void 0:t.defaultView)==null?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};let o=i.getBoundingClientRect(),a=uw(i,e),u=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:u,absoluteScale:a.absoluteScale*u}}l(uw,"getBaseDimension");function _n(n){return n?n instanceof sr&&"shadowRoot"in n?!!n.shadowRoot:!!ve.shadowRoot(n):!1}l(_n,"hasShadowRoot");function Ss(n,e){let t=n[e[0]];return e.length===1?t:Ss(t.cssRules[e[1]].cssRules,e.slice(2))}l(Ss,"getNestedRule");function ib(n){let e=[...n],t=e.pop();return{positions:e,index:t}}l(ib,"getPositionsAndIndex");function XN(n){let e=new Set,t=[];for(let r=n.length;r--;){let i=n[r];e.has(i.id)||(t.push(i),e.add(i.id))}return t}l(XN,"uniqueTextMutations");var al=class{static{l(this,"StyleSheetMirror")}constructor(){P(this,"id",1),P(this,"styleIDMap",new WeakMap),P(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}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 fw(n){var e;let t=null;return"getRootNode"in n&&((e=ve.getRootNode(n))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ve.host(ve.getRootNode(n))&&(t=ve.host(ve.getRootNode(n))),t}l(fw,"getShadowHost");function ZN(n){let e=n,t;for(;t=fw(e);)e=t;return e}l(ZN,"getRootShadowHost");function JN(n){let e=n.ownerDocument;if(!e)return!1;let t=ZN(n);return ve.contains(e,t)}l(JN,"shadowHostInDom");function hw(n){let e=n.ownerDocument;return e?ve.contains(e,n)||JN(n):!1}l(hw,"inDom");var Y=(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))(Y||{}),z=(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))(z||{}),ie=(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))(ie||{}),kr=(n=>(n[n.Mouse=0]="Mouse",n[n.Pen=1]="Pen",n[n.Touch=2]="Touch",n))(kr||{}),Hr=(n=>(n[n["2D"]=0]="2D",n[n.WebGL=1]="WebGL",n[n.WebGL2=2]="WebGL2",n))(Hr||{}),on=(n=>(n[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Seeked=2]="Seeked",n[n.VolumeChange=3]="VolumeChange",n[n.RateChange=4]="RateChange",n))(on||{}),Ee=(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))(Ee||{}),Pr=(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",n))(Pr||{});function sb(n){return"__ln"in n}l(sb,"isNodeInLinkedList");var mh=class{static{l(this,"DoubleLinkedList")}constructor(){P(this,"length",0),P(this,"head",null),P(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&sb(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&sb(e.nextSibling)&&e.nextSibling.__ln.previous){let 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;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--)}},ob=l((n,e)=>`${n}@${e}`,"moveKey"),gh=class{static{l(this,"MutationBuffer")}constructor(){P(this,"frozen",!1),P(this,"locked",!1),P(this,"texts",[]),P(this,"attributes",[]),P(this,"attributeMap",new WeakMap),P(this,"removes",[]),P(this,"mapRemoves",[]),P(this,"movedMap",{}),P(this,"addedSet",new Set),P(this,"movedSet",new Set),P(this,"droppedSet",new Set),P(this,"removesSubTreeCache",new Set),P(this,"mutationCb"),P(this,"blockClass"),P(this,"blockSelector"),P(this,"maskTextClass"),P(this,"maskTextSelector"),P(this,"inlineStylesheet"),P(this,"maskInputOptions"),P(this,"maskTextFn"),P(this,"maskInputFn"),P(this,"keepIframeSrcFn"),P(this,"recordCanvas"),P(this,"inlineImages"),P(this,"slimDOMOptions"),P(this,"dataURLOptions"),P(this,"doc"),P(this,"mirror"),P(this,"iframeManager"),P(this,"stylesheetManager"),P(this,"shadowDomManager"),P(this,"canvasManager"),P(this,"processedNodeManager"),P(this,"unattachedDoc"),P(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),P(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new mh,i=l(f=>{let d=f,p=As;for(;p===As;)d=d&&d.nextSibling,p=d&&this.mirror.getId(d);return p},"getNextId"),o=l(f=>{let d=ve.parentNode(f);if(!d||!hw(f))return;let p=!1;if(f.nodeType===Node.TEXT_NODE){let S=d.tagName;if(S==="TEXTAREA")return;S==="STYLE"&&this.addedSet.has(d)&&(p=!0)}let g=Cs(d)?this.mirror.getId(fw(f)):this.mirror.getId(d),y=i(f);if(g===-1||y===-1)return r.addNode(f);let w=pi(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:l(S=>{Ts(S,this.mirror)&&this.iframeManager.addIframe(S),cw(S,this.mirror)&&this.stylesheetManager.trackLinkElement(S),_n(f)&&this.shadowDomManager.addShadowRoot(ve.shadowRoot(f),this.doc)},"onSerialize"),onIframeLoad:l((S,E)=>{this.iframeManager.attachIframe(S,E),this.shadowDomManager.observeAttachShadow(S)},"onIframeLoad"),onStylesheetLoad:l((S,E)=>{this.stylesheetManager.attachLinkElement(S,E)},"onStylesheetLoad"),cssCaptured:p});w&&(e.push({parentId:g,nextId:y,node:w}),t.add(w.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let f of this.movedSet)ab(this.removesSubTreeCache,f,this.mirror)&&!this.movedSet.has(ve.parentNode(f))||o(f);for(let f of this.addedSet)!lb(this.droppedSet,f)&&!ab(this.removesSubTreeCache,f,this.mirror)||lb(this.movedSet,f)?o(f):this.droppedSet.add(f);let a=null;for(;r.length;){let f=null;if(a){let d=this.mirror.getId(ve.parentNode(a.value)),p=i(a.value);d!==-1&&p!==-1&&(f=a)}if(!f){let d=r.tail;for(;d;){let p=d;if(d=d.previous,p){let g=this.mirror.getId(ve.parentNode(p.value));if(i(p.value)===-1)continue;if(g!==-1){f=p;break}else{let w=p.value,S=ve.parentNode(w);if(S&&S.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let E=ve.host(S);if(this.mirror.getId(E)!==-1){f=p;break}}}}}}if(!f){for(;r.head;)r.removeNode(r.head.value);break}a=f.previous,r.removeNode(f.value),o(f.value)}let u={texts:this.texts.map(f=>{let d=f.node,p=ve.parentNode(d);return p&&p.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(p),{id:this.mirror.getId(d),value:f.value}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),attributes:this.attributes.map(f=>{let{attributes:d}=f;if(typeof d.style=="string"){let p=JSON.stringify(f.styleDiff),g=JSON.stringify(f._unchangedStyles);p.length<d.style.length&&(p+g).split("var(").length===d.style.split("var(").length&&(d.style=f.styleDiff)}return{id:this.mirror.getId(f.node),attributes:d}}).filter(f=>!t.has(f.id)).filter(f=>this.mirror.has(f.id)),removes:this.removes,adds:e};!u.texts.length&&!u.attributes.length&&!u.removes.length&&!u.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.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(u))}),P(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));let r=Array.from(ve.childNodes(e),i=>ve.textContent(i)||"").join("");t.attributes.value=Ua({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Va(e),value:r,maskInputFn:this.maskInputFn})}),P(this,"processMutation",e=>{if(!Sf(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=ve.textContent(e.target);!Tt(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Ob(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sw(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let a=Va(t);i=Ua({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:a,value:i,maskInputFn:this.maskInputFn})}if(Tt(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let o=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Ab(t.tagName,r))if(o.attributes[r]=Rb(this.doc,ln(t.tagName),ln(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(let u of Array.from(t.style)){let f=t.style.getPropertyValue(u),d=t.style.getPropertyPriority(u);f!==a.style.getPropertyValue(u)||d!==a.style.getPropertyPriority(u)?d===""?o.styleDiff[u]=f:o.styleDiff[u]=[f,d]:o._unchangedStyles[u]=[f,d]}for(let u of Array.from(a.style))t.style.getPropertyValue(u)===""&&(o.styleDiff[u]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(Tt(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 r=this.mirror.getId(t),i=Cs(e.target)?this.mirror.getId(ve.host(e.target)):this.mirror.getId(e.target);Tt(e.target,this.blockClass,this.blockSelector,!1)||Sf(t,this.mirror,this.slimDOMOptions)||!YN(t,this.mirror)||(this.addedSet.has(t)?(yh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ow(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[ob(r,i)]?yh(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Cs(e.target)&&xs(e.target)?!0:void 0}),QN(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),P(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Sf(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[ob(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Tt(e,this.blockClass,this.blockSelector,!1)||(ve.childNodes(e).forEach(r=>this.genAdds(r)),_n(e)&&ve.childNodes(ve.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,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 yh(n,e){n.delete(e),ve.childNodes(e).forEach(t=>yh(n,t))}l(yh,"deepDelete");function QN(n,e){let t=[n];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),ve.childNodes(r).forEach(i=>t.push(i)))}}l(QN,"processRemoves");function ab(n,e,t){return n.size===0?!1:eD(n,e)}l(ab,"isParentRemoved");function eD(n,e,t){let r=ve.parentNode(e);return r?n.has(r):!1}l(eD,"_isParentRemoved");function lb(n,e){return n.size===0?!1:dw(n,e)}l(lb,"isAncestorInSet");function dw(n,e){let t=ve.parentNode(e);return t?n.has(t)?!0:dw(n,t):!1}l(dw,"_isAncestorInSet");var Is;function tD(n){Is=n}l(tD,"registerErrorHandler");function rD(){Is=void 0}l(rD,"unregisterErrorHandler");var Me=l(n=>Is?l((...t)=>{try{return n(...t)}catch(r){if(Is&&Is(r)===!0)return;throw r}},"rrwebWrapped"):n,"callbackWrapper"),Ln=[];function Vs(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}l(Vs,"getEventTarget");function pw(n,e){let t=new gh;Ln.push(t),t.init(n);let r=new(tw())(Me(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}l(pw,"initMutationObserver");function nD({mousemoveCb:n,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,o=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,a=[],u,f=$s(Me(g=>{let y=Date.now()-u;n(a.map(w=>(w.timeOffset-=y,w)),g),a=[],u=null}),o),d=Me($s(Me(g=>{let y=Vs(g),{clientX:w,clientY:S}=ph(g)?g.changedTouches[0]:g;u||(u=ol()),a.push({x:w,y:S,id:r.getId(y),timeOffset:ol()-u}),f(typeof DragEvent<"u"&&g instanceof DragEvent?z.Drag:g instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),p=[Mt("mousemove",d,t),Mt("touchmove",d,t),Mt("drag",d,t)];return Me(()=>{p.forEach(g=>g())})}l(nD,"initMoveObserver");function iD({mouseInteractionCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,u=[],f=null,d=l(p=>g=>{let y=Vs(g);if(Tt(y,r,i,!0))return;let w=null,S=p;if("pointerType"in g){switch(g.pointerType){case"mouse":w=kr.Mouse;break;case"touch":w=kr.Touch;break;case"pen":w=kr.Pen;break}w===kr.Touch?ie[p]===ie.MouseDown?S="TouchStart":ie[p]===ie.MouseUp&&(S="TouchEnd"):kr.Pen}else ph(g)&&(w=kr.Touch);w!==null?(f=w,(S.startsWith("Touch")&&w===kr.Touch||S.startsWith("Mouse")&&w===kr.Mouse)&&(w=null)):ie[p]===ie.Click&&(w=f,f=null);let E=ph(g)?g.changedTouches[0]:g;if(!E)return;let v=t.getId(y),{clientX:M,clientY:A}=E;Me(n)({type:ie[S],id:v,x:M,y:A,...w!==null&&{pointerType:w}})},"getHandler");return Object.keys(ie).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&a[p]!==!1).forEach(p=>{let g=ln(p),y=d(p);if(window.PointerEvent)switch(ie[p]){case ie.MouseDown:case ie.MouseUp:g=g.replace("mouse","pointer");break;case ie.TouchStart:case ie.TouchEnd:return}u.push(Mt(g,y,e))}),Me(()=>{u.forEach(p=>p())})}l(iD,"initMouseInteractionObserver");function mw({scrollCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:o}){let a=Me($s(Me(u=>{let f=Vs(u);if(!f||Tt(f,r,i,!0))return;let d=t.getId(f);if(f===e&&e.defaultView){let p=rw(e.defaultView);n({id:d,x:p.left,y:p.top})}else n({id:d,x:f.scrollLeft,y:f.scrollTop})}),o.scroll||100));return Mt("scroll",a,e)}l(mw,"initScrollObserver");function sD({viewportResizeCb:n},{win:e}){let t=-1,r=-1,i=Me($s(Me(()=>{let o=nw(),a=iw();(t!==o||r!==a)&&(n({width:Number(a),height:Number(o)}),t=o,r=a)}),200));return Mt("resize",i,e)}l(sD,"initViewportResizeObserver");var oD=["INPUT","TEXTAREA","SELECT"],cb=new WeakMap;function aD({inputCb:n,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:o,ignoreSelector:a,maskInputOptions:u,maskInputFn:f,sampling:d,userTriggeredOnInput:p}){function g(A){let T=Vs(A),L=A.isTrusted,V=T&&T.tagName;if(T&&V==="OPTION"&&(T=ve.parentElement(T)),!T||!V||oD.indexOf(V)<0||Tt(T,r,i,!0)||T.classList.contains(o)||a&&T.matches(a))return;let U=T.value,Z=!1,W=Va(T)||"";W==="radio"||W==="checkbox"?Z=T.checked:(u[V.toLowerCase()]||u[W])&&(U=Ua({element:T,maskInputOptions:u,tagName:V,type:W,value:U,maskInputFn:f})),y(T,p?{text:U,isChecked:Z,userTriggered:L}:{text:U,isChecked:Z});let G=T.name;W==="radio"&&G&&Z&&e.querySelectorAll(`input[type="radio"][name="${G}"]`).forEach(re=>{if(re!==T){let B=re.value;y(re,p?{text:B,isChecked:!Z,userTriggered:!1}:{text:B,isChecked:!Z})}})}l(g,"eventHandler");function y(A,T){let L=cb.get(A);if(!L||L.text!==T.text||L.isChecked!==T.isChecked){cb.set(A,T);let V=t.getId(A);Me(n)({...T,id:V})}}l(y,"cbWithDedup");let S=(d.input==="last"?["change"]:["input","change"]).map(A=>Mt(A,Me(g),e)),E=e.defaultView;if(!E)return()=>{S.forEach(A=>A())};let v=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),M=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&S.push(...M.map(A=>xl(A[0],A[1],{set(){Me(g)({target:this,isTrusted:!1})}},!1,E))),Me(()=>{S.forEach(A=>A())})}l(aD,"initInputObserver");function ll(n){let e=[];function t(r,i){if(Na("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Na("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Na("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Na("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(a)}return i}return l(t,"recurse"),t(n,e)}l(ll,"getNestedCSSRulePositions");function sn(n,e,t){let r,i;return n?(n.ownerNode?r=e.getId(n.ownerNode):i=t.getId(n),{styleId:i,id:r}):{}}l(sn,"getIdAndStyleId");function lD({styleSheetRuleCb:n,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Me((p,g,y)=>{let[w,S]=y,{id:E,styleId:v}=sn(g,e,t.styleMirror);return(E&&E!==-1||v&&v!==-1)&&n({id:E,styleId:v,adds:[{rule:w,index:S}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.addRule=function(p,g,y=this.cssRules.length){let w=`${p} { ${g} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[w,y])};let o=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:E}=sn(g,e,t.styleMirror);return(S&&S!==-1||E&&E!==-1)&&n({id:S,styleId:E,removes:[{index:w}]}),p.apply(g,y)})}),r.CSSStyleSheet.prototype.removeRule=function(p){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[p])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:E}=sn(g,e,t.styleMirror);return(S&&S!==-1||E&&E!==-1)&&n({id:S,styleId:E,replace:w}),p.apply(g,y)})}));let u;r.CSSStyleSheet.prototype.replaceSync&&(u=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Me((p,g,y)=>{let[w]=y,{id:S,styleId:E}=sn(g,e,t.styleMirror);return(S&&S!==-1||E&&E!==-1)&&n({id:S,styleId:E,replaceSync:w}),p.apply(g,y)})}));let f={};Da("CSSGroupingRule")?f.CSSGroupingRule=r.CSSGroupingRule:(Da("CSSMediaRule")&&(f.CSSMediaRule=r.CSSMediaRule),Da("CSSConditionRule")&&(f.CSSConditionRule=r.CSSConditionRule),Da("CSSSupportsRule")&&(f.CSSSupportsRule=r.CSSSupportsRule));let d={};return Object.entries(f).forEach(([p,g])=>{d[p]={insertRule:g.prototype.insertRule,deleteRule:g.prototype.deleteRule},g.prototype.insertRule=new Proxy(d[p].insertRule,{apply:Me((y,w,S)=>{let[E,v]=S,{id:M,styleId:A}=sn(w.parentStyleSheet,e,t.styleMirror);return(M&&M!==-1||A&&A!==-1)&&n({id:M,styleId:A,adds:[{rule:E,index:[...ll(w),v||0]}]}),y.apply(w,S)})}),g.prototype.deleteRule=new Proxy(d[p].deleteRule,{apply:Me((y,w,S)=>{let[E]=S,{id:v,styleId:M}=sn(w.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||M&&M!==-1)&&n({id:v,styleId:M,removes:[{index:[...ll(w),E]}]}),y.apply(w,S)})})}),Me(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=o,a&&(r.CSSStyleSheet.prototype.replace=a),u&&(r.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(([p,g])=>{g.prototype.insertRule=d[p].insertRule,g.prototype.deleteRule=d[p].deleteRule})})}l(lD,"initStyleSheetObserver");function gw({mirror:n,stylesheetManager:e},t){var r,i,o;let a=null;t.nodeName==="#document"?a=n.getId(t):a=n.getId(ve.host(t));let u=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(o=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:o.ShadowRoot,f=u?.prototype?Object.getOwnPropertyDescriptor(u?.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!u||!f?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get(){var d;return(d=f.get)==null?void 0:d.call(this)},set(d){var p;let g=(p=f.set)==null?void 0:p.call(this,d);if(a!==null&&a!==-1)try{e.adoptStyleSheets(d,a)}catch{}return g}}),Me(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:f.configurable,enumerable:f.enumerable,get:f.get,set:f.set})}))}l(gw,"initAdoptedStyleSheetObserver");function cD({styleDeclarationCb:n,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let o=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:Me((u,f,d)=>{var p;let[g,y,w]=d;if(t.has(g))return o.apply(f,[g,y,w]);let{id:S,styleId:E}=sn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(S&&S!==-1||E&&E!==-1)&&n({id:S,styleId:E,set:{property:g,value:y,priority:w},index:ll(f.parentRule)}),u.apply(f,d)})});let a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:Me((u,f,d)=>{var p;let[g]=d;if(t.has(g))return a.apply(f,[g]);let{id:y,styleId:w}=sn((p=f.parentRule)==null?void 0:p.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||w&&w!==-1)&&n({id:y,styleId:w,remove:{property:g},index:ll(f.parentRule)}),u.apply(f,d)})}),Me(()=>{i.CSSStyleDeclaration.prototype.setProperty=o,i.CSSStyleDeclaration.prototype.removeProperty=a})}l(cD,"initStyleDeclarationObserver");function uD({mediaInteractionCb:n,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:o}){let a=Me(f=>$s(Me(d=>{let p=Vs(d);if(!p||Tt(p,e,t,!0))return;let{currentTime:g,volume:y,muted:w,playbackRate:S,loop:E}=p;n({type:f,id:r.getId(p),currentTime:g,volume:y,muted:w,playbackRate:S,loop:E})}),i.media||500)),u=[Mt("play",a(on.Play),o),Mt("pause",a(on.Pause),o),Mt("seeked",a(on.Seeked),o),Mt("volumechange",a(on.VolumeChange),o),Mt("ratechange",a(on.RateChange),o)];return Me(()=>{u.forEach(f=>f())})}l(uD,"initMediaInteractionObserver");function fD({fontCb:n,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,o=t.FontFace;t.FontFace=l(function(f,d,p){let g=new o(f,d,p);return i.set(g,{family:f,buffer:typeof d!="string",descriptors:p,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),g},"FontFace2");let a=kn(e.fonts,"add",function(u){return function(f){return setTimeout(Me(()=>{let d=i.get(f);d&&(n(d),i.delete(f))}),0),u.apply(this,[f])}});return r.push(()=>{t.FontFace=o}),r.push(a),Me(()=>{r.forEach(u=>u())})}l(fD,"initFontObserver");function hD(n){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:o}=n,a=!0,u=Me(()=>{let f=e.getSelection();if(!f||a&&f?.isCollapsed)return;a=f.isCollapsed||!1;let d=[],p=f.rangeCount||0;for(let g=0;g<p;g++){let y=f.getRangeAt(g),{startContainer:w,startOffset:S,endContainer:E,endOffset:v}=y;Tt(w,r,i,!0)||Tt(E,r,i,!0)||d.push({start:t.getId(w),startOffset:S,end:t.getId(E),endOffset:v})}o({ranges:d})});return u(),Mt("selectionchange",u)}l(hD,"initSelectionObserver");function dD({doc:n,customElementCb:e}){let t=n.defaultView;return!t||!t.customElements?()=>{}:kn(t.customElements,"define",function(i){return function(o,a,u){try{e({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return i.apply(this,[o,a,u])}})}l(dD,"initCustomElementObserver");function pD(n,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:o,viewportResizeCb:a,inputCb:u,mediaInteractionCb:f,styleSheetRuleCb:d,styleDeclarationCb:p,canvasMutationCb:g,fontCb:y,selectionCb:w,customElementCb:S}=n;n.mutationCb=(...E)=>{e.mutation&&e.mutation(...E),t(...E)},n.mousemoveCb=(...E)=>{e.mousemove&&e.mousemove(...E),r(...E)},n.mouseInteractionCb=(...E)=>{e.mouseInteraction&&e.mouseInteraction(...E),i(...E)},n.scrollCb=(...E)=>{e.scroll&&e.scroll(...E),o(...E)},n.viewportResizeCb=(...E)=>{e.viewportResize&&e.viewportResize(...E),a(...E)},n.inputCb=(...E)=>{e.input&&e.input(...E),u(...E)},n.mediaInteractionCb=(...E)=>{e.mediaInteaction&&e.mediaInteaction(...E),f(...E)},n.styleSheetRuleCb=(...E)=>{e.styleSheetRule&&e.styleSheetRule(...E),d(...E)},n.styleDeclarationCb=(...E)=>{e.styleDeclaration&&e.styleDeclaration(...E),p(...E)},n.canvasMutationCb=(...E)=>{e.canvasMutation&&e.canvasMutation(...E),g(...E)},n.fontCb=(...E)=>{e.font&&e.font(...E),y(...E)},n.selectionCb=(...E)=>{e.selection&&e.selection(...E),w(...E)},n.customElementCb=(...E)=>{e.customElement&&e.customElement(...E),S(...E)}}l(pD,"mergeHooks");function mD(n,e={}){let t=n.doc.defaultView;if(!t)return()=>{};pD(n,e);let r;n.recordDOM&&(r=pw(n,n.doc));let i=nD(n),o=iD(n),a=mw(n),u=sD(n,{win:t}),f=aD(n),d=uD(n),p=l(()=>{},"styleSheetObserver"),g=l(()=>{},"adoptedStyleSheetObserver"),y=l(()=>{},"styleDeclarationObserver"),w=l(()=>{},"fontObserver");n.recordDOM&&(p=lD(n,{win:t}),g=gw(n,n.doc),y=cD(n,{win:t}),n.collectFonts&&(w=fD(n)));let S=hD(n),E=dD(n),v=[];for(let M of n.plugins)v.push(M.observer(M.callback,t,M.options));return Me(()=>{Ln.forEach(M=>M.reset()),r?.disconnect(),i(),o(),a(),u(),f(),d(),p(),g(),y(),w(),S(),E(),v.forEach(M=>M())})}l(mD,"initObservers");function Na(n){return typeof window[n]<"u"}l(Na,"hasNestedCSSRule");function Da(n){return!!(typeof window[n]<"u"&&window[n].prototype&&"insertRule"in window[n].prototype&&"deleteRule"in window[n].prototype)}l(Da,"canMonkeyPatchNestedCSSRule");var cl=class{static{l(this,"CrossOriginIframeMirror")}constructor(e){P(this,"iframeIdToRemoteIdMap",new WeakMap),P(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let o=r||this.getIdToRemoteIdMap(e),a=i||this.getRemoteIdToIdMap(e),u=o.get(t);return u||(u=this.generateIdFn(),o.set(t,u),a.set(u,t)),u}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(o=>this.getId(e,o,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let o=i.get(t);return o||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}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}},bh=class{static{l(this,"IframeManager")}constructor(e){P(this,"iframes",new WeakMap),P(this,"crossOriginIframeMap",new WeakMap),P(this,"crossOriginIframeMirror",new cl(Ib)),P(this,"crossOriginIframeStyleMirror"),P(this,"crossOriginIframeRootIdMap",new WeakMap),P(this,"mirror"),P(this,"mutationCb"),P(this,"wrappedEmit"),P(this,"loadListener"),P(this,"stylesheetManager"),P(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new cl(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 r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||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 i=this.crossOriginIframeMap.get(e.source);if(!i)return;let o=this.transformCrossOriginEvent(i,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Y.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let o=this.crossOriginIframeRootIdMap.get(e);o&&this.patchRootIdOnNode(i.node,o)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(let o of i)!Array.isArray(t[o])&&typeof t[o]!="number"||(Array.isArray(t[o])?t[o]=e.getIds(r,t[o]):t[o]=e.getId(r,t[o]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==Pr.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},vh=class{static{l(this,"ShadowDomManager")}constructor(e){P(this,"shadowDoms",new WeakSet),P(this,"mutationCb"),P(this,"scrollCb"),P(this,"bypassOptions"),P(this,"mirror"),P(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(!xs(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=pw({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(mw({...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(ve.host(e))),this.restoreHandlers.push(gw({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 r=this;this.restoreHandlers.push(kn(e.prototype,"attachShadow",function(i){return function(o){let a=i.call(this,o),u=ve.shadowRoot(this);return u&&hw(this)&&r.addShadowRoot(u,t),a}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},mi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Es=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(ws=0;ws<mi.length;ws++)Es[mi.charCodeAt(ws)]=ws;var ws,gD=l(function(n){var e=new Uint8Array(n),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=mi[e[t]>>2],i+=mi[(e[t]&3)<<4|e[t+1]>>4],i+=mi[(e[t+1]&15)<<2|e[t+2]>>6],i+=mi[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i},"encode"),yD=l(function(n){var e=n.length*.75,t=n.length,r,i=0,o,a,u,f;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);var d=new ArrayBuffer(e),p=new Uint8Array(d);for(r=0;r<t;r+=4)o=Es[n.charCodeAt(r)],a=Es[n.charCodeAt(r+1)],u=Es[n.charCodeAt(r+2)],f=Es[n.charCodeAt(r+3)],p[i++]=o<<2|a>>4,p[i++]=(a&15)<<4|u>>2,p[i++]=(u&3)<<6|f&63;return d},"decode"),ub=new Map;function bD(n,e){let t=ub.get(n);return t||(t=new Map,ub.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}l(bD,"variableListFor$1");var yw=l((n,e,t)=>{if(!n||!(vw(n,e)||typeof n=="object"))return;let r=n.constructor.name,i=bD(t,r),o=i.indexOf(n);return o===-1&&(o=i.length,i.push(n)),o},"saveWebGLVar");function Ba(n,e,t){if(n instanceof Array)return n.map(r=>Ba(r,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 r=n.constructor.name,i=gD(n);return{rr_type:r,base64:i}}else{if(n instanceof DataView)return{rr_type:n.constructor.name,args:[Ba(n.buffer,e,t),n.byteOffset,n.byteLength]};if(n instanceof HTMLImageElement){let r=n.constructor.name,{src:i}=n;return{rr_type:r,src:i}}else if(n instanceof HTMLCanvasElement){let r="HTMLImageElement",i=n.toDataURL();return{rr_type:r,src:i}}else{if(n instanceof ImageData)return{rr_type:n.constructor.name,args:[Ba(n.data,e,t),n.width,n.height]};if(vw(n,e)||typeof n=="object"){let r=n.constructor.name,i=yw(n,e,t);return{rr_type:r,index:i}}}}return n}l(Ba,"serializeArg");var bw=l((n,e,t)=>n.map(r=>Ba(r,e,t)),"serializeArgs"),vw=l((n,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>n instanceof e[i]),"isInstanceOfWebGLObject");function vD(n,e,t,r){let i=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let a of o)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;let u=kn(e.CanvasRenderingContext2D.prototype,a,function(f){return function(...d){return Tt(this.canvas,t,r,!0)||setTimeout(()=>{let p=bw(d,e,this);n(this.canvas,{type:Hr["2D"],property:a,args:p})},0),f.apply(this,d)}});i.push(u)}catch{let u=xl(e.CanvasRenderingContext2D.prototype,a,{set(f){n(this.canvas,{type:Hr["2D"],property:a,args:[f],setter:!0})}});i.push(u)}return()=>{i.forEach(a=>a())}}l(vD,"initCanvas2DMutationObserver");function wD(n){return n==="experimental-webgl"?"webgl":n}l(wD,"getNormalizedContextName");function fb(n,e,t,r){let i=[];try{let o=kn(n.HTMLCanvasElement.prototype,"getContext",function(a){return function(u,...f){if(!Tt(this,e,t,!0)){let d=wD(u);if("__context"in this||(this.__context=d),r&&["webgl","webgl2"].includes(d))if(f[0]&&typeof f[0]=="object"){let p=f[0];p.preserveDrawingBuffer||(p.preserveDrawingBuffer=!0)}else f.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[u,...f])}});i.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(o=>o())}}l(fb,"initCanvasContextObserver");function hb(n,e,t,r,i,o){let a=[],u=Object.getOwnPropertyNames(n);for(let f of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof n[f]!="function")continue;let d=kn(n,f,function(p){return function(...g){let y=p.apply(this,g);if(yw(y,o,this),"tagName"in this.canvas&&!Tt(this.canvas,r,i,!0)){let w=bw(g,o,this),S={type:e,property:f,args:w};t(this.canvas,S)}return y}});a.push(d)}catch{let d=xl(n,f,{set(p){t(this.canvas,{type:e,property:f,args:[p],setter:!0})}});a.push(d)}return a}l(hb,"patchGLPrototype");function SD(n,e,t,r){let i=[];return i.push(...hb(e.WebGLRenderingContext.prototype,Hr.WebGL,n,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...hb(e.WebGL2RenderingContext.prototype,Hr.WebGL2,n,t,r,e)),()=>{i.forEach(o=>o())}}l(SD,"initCanvasWebGLMutationObserver");var ww="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ED=l(n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),"decodeBase64"),db=typeof window<"u"&&window.Blob&&new Blob([ED(ww)],{type:"text/javascript;charset=utf-8"});function CD(n){let e;try{if(e=db&&(window.URL||window.webkitURL).createObjectURL(db),!e)throw"";let t=new Worker(e,{name:n?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+ww,{name:n?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}l(CD,"WorkerWrapper");var wh=class{static{l(this,"CanvasManager")}constructor(e){P(this,"pendingCanvasMutations",new Map),P(this,"rafStamps",{latestId:0,invokeId:null}),P(this,"mirror"),P(this,"mutationCb"),P(this,"resetObservers"),P(this,"frozen",!1),P(this,"locked",!1),P(this,"processMutation",(f,d)=>{(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(d)});let{sampling:t="all",win:r,blockClass:i,blockSelector:o,recordCanvas:a,dataURLOptions:u}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&t==="all"&&this.initCanvasMutationObserver(r,i,o),a&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:u})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,o){let a=fb(t,r,i,!0),u=new Map,f=new CD;f.onmessage=S=>{let{id:E}=S.data;if(u.set(E,!1),!("base64"in S.data))return;let{base64:v,type:M,width:A,height:T}=S.data;this.mutationCb({id:E,type:Hr["2D"],commands:[{property:"clearRect",args:[0,0,A,T]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:v}],type:M}]},0,0]}]})};let d=1e3/e,p=0,g,y=l(()=>{let S=[];return t.document.querySelectorAll("canvas").forEach(E=>{Tt(E,r,i,!0)||S.push(E)}),S},"getCanvas"),w=l(S=>{if(p&&S-p<d){g=requestAnimationFrame(w);return}p=S,y().forEach(async E=>{var v;let M=this.mirror.getId(E);if(u.get(M)||E.width===0||E.height===0)return;if(u.set(M,!0),["webgl","webgl2"].includes(E.__context)){let T=E.getContext(E.__context);((v=T?.getContextAttributes())==null?void 0:v.preserveDrawingBuffer)===!1&&T.clear(T.COLOR_BUFFER_BIT)}let A=await createImageBitmap(E);f.postMessage({id:M,bitmap:A,width:E.width,height:E.height,dataURLOptions:o.dataURLOptions},[A])}),g=requestAnimationFrame(w)},"takeCanvasSnapshots");g=requestAnimationFrame(w),this.resetObservers=()=>{a(),cancelAnimationFrame(g)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=fb(e,t,r,!1),o=vD(this.processMutation.bind(this),e,t,r),a=SD(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=l(t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)},"setLatestRAFTimestamp");requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(a=>{let{type:u,...f}=a;return f}),{type:o}=r[0];this.mutationCb({id:t,type:o,commands:i}),this.pendingCanvasMutations.delete(e)}},Sh=class{static{l(this,"StylesheetManager")}constructor(e){P(this,"trackedLinkElements",new WeakSet),P(this,"mutationCb"),P(this,"adoptedStyleSheetCb"),P(this,"styleMirror",new al),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 r={id:t,styleIds:[]},i=[];for(let o of e){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),i.push({styleId:a,rules:Array.from(o.rules||CSSRule,(u,f)=>({rule:Mb(u,o.href),index:f}))})),r.styleIds.push(a)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},Eh=class{static{l(this,"ProcessedNodeManager")}constructor(){P(this,"nodeMap",new WeakMap),P(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},tt,Wa,Ef,ul=!1;try{if(Array.from([1],n=>n*2)[0]!==2){let n=document.createElement("iframe");document.body.appendChild(n),Array.from=((fy=n.contentWindow)==null?void 0:fy.Array.from)||Array.from,document.body.removeChild(n)}}catch(n){console.debug("Unable to override Array.from",n)}var ir=Tb();function Zt(n={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:u=null,maskTextClass:f="rr-mask",maskTextSelector:d=null,inlineStylesheet:p=!0,maskAllInputs:g,maskInputOptions:y,slimDOMOptions:w,maskInputFn:S,maskTextFn:E,hooks:v,packFn:M,sampling:A={},dataURLOptions:T={},mousemoveWait:L,recordDOM:V=!0,recordCanvas:U=!1,recordCrossOriginIframes:Z=!1,recordAfter:W=n.recordAfter==="DOMContentLoaded"?n.recordAfter:"load",userTriggeredOnInput:G=!1,collectFonts:re=!1,inlineImages:B=!1,plugins:j,keepIframeSrcFn:k=l(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:Q=new Set([]),errorHandler:ee}=n;tD(ee);let q=Z?window.parent===window:!0,ae=!1;if(!q)try{window.parent.document&&(ae=!1)}catch{ae=!0}if(q&&!e)throw new Error("emit function is required");if(!q&&!ae)return()=>{};L!==void 0&&A.mousemove===void 0&&(A.mousemove=L),ir.reset();let rt=g===!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},De=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",headTitleMutations:w==="all"}:w||{};aw();let Pe,gn=0,Hn=l(we=>{for(let It of j||[])It.eventProcessor&&(we=It.eventProcessor(we));return M&&!ae&&(we=M(we)),we},"eventProcessor");tt=l((we,It)=>{var xe;let Le=we;if(Le.timestamp=ol(),(xe=Ln[0])!=null&&xe.isFrozen()&&Le.type!==Y.FullSnapshot&&!(Le.type===Y.IncrementalSnapshot&&Le.data.source===z.Mutation)&&Ln.forEach(Vt=>Vt.unfreeze()),q)e?.(Hn(Le),It);else if(ae){let Vt={type:"rrweb",event:Hn(Le),origin:window.location.origin,isCheckout:It};window.parent.postMessage(Vt,"*")}if(Le.type===Y.FullSnapshot)Pe=Le,gn=0;else if(Le.type===Y.IncrementalSnapshot){if(Le.data.source===z.Mutation&&Le.data.isAttachIframe)return;gn++;let Vt=r&&gn>=r,ge=t&&Le.timestamp-Pe.timestamp>t;(Vt||ge)&&Wa(!0)}},"wrappedEmit");let pe=l(we=>{tt({type:Y.IncrementalSnapshot,data:{source:z.Mutation,...we}})},"wrappedMutationEmit"),st=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.Scroll,...we}}),"wrappedScrollEmit"),mt=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.CanvasMutation,...we}}),"wrappedCanvasMutationEmit"),Nt=l(we=>tt({type:Y.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...we}}),"wrappedAdoptedStyleSheetEmit"),gt=new Sh({mutationCb:pe,adoptedStyleSheetCb:Nt}),ct=new bh({mirror:ir,mutationCb:pe,stylesheetManager:gt,recordCrossOriginIframes:Z,wrappedEmit:tt});for(let we of j||[])we.getMirror&&we.getMirror({nodeMirror:ir,crossOriginIframeMirror:ct.crossOriginIframeMirror,crossOriginIframeStyleMirror:ct.crossOriginIframeStyleMirror});let Wi=new Eh;Ef=new wh({recordCanvas:U,mutationCb:mt,win:window,blockClass:i,blockSelector:o,mirror:ir,sampling:A.canvas,dataURLOptions:T});let xr=new vh({mutationCb:pe,scrollCb:st,bypassOptions:{blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskInputOptions:rt,dataURLOptions:T,maskTextFn:E,maskInputFn:S,recordCanvas:U,inlineImages:B,sampling:A,slimDOMOptions:De,iframeManager:ct,stylesheetManager:gt,canvasManager:Ef,keepIframeSrcFn:k,processedNodeManager:Wi},mirror:ir});Wa=l((we=!1)=>{if(!V)return;tt({type:Y.Meta,data:{href:window.location.href,width:iw(),height:nw()}},we),gt.reset(),xr.init(),Ln.forEach(xe=>xe.lock());let It=MA(document,{mirror:ir,blockClass:i,blockSelector:o,maskTextClass:f,maskTextSelector:d,inlineStylesheet:p,maskAllInputs:rt,maskTextFn:E,maskInputFn:S,slimDOM:De,dataURLOptions:T,recordCanvas:U,inlineImages:B,onSerialize:l(xe=>{Ts(xe,ir)&&ct.addIframe(xe),cw(xe,ir)&>.trackLinkElement(xe),_n(xe)&&xr.addShadowRoot(ve.shadowRoot(xe),document)},"onSerialize"),onIframeLoad:l((xe,Le)=>{ct.attachIframe(xe,Le),xr.observeAttachShadow(xe)},"onIframeLoad"),onStylesheetLoad:l((xe,Le)=>{gt.attachLinkElement(xe,Le)},"onStylesheetLoad"),keepIframeSrcFn:k});if(!It)return console.warn("Failed to snapshot the document");tt({type:Y.FullSnapshot,data:{node:It,initialOffset:rw(window)}},we),Ln.forEach(xe=>xe.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&>.adoptStyleSheets(document.adoptedStyleSheets,ir.getId(document))},"takeFullSnapshot$1");try{let we=[],It=l(Le=>{var Vt;return Me(mD)({mutationCb:pe,mousemoveCb:l((ge,Bn)=>tt({type:Y.IncrementalSnapshot,data:{source:Bn,positions:ge}}),"mousemoveCb"),mouseInteractionCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.MouseInteraction,...ge}}),"mouseInteractionCb"),scrollCb:st,viewportResizeCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.ViewportResize,...ge}}),"viewportResizeCb"),inputCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.Input,...ge}}),"inputCb"),mediaInteractionCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.MediaInteraction,...ge}}),"mediaInteractionCb"),styleSheetRuleCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.StyleSheetRule,...ge}}),"styleSheetRuleCb"),styleDeclarationCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.StyleDeclaration,...ge}}),"styleDeclarationCb"),canvasMutationCb:mt,fontCb:l(ge=>tt({type:Y.IncrementalSnapshot,data:{source:z.Font,...ge}}),"fontCb"),selectionCb:l(ge=>{tt({type:Y.IncrementalSnapshot,data:{source:z.Selection,...ge}})},"selectionCb"),customElementCb:l(ge=>{tt({type:Y.IncrementalSnapshot,data:{source:z.CustomElement,...ge}})},"customElementCb"),blockClass:i,ignoreClass:a,ignoreSelector:u,maskTextClass:f,maskTextSelector:d,maskInputOptions:rt,inlineStylesheet:p,sampling:A,recordDOM:V,recordCanvas:U,inlineImages:B,userTriggeredOnInput:G,collectFonts:re,doc:Le,maskInputFn:S,maskTextFn:E,keepIframeSrcFn:k,blockSelector:o,slimDOMOptions:De,dataURLOptions:T,mirror:ir,iframeManager:ct,stylesheetManager:gt,shadowDomManager:xr,processedNodeManager:Wi,canvasManager:Ef,ignoreCSSAttributes:Q,plugins:((Vt=j?.filter(ge=>ge.observer))==null?void 0:Vt.map(ge=>({observer:ge.observer,options:ge.options,callback:l(Bn=>tt({type:Y.Plugin,data:{plugin:ge.name,payload:Bn}}),"callback")})))||[]},v)},"observe");ct.addLoadListener(Le=>{try{we.push(It(Le.contentDocument))}catch(Vt){console.warn(Vt)}});let xe=l(()=>{Wa(),we.push(It(document)),ul=!0},"init");return document.readyState==="interactive"||document.readyState==="complete"?xe():(we.push(Mt("DOMContentLoaded",()=>{tt({type:Y.DomContentLoaded,data:{}}),W==="DOMContentLoaded"&&xe()})),we.push(Mt("load",()=>{tt({type:Y.Load,data:{}}),W==="load"&&xe()},window))),()=>{we.forEach(Le=>Le()),Wi.destroy(),ul=!1,rD()}}catch(we){console.warn(we)}}l(Zt,"record");Zt.addCustomEvent=(n,e)=>{if(!ul)throw new Error("please add custom event after start recording");tt({type:Y.Custom,data:{tag:n,payload:e}})};Zt.freezePage=()=>{Ln.forEach(n=>n.freeze())};Zt.takeFullSnapshot=n=>{if(!ul)throw new Error("please take full snapshot after start recording");Wa(n)};Zt.mirror=ir;function Sw(n){return{all:n=n||new Map,on:l(function(e,t){var r=n.get(e);r?r.push(t):n.set(e,[t])},"on"),off:l(function(e,t){var r=n.get(e);r&&(t?r.splice(r.indexOf(t)>>>0,1):n.set(e,[]))},"off"),emit:l(function(e,t){var r=n.get(e);r&&r.slice().map(function(i){i(t)}),(r=n.get("*"))&&r.slice().map(function(i){i(e,t)})},"emit")}}l(Sw,"mitt$1");var xD=Object.freeze(Object.defineProperty({__proto__:null,default:Sw},Symbol.toStringTag,{value:"Module"}));function MD(n=window,e=document){if("scrollBehavior"in e.documentElement.style&&n.__forceSmoothScrollPolyfill__!==!0)return;let t=n.HTMLElement||n.Element,r=468,i={scroll:n.scroll||n.scrollTo,scrollBy:n.scrollBy,elementScroll:t.prototype.scroll||f,scrollIntoView:t.prototype.scrollIntoView},o=n.performance&&n.performance.now?n.performance.now.bind(n.performance):Date.now;function a(M){let A=["MSIE ","Trident/","Edge/"];return new RegExp(A.join("|")).test(M)}l(a,"isMicrosoftBrowser");let u=a(n.navigator.userAgent)?1:0;function f(M,A){this.scrollLeft=M,this.scrollTop=A}l(f,"scrollElement");function d(M){return .5*(1-Math.cos(Math.PI*M))}l(d,"ease");function p(M){if(M===null||typeof M!="object"||M.behavior===void 0||M.behavior==="auto"||M.behavior==="instant")return!0;if(typeof M=="object"&&M.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+M.behavior+" is not a valid value for enumeration ScrollBehavior.")}l(p,"shouldBailOut");function g(M,A){if(A==="Y")return M.clientHeight+u<M.scrollHeight;if(A==="X")return M.clientWidth+u<M.scrollWidth}l(g,"hasScrollableSpace");function y(M,A){let T=n.getComputedStyle(M,null)["overflow"+A];return T==="auto"||T==="scroll"}l(y,"canOverflow");function w(M){let A=g(M,"Y")&&y(M,"Y"),T=g(M,"X")&&y(M,"X");return A||T}l(w,"isScrollable");function S(M){for(;M!==e.body&&w(M)===!1;)M=M.parentNode||M.host;return M}l(S,"findScrollableParent");function E(M){let A=o(),T,L,V,U=(A-M.startTime)/r;U=U>1?1:U,T=d(U),L=M.startX+(M.x-M.startX)*T,V=M.startY+(M.y-M.startY)*T,M.method.call(M.scrollable,L,V),(L!==M.x||V!==M.y)&&n.requestAnimationFrame(E.bind(n,M))}l(E,"step");function v(M,A,T){let L,V,U,Z,W=o();M===e.body?(L=n,V=n.scrollX||n.pageXOffset,U=n.scrollY||n.pageYOffset,Z=i.scroll):(L=M,V=M.scrollLeft,U=M.scrollTop,Z=f),E({scrollable:L,method:Z,startTime:W,startX:V,startY:U,x:A,y:T})}l(v,"smoothScroll"),n.scroll=n.scrollTo=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.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}v.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])){i.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}v.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");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let M=arguments[0].left,A=arguments[0].top;v.call(this,this,typeof M>"u"?this.scrollLeft:~~M,typeof A>"u"?this.scrollTop:~~A)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(p(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(p(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let M=S(this),A=M.getBoundingClientRect(),T=this.getBoundingClientRect();M!==e.body?(v.call(this,M,M.scrollLeft+T.left-A.left,M.scrollTop+T.top-A.top),n.getComputedStyle(M).position!=="fixed"&&n.scrollBy({left:A.left,top:A.top,behavior:"smooth"})):n.scrollBy({left:T.left,top:T.top,behavior:"smooth"})}}l(MD,"polyfill");var Ch=class{static{l(this,"Timer")}constructor(e=[],t){P(this,"timeOffset",0),P(this,"speed"),P(this,"actions"),P(this,"raf",null),P(this,"lastTimestamp"),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 r=this.findActionIndex(e);this.actions.splice(r,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,r=this.actions.length-1;for(;t<=r;){let i=Math.floor((t+r)/2);if(this.actions[i].delay<e.delay)t=i+1;else if(this.actions[i].delay>e.delay)r=i-1;else return i+1}return t}};function pb(n,e){if(n.type===Y.IncrementalSnapshot&&n.data.source===z.MouseMove&&n.data.positions&&n.data.positions.length){let t=n.data.positions[0].timeOffset,r=n.timestamp+t;return n.delay=r-e,r-e}return n.delay=n.timestamp-e,n.delay}l(pb,"addDelay");function mb(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r,i,o=t.call(n),a=[];try{for(;(e===void 0||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a}l(mb,"t");var gi;(function(n){n[n.NotStarted=0]="NotStarted",n[n.Running=1]="Running",n[n.Stopped=2]="Stopped"})(gi||(gi={}));var Ew={type:"xstate.init"};function Cf(n){return n===void 0?[]:[].concat(n)}l(Cf,"r");function hi(n){return{type:"xstate.assign",assignment:n}}l(hi,"o");function gb(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}l(gb,"i");function fl(n){return function(e){return n===e}}l(fl,"a");function Cw(n){return typeof n=="string"?{type:n}:n}l(Cw,"u");function yb(n,e){return{value:n,context:e,actions:[],changed:!1,matches:fl(n)}}l(yb,"c");function bb(n,e,t){var r=e,i=!1;return[n.filter(function(o){if(o.type==="xstate.assign"){i=!0;var a=Object.assign({},r);return typeof o.assignment=="function"?a=o.assignment(r,t):Object.keys(o.assignment).forEach(function(u){a[u]=typeof o.assignment[u]=="function"?o.assignment[u](r,t):o.assignment[u]}),r=a,!1}return!0}),r,i]}l(bb,"f");function xw(n,e){e===void 0&&(e={});var t=mb(bb(Cf(n.states[n.initial].entry).map(function(a){return gb(a,e.actions)}),n.context,Ew),2),r=t[0],i=t[1],o={config:n,_options:e,initialState:{value:n.initial,actions:r,context:i,matches:fl(n.initial)},transition:l(function(a,u){var f,d,p=typeof a=="string"?{value:a,context:n.context}:a,g=p.value,y=p.context,w=Cw(u),S=n.states[g];if(S.on){var E=Cf(S.on[w.type]);try{for(var v=function(ae){var rt=typeof Symbol=="function"&&Symbol.iterator,De=rt&&ae[rt],Pe=0;if(De)return De.call(ae);if(ae&&typeof ae.length=="number")return{next:l(function(){return ae&&Pe>=ae.length&&(ae=void 0),{value:ae&&ae[Pe++],done:!ae}},"next")};throw new TypeError(rt?"Object is not iterable.":"Symbol.iterator is not defined.")}(E),M=v.next();!M.done;M=v.next()){var A=M.value;if(A===void 0)return yb(g,y);var T=typeof A=="string"?{target:A}:A,L=T.target,V=T.actions,U=V===void 0?[]:V,Z=T.cond,W=Z===void 0?function(){return!0}:Z,G=L===void 0,re=L??g,B=n.states[re];if(W(y,w)){var j=mb(bb((G?Cf(U):[].concat(S.exit,U,B.entry).filter(function(ae){return ae})).map(function(ae){return gb(ae,o._options.actions)}),y,w),3),k=j[0],Q=j[1],ee=j[2],q=L??g;return{value:q,context:Q,actions:k,changed:L!==g||k.length>0||ee,matches:fl(q)}}}}catch(ae){f={error:ae}}finally{try{M&&!M.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}}return yb(g,y)},"transition")};return o}l(xw,"s");var vb=l(function(n,e){return n.actions.forEach(function(t){var r=t.exec;return r&&r(n.context,e)})},"l");function Mw(n){var e=n.initialState,t=gi.NotStarted,r=new Set,i={_machine:n,send:l(function(o){t===gi.Running&&(e=n.transition(e,o),vb(e,Cw(o)),r.forEach(function(a){return a(e)}))},"send"),subscribe:l(function(o){return r.add(o),o(e),{unsubscribe:l(function(){return r.delete(o)},"unsubscribe")}},"subscribe"),start:l(function(o){if(o){var a=typeof o=="object"?o:{context:n.config.context,value:o};e={value:a.value,actions:[],context:a.context,matches:fl(a.value)}}return t=gi.Running,vb(e,Ew),i},"start"),stop:l(function(){return t=gi.Stopped,r.clear(),i},"stop"),get state(){return e},get status(){return t}};return i}l(Mw,"v");function TD(n,e){for(let t=n.length-1;t>=0;t--){let r=n[t];if(r.type===Y.Meta&&r.timestamp<=e)return n.slice(t)}return n}l(TD,"discardPriorSnapshots");function ID(n,{getCastFn:e,applyEventsSynchronously:t,emitter:r}){let i=xw({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:hi({lastPlayedEvent:l((o,a)=>a.type==="CAST_EVENT"?a.payload.event:o.lastPlayedEvent,"lastPlayedEvent")}),recordTimeOffset:hi((o,a)=>{let u=o.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(u=a.payload.timeOffset),{...o,timeOffset:u,baselineTime:o.events[0].timestamp+u}}),play(o){var a;let{timer:u,events:f,baselineTime:d,lastPlayedEvent:p}=o;u.clear();for(let S of f)pb(S,d);let g=TD(f,d),y=p?.timestamp;p?.type===Y.IncrementalSnapshot&&p.data.source===z.MouseMove&&(y=p.timestamp+((a=p.data.positions[0])==null?void 0:a.timeOffset)),d<(y||0)&&r.emit(Ee.PlayBack);let w=new Array;for(let S of g)if(!(y&&y<d&&(S.timestamp<=y||S===p)))if(S.timestamp<d)w.push(S);else{let E=e(S,!1);u.addAction({doAction:l(()=>{E()},"doAction"),delay:S.delay})}t(w),r.emit(Ee.Flush),u.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:hi(o=>({...o,lastPlayedEvent:null})),startLive:hi({baselineTime:l((o,a)=>(o.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now()),"baselineTime")}),addEvent:hi((o,a)=>{let{baselineTime:u,timer:f,events:d}=o;if(a.type==="ADD_EVENT"){let{event:p}=a.payload;pb(p,u);let g=d.length-1;if(!d[g]||d[g].timestamp<=p.timestamp)d.push(p);else{let S=-1,E=0;for(;E<=g;){let v=Math.floor((E+g)/2);d[v].timestamp<=p.timestamp?E=v+1:g=v-1}S===-1&&(S=E),d.splice(S,0,p)}let y=p.timestamp<u,w=e(p,y);y?w():f.isActive()&&f.addAction({doAction:l(()=>{w()},"doAction"),delay:p.delay})}return{...o,events:d}})}});return Mw(i)}l(ID,"createPlayerService");function RD(n){let e=xw({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:l((t,r)=>{"payload"in r&&t.timer.setSpeed(r.payload.speed)},"setSpeed"),recordSpeed:hi({normalSpeed:l(t=>t.timer.speed,"normalSpeed")}),restoreSpeed:l(t=>{t.timer.setSpeed(t.normalSpeed)},"restoreSpeed")}});return Mw(e)}l(RD,"createSpeedService");var AD=l(n=>[`.${n} { background: currentColor }`,"noscript { display: none !important; }"],"rules"),wb=new Map;function Tw(n,e){let t=wb.get(n);return t||(t=new Map,wb.set(n,t)),t.has(e)||t.set(e,[]),t.get(e)}l(Tw,"variableListFor");function an(n,e,t){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(t&&(t.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){let i=await an(n,e,t)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(t||e===null)return r;let{rr_type:i,index:o}=r;return Tw(e,i)[o]}else if("args"in r){let{rr_type:i,args:o}=r,a=window[i];return new a(...await Promise.all(o.map(an(n,e,t))))}else{if("base64"in r)return yD(r.base64);if("src"in r){let i=n.get(r.src);if(i)return i;{let o=new Image;return o.src=r.src,n.set(r.src,o),o}}else if("data"in r&&r.rr_type==="Blob"){let i=await Promise.all(r.data.map(an(n,e,t)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(an(n,e,t)));return r}}l(an,"deserializeArg");function OD(n,e){try{return e===Hr.WebGL?n.getContext("webgl")||n.getContext("experimental-webgl"):n.getContext("webgl2")}catch{return null}}l(OD,"getContext");var _D=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function LD(n,e){if(!e?.constructor)return;let{name:t}=e.constructor;if(!_D.includes(t))return;let r=Tw(n,t);r.includes(e)||r.push(e)}l(LD,"saveToWebGLVarMap");async function ND({mutation:n,target:e,type:t,imageMap:r,errorHandler:i}){try{let o=OD(e,t);if(!o)return;if(n.setter){o[n.property]=n.args[0];return}let a=o[n.property],u=await Promise.all(n.args.map(an(r,o))),f=a.apply(o,u);LD(o,f);let d=!1}catch(o){i(n,o)}}l(ND,"webglMutation");async function DD({event:n,mutations:e,target:t,imageMap:r,errorHandler:i}){let o=t.getContext("2d");if(!o){i(e[0],new Error("Canvas context is null"));return}let a=e.map(async f=>Promise.all(f.args.map(an(r,o))));(await Promise.all(a)).forEach((f,d)=>{let p=e[d];try{if(p.setter){o[p.property]=p.args[0];return}let g=o[p.property];p.property==="drawImage"&&typeof p.args[0]=="string"?(r.get(n),g.apply(o,p.args)):g.apply(o,f)}catch(g){i(p,g)}})}l(DD,"canvasMutation$1");async function Sb({event:n,mutation:e,target:t,imageMap:r,canvasEventMap:i,errorHandler:o}){try{let a=i.get(n)||e,u="commands"in a?a.commands:[a];if([Hr.WebGL,Hr.WebGL2].includes(e.type)){for(let f=0;f<u.length;f++){let d=u[f];await ND({mutation:d,type:e.type,target:t,imageMap:r,errorHandler:o})}return}await DD({event:n,mutations:u,target:t,imageMap:r,errorHandler:o})}catch(a){o(e,a)}}l(Sb,"canvasMutation");var xh=class{static{l(this,"MediaManager")}constructor(e){P(this,"mediaMap",new Map),P(this,"warn"),P(this,"service"),P(this,"speedService"),P(this,"emitter"),P(this,"getCurrentTime"),P(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(Ee.Start,this.start.bind(this)),this.emitter.on(Ee.SkipStart,this.start.bind(this)),this.emitter.on(Ee.Pause,this.pause.bind(this)),this.emitter.on(Ee.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,r)=>{this.syncTargetWithState(r),e.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:r}){if(r.isPlaying){let o=(e-r.lastInteractionTimeOffset)/1e3*r.playbackRate,a="duration"in t&&t.duration;if(Number.isNaN(a)){this.waitForMetadata(t);return}let u=r.currentTimeAtLastInteraction+o;t.loop&&a!==!1&&(u=u%a),t.currentTime=u}else t.pause(),t.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;let t=l(()=>{this.metadataCallbackMap.delete(e);let r=this.mediaMap.get(e);r&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r})},"onLoadedMetadata");this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:r}){let i=this.mediaMap.get(e),{type:o,playbackRate:a,currentTime:u,muted:f,volume:d,loop:p}=r;return{isPlaying:o===on.Play||o!==on.Pause&&(i?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:u??i?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:a??i?.playbackRate??1,volume:d??i?.volume??1,muted:f??i?.muted??e.getAttribute("muted")===null,loop:p??i?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){let t=this.mediaMap.get(e);if(!t)return;let{muted:r,loop:i,volume:o,isPlaying:a}=t,u=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!==o&&(e.volume=o),e.muted=r,e.loop=i,e.playbackRate!==f&&(e.playbackRate=f),a&&!u?e.play():e.pause()}catch(d){this.warn(`Failed to replay media interactions: ${d.message||d}`)}}addMediaElements(e,t,r){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;let i=e,o=r.getMeta(i);if(!o||!("attributes"in o))return;let a=this.service.state.matches("paused"),u=o.attributes,f=!1;u.rr_mediaState?f=u.rr_mediaState==="played":f=i.getAttribute("autoplay")!==null,f&&a&&i.pause();let d=1;typeof u.rr_mediaPlaybackRate=="number"&&(d=u.rr_mediaPlaybackRate);let p=!1;typeof u.rr_mediaMuted=="boolean"?p=u.rr_mediaMuted:p=i.getAttribute("muted")!==null;let g=!1;typeof u.rr_mediaLoop=="boolean"?g=u.rr_mediaLoop:g=i.getAttribute("loop")!==null;let y=1;typeof u.rr_mediaVolume=="number"&&(y=u.rr_mediaVolume);let w=0;typeof u.rr_mediaCurrentTime=="number"&&(w=u.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:f,currentTimeAtLastInteraction:w,lastInteractionTimeOffset:t,playbackRate:d,volume:y,muted:p,loop:g}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:t,mutation:r}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:r})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}};function ka(n,e){if(n.nodeName!=="DIALOG"||n instanceof sr)return;let t=n,r=t.open,i=r&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),a=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",u=o==="modal";if(!(r&&!(i&&o==="non-modal"||!i&&u))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}r&&t.close(),a&&(u?t.showModal():t.show())}}l(ka,"applyDialogToTopLevel");function kD(n,e){if(n.nodeName!=="DIALOG"||n instanceof sr)return;let t=n;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}l(kD,"removeDialogFromTopLevel");var PD=5*1e3,FD=Sw||xD,Eb="[replayer]",xf={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Cb(n){return n.type==Y.IncrementalSnapshot&&(n.data.source==z.TouchMove||n.data.source==z.MouseInteraction&&n.data.type==ie.TouchStart)}l(Cb,"indicatesTouchDevice");var hl=class{static{l(this,"Replayer")}constructor(e,t){if(P(this,"wrapper"),P(this,"iframe"),P(this,"service"),P(this,"speedService"),P(this,"config"),P(this,"usingVirtualDom",!1),P(this,"virtualDom",new xi),P(this,"mouse"),P(this,"mouseTail",null),P(this,"tailPositions",[]),P(this,"emitter",FD()),P(this,"nextUserInteractionEvent"),P(this,"legacy_missingNodeRetryMap",{}),P(this,"cache",Py()),P(this,"imageMap",new Map),P(this,"canvasEventMap",new Map),P(this,"mirror",Tb()),P(this,"styleMirror",new al),P(this,"mediaManager"),P(this,"firstFullSnapshot",null),P(this,"newDocumentQueue",[]),P(this,"mousePos",null),P(this,"touchActive",null),P(this,"lastMouseDownEvent",null),P(this,"lastHoveredRootNode"),P(this,"lastSelectionData",null),P(this,"constructedStyleMutations",[]),P(this,"adoptedStyleSheets",[]),P(this,"handleResize",u=>{this.iframe.style.display="inherit";for(let f of[this.mouseTail,this.iframe])f&&(f.setAttribute("width",String(u.width)),f.setAttribute("height",String(u.height)))}),P(this,"applyEventsSynchronously",u=>{for(let f of u){switch(f.type){case Y.DomContentLoaded:case Y.Load:case Y.Custom:continue;case Y.FullSnapshot:case Y.Meta:case Y.Plugin:case Y.IncrementalSnapshot:break}this.getCastFn(f,!0)()}}),P(this,"getCastFn",(u,f=!1)=>{let d;switch(u.type){case Y.DomContentLoaded:case Y.Load:break;case Y.Custom:d=l(()=>{this.emitter.emit(Ee.CustomEvent,u)},"castFn");break;case Y.Meta:d=l(()=>this.emitter.emit(Ee.Resize,{width:u.data.width,height:u.data.height}),"castFn");break;case Y.FullSnapshot:d=l(()=>{var g;if(this.firstFullSnapshot){if(this.firstFullSnapshot===u){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(u,f),(g=this.iframe.contentWindow)==null||g.scrollTo(u.data.initialOffset)},"castFn");break;case Y.IncrementalSnapshot:d=l(()=>{if(this.applyIncremental(u,f),!f&&(u===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let g of this.service.state.context.events)if(!(g.timestamp<=u.timestamp)&&this.isUserInteraction(g)){g.delay-u.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=g);break}if(this.nextUserInteractionEvent){let g=this.nextUserInteractionEvent.delay-u.delay,y={speed:Math.min(Math.round(g/PD),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:y}),this.emitter.emit(Ee.SkipStart,y)}}},"castFn");break}return l(()=>{d&&d();for(let y of this.config.plugins||[])y.handler&&y.handler(u,f,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:u}});let g=this.service.state.context.events.length-1;if(!this.config.liveMode&&u===this.service.state.context.events[g]){let y=l(()=>{g<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Ee.Finish))},"finish"),w=50;u.type===Y.IncrementalSnapshot&&u.data.source===z.MouseMove&&u.data.positions.length&&(w+=Math.max(0,-u.data.positions[0].timeOffset)),setTimeout(y,w)}this.emitter.emit(Ee.EventCast,u)},"wrappedCastFn")}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");let r={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:xf,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Ee.Resize,this.handleResize),this.setupDom();for(let u of this.config.plugins||[])u.getMirror&&u.getMirror({nodeMirror:this.mirror});this.emitter.on(Ee.Flush,()=>{if(this.usingVirtualDom){let u={mirror:this.mirror,applyCanvas:l((f,d,p)=>{Sb({event:f,mutation:d,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:l((f,d)=>{f.source===z.StyleSheetRule?this.applyStyleSheetRule(f,d):f.source===z.StyleDeclaration&&this.applyStyleDeclaration(f,d)},"applyStyleSheetMutation"),afterAppend:l((f,d)=>{for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend")};if(this.iframe.contentDocument)try{il(this.iframe.contentDocument,this.virtualDom,u,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 d=this.legacy_missingNodeRetryMap[f],p=sl(d.node,this.mirror,this.virtualDom.mirror);il(p,d.node,u,this.virtualDom.mirror),d.node=p}catch(d){this.warn(d)}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[u,f]=this.lastMouseDownEvent;u.dispatchEvent(f)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Ee.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let i=new Ch([],{speed:this.config.speed});this.service=ID({events:e.map(u=>t&&t.unpackFn?t.unpackFn(u):u).sort((u,f)=>u.timestamp-f.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(u=>{this.emitter.emit(Ee.StateChange,{player:u})}),this.speedService=RD({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(u=>{this.emitter.emit(Ee.StateChange,{speed:u})}),this.mediaManager=new xh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let o=this.service.state.context.events.find(u=>u.type===Y.Meta),a=this.service.state.context.events.find(u=>u.type===Y.FullSnapshot);if(o){let{width:u,height:f}=o.data;setTimeout(()=>{this.emitter.emit(Ee.Resize,{width:u,height:f})},0)}a&&setTimeout(()=>{var u;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(u=this.iframe.contentWindow)==null||u.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Cb)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),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,r;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}})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.remove("rrweb-paused"),this.emitter.emit(Ee.Start)}pause(e){var t,r;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(r=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||r.classList.add("rrweb-paused"),this.emitter.emit(Ee.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(Ee.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Ee.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){let t=this.config.unpackFn?this.config.unpackFn(e):e;Cb(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=Py()}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&&(MD(this.iframe.contentWindow,this.iframe.contentDocument),aw(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 r=[],i=new Set,o=l((f,d)=>{if(f.nodeName==="DIALOG"&&i.add(f),this.collectIframeAndAttachDocument(r,f),this.mediaManager.isSupportedMediaElement(f)){let{events:p}=this.service.state.context;this.mediaManager.addMediaElements(f,e.timestamp-p[0].timestamp,this.mirror)}for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(f,{id:d,replayer:this})},"afterAppend");this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),x_(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(let{mutationInQueue:f,builtNode:d}of r)this.attachDocumentToIframe(f,d),this.newDocumentQueue=this.newDocumentQueue.filter(p=>p!==f);let{documentElement:a,head:u}=this.iframe.contentDocument;this.insertStyleRules(a,u),i.forEach(f=>ka(f)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Ee.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var r;let i=AD(this.config.blockClass).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; }"),!!i.length)if(this.usingVirtualDom){let o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,Qv(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:z.StyleSheetRule,adds:i.map((a,u)=>({rule:a,index:u}))})}else{let o=document.createElement("style");e.insertBefore(o,t);for(let a=0;a<i.length;a++)(r=o.sheet)==null||r.insertRule(i[a],a)}}attachDocumentToIframe(e,t){let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],o=new Set,a=l((u,f)=>{u.nodeName==="DIALOG"&&o.add(u),this.collectIframeAndAttachDocument(i,u);let d=r.getMeta(u);if(d?.type===Pr.Element&&d?.tagName.toUpperCase()==="HTML"){let{documentElement:p,head:g}=t.contentDocument;this.insertStyleRules(p,g)}if(!this.usingVirtualDom)for(let p of this.config.plugins||[])p.onBuild&&p.onBuild(u,{id:f,replayer:this})},"afterAppend");Ms(e.node,{doc:t.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:a,cache:this.cache}),a(t.contentDocument,e.node.id);for(let{mutationInQueue:u,builtNode:f}of i)this.attachDocumentToIframe(u,f),this.newDocumentQueue=this.newDocumentQueue.filter(d=>d!==u);o.forEach(u=>ka(u))}collectIframeAndAttachDocument(e,t){if(Ts(t,this.mirror)){let r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(t));r&&e.push({mutationInQueue:r,builtNode:t})}}waitForStylesheetLoad(){var e;let t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){let r=new Set,i,o=this.service.state,a=l(()=>{o=this.service.state},"stateHandler");this.emitter.on(Ee.Start,a),this.emitter.on(Ee.Pause,a);let u=l(()=>{this.emitter.off(Ee.Start,a),this.emitter.off(Ee.Pause,a)},"unsubscribe");t.querySelectorAll('link[rel="stylesheet"]').forEach(f=>{f.sheet||(r.add(f),f.addEventListener("load",()=>{r.delete(f),r.size===0&&i!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Ee.LoadStylesheetEnd),i&&clearTimeout(i),u())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Ee.LoadStylesheetStart),i=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),i=-1,u()},this.config.loadTimeout))}}async preloadAllImages(){let e=[];for(let t of this.service.state.context.events)t.type===Y.IncrementalSnapshot&&t.data.source===z.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(i=>{this.preloadImages(i,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){let r=document.createElement("canvas"),i=r.getContext("2d"),o=i?.createImageData(r.width,r.height);i?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){let r={isUnchanged:!0};if("commands"in e){let i=await Promise.all(e.commands.map(async o=>{let a=await Promise.all(o.args.map(an(this.imageMap,null,r)));return{...o,args:a}}));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:i})}else{let i=await Promise.all(e.args.map(an(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:i})}}}applyIncremental(e,t){var r,i,o;let{data:a}=e;switch(a.source){case z.Mutation:{try{this.applyMutation(a,t)}catch(u){this.warn(`Exception in mutation ${u.message||u}`,a)}break}case z.Drag:case z.TouchMove:case z.MouseMove:if(t){let u=a.positions[a.positions.length-1];this.mousePos={x:u.x,y:u.y,id:u.id,debugData:a}}else a.positions.forEach(u=>{let f={doAction:l(()=>{this.moveAndHover(u.x,u.y,u.id,t,a)},"doAction"),delay:u.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(f)}),this.timer.addAction({doAction(){},delay:e.delay-((r=a.positions[0])==null?void 0:r.timeOffset)});break;case z.MouseInteraction:{if(a.id===-1)break;let u=new Event(ln(ie[a.type])),f=this.mirror.getNode(a.id);if(!f)return this.debugNodeNotFound(a,a.id);this.emitter.emit(Ee.MouseInteraction,{type:a.type,target:f});let{triggerFocus:d}=this.config;switch(a.type){case ie.Blur:"blur"in f&&f.blur();break;case ie.Focus:d&&f.focus&&f.focus({preventScroll:!0});break;case ie.Click:case ie.TouchStart:case ie.TouchEnd:case ie.MouseDown:case ie.MouseUp:t?(a.type===ie.TouchStart?this.touchActive=!0:a.type===ie.TouchEnd&&(this.touchActive=!1),a.type===ie.MouseDown?this.lastMouseDownEvent=[f,u]:a.type===ie.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===ie.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,t,a),a.type===ie.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===ie.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===ie.TouchEnd?this.mouse.classList.remove("touch-active"):f.dispatchEvent(u));break;case ie.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:f.dispatchEvent(u)}break}case z.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.scrollData=a;break}this.applyScroll(a,t);break}case z.ViewportResize:this.emitter.emit(Ee.Resize,{width:a.width,height:a.height});break;case z.Input:{if(a.id===-1)break;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.inputData=a;break}this.applyInput(a);break}case z.MediaInteraction:{let u=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);let f=u,{events:d}=this.service.state.context;this.mediaManager.mediaMutation({target:f,timeOffset:e.timestamp-d[0].timestamp,mutation:a});break}case z.StyleSheetRule:case z.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case z.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let u=this.virtualDom.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);u.canvasMutations.push({event:e,mutation:a})}else{let u=this.mirror.getNode(a.id);if(!u)return this.debugNodeNotFound(a,a.id);Sb({event:e,mutation:a,target:u,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case z.Font:{try{let u=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(u)}catch(u){this.warn(u)}break}case z.Selection:{if(t){this.lastSelectionData=a;break}this.applySelection(a);break}case z.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,DN(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let d in this.legacy_missingNodeRetryMap)try{let p=this.legacy_missingNodeRetryMap[d],g=Jv(p.node,this.virtualDom,this.mirror);g&&(p.node=g)}catch(p){this.warn(p)}let r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(d=>r.getNode(d.id)?!0:(this.warnNodeNotFound(e,d.id),!1)),e.removes.forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return;let y=r.getNode(d.parentId);if(!y)return this.warnNodeNotFound(e,d.parentId);if(d.isShadow&&_n(y)&&(y=y.shadowRoot),r.removeNodeFromMap(g),y)try{y.removeChild(g),this.usingVirtualDom&&g.nodeName==="#text"&&y.nodeName==="STYLE"&&((p=y.rules)==null?void 0:p.length)>0&&(y.rules=[])}catch(w){if(w instanceof DOMException)this.warn("parent could not remove child in mutation",y,g,e);else throw w}});let i={...this.legacy_missingNodeRetryMap},o=[],a=l(d=>{let p=null;return d.nextId&&(p=r.getNode(d.nextId)),d.nextId!==null&&d.nextId!==void 0&&d.nextId!==-1&&!p},"nextNotInDOM"),u=l(d=>{var p,g;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let y=r.getNode(d.parentId);if(!y)return d.node.type===Pr.Document?this.newDocumentQueue.push(d):o.push(d);d.node.isShadow&&(_n(y)||y.attachShadow({mode:"open"}),y=y.shadowRoot);let w=null,S=null;if(d.previousId&&(w=r.getNode(d.previousId)),d.nextId&&(S=r.getNode(d.nextId)),a(d))return o.push(d);if(d.node.rootId&&!r.getNode(d.node.rootId))return;let E=d.node.rootId?r.getNode(d.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Ts(y,r)){this.attachDocumentToIframe(d,y);return}let v=l((T,L)=>{if(!this.usingVirtualDom){ka(T);for(let V of this.config.plugins||[])V.onBuild&&V.onBuild(T,{id:L,replayer:this})}},"afterAppend"),M=Ms(d.node,{doc:E,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:v});if(d.previousId===-1||d.nextId===-1){i[d.node.id]={node:M,mutation:d};return}let A=r.getMeta(y);if(A&&A.type===Pr.Element&&d.node.type===Pr.Text){let T=Array.isArray(y.childNodes)?y.childNodes:Array.from(y.childNodes);if(A.tagName==="textarea")for(let L of T)L.nodeType===y.TEXT_NODE&&y.removeChild(L);else if(A.tagName==="style"&&T.length===1)for(let L of T)L.nodeType===y.TEXT_NODE&&!r.hasNode(L)&&(M.textContent=L.textContent,y.removeChild(L))}else if(A?.type===Pr.Document){let T=y;d.node.type===Pr.DocumentType&&((p=T.childNodes[0])==null?void 0:p.nodeType)===Node.DOCUMENT_TYPE_NODE&&T.removeChild(T.childNodes[0]),M.nodeName==="HTML"&&T.documentElement&&T.removeChild(T.documentElement)}if(w&&w.nextSibling&&w.nextSibling.parentNode?y.insertBefore(M,w.nextSibling):S&&S.parentNode?y.contains(S)?y.insertBefore(M,S):y.insertBefore(M,null):y.appendChild(M),v(M,d.node.id),this.usingVirtualDom&&M.nodeName==="#text"&&y.nodeName==="STYLE"&&((g=y.rules)==null?void 0:g.length)>0&&(y.rules=[]),Ts(M,this.mirror)){let T=this.mirror.getId(M),L=this.newDocumentQueue.find(V=>V.parentId===T);L&&(this.attachDocumentToIframe(L,M),this.newDocumentQueue=this.newDocumentQueue.filter(V=>V!==L))}(d.previousId||d.nextId)&&this.legacy_resolveMissingNode(i,y,M,d)},"appendNode");e.adds.forEach(d=>{u(d)});let f=Date.now();for(;o.length;){let d=KN(o);if(o.length=0,Date.now()-f>500){this.warn("Timeout in the loop, please check the resolve tree data:",d);break}for(let p of d)r.getNode(p.value.parentId)?lw(p,y=>{u(y)}):this.debug("Drop resolve tree since there is no parent for the root node.",p)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),XN(e.texts).forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return e.removes.find(w=>w.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);let y=g.parentElement;if(d.value&&y&&y.tagName==="STYLE"?g.textContent=bl(d.value,this.cache):g.textContent=d.value,this.usingVirtualDom){let w=g.parentNode;((p=w?.rules)==null?void 0:p.length)>0&&(w.rules=[])}}),e.attributes.forEach(d=>{var p;let g=r.getNode(d.id);if(!g)return e.removes.find(y=>y.id===d.id)?void 0:this.warnNodeNotFound(e,d.id);for(let y in d.attributes)if(typeof y=="string"){let w=d.attributes[y];if(w===null)g.removeAttribute(y),y==="open"&&kD(g,d);else if(typeof w=="string")try{if(y==="_cssText"&&(g.nodeName==="LINK"||g.nodeName==="STYLE"))try{let S=r.getMeta(g),E=Ms({...S,attributes:{...S.attributes,...d.attributes}},{doc:g.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(S.attributes,d.attributes);let v=g.nextSibling,M=g.parentNode;if(E&&M){M.removeChild(g),M.insertBefore(E,v),r.replace(d.id,E);break}}catch{}if(y==="value"&&g.nodeName==="TEXTAREA"){let S=g;S.childNodes.forEach(v=>S.removeChild(v));let E=(p=g.ownerDocument)==null?void 0:p.createTextNode(w);E&&S.appendChild(E)}else g.setAttribute(y,w);y==="rr_open_mode"&&g.nodeName==="DIALOG"&&ka(g,d)}catch(S){this.warn("An error occurred may due to the checkout feature.",S)}else if(y==="style"){let S=w,E=g;for(let v in S)if(S[v]===!1)E.style.removeProperty(v);else if(S[v]instanceof Array){let M=S[v];E.style.setProperty(v,M[0],M[1])}else{let M=S[v];E.style.setProperty(v,M)}}}})}applyScroll(e,t){var r,i;let o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);let a=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(a?.type===Pr.Document)(i=o.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.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,r=e.ranges.map(({start:i,startOffset:o,end:a,endOffset:u})=>{let f=this.mirror.getNode(i),d=this.mirror.getNode(a);if(!f||!d)return;let p=new Range;p.setStart(f,o),p.setEnd(d,u);let g=f.ownerDocument,y=g?.getSelection();return y&&t.add(y),{range:p,selection:y}});t.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var o;return i&&((o=i.selection)==null?void 0:o.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var t;let r=null;e.styleId?r=this.styleMirror.getStyle(e.styleId):e.id&&(r=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),r&&(e.source===z.StyleSheetRule?this.applyStyleSheetRule(e,r):e.source===z.StyleDeclaration&&this.applyStyleDeclaration(e,r))}applyStyleSheetRule(e,t){var r,i,o,a;if((r=e.adds)==null||r.forEach(({rule:u,index:f})=>{try{if(Array.isArray(f)){let{positions:d,index:p}=ib(f);Ss(t.cssRules,d).insertRule(u,p)}else{let d=f===void 0?void 0:Math.min(f,t.cssRules.length);t?.insertRule(u,d)}}catch{}}),(i=e.removes)==null||i.forEach(({index:u})=>{try{if(Array.isArray(u)){let{positions:f,index:d}=ib(u);Ss(t.cssRules,f).deleteRule(d||0)}else t?.deleteRule(u)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(a=t.replaceSync)==null||a.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&Ss(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&Ss(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;let r=this.mirror.getNode(e.id);if(!r)return;(t=e.styles)==null||t.forEach(u=>{var f;let d=null,p=null;if(_n(r)?p=((f=r.ownerDocument)==null?void 0:f.defaultView)||null:r.nodeName==="#document"&&(p=r.defaultView),!!p)try{d=new p.CSSStyleSheet,this.styleMirror.add(d,u.styleId),this.applyStyleSheetRule({source:z.StyleSheetRule,adds:u.rules},d)}catch{}});let i=10,o=0,a=l((u,f)=>{let d=f.map(p=>this.styleMirror.getStyle(p)).filter(p=>p!==null);_n(u)?u.shadowRoot.adoptedStyleSheets=d:u.nodeName==="#document"&&(u.adoptedStyleSheets=d),d.length!==f.length&&o<i&&(setTimeout(()=>a(u,f),0+100*o),o++)},"adoptStyleSheets");a(r,e.styleIds)}legacy_resolveMissingNode(e,t,r,i){let{previousId:o,nextId:a}=i,u=o&&e[o],f=a&&e[a];if(u){let{node:d,mutation:p}=u;t.insertBefore(d,r),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}if(f){let{node:d,mutation:p}=f;t.insertBefore(d,r.nextSibling),delete e[p.node.id],delete this.legacy_missingNodeRetryMap[p.node.id],(p.previousId||p.nextId)&&this.legacy_resolveMissingNode(e,t,d,p)}}moveAndHover(e,t,r,i,o){let a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(o,r);let u=uw(a,this.iframe),f=e*u.absoluteScale+u.x,d=t*u.absoluteScale+u.y;this.mouse.style.left=`${f}px`,this.mouse.style.top=`${d}px`,i||this.drawMouseTail({x:f,y:d}),this.hoverElements(a)}drawMouseTail(e){if(!this.mouseTail)return;let{lineCap:t,lineWidth:r,strokeStyle:i,duration:o}=this.config.mouseTail===!0?xf:Object.assign({},xf,this.config.mouseTail),a=l(()=>{if(!this.mouseTail)return;let u=this.mouseTail.getContext("2d");!u||!this.tailPositions.length||(u.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),u.beginPath(),u.lineWidth=r,u.lineCap=t,u.strokeStyle=i,u.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(f=>u.lineTo(f.x,f.y)),u.stroke())},"draw");this.tailPositions.push(e),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(u=>u!==e),a()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let r=e;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(e){return e.type!==Y.IncrementalSnapshot?!1:e.data.source>z.Mutation&&e.data.source<=z.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Ee.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(Eb,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Eb,...e)}},{addCustomEvent:JU}=Zt,{freezePage:QU}=Zt,{takeFullSnapshot:eV}=Zt,$D="0.0.3-beta.1";typeof window<"u"&&(window.checksumRRWeb={version:$D});var Rw=l(n=>{let e=l(o=>o&&(o instanceof HTMLInputElement&&/|text|email|number|password|search|tel|url/.test(o.type||"")||o instanceof HTMLTextAreaElement)?!(o.disabled||o.readOnly):!1,"isEditableInputOrTextArea"),t=l((o,a)=>{n({key:o,eventTarget:a})},"sendKeyEvent"),r=l(o=>(o.ctrlKey?"ctrl ":"")+(o.altKey?"alt ":"")+(o.shiftKey?"shift ":"")+(o.metaKey?"meta ":"")+o.key,"formatKeyProperties"),i=l(o=>{try{if(e(o.target))return;t(r(o),o.target)}catch{}},"onKeyUp");window.addEventListener("keyup",o=>{i(o)})},"startKeyboardObserver");var Ml=class n{constructor(e=document,t){this.target=e;this.onEvent=t;this.monitoredTextElements=[];this.inputEnabledSelectors=["[contenteditable=true]"].join(",");this.iframeObservers=[];this.monitorInputEnabledElement=l(e=>{e.addEventListener("input",t=>{this.onEvent({text:t.target?.innerText,eventTarget:t.target})})},"monitorInputEnabledElement")}static{l(this,"ContendEditableObserver")}startObserver(){this.startIframesObserver(),this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.forEach(r=>{if(r.nodeType===Node.ELEMENT_NODE&&r.nodeType===Node.ELEMENT_NODE){let i=r;i.matches(this.inputEnabledSelectors)||i.isContentEditable?this.monitorInputEnabledElement(i):Array.from(de("*",i)).filter(o=>o.matches&&o.matches(this.inputEnabledSelectors)||o.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(()=>{de("iframe",this.target).forEach(t=>{if(this.iframeObservers.find(a=>a.iframe===t))return;let r=l(a=>{if(a.iframe.contentWindow)try{a.observer=new n(a.iframe.contentWindow.document,this.onEvent),a.observer.startObserver()}catch{}},"observeIframe"),i=t,o={iframe:i,observer:null};this.iframeObservers.push(o),i.contentWindow?r(o):i.addEventListener("load",()=>{r(o)})})},500)}startInputMonitoring(){this.monitoredTextElements=de(this.inputEnabledSelectors,this.target),this.monitoredTextElements.forEach(this.monitorInputEnabledElement)}};var Tl=class{constructor(e){this.onEvent=e;this.onURLChange=l(()=>{setTimeout(()=>{let e=window.location.href;if(e!==this.currentURL){this.currentURL=e;try{this.onEvent({url:e})}catch{}}})},"onURLChange")}static{l(this,"URLObserver")}start(){window.addEventListener("popstate",r=>{this.onURLChange()}),window.addEventListener("locationchange",r=>{this.onURLChange()}),window.addEventListener("hashchange",r=>{this.onURLChange()});let e=window.history.pushState;window.history.pushState=(...r)=>(this.onURLChange(),e.apply(window.history,r));let t=window.history.replaceState;window.history.replaceState=(...r)=>(this.onURLChange(),t.apply(window.history,r))}};var fn={defaultMerge:Symbol("deepmerge-ts: default merge"),skip:Symbol("deepmerge-ts: skip")},fV={defaultMerge:fn.defaultMerge};function HD(n,e){return e}l(HD,"defaultMetaDataUpdater");function BD(n,e){return n.filter(t=>t!==void 0)}l(BD,"defaultFilterValues");var Aw;(function(n){n[n.NOT=0]="NOT",n[n.RECORD=1]="RECORD",n[n.ARRAY=2]="ARRAY",n[n.SET=3]="SET",n[n.MAP=4]="MAP",n[n.OTHER=5]="OTHER"})(Aw||(Aw={}));function Ow(n){return typeof n!="object"||n===null?0:Array.isArray(n)?2:VD(n)?1:n instanceof Set?3:n instanceof Map?4:5}l(Ow,"getObjectType");function WD(n){let e=new Set;for(let t of n)for(let r of[...Object.keys(t),...Object.getOwnPropertySymbols(t)])e.add(r);return e}l(WD,"getKeys");function UD(n,e){return typeof n=="object"&&Object.prototype.propertyIsEnumerable.call(n,e)}l(UD,"objectHasProperty");function Lw(n){let e=0,t=n[0]?.[Symbol.iterator]();return{[Symbol.iterator](){return{next(){do{if(t===void 0)return{done:!0,value:void 0};let r=t.next();if(r.done===!0){e+=1,t=n[e]?.[Symbol.iterator]();continue}return{done:!1,value:r.value}}while(!0)}}}}}l(Lw,"getIterableOfIterables");var _w=["[object Object]","[object Module]"];function VD(n){if(!_w.includes(Object.prototype.toString.call(n)))return!1;let{constructor:e}=n;if(e===void 0)return!0;let t=e.prototype;return!(t===null||typeof t!="object"||!_w.includes(Object.prototype.toString.call(t))||!t.hasOwnProperty("isPrototypeOf"))}l(VD,"isRecord");function zD(n,e,t){let r={};for(let i of WD(n)){let o=[];for(let f of n)UD(f,i)&&o.push(f[i]);if(o.length===0)continue;let a=e.metaDataUpdater(t,{key:i,parents:n}),u=Dw(o,e,a);u!==fn.skip&&(i==="__proto__"?Object.defineProperty(r,i,{value:u,configurable:!0,enumerable:!0,writable:!0}):r[i]=u)}return r}l(zD,"mergeRecords$1");function GD(n){return n.flat()}l(GD,"mergeArrays$1");function jD(n){return new Set(Lw(n))}l(jD,"mergeSets$1");function qD(n){return new Map(Lw(n))}l(qD,"mergeMaps$1");function YD(n){return n.at(-1)}l(YD,"mergeOthers$1");var Il={mergeRecords:zD,mergeArrays:GD,mergeSets:jD,mergeMaps:qD,mergeOthers:YD};function Nw(...n){return KD({})(...n)}l(Nw,"deepmerge");function KD(n,e){let t=XD(n,r);function r(...i){return Dw(i,t,e)}return l(r,"customizedDeepmerge"),r}l(KD,"deepmergeCustom");function XD(n,e){return{defaultMergeFunctions:Il,mergeFunctions:{...Il,...Object.fromEntries(Object.entries(n).filter(([t,r])=>Object.hasOwn(Il,t)).map(([t,r])=>r===!1?[t,Il.mergeOthers]:[t,r]))},metaDataUpdater:n.metaDataUpdater??HD,deepmerge:e,useImplicitDefaultMerging:n.enableImplicitDefaultMerging??!1,filterValues:n.filterValues===!1?void 0:n.filterValues??BD,actions:fn}}l(XD,"getUtils");function Dw(n,e,t){let r=e.filterValues?.(n,t)??n;if(r.length===0)return;if(r.length===1)return Jh(r,e,t);let i=Ow(r[0]);if(i!==0&&i!==5){for(let o=1;o<r.length;o++)if(Ow(r[o])!==i)return Jh(r,e,t)}switch(i){case 1:return ZD(r,e,t);case 2:return JD(r,e,t);case 3:return QD(r,e,t);case 4:return ek(r,e,t);default:return Jh(r,e,t)}}l(Dw,"mergeUnknowns");function ZD(n,e,t){let r=e.mergeFunctions.mergeRecords(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeRecords!==e.defaultMergeFunctions.mergeRecords?e.defaultMergeFunctions.mergeRecords(n,e,t):r}l(ZD,"mergeRecords");function JD(n,e,t){let r=e.mergeFunctions.mergeArrays(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeArrays!==e.defaultMergeFunctions.mergeArrays?e.defaultMergeFunctions.mergeArrays(n):r}l(JD,"mergeArrays");function QD(n,e,t){let r=e.mergeFunctions.mergeSets(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeSets!==e.defaultMergeFunctions.mergeSets?e.defaultMergeFunctions.mergeSets(n):r}l(QD,"mergeSets");function ek(n,e,t){let r=e.mergeFunctions.mergeMaps(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeMaps!==e.defaultMergeFunctions.mergeMaps?e.defaultMergeFunctions.mergeMaps(n):r}l(ek,"mergeMaps");function Jh(n,e,t){let r=e.mergeFunctions.mergeOthers(n,e,t);return r===fn.defaultMerge||e.useImplicitDefaultMerging&&r===void 0&&e.mergeFunctions.mergeOthers!==e.defaultMergeFunctions.mergeOthers?e.defaultMergeFunctions.mergeOthers(n):r}l(Jh,"mergeOthers");var tk={sampling:{mousemove:!1},userTriggeredOnInput:!0,maskInputOptions:{password:!1}},Rl=class{constructor(e,t={}){this.eventHandler=e;this.options=t;this.logNativeMutationObserver=!1;this.stopRRWebRecording=l(()=>{},"stopRRWebRecording");this.start=l(()=>{console.log("starting with options",this.options),this.stopRRWebRecording=Zt({...this.options,emit:l((e,t)=>{this.eventHandler(e,t)},"emit")}),this.logNativeMutationObserver&&this.selfObserve(),this.startURLObserver(),this.startKeyboardObserver(),this.startContentEditableObserver()},"start");this.stop=l(()=>{this.stopRRWebRecording()},"stop");this.startURLObserver=l(()=>{this.urlObserver=new Tl(({url:e})=>{let t={url:e};this.addCustomEvent("url-change",t)}),this.urlObserver.start()},"startURLObserver");this.startContentEditableObserver=l(()=>{this.contentEditableObserver=new Ml(document,({text:e,eventTarget:t})=>{let r={text:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("contenteditable-input",r)}),this.contentEditableObserver.startObserver()},"startContentEditableObserver");this.startKeyboardObserver=l(()=>{Rw(({key:e,eventTarget:t})=>{let r={key:e,id:this.tryGetMetaFromEventTarget(t)?.id};this.addCustomEvent("key-stroke",r)})},"startKeyboardObserver");this.addCustomEvent=l((e,t)=>{Zt.addCustomEvent(e,t)},"addCustomEvent");this.tryGetMetaFromEventTarget=l(e=>{try{return this.getMeta(e)}catch{}},"tryGetMetaFromEventTarget");this.selfObserve=l(()=>{let e=document.getElementsByTagName("body"),t={attributes:!0,childList:!0,subtree:!0},r=l((o,a)=>{for(let u of o)u.type==="childList"?console.log("A child node has been added or removed.",u):u.type==="attributes"&&console.log(`The ${u.attributeName} attribute was modified.`,u)},"callback");new MutationObserver(r).observe(e[0],t)},"selfObserve");this.getNodeById=l(e=>Zt.mirror.getNode(e),"getNodeById");this.getMeta=l(e=>Zt.mirror.getMeta(e),"getMeta");this.eventHandler=e,this.options=Nw(tk,t)}static{l(this,"SessionRecorder")}};var kw=[{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 rk=5*60*1e3,Al=class{constructor(){this.flashingTextElements=[]}static{l(this,"FlashingElementsDetector")}start(){this.stop(),this.flashingTextElements=[],this.observer=new MutationObserver(e=>{e.forEach(t=>{t.addedNodes.length>0&&t.addedNodes.forEach(r=>{r instanceof HTMLElement&&this.includeElement(r)&&setTimeout(()=>{this.flashingTextElements.push(this.processTextElements(r))},1e3)})})}),this.observer.observe(document.body,{childList:!0,subtree:!0}),this.monitoringPeriodTimeout=setTimeout(()=>{this.stop()},rk)}stop(){this.monitoringPeriodTimeout&&(clearTimeout(this.monitoringPeriodTimeout),this.monitoringPeriodTimeout=null),this.observer&&(this.observer.disconnect(),this.observer=null)}get(){let e=this.flashingTextElements.map(r=>r.filter(i=>!i.isConnected||vt(i.parentElement).isHidden)).filter(r=>r.length).map(r=>`<span>${r.map(i=>i.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),r,i=[];for(;r=t.nextNode();)vt(r.parentNode).isHidden||i.push(r);return i}};var Ii=class{static{l(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,r){return e.substr(0,t)+r+e.substr(t+r.length)}static compare(e,t){let r=e.length,i=t.length;if(r!==i)return r-i;for(let o=0;o<r;o++){let a=e.charCodeAt(o),u=t.charCodeAt(o);if(a!==u)return a-u}return 0}};var zs="checksum-ignore",_l="checksum-get-more-items",Pw=20,nk=.7,Ol,Fw,ik=0,$w=l((n,{forceIncludeAttribute:e,forceIncludeFileInput:t,forceIncludeElements:r,limit:i})=>{n.excludedElements?.forEach(w=>{w.removeAttribute(zs)}),n.excludedElements=new Set;let o=n.element,a=i??Math.min(Math.ceil(o.children.length*.5),o.children.length-Pw),u=l(w=>e&&(w.hasAttribute(e)||Array.from(w.querySelectorAll(`[${e}]`)).length>0)||t&&w.tagName.toLowerCase()==="input"&&w.type==="file"?!0:r.includes(w),"isForceIncluded"),f=l(w=>{let S=0;if(n.elementsToKeep.includes(w))return S;let E=Qh(w);E.length>=n.attributes.length&&S++;let v=E.filter(T=>n.attributes.includes(T)).length;v===n.attributes.length?S+=3:v>0&&S++;let A=ed(w).filter(T=>n.classes.includes(T)).length;return A===n.classes.length?S+=2:A>0&&S++,S},"scoreElement"),d=Array.from(o.children).filter(w=>w.tagName===n.tagName&&!u(w)).map(w=>({element:w,score:f(w)})).sort((w,S)=>S.score-w.score),{inViewportElements:p,outOfViewportElements:g}=d.reduce((w,S)=>{let{element:E}=S;return hs(Ye(E,"Element")?E:E?.parentElement)?w.inViewportElements.push(E):w.outOfViewportElements.push(E),w},{inViewportElements:[],outOfViewportElements:[]}),y=l(w=>{for(let S of w)if(n.excludedElements.add(S),n.excludedElements.size===a)return!0},"excludeElements");return y(g)||y(p),sk(n),Array.from(n.excludedElements)},"viewportReducer");function sk(n){let{excludedElements:e,element:t}=n;e.forEach(r=>{r.setAttribute(zs,"")}),t._getmoreitemsid||(t._getmoreitemsid="gm"+ik++),n.id=t._getmoreitemsid,t.setAttribute(_l,n.id)}l(sk,"markTemplateElements");function Qh(n){return Array.from(n.attributes).filter(e=>!e.name.startsWith("checksum")).map(e=>e.name.replace(/[0-9]/g,""))}l(Qh,"mapAttributes");function ed(n){return n.className?.split(" ").filter(e=>e)??[]}l(ed,"getElementClasses");function vr(n=document.body,{nodeRepetitionsThreshold:e=Pw}={}){try{return console.time("bettertemplatize"),Ol=new Set,Hw(n,e),console.timeEnd("bettertemplatize"),console.log("[bettertemplatize] templates found:",Array.from(Ol)),Array.from(Ol)}catch(t){return console.error("[bettertemplatize] failed during template processing:",t.message),[]}}l(vr,"bettertemplatize");function Hw(n,e){Array.from(n.children).forEach(t=>{if(t instanceof SVGElement)return;let r=t.children.length;if(r>=e){let i=Array.from(t.children),o=Math.ceil(r*nk);for(let a=0;a<r;a++){let u=0,f=i.slice(0,a);for(let d=a+1;d<r&&u+r-d>=o;d++)try{if(Bw(i[a],i[d])){if(u++,u>=o){Ol.add({element:t,...Fw,elementsToKeep:f});return}}else f.push(i[d])}catch{return}}}Hw(t,e)})}l(Hw,"traverse");var ok=.8,ak=.5,lk=.8,ck=5;function Bw(n,e,t=1){let r,i,o=l(E=>(E&&(Fw={attributes:r,classes:i,tagName:n.nodeName}),E),"response");if(n.nodeType!==e.nodeType)return o(!1);if(n instanceof SVGElement&&e instanceof SVGElement||n.nodeType===Node.TEXT_NODE)return o(!0);if(n.nodeType!==Node.ELEMENT_NODE)return o(!1);let a=n,u=e;if(a.tagName.toLowerCase()!==u.tagName.toLowerCase())return o(!1);let f=Qh(a),d=Qh(u);if(r=f.filter(E=>d.includes(E)),r.length/Math.max(f.length,d.length)<ok)return o(!1);let p=ed(a),g=ed(u);if(i=p.filter(E=>g.includes(E)),i.length/Math.max(p.length,g.length)<ak)return o(!1);if(t>=ck)return o(!0);if(a.shadowRoot&&!u.shadowRoot||!a.shadowRoot&&u.shadowRoot)return o(!1);let y=Array.from(a.shadowRoot?a.shadowRoot.children:a.children),w=Array.from(u.shadowRoot?u.shadowRoot.children:u.children);if(y.length===0&&w.length===0)return o(!0);let S=0;for(let E=0;E<Math.min(y.length,w.length);E++)Bw(y[E],w[E],t+1)&&S++;return S/Math.max(y.length,w.length)<lk?o(!1):o(!0)}l(Bw,"areSimilar");function Ww(n,e){let t=n.toLowerCase();return e?{resolvedTag:"div",dataTag:null}:t.includes("-")?{resolvedTag:"div",dataTag:t}:{resolvedTag:n,dataTag:null}}l(Ww,"resolveTagName");var Uw=16e3;var uk=!0,td={markTransparentElementsAsHidden:!1,markElementsHiddenByTransparentElementAsVisible:!0},Ll=class{constructor(){this.checksumIdToRRwebIdMap={};this.flashingElementsDetector=new Al;this.forceIncludeElements=[];this.preMapReducedHTMLSelectors=!1;this.useRrwebIdsAsChecksumIds=!1;this.excludedNodes=0;this.reducePercentage=50;this.scrollableElements={};this.defaultReduceHTMLOptions={checkElementInstanceType:!0,extraAllowedAttributes:[],initialChecksumId:void 0,forceIncludeFileInput:!1,forceIncludeAttribute:void 0,invalidateCache:!1,svgIntegration:"aria-label",includeFlashingElements:!0,onForceIncludeElement:l(()=>{},"onForceIncludeElement"),limitNodeRepetitions:50,stopFlashingElementsDetection:!1,assignChecksumIdsToAllElements:!0,assignRrwebIdsToAllElements:!0,fromTimeMachine:!1}}static{l(this,"HTMLReducer")}preprocessDocument(e=document){rn("[preprocessDocument] querySelectorAllExtended");let t=de("*",e,{includeHTML:!0});nn("[preprocessDocument] querySelectorAllExtended"),rn("[preprocessDocument] isElementHidden");for(let r of t){if(this.shouldIgnoreElement(r))continue;let i=vt(r,td);r.setAttribute("checksum-data-visible",!i.isHidden&&!i.isTransparent?"true":"false"),!i.isHidden&&i.isTransparent&&r.setAttribute("checksum-data-transparently-visible","true"),i.isBehindTransparentElement&&r.setAttribute("checksum-data-visible-under-transparent-element","true"),i.clickOffset&&r.setAttribute("checksum-data-click-offset",`${i.clickOffset.x};${i.clickOffset.y}`),this.markScrollableElement(r)}nn("[preprocessDocument] isElementHidden")}markScrollableElement(e){let{canScrollX:t,canScrollY:r,progressX:i,progressY:o}=dt.getScrollData(e);if(t&&(e.setAttribute("data-scrollable-x","true"),e.setAttribute("data-scrollable-x-progress",i.toString())),r&&(e.setAttribute("data-scrollable-y","true"),e.setAttribute("data-scrollable-y-progress",o.toString())),t||r)try{let{id:a}=this.getSessionMirror().getMeta(e);a&&(this.scrollableElements[a]={x:t?i:void 0,y:r?o:void 0})}catch(a){console.error("[markScrollableElement] Error getting rrwebId and updating scrollable elements",e,a)}}setSessionRecorder(e){this.sessionRecorder=e}markInteractableElements(e,t=document,{forceIncludeAttribute:r,forceIncludeFileInput:i}={}){rn("[markInteractableElements]"),this.interactableElements=[];let o=An(t,e,{allowDisabled:!0,excludeCrossOriginIframes:!1}),a=l((d,p)=>(d._checksumid||(d._checksumid=p??this.checksumIdCounter.getAndIncrement()),d.setAttribute("checksumid",d._checksumid),d.setAttribute("checksuminteractable","true"),d._checksumid),"setChecksumIdForElement"),u=l((d,p=!1,g)=>{if(this.shouldIgnoreElement(d))return;let y=d.getAttribute("checksum-data-click-offset")?.split(";"),w=y&&{x:parseInt(y[0]),y:parseInt(y[1])},S=a(d,g);this.interactableElements.push({checksumId:S,element:d,forced:p,clickOffset:w})},"handleInteractableElement");o.forEach(d=>u(d));let f=l(d=>{de(d,t,{includeHTML:!0}).forEach(p=>u(p,!0))},"forceIncludeSelector");r&&f(`[${r}]`),i&&f("input[type='file']"),this.forceIncludeElements.filter(({element:d})=>d?.isConnected).forEach(({element:d,checksumid:p})=>u(d,!0,p)),console.log(`Marked ${this.interactableElements.length} interactable elements`),nn("[markInteractableElements]")}truthyFilter(e){return!!e}shouldIgnoreElement(e){return e.hasAttribute(zs)}getSessionMirror(e=!1){return e?window.checksum.timeMachine.sessionReplayer:this.sessionRecorder}generateSimplifiedDom(e,t,{extraAllowedAttributes:r=[],checkElementInstanceType:i=!0,forceIncludeAttribute:o=void 0,forceIncludeFileInput:a=!1,svgIntegration:u="aria-label",onForceIncludeElement:f=void 0,contentWindow:d=window,assignChecksumIdsToAllElements:p=!0,assignRrwebIdsToAllElements:g=!0,fromTimeMachine:y=!1}={}){if(!e)return null;let w=l((pe,st=pe)=>{if(pe._originalNode=st,!Ye(pe,"Element")||!Ye(st,"Element"))return pe;let mt=pe,Nt=st;if(p&&!Nt.hasAttribute("checksumid")&&(Nt._checksumid||(Nt._checksumid=this.checksumIdCounter.getAndIncrement()),mt.setAttribute("checksumid",Nt._checksumid),this.nonInteractableElementsFromSimplifiedDom.push({checksumId:Nt._checksumid,element:Nt})),g){let gt=this.getSessionMirror(y);if(gt){let ct=gt.getMeta(Nt)?.id?.toString();ct&&(mt.setAttribute("rrwebid",ct),this.useRrwebIdsAsChecksumIds&&(mt.setAttribute("checksumid",ct),mt._checksumid=ct))}}return this.checksumIdToRRwebIdMap[Nt._checksumid]=parseInt(Nt._rrwebid),pe},"processSimplifiedDOMNode"),S=l((pe,st=e)=>w(document.createTextNode(pe),st),"createTextNode"),E=l((pe,st=e)=>w(document.createElement(pe),st),"createElementNode");if(e.nodeType===Node.ELEMENT_NODE){let pe=e;if(pe.tagName.toLowerCase()==="head"||this.shouldIgnoreElement(pe))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()?S(e.textContent+" "):null;if(e.nodeType!==Node.ELEMENT_NODE||i&&!(Ye(e,"HTMLElement")||Ye(e,"SVGElement")))return null;let v=e,M=v.tagName.toLowerCase()==="iframe"&&v.contentDocument,A=ti(M?v.contentDocument.documentElement:v,{flattenShadowRootChildren:!0});t.esraSelectionRules?.limitChildren?.forEach(pe=>{v.matches(pe.selector)&&A.length>pe.limit&&A.splice(pe.limit)});let T=A.map(pe=>this.generateSimplifiedDom(pe,t,{extraAllowedAttributes:r,checkElementInstanceType:i,forceIncludeAttribute:o,forceIncludeFileInput:a,svgIntegration:u,onForceIncludeElement:f,contentWindow:M?v.contentWindow:d,assignChecksumIdsToAllElements:p,assignRrwebIdsToAllElements:g,fromTimeMachine:y})).filter(this.truthyFilter),L=v.getAttribute("checksum-data-visible")!=="false",V=v.hasAttribute("checksumid"),U=v.hasAttribute("role"),{customDescription:Z,customDescriptionTarget:W}=this.getElementCustomDescription(v,{enableSVGCustomDescription:!!u}),G=!!Z,re=v.hasAttribute("aria-label")||v.hasAttribute("name")||v.hasAttribute("alt"),B=v.hasAttribute(_l)||this.forceIncludeElements.map(pe=>pe.element).includes(v)||!!o&&v.hasAttribute(o)||a&&v.tagName.toLowerCase()==="input"&&v.getAttribute("type")==="file",j=["form","button","input","textarea","a","table","th","tr","td","section","nav","header","footer","main","article","aside","li","ul","select","option","datalist"],k=V||L&&(U||re||G||v.matches(j.join(",")));if(!(k||B)){if(!T.length)return null;if(T.length===1&&!Ye(T[0],"Text"))return T[0]}!k&&B&&f?.(v);let{resolvedTag:ee,dataTag:q}=Ww(v.tagName,v.tagName.toLowerCase()==="body"&&v.ownerDocument!==document),ae=l(()=>{if(G)switch(W){case"svg":switch(u){case"aria-label":let pe=E("svg");return pe.setAttribute("aria-label",Z),{simplifiedNode:pe,appendChildren:!1};case"text":if(v.hasAttribute("checksumid")){let mt=E("div");return mt.innerText=Z,{simplifiedNode:mt,appendChildren:!1}}return{simplifiedNode:S(` [${Z}] `),appendChildren:!1}}}return{simplifiedNode:E(ee)}},"makeSimplifiedNode"),{simplifiedNode:rt,appendChildren:De=!0}=ae();if(!Ye(rt,"Element"))return rt;let Pe=rt,gn=["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(r),Hn=v.attributes;for(let pe of Hn)for(let st of gn)new RegExp("^"+st+"$").test(pe.name)&&Pe.setAttribute(pe.name,pe.value??!0);if(q&&Pe.setAttribute("data-tag",q),v.isContentEditable?Pe.setAttribute("contenteditable","true"):!["TEXTAREA","INPUT","SELECT"].includes(v.tagName)&&window.getComputedStyle(v).cursor==="text"&&Pe.setAttribute("contenteditable","cursor-text"),Ye(v,"HTMLInputElement")&&v.getAttribute("type")==="checkbox")v.checked&&Pe.setAttribute("checked","true");else if(Ye(v,"HTMLInputElement")||Ye(v,"HTMLSelectElement"))Pe.setAttribute("value",v.value);else if(Ye(v,"HTMLTextAreaElement")&&!v.childNodes.length&&v.value){let pe=S(v.value);Pe.appendChild(pe)}return De&&T.forEach(pe=>Pe.appendChild(pe)),Pe}getElementCustomDescription(e,{enableSVGCustomDescription:t=!0}={}){return(Ye(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 r=e.querySelector("title");if(r)return r.textContent}findSvgElementDescriptionFromBank(e){return this.getSvgBank().find(t=>e.matches(`svg:has(${t.selector})`))?.description}getSvgBank(){return kw}restoreDom(e=document){de("*",e).forEach(r=>{r.removeAttribute("checksum-data-visible"),r.removeAttribute("checksum-data-transparently-visible"),r.removeAttribute("checksum-data-visible-under-transparent-element"),r.removeAttribute("checksumid"),r.removeAttribute("checksuminteractable"),r.removeAttribute("checksum-data-click-offset"),r.removeAttribute(zs),r.removeAttribute(_l),r.removeAttribute("data-scrollable-x"),r.removeAttribute("data-scrollable-y"),r.removeAttribute("data-scrollable-x-progress"),r.removeAttribute("data-scrollable-y-progress"),r.removeAttribute("rrwebid")})}removeAttribute(e){de("*",document).forEach(r=>{r.removeAttribute(e)})}async mapAndStoreSelectors(){let e={},t=new Wt;for(let{checksumId:r,element:i,clickOffset:o,selector:a,locator:u,parentFramesSelectors:f}of await t.injectSelectorsAndLocators(this.interactableElementsFromSimplifiedDom)){if(!a){console.warn("Unable to get selector for element",i);continue}let d=i;e[r]={element:d,selector:a,locator:u,clickOffset:o,parentFramesSelectors:f,innerText:d.innerText,rrwebId:this.checksumIdToRRwebIdMap[r]}}return e}shouldFurtherReduce(e){return e?e.outerHTML.length>Uw:!0}async reduce(e=document,t,r={}){console.time("reduceHTML");let{initialChecksumId:i,forceIncludeAttribute:o,forceIncludeFileInput:a,invalidateCache:u,includeFlashingElements:f,limitNodeRepetitions:d,stopFlashingElementsDetection:p}=this.lastReduceHTMLOptions={...this.defaultReduceHTMLOptions,...r},g=Lt.getInstance("reduce",{target:e,monitorInput:!0,invalidate:u,log:!1});if(g.hasCache())return g.get();let y=f?this.flashingElementsDetector.get():void 0;p&&this.flashingElementsDetector.stop(),this.nodeRepetitionsThreshold=d,this.reducePercentage=50,this.templateNodes=void 0,this.excludedNodes=0,this.scrollableElements={};let w=l(M=>$w(M,{forceIncludeAttribute:o,forceIncludeFileInput:a,forceIncludeElements:this.forceIncludeElements.map(A=>A.element),limit:Math.min(Math.ceil(M.element.children.length*(this.reducePercentage/100)),M.element.children.length-6)}),"templateReducer");console.log("Running pre-templatize"),this.templatize(w),console.log("Preprocessing document..."),this.preprocessDocument(e);let S;for((i||!this.checksumIdCounter)&&(this.checksumIdCounter=new Ii(i??"0")),console.log("Marking interactable elements..."),this.markInteractableElements(t,e,{forceIncludeAttribute:o,forceIncludeFileInput:a});;){if(console.log("Generating simplified DOM..."),this.nonInteractableElementsFromSimplifiedDom=[],S=this.generateSimplifiedDom(e.documentElement,t,this.lastReduceHTMLOptions),!S)throw new Error("Unable to get simplified DOM");if(this.shouldFurtherReduce(S)){if(console.log(`Will further reduce (${S.outerHTML.length})...`),!this.templatize(w)){console.log(`Exceeded maximum html reduction, stopping (html size: ${S.outerHTML.length})`);break}}else break}console.log("Simplified DOM generated, length:",S.outerHTML.length);let E=new Set(Array.from(S.querySelectorAll("[checksumid]")).map(M=>M.getAttribute("checksumid")));this.interactableElementsFromSimplifiedDom=this.interactableElements.filter(M=>E.has(M.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(e),this.preMapReducedHTMLSelectors=uk?!1:!!t.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((M,A)=>(M[A.checksumId]=A,M),{});let v={reducedDomHTMLElement:S,reducedHTML:S.outerHTML,currentChecksumId:this.checksumIdCounter.get(),flashingHTML:y,scrollableElements:this.scrollableElements};return g.set(v),console.timeEnd("reduceHTML"),v}templatize(e){let t=this.excludedNodes,r=l(()=>Array.from(this.templateNodes).reduce((i,o)=>i+e(o).length,0),"calcExculdedNodes");if(!this.templateNodes)this.templateNodes=vr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold}),this.excludedNodes=r();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=vr(document.body,{nodeRepetitionsThreshold:this.nodeRepetitionsThreshold})}this.excludedNodes=r()}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 r=this.templateNodes.find(d=>d.id===e);if(!r)throw new Error("Template not found");let{element:i,excludedElements:o}=r;console.log("Preprocessing template node..."),this.preprocessDocument(i),console.log("Marking template interactable elements..."),this.markInteractableElements(t,i,this.lastReduceHTMLOptions);let a=[],u=l(()=>a.map(d=>d.outerHTML).join(""),"getElementsHTML"),f=o.values();for(;u().length<Uw*.5;){let d=f.next().value;if(!d)break;let p=Array.from(d.querySelectorAll("[checksumid]")).concat(d._checksumid?[d]:[]);this.interactableElements.filter(g=>p.includes(g.element)).forEach(g=>{this.elementsInSimplifiedDomByChecksumId[g.element._checksumid]=g}),a.push(this.generateSimplifiedDom(d,t,this.lastReduceHTMLOptions)),o.delete(d)}return this.restoreDom(i),{items:u(),hasMoreItems:o.size>0}}catch(r){console.error("[getMoreElementsFromTemplate] error",r);return}}async getSelectorForChecksumId(e,{forceGenerate:t=!1}={}){let r=l(d=>({selector:e,element:d?d.element:null,locator:"",parentFramesSelectors:[],invalid:!0,rrwebId:this.checksumIdToRRwebIdMap[e],clickOffset:d?.clickOffset,innerText:d?d.element.innerText:""}),"makeDefaultResult"),i=new Wt,o=this.elementsInSimplifiedDomByChecksumId[e];if(!o||!o.element.isConnected)return this.preMapReducedHTMLSelectors&&this.selectors[e]?this.selectors[e]:r(o);let{selector:a,locator:u,parentFramesSelectors:f}=await i.getSelectorAndLocator(o.element);return{...r(o),selector:a,locator:u,parentFramesSelectors:f,invalid:!1}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]?.element}hasInnerTextByChecksumId(e,{maxLength:t=void 0,minLength:r=void 0}={}){if(!this.preMapReducedHTMLSelectors){let o=this.elementsInSimplifiedDomByChecksumId[e]?.element?.innerText;return!(!o||r&&o.length<r||t&&o.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}};function zw(n){return n._debugSource?.fileName?n._debugSource?.fileName:""}l(zw,"getComponentpath");function Vw(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=zw(e);return!(/.*\/node_modules\//.test(t)||n===t||/^(?!.*src).*$/.test(t))}l(Vw,"isComponentAllowed");function rd(n,e={}){if(!n)return["",{}];let t=n.type,r=t?t.name||t:"Unknown",i="";if(Vw(r,n)){i+=`<${r}>`;let o=zw(n);e[r]=o}if(n.child){let[o,a]=rd(n.child,e);i+=o,e={...e,...a}}if(Vw(r,n)&&(i+=`</${r}>`),n.sibling){let[o,a]=rd(n.sibling,e);i+=o,e={...e,...a}}return[i,e]}l(rd,"traverseReactTree");function Gw(n){let e=n._reactRootContainer?._internalRoot.current;return e||console.log("No react tree in element",n),rd(e)}l(Gw,"getReactTree");var Ri=class n{static{l(this,"FrontendLogger")}static{this.overriddenMethods=["log","warn","error"]}static{this.original={}}static removePrefix(){this.overriddenMethods.forEach(e=>{n.original[e]&&(console[e]=n.original[e])})}static setPrefix(e){this.overriddenMethods.forEach(t=>{n.original[t]||(n.original[t]=console[t]),console[t]=(...r)=>{r.unshift(e),n.original[t].apply(console,r)}})}};var Nl=class{constructor(e=i=>i.map(o=>o.target),t={childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0},r={collectElement:!0}){this.filterElements=e;this.observeOptions=t;this.options=r;this.mutationEventListeners=[]}static{l(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(r=>{if(r.nodeType!==Node.ELEMENT_NODE)return;let i=r;this.mutationEventListeners.forEach(o=>{i.matches(o.selector)?o.listener(i):i.querySelectorAll(o.selector).forEach(a=>{o.listener(a)})})})})}),this.observer.observe(document.body,this.observeOptions)}stopListening(){return this.observer.disconnect(),this.elements}};function jw(n){let e=n.filter(r=>r.addedNodes.length>0).reduce((r,i)=>[...r,...i.addedNodes],[]),t=n.filter(r=>r.type==="attributes"&&r.attributeName==="style"&&r.target instanceof HTMLElement&&/display\s*:\s*none/.test(r.oldValue)&&ra(r.target).visible).map(r=>r.target);return[...e,...t]}l(jw,"poppingElementsFilter");function fk(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}l(fk,"findCommonAncestor");function nd(n,e){let t=fk(n,e),r=0,i;if(!t)return 99999;for(i=n;i&&i!==t;)r++,i=i.parentNode;for(i=e;i&&i!==t;)r++,i=i.parentNode;return r}l(nd,"distanceBetweenNodes");var id=class{constructor(){this.lastHighlights=[]}static{l(this,"ElementHighlighter")}clearHighlights(){this.lastHighlights.length&&(this.lastHighlights.forEach(e=>e.remove()),this.lastHighlights=[])}highlightElement(e,{highlightStyle:t={},textStyle:r={},mousePosition:i,text:o,textType:a="static",textPosition:u="overlap",textWidthType:f="rect",clear:d=!0,shouldFlipHighlightTextOutsideViewport:p=!0,pointerEvents:g,classNames:y=[],renderDocument:w,scroll:S=!1}={}){if(d&&this.clearHighlights(),!e)return;let E={left:0,top:0,right:0,bottom:0},v=1,M=1;if(w!==e.ownerDocument){let G=e.ownerDocument.defaultView?.frameElement;for(;G&&G.contentDocument!==w;){let re=G.getBoundingClientRect(),B=this.getScaleFromStyles(G);v*=B.scaleX,M*=B.scaleY,E.left+=re.left,E.top+=re.top,G=G.ownerDocument.defaultView?.frameElement}}let A=w??e.ownerDocument,T=rf(e),L=e.getBoundingClientRect(),V={top:L.top*M+E.top,left:L.left*v+E.left};if(!T){let G=A.defaultView?.scrollX||0,re=A.defaultView?.scrollY||0;V.left+=G,V.top+=re}let U=A.createElement("div");if(U.style.outline="2px dashed rgba(255,0,0,.75)",U.style.position=T?"fixed":"absolute",U.style.left=V.left+"px",U.style.top=V.top+"px",U.style.width=L.width*v+"px",U.style.height=L.height*M+"px",U.style.pointerEvents=g??"none",U.style.zIndex="2147483647",U.className=["checksum-dom-cache-ignore",...y].join(" "),this.mergeStyle(U,t),i){let G=A.createElement("div");if(G.style.position="absolute",G.style.left=+i.x-16+"px",G.style.top=+i.y-16+"px",G.style.color="#004DFF",G.className=["checksum-dom-cache-ignore","mouse-cross",...y].join(" "),G.style.zIndex="2147483648",!A.head.querySelector("style[role=mouse-location]")){var Z=A.head.appendChild(A.createElement("style"));Z.setAttribute("role","mouse-location"),Z.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);}"}A.body.appendChild(G),this.lastHighlights.push(G)}let W=A.createElement("div");o&&(W.className=["checksum-dom-cache-ignore",...y].join(" "),W.innerText=o,W.style.fontSize="12px",W.style.width=f==="rect"?`${L.width}px`:"auto",W.style.background="#000000a1",W.style.color="white",W.style.padding="5px",W.style.position="absolute",W.style.pointerEvents="none",W.style.userSelect="none",u==="above"?W.style.bottom=`${L.height}px`:u==="below"&&(W.style.top=`${L.height}px`),this.mergeStyle(W,r),U.appendChild(W),U.style.pointerEvents=g??"none",a==="hover"&&(W.style.display="none",U.addEventListener("mouseover",()=>{W.style.display="block"}),U.addEventListener("mouseout",()=>{W.style.display="none"}))),A.body.appendChild(U),u==="above"&&nf(W)>0?(W.style.bottom="initial",W.style.top=`${L.height}px`):u==="below"&&sf(W)>0&&(W.style.top="initial",W.style.bottom=`${L.height}px`),this.lastHighlights.push(U),p&&this.flipHighlightTextPositionOutsideViewport(W,u,L.height),S&&new dt(e).scrollIntoView()}getScaleFromStyles(e){let t=window.getComputedStyle(e),r=t.transform;if(r.startsWith("matrix")){let i=parseFloat(r.split(",")[0].replace("matrix(",""))||1,o=parseFloat(r.split(",")[3])||1;return{scaleX:i,scaleY:o}}else if(t.scale){let i=parseFloat(t.scale)||1,o=parseFloat(t.scale)||1;return{scaleX:i,scaleY:o}}return{scaleX:1,scaleY:1}}mergeStyle(e,t){for(let r in t)e.style[r]=t[r]}flipHighlightTextPositionOutsideViewport(e,t,r){t==="above"&&nf(e)>0?(e.style.bottom="initial",e.style.top=`${r}px`):t==="below"&&sf(e)>0&&(e.style.top="initial",e.style.bottom=`${r}px`)}},Br=new id;function Dl(n,e){return typeof n!="string"?qw(n):`${JSON.stringify(n)}${e?"s":"i"}`}l(Dl,"escapeForTextSelector");function kl(n,e=!1){return typeof n!="string"?qw(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}l(kl,"escapeForAttributeSelector");function qw(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}l(qw,"escapeRegexForSelector");var hk=10,Oi=hk/2;var dk=100,pk=120,mk=140,gk=160,yk=180,bk=200;var m3=dk+Oi,g3=pk+Oi,y3=mk+Oi,b3=gk+Oi,v3=yk+Oi,w3=bk+Oi;function Ai(n){let e={full:"",immediate:[]};if(!vk(n)){let t="";if(n instanceof HTMLInputElement&&(n.type==="submit"||n.type==="button"))e={full:n.value,immediate:[n.value]};else{for(let r=n.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE?(e.full+=r.nodeValue||"",t+=r.nodeValue||""):(t&&e.immediate.push(t),t="",r.nodeType===Node.ELEMENT_NODE&&(e.full+=Ai(r).full));t&&e.immediate.push(t),n.shadowRoot&&(e.full+=Ai(n.shadowRoot).full)}}return e}l(Ai,"elementText");function Pl(n){return n.replace(/\u200b/g,"").trim().replace(/\s+/g," ")}l(Pl,"normalizeWhiteSpace");function vk(n){let e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}l(vk,"shouldSkipForTextMatching");function Gs(n){return n.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")}l(Gs,"escapeSelector");function Wr(n){let e=n.ownerDocument.defaultView;return e!==window&&!e.playwright&&(e.playwright=window.playwright),e.playwright}l(Wr,"getElementWindowPlaywright");var Fl=["role","aria-label","aria-labelledby","aria-checked","checked","placeholder","title","alt","id","data-testid","data-test-id","data-test","class","id","style","href","src","path","type"];function _i(n){return typeof n=="object"&&n!==null&&n.nodeType===Node.ELEMENT_NODE}l(_i,"isElement");var Pn={NONE:"",DESCENDANT:" ",CHILD:" > "},He={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"};function Yw(n,e){return Object.values(n).includes(e)}l(Yw,"isEnumValue");var wk="CssSelectorGenerator";function Li(n="unknown problem",...e){console.warn(`${wk}: ${n}`,...e)}l(Li,"showWarning");var Sk={selectors:[He.id,He.class,He.tag,He.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Ek(n){return Array.isArray(n)?n.filter(e=>Yw(He,e)):[]}l(Ek,"sanitizeSelectorTypes");function sd(n){return n instanceof RegExp}l(sd,"isRegExp");function Ck(n){return["string","function"].includes(typeof n)||sd(n)}l(Ck,"isCssSelectorMatch");function Kw(n){return Array.isArray(n)?n.filter(Ck):[]}l(Kw,"sanitizeCssSelectorMatchList");function xk(n){return n instanceof Node}l(xk,"isNode");function Xw(n){let e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return xk(n)&&e.includes(n.nodeType)}l(Xw,"isParentNode");function od(n,e){if(Xw(n))return n.contains(e)||Li("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended."),n;let t=e.getRootNode({composed:!1});return Xw(t)?(t!==document&&Li("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),t):js(e)}l(od,"sanitizeRoot");function Zw(n){return typeof n=="number"?n:Number.POSITIVE_INFINITY}l(Zw,"sanitizeMaxNumber");function Jw(n,e={}){let t=Object.assign(Object.assign({},Sk),e);return{selectors:Ek(t.selectors),whitelist:Kw(t.whitelist),blacklist:Kw(t.blacklist),root:od(t.root,n),combineWithinSelector:!!t.combineWithinSelector,combineBetweenSelectors:!!t.combineBetweenSelectors,includeTag:!!t.includeTag,maxCombinations:Zw(t.maxCombinations),maxCandidates:Zw(t.maxCandidates)}}l(Jw,"sanitizeOptions");function wr(n=[]){let[e=[],...t]=n;return t.length===0?e:t.reduce((r,i)=>r.filter(o=>i.includes(o)),e)}l(wr,"getIntersection");function $l(n){return[].concat(...n)}l($l,"flattenArray");function Mk(n){return n.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")}l(Mk,"wildcardToRegExp");function qs(n){let e=n.map(t=>{if(sd(t))return r=>t.test(r);if(typeof t=="function")return r=>{let i=t(r);return typeof i!="boolean"?(Li("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):i};if(typeof t=="string"){let r=new RegExp("^"+Mk(t)+"$");return i=>r.test(i)}return Li("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1});return t=>e.some(r=>r(t))}l(qs,"createPatternMatcher");function Ni(n,e,t){let r=Array.from(od(t,n[0]).querySelectorAll(e));return r.length===n.length&&n.every(i=>r.includes(i))}l(Ni,"testSelector");function ad(n,e){e=e??js(n);let t=[],r=n;for(;_i(r)&&r!==e;)t.push(r),r=r.parentElement;return t}l(ad,"getElementParents");function Qw(n,e){return wr(n.map(t=>ad(t,e)))}l(Qw,"getParents");function js(n){return n.ownerDocument.querySelector(":root")}l(js,"getRootNode");var Hl=", ",eS=new RegExp(["^$","\\s"].join("|")),tS=new RegExp(["^$"].join("|")),Bl=[He.nthoftype,He.tag,He.id,He.class,He.attribute,He.nthchild];var Tk=qs(["class","id","ng-*"]);function Ik({name:n}){return`[${n}]`}l(Ik,"attributeNodeToSimplifiedSelector");function Rk({name:n,value:e}){return`[${n}='${e}']`}l(Rk,"attributeNodeToSelector");function Ak({nodeName:n,nodeValue:e},t){let r=t.tagName.toLowerCase();return["input","option"].includes(r)&&n==="value"||n==="src"&&e?.startsWith("data:")?!1:!Tk(n)}l(Ak,"isValidAttributeNode");function Ok({nodeName:n,nodeValue:e}){return{name:Ur(n),value:Ur(e??void 0)}}l(Ok,"sanitizeAttributeData");function ld(n){let e=Array.from(n.attributes).filter(t=>Ak(t,n)).map(Ok);return[...e.map(Ik),...e.map(Rk)]}l(ld,"getElementAttributeSelectors");function rS(n){let e=n.map(ld);return wr(e)}l(rS,"getAttributeSelectors");function cd(n){var e;return((e=n.getAttribute("class"))!==null&&e!==void 0?e:"").trim().split(/\s+/).filter(t=>!tS.test(t)).map(t=>`.${Ur(t)}`)}l(cd,"getElementClassSelectors");function nS(n){let e=n.map(cd);return wr(e)}l(nS,"getClassSelectors");function ud(n){var e;let t=(e=n.getAttribute("id"))!==null&&e!==void 0?e:"",r=`#${Ur(t)}`,i=n.getRootNode({composed:!1});return!eS.test(t)&&Ni([n],r,i)?[r]:[]}l(ud,"getElementIdSelectors");function iS(n){return n.length===0||n.length>1?[]:ud(n[0])}l(iS,"getIdSelector");function fd(n){let e=n.parentNode;if(e){let r=Array.from(e.childNodes).filter(_i).indexOf(n);if(r>-1)return[`:nth-child(${String(r+1)})`]}return[]}l(fd,"getElementNthChildSelector");function sS(n){return wr(n.map(fd))}l(sS,"getNthChildSelector");function hd(n){return[Ur(n.tagName.toLowerCase())]}l(hd,"getElementTagSelectors");function Wl(n){let e=[...new Set($l(n.map(hd)))];return e.length===0||e.length>1?[]:[e[0]]}l(Wl,"getTagSelector");function dd(n){let e=Wl([n])[0],t=n.parentElement;if(t){let i=Array.from(t.children).filter(o=>o.tagName.toLowerCase()===e).indexOf(n);if(i>-1)return[`${e}:nth-of-type(${String(i+1)})`]}return[]}l(dd,"getElementNthOfTypeSelector");function oS(n){return wr(n.map(dd))}l(oS,"getNthOfTypeSelector");function*_k(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let t=0,r=pd(1);for(;r.length<=n.length&&t<e;)t+=1,yield r.map(o=>n[o]),r=Lk(r,n.length-1)}l(_k,"powerSetGenerator");function md(n=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(_k(n,{maxResults:e}))}l(md,"getPowerSet");function Lk(n=[],e=0){let t=n.length;if(t===0)return[];let r=[...n];r[t-1]+=1;for(let i=t-1;i>=0;i--)if(r[i]>e){if(i===0)return pd(t+1);r[i-1]++,r[i]=r[i-1]+1}return r[t-1]>e?pd(t+1):r}l(Lk,"bumpOffsets");function pd(n=1){return Array.from(Array(n).keys())}l(pd,"generateOffsets");function aS(n={}){let e=[];return Object.entries(n).forEach(([t,r])=>{e=r.flatMap(i=>e.length===0?[{[t]:i}]:e.map(o=>Object.assign(Object.assign({},o),{[t]:i})))}),e}l(aS,"getCartesianProduct");var Nk="3a".toUpperCase(),Dk=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function Ur(n=""){return CSS?CSS.escape(n):kk(n)}l(Ur,"sanitizeSelectorItem");function kk(n=""){return n.split("").map(e=>e===":"?`\\${Nk} `:Dk.test(e)?`\\${e}`:escape(e).replace(/%/g,"\\")).join("")}l(kk,"legacySanitizeSelectorItem");var Pk={tag:Wl,id:iS,class:nS,attribute:rS,nthchild:sS,nthoftype:oS},Fk={tag:hd,id:ud,class:cd,attribute:ld,nthchild:fd,nthoftype:dd};function lS(n,e){return Fk[e](n)}l(lS,"getElementSelectorsByType");function $k(n,e){let t=Pk[e];return t(n)}l($k,"getSelectorsByType");function Hk(n=[],e,t){return n.filter(r=>t(r)||!e(r))}l(Hk,"filterSelectors");function Bk(n=[],e){return n.sort((t,r)=>{let i=e(t),o=e(r);return i&&!o?-1:!i&&o?1:0})}l(Bk,"orderSelectors");function Wk(n,e,t){let r=Uk(n,t),i=jk(r,t),o=$l(i);return[...new Set(o)]}l(Wk,"getAllSelectors");function Uk(n,e){let{blacklist:t,whitelist:r,combineWithinSelector:i,maxCombinations:o}=e,a=qs(t),u=qs(r),f=l((d,p)=>{let g=$k(n,p),y=Hk(g,a,u),w=Bk(y,u);return d[p]=i?md(w,{maxResults:o}):w.map(S=>[S]),d},"reducer");return Vk(e).reduce(f,{})}l(Uk,"getSelectorsList");function Vk(n){let{selectors:e,includeTag:t}=n,r=[...e];return t&&!r.includes("tag")&&r.push("tag"),r}l(Vk,"getSelectorsToGet");function zk(n){return n.includes(He.tag)||n.includes(He.nthoftype)?[...n]:[...n,He.tag]}l(zk,"addTagTypeIfNeeded");function Gk(n){let{selectors:e,combineBetweenSelectors:t,includeTag:r,maxCandidates:i}=n,o=t?md(e,{maxResults:i}):e.map(a=>[a]);return r?o.map(zk):o}l(Gk,"combineSelectorTypes");function jk(n,e){return Gk(e).map(t=>qk(t,n)).filter(t=>t.length>0)}l(jk,"getTypeCombinations");function qk(n,e){let t={};return n.forEach(i=>{let o=e[i];o&&o.length>0&&(t[i]=o)}),aS(t).map(Kk)}l(qk,"constructSelectors");function Yk(n,e){return e[n]?e[n].join(""):""}l(Yk,"constructSelectorType");function Kk(n={}){let e=[...Bl];return n[He.tag]&&n[He.nthoftype]&&e.splice(e.indexOf(He.tag),1),e.map(t=>Yk(t,n)).join("")}l(Kk,"constructSelector");function Xk(n,e){return[...n.map(t=>e+Pn.DESCENDANT+t),...n.map(t=>e+Pn.CHILD+t)]}l(Xk,"generateCandidateCombinations");function Zk(n,e){return e===""?n:Xk(n,e)}l(Zk,"generateCandidates");function Jk(n,e,t="",r){let i=Wk(n,e,r),o=Zk(i,t);for(let a of o)if(Ni(n,a,e))return a;return null}l(Jk,"getSelectorWithinRoot");function cS(n,e,t="",r){if(n.length===0)return null;let i=[n.length>1?n:[],...Qw(n,e).map(o=>[o])];for(let o of i){let a=Jk(o,e,t,r);if(a)return{foundElements:o,selector:a}}return null}l(cS,"getClosestIdentifiableParent");function uS(n){(n instanceof NodeList||n instanceof HTMLCollection)&&(n=Array.from(n));let e=(Array.isArray(n)?n:[n]).filter(_i);return[...new Set(e)]}l(uS,"sanitizeSelectorNeedle");function Qk(n){return{value:n,include:!1}}l(Qk,"createElementSelectorData");function fS(n,e,t=Pn.NONE){let r={};return e.forEach(i=>{Reflect.set(r,i,lS(n,i).map(Qk))}),{element:n,operator:t,selectors:r}}l(fS,"createElementData");function hS({selectors:n,operator:e}){let t=[...Bl];n[He.tag]&&n[He.nthoftype]&&(t=t.filter(i=>i!==He.tag));let r="";return t.forEach(i=>{var o;((o=n[i])!==null&&o!==void 0?o:[]).forEach(({value:u,include:f})=>{f&&(r+=u)})}),e+r}l(hS,"constructElementSelector");function eP(n){return[":root",...ad(n).reverse().map(r=>{let i=fS(r,[He.nthchild],Pn.CHILD);return i.selectors.nthchild.forEach(o=>{o.include=!0}),i}).map(hS)].join("")}l(eP,"getElementFallbackSelector");function dS(n){return n.map(eP).join(Hl)}l(dS,"getFallbackSelector");function gd(n,e={}){var t;let r=uS(n),i=Jw(r[0],e),o=(t=i.root)!==null&&t!==void 0?t:js(r[0]),a="",u=o;function f(){return cS(r,u,a,i)}l(f,"updateIdentifiableParent");let d=f();for(;d;){let{foundElements:p,selector:g}=d;if(Ni(r,g,o))return g;u=p[0],a=g,d=f()}return r.length>1?r.map(p=>gd(p,i)).join(Hl):dS(r)}l(gd,"getCssSelector");var Ul=l(n=>new Promise(e=>setTimeout(e,n)),"awaitSleep"),pS=l(async(n,e=1e3,t)=>{if(e===null)return n;let r="guard-timed-out",i=null,o=l(async()=>new Promise(a=>{i=setTimeout(()=>{i=null,a(r)},e+1e3)}),"guard");try{let a=await Promise.race([n,o()]);if(i!==null&&(clearTimeout(i),i=null),typeof a=="string"&&a===r)throw typeof t=="function"?new Error(t()):new Error(t??"guardReturnTimedOut");return a}catch(a){throw i!==null&&(clearTimeout(i),i=null),a}},"guardReturn");var rP=!1,dn=class n{constructor(e){this.locators=[];this.elements=[];this.locators=e}static{l(this,"LocatorChain")}hasDuplicateFilters(){let e=this.locators.map(t=>t.options?.hasText).filter(t=>t);return e.length!==new Set(e).size}cloneAndAddCandidate(e){return new n([e,...this.locators.slice()])}toLocatorCandidate(){return{selector:this.getSelector(),locator:this.getLocator()}}getSelector(){return this.locators.map(e=>e.selector).join(" >> ")}getLocator(){return this.locators.map(e=>e.locator).join(".")}},pn=class n{constructor(e=document){this.rootNode=e;this.MAX_TESTING_SELECTORS=50;this.MAX_SINGLE_ELEMENT_SELECTORS=5;this.MAX_PROCESSING_TIME=15e3;this.MAX_MULTICANDIDATE_PROCESSING=5}static{l(this,"PlaywrightCustomLocatorGenerator")}async generate(e,t=[],r={}){let{isPartOfListItem:i,isForContextElement:o,useTextContent:a,addCSSSelectorGenerator:u,expandCSSKeyElements:f,bruteForceMode:d}={isPartOfListItem:!1,isForContextElement:!1,useTextContent:!0,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,bruteForceMode:!1,...r};if(Ye(e,"HTMLOptionElement")&&e.closest("select"))return this.generate(e.closest("select"),t,{isPartOfListItem:i});this.targetElement=e,this.startTimestamp=Date.now();let p=[];for(t=t.filter(y=>Array.from(document.querySelectorAll(y.selector)).includes(y.element)),f&&this.expandCSSKeyFeatures(e,t);e&&e!==this.rootNode;){await Ul(0);let y=this.getAllLocators(e,t,{useTextContent:a,bruteForceMode:d}),w=[],S=l(async E=>{if(!E.hasDuplicateFilters())try{await Ul(0);let{elements:v}=this.getLocatorBase(e).locator(E.getSelector());v?.some(M=>M===this.targetElement)&&(E.elements=v.filter(M=>hn(M)||M.constructor.name===this.targetElement.constructor.name),w.push(E))}catch(v){console.log(v,E.getSelector())}},"testCandidate");if(p.length)for(let E of y)for(let v of p)await S(v.cloneAndAddCandidate(E));else for(let E of y)await S(new dn([E]));if(w.length===0&&p.length===0){let E=e.tagName.toLowerCase();p.push(new dn([{selector:E,locator:this.getSelectorLocator(E),elements:this.getLocatorBase(e).locator(e.tagName.toLowerCase()).elements.filter(v=>hn(v))}]))}if(p.push(...w),o)return p.map(E=>E.toLocatorCandidate());if(p.length>this.MAX_TESTING_SELECTORS||p.filter(E=>E.elements.length===1).length>this.MAX_SINGLE_ELEMENT_SELECTORS||this.checkTimeout(!1))break;e=e.parentElement}if(i){let y=this.filterListItemsSelectors(p);if(y?.length)return y.map(w=>({...w.toLocatorCandidate(),isListSelector:!0}))}let g=[];try{for(let y of p)this.checkTimeout(),g.push(...y.elements.length===1?[y]:await this.reduceMultiCandidates(y))}catch(y){y instanceof tn&&console.warn("[PlaywrightCustomLocatorGenerator] Timeout error")}if(!g?.length&&(console.log("no single element selector found"),!f))return this.generate(e,t,{isPartOfListItem:i,isForContextElement:o,useTextContent:a,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0});if(u){let y=await this.addCSSSelectorGenerator();y&&g.unshift(y)}if(this.rootNode===document&&a){let{selector:y,locator:w}=await new Wt().getSelectorAndLocator(this.targetElement);g.unshift(new dn([{selector:y,locator:w}]))}return g=g.concat(await this.addOptionalParentSelector(a,u,f)),Array.from(new Map(g.map(y=>[y.toLocatorCandidate().selector,y.toLocatorCandidate()])).values())}testSelector(e,t,r,i=!0){let o=Wr(t).selector(t),a=this.getLocatorBase(t).locator(o);console.log("Locator result",a);let u=l(d=>i&&(d.elements.length!==1||t!==d.element)?!1:!!d.elements.includes(t),"testResult");if(!u(a))return{valid:!1};let f={};if(r?.locatorWithVars?.length)try{let p=new Function(`{ return function(element) { ${r.variablesCode}; return this.getLocatorBase(element).locator(\`${r.locatorWithVars}\`); } }`)().call(this,t);if(console.log("Locator with vars result",p),!u(p))return{valid:!1};f={selectorWithVars:o,locatorWithVars:r.locatorWithVars}}catch(d){return console.error("Error testing selector with variables",d.message),{valid:!1}}return{valid:!0,selector:o,locator:e,...f}}async addCSSSelectorGenerator(){try{let e=this.rootNode===document?{}:{root:this.rootNode},t=await pS(new Promise(r=>{let i=gd(this.targetElement,e);r(i)}),2e3);if(t.length<50)return new dn([{selector:t,locator:`locator('${t}')`}])}catch(e){console.error("Error getting CSS selector",e)}}async addOptionalParentSelector(e,t,r){try{let i=Wr(this.targetElement),o=i.locator(i.selector(this.targetElement)).element;if(o!==this.targetElement&&o?.contains(this.targetElement))return(await this.generate(o,[],{isPartOfListItem:!1,isForContextElement:!1,useTextContent:e,addCSSSelectorGenerator:t,expandCSSKeyElements:r})).map(({selector:a,locator:u})=>new dn([{selector:a,locator:u}]))}finally{return[]}}expandCSSKeyFeatures(e,t,r=4){try{let i=[];for(;e&&e!==this.rootNode&&i.length<r&&e!==document.documentElement;)Array.from(e.attributes).filter(({name:a,value:u})=>u.length<30&&!Fl.includes(a)).forEach(a=>{try{if(i.length>r-1)return;let u=`[${a.name}${a.value?`="${a.value}"`:""}]`;try{if(!e.parentElement||e.parentElement.querySelectorAll(u).length>1)return}catch{console.warn(`Error checking selector - ${u}, continuing`);return}if(!t.some(f=>f.selector.includes(u))&&this.getLocatorBase(e).locator(u).element===e){let f={element:e,selector:u};t.push(f),i.push(f)}}catch(u){console.warn("Error processing css key feature",{name:a.name,value:a.value},u)}}),e=e.parentElement;i.length}catch(i){console.error("Error extracting CSS key features",i)}}async generateArbitraryItemListSelector(e,t=[]){console.log("generateArbitraryItemListSelector",e);try{let r=vr(document.body,{nodeRepetitionsThreshold:5});if(!r?.length)throw new Error("No templates found in the page");let i=r.find(y=>y.element.contains(e));if(!i)throw new Error("No template found for target element");console.log("Found template for target element",i);let o=await new n().generate(i.element,t,{isPartOfListItem:!1,isForContextElement:!1,useTextContent:!1});console.log("baseCustomSelectors",o);let a=o[0].selector,u=this.getSelectorLocator(a,i.element);console.log("Randomly selected baseSelector",a);let f=l(()=>{let y=[],w=new Fn,S=e;for(;S&&S!==i.element;){let E="",v=!1,M=!1,A=!1;for(;!E.length;)E=w.getSelectorPart(S,{useClasses:M,useId:v,useTag:A}),v?(M=!0,A=!0):v=!0;y.push({selector:E,element:S}),S=S.parentElement}return y},"getCSSFeatures"),d=f();console.log("cssFeatures",d);let p=(await new n(i.element).generate(e,f(),{isPartOfListItem:!0,isForContextElement:!1,useTextContent:!1})).map(y=>({...y,elements:[]})),g=p.filter(y=>(y.elements=this.getLocatorBase(e).locator(a).locator(y.selector).elements,y.elements.length>Math.ceil(i.element.children.length*.7)));return console.log("elementSelectors",p),g.map(({selector:y,locator:w})=>({selector:`${a} >> ${y}`,locator:`${u}.${w}`}))}catch(r){console.error("[findGenericItemListSelector] error",r)}}filterListItemsSelectors(e){try{let t=vr(document.body,{nodeRepetitionsThreshold:5});if(!t?.length)throw new Error("No templates found in the page");return e.filter(r=>{if(r.elements.length<2)return!1;let i=new Fn().getSmallestCommonRoot(r.elements);return!(!t.some(o=>o.element===i)||Array.from(i.children).some(o=>{r.elements.filter(a=>o.contains(a)).length>1}))})}catch(t){console.error("[filterListItemsSelectors] error",t.message)}}getLocatorBase(e){let t=Wr(e);return this.rootNode===document||this.rootNode.nodeType===9?t:t.locator(t.selector(this.rootNode))}getSelectorLocator(e,t){return Wr(t??this.targetElement).asLocator("javascript",e)}async reduceMultiCandidates(e){await Ul(0);let{elements:t}=e,r=e.getSelector().split(" >> "),i=[],o=this.getLocatorBase(this.targetElement),a=l(p=>{try{return i.push(new dn([{selector:p,locator:this.getSelectorLocator(p)}])),i.length>=this.MAX_MULTICANDIDATE_PROCESSING}catch(g){return console.error(g),!1}},"addCandidateWithSelector"),u=l(p=>e.getSelector()+(r[r.length-1]===this.targetElement.tagName.toLowerCase()?p:` >> internal:and=${nP(this.targetElement.tagName.toLowerCase()+p)}`),"addCSSFilterToLocator"),f=l(p=>o.locator(p).elements.length===1?a(p):!1,"addIfSingularAndCheckLimit");if(t.length<5){let p=t.indexOf(this.targetElement);p!==-1&&a(e.getSelector()+` >> nth=${p}`)}let d=this.targetElement.parentElement;if(t.every(p=>p.parentElement===d&&p.tagName===this.targetElement.tagName)){let p=Array.from(d.children).indexOf(this.targetElement);if(p!==-1){let g=u(`:nth-child(${p+1})`);f(g)&&a(g)}}for(let p of Array.from(this.targetElement.classList).filter(g=>!dr.includes(g))){let g=u(`.${Gs(p)}`);try{if(f(g))return i}catch(y){console.error(y)}}for(let p of Array.from(this.targetElement.attributes).filter(g=>!Fl.includes(g.name))){let g=u(`[${p.name}`+(p.value?`="${p.value}"]`:"]"));try{if(f(g))return i}catch(y){console.error(y)}}return i}getAllLocators(e,t,r={}){r={exact:!0,useTextContent:!0,...r};let i=[this.getByRoleLocator(e,r),r.useTextContent?this.getByTextLocator(e,r):null,this.getByLabelLocator(e,r),this.getByPlaceholderLocator(e,r),this.getByTitleLocator(e,r),this.getByAltLocator(e,r),this.getTestIdLocator(e,r),...e===this.targetElement?[this.getInnerFeaturesLocator(e)]:[],...t.filter(o=>o.element===e).map(o=>({selector:o.selector,locator:this.getSelectorLocator(o.selector)}))].filter(o=>o);return!i.length&&r.bruteForceMode?i.concat(this.findUniqueCSSLocatorForElement(e)):i}findUniqueCSSLocatorForElement(e,t=5){let r=[],i=l(o=>(r.push([{selector:o,locator:`locator('${o}')`}]),r.length>=t),"addCandidate");for(let o of Array.from(e.attributes).filter(({name:a,value:u})=>u.length<30&&!Fl.includes(a)))try{let a=`[${o.name}${o.value?`="${o.value}"`:""}]`;if(e.ownerDocument.querySelectorAll(a).length===1&&i(a))return r}catch{}for(let o of Array.from(e.classList).filter(a=>!dr.includes(a)))try{let a=`.${Gs(o)}`;if(e.ownerDocument.querySelectorAll(a).length===1&&i(a))return r}catch{}return r}getInnerFeaturesLocator(e){let t=e.tagName.toLowerCase();if(!hn(e)||["html","body","div"].includes(t))return;let r=new Nr().extract(e).filter(o=>!o.isRoot).slice(0,4).map(o=>oi(o).pop());if(r.length<2)return;let i=t+r.map(o=>`:has(${o})`).join("");return{selector:i,locator:this.getSelectorLocator(i)}}getByRoleLocator(e,t={}){try{if(!hn(e))throw new Error("Provided element is not an HTMLElement");let r={},i={button:"button",input:l(w=>w.type==="checkbox"?"checkbox":w.type==="radio"?"radio":"textbox","input"),select:"listbox",a:"link",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",li:"listitem",option:"option",textarea:"textbox",table:"table",tr:"row",th:"columnheader",td:"cell",img:"img"},o=e.tagName.toLowerCase(),a=e.getAttribute("role")||(i[o]instanceof Function?i[o](e):i[o]);if(!a)return;let u=[];if(a==="heading"&&!e.hasAttribute("aria-level")){let w=parseInt(o.charAt(1),10);u.push(["level",String(w)])}(a==="checkbox"||a==="radio")&&u.push(["checked",String(e.getAttribute("aria-checked")??e.getAttribute("checked")??"false")]);let f=l(()=>{let w=l(T=>this.limitTextLength(this.normalize(T),t.exact),"normalize"),S={text:"",exact:!1},E=e.getAttribute("aria-label")??e.getAttribute("aria-labelledby")??e.getAttribute("title");if(E)return w(E);let v=Ai(e),M=Pl(v.full);if(!M?.length)return S;let A=w(M);return r.hasText=A.text,A},"getAccessibleName"),{text:d,exact:p}=f();d&&d.length>0&&d.length<30&&u.push(["name",kl(d,p)]);let g=l(()=>{let w=`internal:role=${a}${u.map(([S,E])=>`[${S}=${E}]`).join("")}`;return{locator:this.getSelectorLocator(w),selector:w,options:r}},"getSelection"),y=g();if(d?.length&&p&&!this.getLocatorBase(e).locator(y.selector).elements.includes(e)){let w=u.find(S=>S[0]==="name");w&&(w[1]=kl(d,!1),y=g())}return y}catch(r){console.error("Error getting role locator",r.message)}}getByTextLocator(e,t={}){try{if(!hn(e))return;let r=Pl(Ai(e).full);if(!r?.length||r.length>100)return;let i={};if(Array.from(e.children).filter(u=>hn(u)).some(u=>Pl(Ai(u).full)===r)){i.hasText=r;let u=`${e.tagName.toLowerCase()} >> internal:has-text=${Dl(r,!1)}`;return{selector:u,locator:this.getSelectorLocator(u),options:i}}let o=l(u=>{let d="internal:text="+Dl(r,u);return{selector:d,locator:this.getSelectorLocator(d),options:i}},"getSelection"),a=o(t.exact);return t.exact&&!this.getLocatorBase(e).locator(a.selector).elements.includes(e)&&(a=o(!1)),a}catch{}}getByLabelLocator(e,t={}){try{if(!hn(e)||!["input","textarea","select"].includes(e.tagName.toLowerCase()))return;let r=l(u=>({selector:`internal:label=${Dl(u,t.exact)}`,locator:`getByLabel('${u}')`}),"respond"),i=e.getAttribute("aria-label");if(i)return r(i);let o=e.getAttribute("aria-labelledby");if(o){let u=document.getElementById(o);if(u){let f=u.innerText.trim();if(f)return r(f)}}let a=e.getAttribute("id");if(a){let u=document.querySelector(`label[for="${a}"]`);if(u){let f=u.innerText.trim();if(f)return r(f)}}}catch{}}getByPlaceholderLocator(e,t={}){if(["input","textarea"].includes(e.tagName?.toLowerCase()))return this.getByAttributeLocator(e,"placeholder",t)}getByTitleLocator(e,t={}){return this.getByAttributeLocator(e,"title",t)}getByAltLocator(e,t={}){return this.getByAttributeLocator(e,"alt",t)}getTestIdLocator(e,t={}){for(let r of["data-testid","data-test-id","data-test"])if(e.getAttribute(r))return this.getByAttributeLocator(e,r,{...t,locatorName:"getByTestId"})}getByAttributeLocator(e,t,r={}){try{if(!hn(e))return;let i=e.getAttribute(t);if(i)return{selector:`internal:attr=[${t}=${kl(i,r.exact)}]`,locator:(r.locatorName??`getBy${t.charAt(0).toUpperCase()+t.slice(1)}`)+`('${i}')`}}catch{}}normalize(e){return e.replace(/\n/g,"").replace(/[ \t]+/g," ").trim()}limitTextLength(e,t=!0,r=30){for(;e?.length>30&&e.length<100&&e.includes(" ");)e=e.split(" ").slice(0,-1).join(" "),t=!1;return{text:e,exact:t}}checkTimeout(e=!0){if(rP)return!1;if(this.MAX_PROCESSING_TIME&&Date.now()-this.startTimestamp>this.MAX_PROCESSING_TIME){if(e)throw new tn;return!0}}};function nP(n,e=!1){return`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"`}l(nP,"escapeForAndLocator");function hn(n){return Ye(n,"HTMLElement")}l(hn,"isInstanceOfHTMLElement");function mS(n=document,e){try{let r=function(a){let u=a.nodeName.toLowerCase(),f=!1;if(["name","label","aria-label","data-testid","role"].forEach(d=>{a.hasAttribute(d)&&(u+=`[@${d}="${a.getAttribute(d)}"]`,f=!0)}),!f){let d=1,p=a.previousSibling;for(;p;)p.nodeType===Node.ELEMENT_NODE&&p.nodeName===a.nodeName&&d++,p=p.previousSibling;d>1&&(u+=`[${d}]`)}return u};var t=r;if(l(r,"getNodeIdentifier"),!n||!e||!n.contains(e))throw new Error("Child is not a descendant of the given element.");let i=[],o=e;for(;o!==n;)o.nodeType===Node.ELEMENT_NODE&&i.unshift(r(o)),o=o.parentElement;return i.join("/")}catch(r){console.error("Failed to get relative xpath",r);return}}l(mS,"getRelativeXPath");function gS(n,e){return[new XPathEvaluator().evaluate(e,n,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue].filter(i=>i instanceof HTMLElement)}l(gS,"findElementsByXPath");var Fn=class{constructor(e){this.htmlReducer=e;this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION=13;this.MAX_SELECTORS_PER_CONTEXT_ELEMENT=10;this.innerFeaturesExtractor=new Nr;this.innerTextExtractor=new li}static{l(this,"CompoundSelector")}filter(e,{isPartOfListItem:t=!1}={}){e.forEach(u=>{u.element=this.htmlReducer.getElementForChecksumId(u.selection.checksumid)});let r=e.splice(e.findIndex(u=>u.isTarget),1)[0],i=e.filter(u=>!!u.element&&!u.element.contains(r.element)&&!r.element.contains(u.element)&&!e.some(f=>f!==u&&(f.element===u.element||f.element.contains(u.element)))).concat(r);if(console.log(`filtered context elements, ${e.length+1} > ${i.length}`),!t)return i;let o=vr(document.body,{nodeRepetitionsThreshold:4});if(!o?.length)return[];let a=o.find(u=>u.element.contains(r.element));return a?(console.log("Found template for target element",a),i.filter(u=>a.element.contains(u.element))):[]}async generate(e,{isPartOfListItem:t=!1}={}){let r=e.filter(a=>a.isTarget)[0];if(e=this.filter(e,{isPartOfListItem:t}),e.length<2)throw new Error("Not enough elements found for the given checksum ids");if(!r?.element)throw new Error("Target element not found");let i=this.getSmallestCommonRoot(e.map(a=>a.element));if(!i)throw new Error("No common root found for the given elements");return this.extractFeaturesMetadata(e),{targetSelection:{xpath:mS(i,r.element),cssSelectors:this.generateAllContextualSelectors(i,r.element).filter(a=>a&&a.trim().length>0),playwrightSelectors:await new pn(i).generate(r.element,[],{addCSSSelectorGenerator:!1,expandCSSKeyElements:!1}),featuresMetadata:r.featuresMetadata},contextElements:e}}async select(e,t){e.forEach(o=>{if(o.find(a=>!a||!a.isConnected))throw new Error("One or more context elements are not connected to the DOM")});let r=l((o,a)=>{try{return o.selector(a)}catch{let f=a.ownerDocument.defaultView.parent?.document?.defaultView?.playwright;if(f)try{return f.selector(a)}catch{return}return}},"getElementSelector"),i=this.getSmallestCommonParents(e).map(this.calculateElementSize).sort((o,a)=>o.size-a.size).map(o=>o.element);return t?i.map(o=>{let a=Wr(o),{element:u}=a.locator(r(a,o)).locator(t);return u?r(a,u):null}).filter(o=>o):i.map(o=>{let a=Wr(o);if(!a){console.warn("Failed getting playwright for element",o);return}return r(a,o)}).filter(o=>o)}async selectFromMetadata(e){let{contextElements:t}=e;t.forEach(i=>this.getSelectorCandidatesForContextElement(i));let r=sa(t.map(i=>i.candidatesSelectors.map((o,a)=>a)));for(let i of r){t.forEach((a,u)=>a.selector=a.candidatesSelectors[i[u]]);let o=this.getSmallestCommonParentsFromMetadata(t).map(this.calculateElementSize).sort((a,u)=>a.size-u.size).map(a=>a.element);for(let a of o){let u=this.generateTargetSelectotionHistogram(a,e.targetSelection);if(u.size>0)return Array.from(u.keys()).slice(0,20).map(d=>Wr(d).generateSelectorAndLocator(d))}}}generateTargetSelectotionHistogram(e,t){let r=new Map,i=l(o=>{o.filter(a=>a instanceof HTMLElement).forEach(a=>{r.set(a,(r.get(a)||0)+1)})},"addElementstoHistogram");if(t.xpath)try{i(gS(e,t.xpath))}catch{}return t.cssSelectors.forEach(o=>{try{i(de(o,e))}catch{}}),new Map([...r.entries()].sort((o,a)=>a[1]-o[1]))}calculateElementSize(e){let t=e.getBoundingClientRect();return{element:e,size:t.width*t.height}}buildSelectorForContextElement(e,{useTag:t=!0,useInnerFeatures:r=!0,useClasses:i=!0,useAttributes:o=!0}){let a=t?e.featuresMetadata.tag:"";i&&e.featuresMetadata.classes.length&&(a+="."+e.featuresMetadata.classes.map(u=>u.trim().replace(/([!\"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1")).join(".")),o&&(a+=Object.entries(e.featuresMetadata.attributes).map(([u,f])=>`[${u}="${f}"]`).join("")),r&&(a+=e.featuresMetadata.innerFeatures.filter(u=>!u.isRoot).map(u=>`:has(${oi(u)})`).join("")),e.selector=a}getSelectorCandidatesForContextElement(e){let t=this.buildSelectorsCombination(e.featuresMetadata);e.candidatesSelectors=[];for(let r=0;r<t.length&&e.candidatesSelectors.length<this.MAX_SELECTORS_PER_CONTEXT_ELEMENT;r++)document.querySelector(t[r])&&e.candidatesSelectors.push(t[r])}buildSelectorsCombination(e){let t=this.BASE_MAX_COMPONENTS_FOR_SELECTOR_COMBINATION,r=l(y=>{let w=[[]];for(let S=0;S<y.length;S++){let E=w.length;for(let v=0;v<E;v++)w.push(w[v].concat(y[S]))}return w},"getCombinations"),i=l(y=>y.trim().replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g,"\\$1"),"escapeSelector"),o=e.tag,a=e.innerFeatures.filter(y=>!y.isRoot).map(y=>`:has(${oi(y)})`).slice(0,4),u=e.classes.map(y=>`.${i(y)}`),f=Object.entries(e.attributes).map(([y,w])=>`[${y}="${i(w)}"]`),d=l(()=>a.length+1+u.length+f.length>t,"exceedsMaxLength");for(;d()&&(u.pop(),!!d());)f.pop();let p=r([...u,...f,...a]),g=p.map(y=>[o,...y]);return p.push(...g),p.map(y=>y.join("")).filter(y=>y).sort((y,w)=>w.length-y.length)}extractFeaturesMetadata(e){e.forEach(t=>{t.featuresMetadata={id:t.element.getAttribute("id")??void 0,tag:t.element.tagName.toLowerCase(),innerText:this.innerTextExtractor.extract(t.element),innerFeatures:this.innerFeaturesExtractor.extract(t.element),classes:Array.from(t.element.classList).filter(r=>!dr.includes(r))||[],attributes:Array.from(t.element.attributes).reduce((r,i)=>(["class","style","id"].includes(i.name)||(r[i.name]=i.value),r),{})}})}generateAllContextualSelectors(e,t){let r=[],i=[!0,!1];for(let a of i)for(let u of i)for(let f of i)r.push({useId:a,useClasses:u,useTag:f});let o=r.map(a=>this.createContextualSelector(e,t,a)).filter(a=>a).filter(a=>{try{let u=de(a,e);return u.length===1&&u[0]===t}catch{return!1}});return[...new Set(o)]}createContextualSelector(e,t,{useId:r=!1,useClasses:i=!0,useTag:o=!0}){if(!e||!t)return null;let a=[],u=t;for(;u&&u!==e;)a.unshift(this.getSelectorPart(u,{useId:r,useClasses:i,useTag:o})),u=u.parentElement;return u?a.join(" ").trim():null}getSelectorPart(e,{useId:t=!1,useClasses:r=!0,useTag:i=!0}){if(t&&e.id&&e.id.match(/^\D/))return`#${e.id}`;let o=i?e.tagName.toLowerCase():"";if(r&&e.className){let a=e.className.trim().split(/\s+/).filter(u=>!dr.includes(u)).map(Gs).join(".");a.length>0&&(o+="."+a)}return["name","label","aria-label","data-testid","role"].forEach(a=>{e.hasAttribute(a)&&(o+=`[${a}="${e.getAttribute(a)}"]`)}),o.trim()}getSmallestCommonRoot(e){let t=l(i=>{let o=[];for(;i;)o.push(i),i=i.parentElement;return o},"getAncestors"),r=t(e[0]);for(let i=1;i<e.length;i++){let o=t(e[i]);r=r.filter(a=>o.includes(a))}return r.length>0?r[0]:null}getSmallestCommonParentsFromMetadata(e){let t=e.map(r=>{try{let i=de(r.selector);return r.selection.type==="content"?i.filter(o=>o.textContent===r.selection.value):i}catch{return[]}});return t.some(r=>r.length===0)?[]:this.getSmallestCommonParents(t)}getSmallestCommonParents(e){let t=new Set;sa(e).forEach(o=>{let a=this.getSmallestCommonRoot(o);a&&t.add(a)});let i=Array.from(t);return i.filter(o=>!i.some(a=>o!==a&&o.contains(a)))}};var Vl=class{constructor(){this.MAX_SNIPPET_SIZE=12e3;this.MAX_LIONTAIL_SIZE=6e3;this.MAX_ATTRIBUTE_SIZE=100}static{l(this,"ParentChainReducer")}async reduce(e,t={useLionTail:!0,useChecksumIds:!0}){if(console.log("[ParentChainReducer] will reduce",e),!Ye(e,"HTMLElement")&&!Ye(e,"SVGElement"))throw new Error("Element is not an HTMLElement");return{reducedHTML:this.getAncestorsHTMLSnippet(e,t)}}getElementForChecksumId(e){return this.elementsInSimplifiedDomByChecksumId[e]}getAncestorsHTMLSnippet(e,{useLionTail:t=!0,useChecksumIds:r=!0}={}){this.elementsInSimplifiedDomByChecksumId={};let i=this.MAX_LIONTAIL_SIZE,o=this.MAX_ATTRIBUTE_SIZE,a=[],u=e;e.setAttribute("checksum-selected","true");try{for(;u;)a.push(u),u.parentNode&&u.parentNode instanceof ShadowRoot?u=u.parentNode.host:u=u.parentElement;a.reverse();let f=l(y=>{for(let w=y.attributes.length-1;w>=0;w--){let S=y.attributes[w];S.name.length+S.value.length>o&&y.removeAttribute(S.name)}return y},"normalizeNode"),d,p=new Ii;do{d=a[0].cloneNode(!1);let y=d,w=as(d);for(let S=1;S<a.length;S++){if(t){let v=as(a[S]).length;if(v<=i&&w.length+v<=this.MAX_SNIPPET_SIZE){let M=this.deepCloneNode(a[S],r?p:void 0);y.appendChild(M);break}}let E=f(a[S].cloneNode(a[S]===e));if(r){let v=p.getAndIncrement();E.setAttribute("checksumid",v),this.elementsInSimplifiedDomByChecksumId[v]=a[S]}y.appendChild(E),y=E}i=Math.max(i-10,0),o=Math.max(o-10,0)}while(d.outerHTML.length>this.MAX_SNIPPET_SIZE&&o>0);return this.filterNodeClasses(d),as(d,{limitAttributeLength:!0})}catch(f){console.error("Error while getting ancestors HTML snippet",f)}finally{e.removeAttribute("checksum-selected")}}deepCloneNode(e,t){let r=e.cloneNode(!1),i=[e],o=[r];for(;i.length;){let a=i.shift(),u=o.shift();for(let f=0;f<a.childNodes.length;f++){let d=a.childNodes[f],p=d.cloneNode(!1);if(u.appendChild(p),t&&Ye(d,"HTMLElement")){let g=t.getAndIncrement();p.setAttribute("checksumid",g),this.elementsInSimplifiedDomByChecksumId[g]=d}i.push(d),o.push(p)}}return r}filterNodeClasses(e){let t=l(r=>{if("classList"in r){let i=r,o=i.classList;for(let a=0;a<o.length;a++){let u=o[a];dr.includes(u)&&i.classList.remove(u)}for(let a=0;a<i.children.length;a++)t(i.children[a])}},"filterClasses");t(e)}};var zl=class{static{l(this,"FilesObserver")}constructor(e){this.fileInputsWithListeners=new Set,this.filesMap={},this.observer=null,this.sessionMirror=e}async getFilesByRrwebId(e){let t=this.filesMap[e]??[];try{let r=await Promise.all(t.map(async i=>({data:await iP(i),fileName:i.name})));return this.filesMap[e]=[],r}catch{console.log("Error while parsing files to base 64")}}init(){console.log("Starting observation..."),console.log(this.sessionMirror),this.observeDOMChanges(),window.addEventListener("unload",this.cleanup.bind(this))}handleFileChange(e){console.log("handleFileChange",this.sessionMirror);let t=e.target,r=Array.from(t.files||[]),i=this.sessionMirror.getMeta(t);this.filesMap[i.id]=r,console.log(`Files updated for ID: ${i.id}`,r)}addFileInputListeners(e){e.forEach(t=>{this.fileInputsWithListeners.has(t)||(t.addEventListener("change",this.handleFileChange.bind(this)),this.fileInputsWithListeners.add(t))})}observeDOMChanges(){let e=window.document,t=e.querySelectorAll('input[type="file"]');this.addFileInputListeners(t);let r=l(()=>{this.observer=new MutationObserver(o=>{o.forEach(a=>{if(a.type==="childList"){let u=a.target.querySelectorAll('input[type="file"]');this.addFileInputListeners(u)}})}),this.observer.observe(e.body,{childList:!0,subtree:!0})},"onBodyReady"),i=new MutationObserver(function(){e.body&&(i.disconnect(),r())});i.observe(e.documentElement,{childList:!0,subtree:!0})}cleanup(){console.log("Cleaning up files observer..."),this.observer&&this.observer.disconnect(),this.fileInputsWithListeners.forEach(e=>{e.removeEventListener("change",this.handleFileChange)}),this.fileInputsWithListeners.clear(),this.filesMap={}}},iP=l(n=>new Promise((e,t)=>{let r=new FileReader;r.onloadend=()=>{r.result?e(r.result.toString()):t(new Error("File reading failed"))},r.onerror=()=>{t(new Error("File reading failed"))},r.readAsDataURL(n)}),"convertFileToBase64");var Gl=class{constructor(e){this.sessionRecorder=e}static{l(this,"NativeDialogObserver")}init(){this.overrideDialog("alert"),this.overrideDialog("confirm"),this.overrideDialog("prompt")}overrideDialog(e){let t=window[e].bind(window);window[e]=r=>{let i=t(r),o=this.determineDialogAction(i,e);return this.sessionRecorder.addCustomEvent("native-dialog-event",{dialogType:e,dialogMessage:r,dialogResult:i,dialogAction:o}),i}}determineDialogAction(e,t){if(t==="alert")return"native_accept";if(t==="confirm")return e?"native_accept":"native_dismiss";if(t==="prompt")return e?"native_accept":"native_dismiss"}};var jl=class n{constructor({rootDocument:e=document,getRenderDocument:t=l(u=>u?.document,"getRenderDocument"),defaultView:r,topLevelInspector:i,rootDocumentForSelectorGenerator:o,eventName:a}={}){this.wasHoveredElementSelected=!1;this.selected=[];this.singleSelection=!0;this.subDocumentInspector=null;this.listening=!1;this.locatorCache=yd.getInstance();this.onMouseOut=l(e=>{Br.clearHighlights()},"onMouseOut");this.onMouseOver=l(async e=>{let t=e.composedPath()[0];if("getRootNode"in t){let i=t.getRootNode();if(i!==this.rootDocument){this.handleSubDocument(i,this.defaultView);return}}if(Ye(t,"HTMLIFrameElement")){this.handleSubDocument(t.contentDocument,t.contentDocument.defaultView);return}if(this.subDocumentInspector&&this.stopSubDocumentInspector(!0),!Ye(t,"HTMLElement"))return;let r=t;if(!(r===this.hoveredElement||r.matches(".element-inspector-ignore"))){Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0});try{let{locator:i,selector:o,parentFramesSelectors:a,locatorRrwebId:u}=await this.getInspectedElementSelection(r,this.rootDocumentForSelectorGenerator);if(Br.highlightElement(r,{text:i.replace("frameLocator('iframe').",""),textPosition:"below",textWidthType:"auto",pointerEvents:"none",classNames:["element-inspector-ignore"],renderDocument:this.getRenderDocument(this.defaultView)}),u){let f=window.checksum.timeMachine.sessionReplayer.getNodeById(u);f&&Br.highlightElement(f,{clear:!1,pointerEvents:"none",classNames:["element-inspector-ignore"],renderDocument:this.getRenderDocument(this.defaultView)})}this.hoveredElement=r,this.hoveredElementSelection={locator:i,selector:o,parentFramesSelectors:a},this.wasHoveredElementSelected=!1,t.addEventListener("click",this.onClick,{capture:!0})}catch(i){console.error("Error inspecting element",i.message)}}},"onMouseOver");this.onClick=l(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()),window.parent.postMessage({type:this.eventName,data:this.selected[this.selected.length-1]},"*"))},"onClick");this.handleSubDocument=l((e,t)=>{if(this.subDocumentInspector){if(this.subDocumentInspector.rootDocument===e)return!0;this.stopSubDocumentInspector(!0)}return this.subDocumentInspector=new n({rootDocument:e,defaultView:t,topLevelInspector:this.topLevelInspector??this,getRenderDocument:this.getRenderDocument,eventName:this.eventName}),this.subDocumentInspector.start({singleSelection:this.singleSelection,timestamp:this.currentTimestamp}),!0},"handleSubDocument");this.stopSubDocumentInspector=l(e=>{this.subDocumentInspector&&(this.subDocumentInspector.stop(e),this.subDocumentInspector=null)},"stopSubDocumentInspector");this.rootDocument=e,this.topLevelInspector=i,this.getRenderDocument=t,this.eventName=a,this.defaultView=r??this.getDefaultView(),this.playwrightElementSelectorGenerator=new Wt,this.rootDocumentForSelectorGenerator=o??this.getDefaultView().document}static{l(this,"ElementInspector")}getDefaultView(){let t=document.querySelector(".replayer-wrapper > iframe")?.contentDocument||null;return!t&&this.rootDocument.nodeType===Node.DOCUMENT_NODE&&(t=this.rootDocument),t||(t=document),t.defaultView}start({singleSelection:e,timestamp:t}={singleSelection:!0}){this.singleSelection=e,this.locatorCache.setTimestamp(t),this.currentTimestamp=t,this.stop(),this.cleanSelection(),this.rootDocument.addEventListener("mouseover",this.onMouseOver),this.rootDocument.addEventListener("mouseout",this.onMouseOut),this.listening=!0}stop(e=!1){this.listening&&(this.listening=!1,this.subDocumentInspector&&this.stopSubDocumentInspector(e),Br.clearHighlights(),this.hoveredElement&&this.hoveredElement.removeEventListener("click",this.onClick,{capture:!0}),this.currentTimestamp=void 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}async getInspectedElementSelection(e,t){let r=this.locatorCache.getCachedLocatorForElement(e);if(!r){let{locator:i,selector:o,parentFramesSelectors:a}=await this.playwrightElementSelectorGenerator.getSelectorAndLocator(e,{rootDocument:t,ignoredIframesSelectors:[".replayer-wrapper > iframe"],flags:{origin:"element-inspector"}}).catch(d=>({locator:"",selector:"",parentFramesSelectors:[]})),u=await this.playwrightElementSelectorGenerator.selector(o,a).catch(()=>e),f=u!==e?yS(u):void 0;r={locator:i,selector:o,parentFramesSelectors:a,locatorRrwebId:f},this.locatorCache.setCachedLocatorForElement(e,r)}return r}},yd=class n{constructor(){this.locatorCache=new Map}static{l(this,"InspectedElementCache")}static getInstance(){return n.instance||(n.instance=new n),n.instance}setTimestamp(e){this.currentTimestamp=e}getCachedLocatorForElement(e){try{return this.currentTimestamp?this.locatorCache.get(this.getKeyForElement(e)):void 0}catch{return}}setCachedLocatorForElement(e,t){this.currentTimestamp&&this.locatorCache.set(this.getKeyForElement(e),t)}getKeyForElement(e){let t=yS(e);if(!t)throw new Error("Can't find rrwebId for element");return`${t}_${this.currentTimestamp}`}};function yS(n){return window.checksum.timeMachine.sessionReplayer.getMeta(n)?.id}l(yS,"getNodeRrwebId");var bd=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function vd(n,e,t,r){n.addEventListener?n.addEventListener(e,t,r):n.attachEvent&&n.attachEvent("on".concat(e),t)}l(vd,"addEvent");function Ys(n,e,t,r){n.removeEventListener?n.removeEventListener(e,t,r):n.detachEvent&&n.detachEvent("on".concat(e),t)}l(Ys,"removeEvent");function wS(n,e){let t=e.slice(0,e.length-1);for(let r=0;r<t.length;r++)t[r]=n[t[r].toLowerCase()];return t}l(wS,"getMods");function SS(n){typeof n!="string"&&(n=""),n=n.replace(/\s/g,"");let e=n.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}l(SS,"getKeys");function sP(n,e){let t=n.length>=e.length?n:e,r=n.length>=e.length?e:n,i=!0;for(let o=0;o<t.length;o++)r.indexOf(t[o])===-1&&(i=!1);return i}l(sP,"compareArray");var Xs={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":bd?173:189,"=":bd?61:187,";":bd?59:186,"'":222,"[":219,"]":221,"\\":220},Er={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},Yl={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},pt={16:!1,18:!1,17:!1,91:!1},Qe={};for(let n=1;n<20;n++)Xs["f".concat(n)]=111+n;var Xe=[],Ks=null,ES="all",Vr=new Map,Js=l(n=>Xs[n.toLowerCase()]||Er[n.toLowerCase()]||n.toUpperCase().charCodeAt(0),"code"),oP=l(n=>Object.keys(Xs).find(e=>Xs[e]===n),"getKey"),aP=l(n=>Object.keys(Er).find(e=>Er[e]===n),"getModifier");function CS(n){ES=n||"all"}l(CS,"setScope");function Zs(){return ES||"all"}l(Zs,"getScope");function lP(){return Xe.slice(0)}l(lP,"getPressedKeyCodes");function cP(){return Xe.map(n=>oP(n)||aP(n)||String.fromCharCode(n))}l(cP,"getPressedKeyString");function uP(){let n=[];return Object.keys(Qe).forEach(e=>{Qe[e].forEach(t=>{let{key:r,scope:i,mods:o,shortcut:a}=t;n.push({scope:i,shortcut:a,mods:o,keys:r.split("+").map(u=>Js(u))})})}),n}l(uP,"getAllKeyCodes");function fP(n){let e=n.target||n.srcElement,{tagName:t}=e,r=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(r=!1),r}l(fP,"filter");function hP(n){return typeof n=="string"&&(n=Js(n)),Xe.indexOf(n)!==-1}l(hP,"isPressed");function dP(n,e){let t,r;n||(n=Zs());for(let i in Qe)if(Object.prototype.hasOwnProperty.call(Qe,i))for(t=Qe[i],r=0;r<t.length;)t[r].scope===n?t.splice(r,1).forEach(a=>{let{element:u}=a;return Sd(u)}):r++;Zs()===n&&CS(e||"all")}l(dP,"deleteScope");function pP(n){let e=n.keyCode||n.which||n.charCode,t=Xe.indexOf(e);if(t>=0&&Xe.splice(t,1),n.key&&n.key.toLowerCase()==="meta"&&Xe.splice(0,Xe.length),(e===93||e===224)&&(e=91),e in pt){pt[e]=!1;for(let r in Er)Er[r]===e&&(Sr[r]=!1)}}l(pP,"clearModifier");function xS(n){if(typeof n>"u")Object.keys(Qe).forEach(i=>{Array.isArray(Qe[i])&&Qe[i].forEach(o=>ql(o)),delete Qe[i]}),Sd(null);else if(Array.isArray(n))n.forEach(i=>{i.key&&ql(i)});else if(typeof n=="object")n.key&&ql(n);else if(typeof n=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];let[i,o]=t;typeof i=="function"&&(o=i,i=""),ql({key:n,scope:i,method:o,splitKey:"+"})}}l(xS,"unbind");var ql=l(n=>{let{key:e,scope:t,method:r,splitKey:i="+"}=n;SS(e).forEach(a=>{let u=a.split(i),f=u.length,d=u[f-1],p=d==="*"?"*":Js(d);if(!Qe[p])return;t||(t=Zs());let g=f>1?wS(Er,u):[],y=[];Qe[p]=Qe[p].filter(w=>{let E=(r?w.method===r:!0)&&w.scope===t&&sP(w.mods,g);return E&&y.push(w.element),!E}),y.forEach(w=>Sd(w))})},"eachUnbind");function bS(n,e,t,r){if(e.element!==r)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in pt)Object.prototype.hasOwnProperty.call(pt,o)&&(!pt[o]&&e.mods.indexOf(+o)>-1||pt[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!pt[16]&&!pt[18]&&!pt[17]&&!pt[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(Xe),e.method(n,e)===!1&&(n.preventDefault?n.preventDefault():n.returnValue=!1,n.stopPropagation&&n.stopPropagation(),n.cancelBubble&&(n.cancelBubble=!0)))}}l(bS,"eventHandler");function vS(n,e){let t=Qe["*"],r=n.keyCode||n.which||n.charCode;if(!Sr.filter.call(this,n))return;if((r===93||r===224)&&(r=91),Xe.indexOf(r)===-1&&r!==229&&Xe.push(r),["metaKey","ctrlKey","altKey","shiftKey"].forEach(u=>{let f=Yl[u];n[u]&&Xe.indexOf(f)===-1?Xe.push(f):!n[u]&&Xe.indexOf(f)>-1?Xe.splice(Xe.indexOf(f),1):u==="metaKey"&&n[u]&&(Xe=Xe.filter(d=>d in Yl||d===r))}),r in pt){pt[r]=!0;for(let u in Er)Er[u]===r&&(Sr[u]=!0);if(!t)return}for(let u in pt)Object.prototype.hasOwnProperty.call(pt,u)&&(pt[u]=n[Yl[u]]);n.getModifierState&&!(n.altKey&&!n.ctrlKey)&&n.getModifierState("AltGraph")&&(Xe.indexOf(17)===-1&&Xe.push(17),Xe.indexOf(18)===-1&&Xe.push(18),pt[17]=!0,pt[18]=!0);let i=Zs();if(t)for(let u=0;u<t.length;u++)t[u].scope===i&&(n.type==="keydown"&&t[u].keydown||n.type==="keyup"&&t[u].keyup)&&bS(n,t[u],i,e);if(!(r in Qe))return;let o=Qe[r],a=o.length;for(let u=0;u<a;u++)if((n.type==="keydown"&&o[u].keydown||n.type==="keyup"&&o[u].keyup)&&o[u].key){let f=o[u],{splitKey:d}=f,p=f.key.split(d),g=[];for(let y=0;y<p.length;y++)g.push(Js(p[y]));g.sort().join("")===Xe.sort().join("")&&bS(n,f,i,e)}}l(vS,"dispatch");function Sr(n,e,t){Xe=[];let r=SS(n),i=[],o="all",a=document,u=0,f=!1,d=!0,p="+",g=!1,y=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(f=e.keyup),e.keydown!==void 0&&(d=e.keydown),e.capture!==void 0&&(g=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(y=!0)),typeof e=="string"&&(o=e),y&&xS(n,o);u<r.length;u++)n=r[u].split(p),i=[],n.length>1&&(i=wS(Er,n)),n=n[n.length-1],n=n==="*"?"*":Js(n),n in Qe||(Qe[n]=[]),Qe[n].push({keyup:f,keydown:d,scope:o,mods:i,shortcut:r[u],method:t,key:r[u],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Vr.has(a)){let w=l(function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return vS(E,a)},"keydownListener"),S=l(function(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;vS(E,a),pP(E)},"keyupListenr");Vr.set(a,{keydownListener:w,keyupListenr:S,capture:g}),vd(a,"keydown",w,g),vd(a,"keyup",S,g)}if(!Ks){let w=l(()=>{Xe=[]},"listener");Ks={listener:w,capture:g},vd(window,"focus",w,g)}}}l(Sr,"hotkeys");function mP(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Qe).forEach(t=>{Qe[t].filter(i=>i.scope===e&&i.shortcut===n).forEach(i=>{i&&i.method&&i.method()})})}l(mP,"trigger");function Sd(n){let e=Object.values(Qe).flat();if(e.findIndex(r=>{let{element:i}=r;return i===n})<0){let{keydownListener:r,keyupListenr:i,capture:o}=Vr.get(n)||{};r&&i&&(Ys(n,"keyup",i,o),Ys(n,"keydown",r,o),Vr.delete(n))}if((e.length<=0||Vr.size<=0)&&(Object.keys(Vr).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:u}=Vr.get(i)||{};o&&a&&(Ys(i,"keyup",a,u),Ys(i,"keydown",o,u),Vr.delete(i))}),Vr.clear(),Object.keys(Qe).forEach(i=>delete Qe[i]),Ks)){let{listener:i,capture:o}=Ks;Ys(window,"focus",i,o),Ks=null}}l(Sd,"removeKeyEvent");var wd={getPressedKeyString:cP,setScope:CS,getScope:Zs,deleteScope:dP,getPressedKeyCodes:lP,getAllKeyCodes:uP,isPressed:hP,filter:fP,trigger:mP,unbind:xS,keyMap:Xs,modifier:Er,modifierMap:Yl};for(let n in wd)Object.prototype.hasOwnProperty.call(wd,n)&&(Sr[n]=wd[n]);if(typeof window<"u"){let n=window.hotkeys;Sr.noConflict=e=>(e&&window.hotkeys===Sr&&(window.hotkeys=n),Sr),window.hotkeys=Sr}var Di=class{constructor(){this.boundShortcuts=[]}static{l(this,"KeybindingsManager")}addKeybinding(e){let t=e.key.toLowerCase();if(this.boundShortcuts.includes(t))return;this.boundShortcuts.push(t),Sr(t,{capture:!0,keydown:!0},i=>{i.preventDefault(),e.callback(i)})}};var Kl=class{constructor(e){this.keybindingsManager=new Di;this.createHandler=l(e=>({handlerFunc:l(t=>{try{e.handlerFunc(t)}finally{this.stopObserver()}},"handlerFunc"),handlerType:e.handlerType}),"createHandler");this.toHaveTextHandler=l(()=>e=>{let t=e?.data?.data,r=window.prompt(`Please enter the expected text for the element:
|
|
77
|
+
${t.locator}`);r!==null&&this.sessionRecorder.addCustomEvent("assertion",{matcher:`toHaveText("${r}")`,locator:t.locator})},"toHaveTextHandler");this.toBeVisibleHandler=l(()=>e=>{let t=e?.data?.data;this.sessionRecorder.addCustomEvent("assertion",{matcher:"toBeVisible()",locator:t.locator})},"toBeVisibleHandler");this.sessionRecorder=e}static{l(this,"AssertionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+a",callback:l(()=>this.toggleObserver({handlerFunc:this.toHaveTextHandler(),handlerType:"toHaveText"}),"callback")}),this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+s",callback:l(()=>this.toggleObserver({handlerFunc:this.toBeVisibleHandler(),handlerType:"toBeVisible"}),"callback")}),this.keybindingsManager.addKeybinding({key:"esc",callback:l(e=>{this.activeHandler&&(e.stopPropagation(),this.cleanUpHandler())},"callback")})}toggleObserver(e){if(this.activeHandler){this.cleanUpHandler();return}let t=this.createHandler(e);this.activeHandler=t,this.startObserver(),window.addEventListener("message",t.handlerFunc,{once:!0})}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}enableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[{type:Y.Custom,tag:"assertion"}],exclude:[]}})}disableEventsFilter(){this.sessionRecorder.addCustomEvent("filter",{filter:{only:[],exclude:[]}})}startObserver(){this.elementInspector=new jl({rootDocument:window.document}),this.elementInspector.start(),this.enableEventsFilter()}stopObserver(){this.isInspectorActive()&&(this.elementInspector.stop(),this.elementInspector=null,this.disableEventsFilter(),this.cleanUpHandler())}};var Xl=class{constructor(e){this.keybindingsManager=new Di;this.lastMousePosition={x:0,y:0};this.sessionRecorder=e,this.listenForMouseMove()}static{l(this,"ActionsObserver")}init(){this.keybindingsManager.addKeybinding({key:"ctrl+\u2318+h",callback:l(async()=>{try{await this.handleImmediateHover()}catch(e){console.error("[ActionsObserver] calling handleImmediateHover:",e)}},"callback")})}listenForMouseMove(){try{document.addEventListener("mousemove",e=>{try{this.lastMousePosition.x=e.clientX,this.lastMousePosition.y=e.clientY}catch(t){console.error("[ActionsObserver] mousemove event listener error:",t)}})}catch(e){console.error("[ActionsObserver] listenForMouseMove error:",e)}}async handleImmediateHover(){let e=document.elementFromPoint(this.lastMousePosition.x,this.lastMousePosition.y);if(!e)return;let t=new Wt,{locator:r}=await t.getSelectorAndLocator(e);r&&(this.sessionRecorder.addCustomEvent("hover",{locator:r}),this.highlightElement(e))}highlightElement(e){let t=e;if(!t.style)return;let r=t.style.backgroundColor,i=t.style.transition;t.style.transition="background-color 0.3s ease",t.style.backgroundColor="rgba(255, 255, 0, 0.3)",setTimeout(()=>{t.style.backgroundColor=r,t.style.transition=i},500)}cleanUpHandler(){this.activeHandler&&(window.removeEventListener("message",this.activeHandler.handlerFunc),this.stopObserver(),this.activeHandler=null)}isInspectorActive(){return!!this.elementInspector}stopObserver(){this.isInspectorActive()&&(this.elementInspector.stop(),this.elementInspector=null,this.cleanUpHandler())}};var Zl=class{constructor(e){this.sessionRecorder=e}static{l(this,"BlobObserver")}init(){this.overrideCreateObjectURL()}overrideCreateObjectURL(){let e=URL.createObjectURL.bind(URL);URL.createObjectURL=t=>{let r=e(t);return!this.sessionRecorder||!t||typeof t.arrayBuffer!="function"||t.arrayBuffer().then(i=>{let o=new Uint8Array(i),a=Array.from(o);this.sessionRecorder.addCustomEvent("blob-data",{blobData:a,mimeType:t.type,originalUrl:r})}).catch(i=>{console.warn("Failed to process blob data for recording:",i)}),r}}};var gP="$checksum",Jl=class{constructor(){this.testIdCounter=0;this.initialized=!1;Ri.setPrefix(gP),this.elementSelector=new Wt,this.htmlReducer=new Ll,this.parentChainReducer=new Vl,this.compoundSelector=new Fn(this.htmlReducer)}static{l(this,"ChecksumTestGenerator")}getCompoundSelector(){return this.compoundSelector}betterTemplatizr(e){return vr(e)}async buildCustomPlaywrightSelectors(e,t=[],r={},i=document){typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e));let o=t.map(a=>({...a,element:this.parentChainReducer.getElementForChecksumId(a.checksumId)})).filter(({element:a})=>!!a);return await new pn(i).generate(e,o,{isPartOfListItem:!1,isForContextElement:!1,addCSSSelectorGenerator:!0,expandCSSKeyElements:!0,...r})}async buildArbitraryListItem(e){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),new pn().generateArbitraryItemListSelector(e)}testElementSelector(e,t,r,i=!0){let o=typeof t=="string"?this.htmlReducer.getElementForChecksumId(t):t;return o?new pn().testSelector(e,o,r,i):(console.error("Element not found",t),{valid:!1,error:"Element not found"})}async getParentChainHTML(e,t=!0,r=!0){return typeof e=="string"&&(e=this.htmlReducer.getElementForChecksumId(e)),(await this.parentChainReducer.reduce(e,{useLionTail:t,useChecksumIds:r})).reducedHTML}init(e,t={},{sessionRecorder:r=!0,filesObserver:i=!1,assertionsObserver:o=!1,actionsObserver:a=!1,nativeDialogObserver:u=!1,blobObserver:f=!0}={}){this.appSpecificRules=e,this.config=t,!this.initialized&&(this.initialized=!0,r&&(this.sessionMirror=new Rl((d,p)=>{d.isCheckout=p,window.checksumSendBroadcastMessage?.("rrweb",[d]),this.lastRrwebEventTimestamp=d.timestamp},t.recordOptions)),i&&(this.filesObserver=new zl(this.sessionMirror),this.filesObserver.init()),o&&(this.assertionsObserver=new Kl(this.sessionMirror),this.assertionsObserver.init()),a&&(this.actionsObserver=new Xl(this.sessionMirror),this.actionsObserver.init()),u&&(this.nativeDialogObserver=new Gl(this.sessionMirror),this.nativeDialogObserver.init()),f&&(this.blobObserver=new Zl(this.sessionMirror),this.blobObserver.init()),this.sessionMirror&&(this.sessionMirror.start(),this.htmlReducer.setSessionRecorder(this.sessionMirror)),On.limitChildren=this.appSpecificRules?.esraSelectionRules?.limitChildren??[],On.timeout=this.config.esraTimeout,this.config.showFrontendLogs?Ri.removePrefix():this.config.logPrefix?.length&&Ri.setPrefix(this.config.logPrefix))}getElementSelector(){return this.elementSelector}getLastSelectionLogs(){return this.currentESRASelector?this.currentESRASelector.getLastSelectionLogs():{}}getBestMatchingElementSimilarityScore(e){return this.currentESRASelector=new On(e),this.currentESRASelector.selectOne().score}async extractESRAMetadata(e){return new Dr(document).extract(e).toMetadata()}async select(e,t){return await this.elementSelector.selector(e,t)}async getSelectionDataForSelector(e,t){try{let r=await this.elementSelector.selector(e,t);if(!r)return console.warn("could not find element for selector: "+e),null;let{locator:i}=await this.elementSelector.getSelectorAndLocator(r,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),o=await this.extractESRAMetadata(r);return{generatedLocator:i,esraMetadata:o,selector:e,parentFramesSelectors:t}}catch(r){console.log("getMetadataForSelector exception",r);return}}async getMatchingElementSelectionData(e,{minSelectionScore:t,cachedSelector:r,staticMetadata:i}={minSelectionScore:.3},o=!1){try{let a,u,f;if(r&&(console.log("Trying to locate using cached selector",r),a=await this.elementSelector.selector(r)),!a){console.log("Trying to locate using ESRA",e),ia(i)&&console.log("and static data",i),this.currentESRASelector=new On(e,i);let p=this.currentESRASelector.selectOne({minSelectionScore:t});p.score>=t?(a=p.candidate,u=p.score,f=p.clickOffset):console.log("Best matching element was below threshold",p)}if(console.log(a?[`Located with score ${u}`,a]:"Element not located"),!a)return;o&&new dt(a).scrollIntoView(),this.highlightElement(a);let d=await this.makeMatchingElementSelectionData(a,u);return f&&(d.clickOffset=f),d}catch(a){console.log("getMatchingElementSelectionData exception",a);return}}getAllInteractableElementsForLastSelectQuery(){let e=this.currentESRASelector.getFinalCandidates();return Promise.all(e.map(async t=>({esraMetadata:t.esraMetadata,selectionData:await this.makeMatchingElementSelectionData(t.candidate,t.score)})))}async getInteractableElementsRaw(){return An()}async getInteractableElements(){let e=An(),t=new Dr(document);return Promise.all(e.map(async r=>{let i=t.extract(r).toMetadata(),o=await this.makeMatchingElementSelectionData(r);return{esraMetadata:i,selectionData:o}}))}getCurrentESRASelector(){return this.currentESRASelector}startFlashingElementsDetection(){return this.htmlReducer.startFlashingElementsDetection()}async reduceHTML(e={},t={},r=document){let i=await this.htmlReducer.reduce(r,{...this.appSpecificRules,...e},t);if(this.lastRrwebEventTimestamp&&(i.lastRRwebEvent={timestamp:this.lastRrwebEventTimestamp}),t.extractESRAForInterpretationRequiredElements){console.log("Extracting ESRA for interpretation required elements...");let o=this.htmlReducer.getInteractableElementsInReducedHTML();i.elementsForNodeInterpretation=o.reduce((a,{checksumId:u,element:f})=>{if(!(f instanceof HTMLElement)||f.innerText?.trim().length)return a;let p=new Dr(document).extract(f).toMetadata();return[...a,{checksumId:u,esraMetadata:p}]},[]),console.log("Done with ESRA extraction for interpretation required elements")}return i}getMoreItemsForTemplate(e,t={}){return this.htmlReducer.getMoreElementsFromTemplate(e,{...this.appSpecificRules,...t})}displayInterpretationForElements(e){this.clearHighlights(),this.htmlReducer.getInteractableElements().forEach(({checksumId:r,element:i})=>{let o=e[r];if(o){if(!i.isConnected){console.log(`Element ${r} is not connected to the DOM, skipping display`);return}this.highlightElement(i,{text:o,textType:"hover",clear:!1,textStyle:{width:"120px"}})}})}async overlayInteractableElementsWithChecksumId({reduceBeforeRender:e=!1,mode:t="full",textPosition:r=t==="tag"?"above":void 0,shouldFlipHighlightTextOutsideViewport:i=!0,scrollIntoView:o=!1,checksumId:a}={}){this.clearHighlights(),e&&await this.reduceHTML();let u=l((d,p,g)=>{if(!p.isConnected){console.log(`Element ${d} is not connected to the DOM, skipping display`);return}let{width:y,height:w}=p.getBoundingClientRect();if(y<=0||w<=0)return;function S(A){switch(t){case"tag":return{background:A,width:"initial",left:"-2px",border:`3px dashed ${A}`,"font-weight":"bold"};case"full":return{background:"black",height:"100%"}}}l(S,"getTextStyleByMode");function E(A){let T=["red","gold","green","steelBlue","orange","hotPink","darkViolet","brown"];return A?T[A%T.length]:"red"}l(E,"getColor");let v=E(g);function M(){switch(t){case"tag":return{outline:`3px dashed ${v}`};case"full":return{outline:"none"};case"selected":return{outline:"6px dashed red",opacity:"0.7"}}}l(M,"getHighlightStyle"),this.highlightElement(p,{text:d,clear:!1,highlightStyle:M(),...r?{textPosition:r}:{},textStyle:S(v),shouldFlipHighlightTextOutsideViewport:i})},"overlayElement");if(t==="selected"&&a){let d=await this.getElementForChecksumId(a);u(null,d,0);return}this.htmlReducer.getInteractableElementsInReducedHTML().filter(d=>!vt(d.element,{...td,scrollIntoView:o}).isHidden).forEach(({checksumId:d,element:p},g)=>{u(d,p,g)})}async getElementForChecksumId(e){return this.htmlReducer.getElementForChecksumId(e)}async getSelectorForChecksumId(e){let t=await this.htmlReducer.getSelectorForChecksumId(e),{element:r,innerText:i,...o}=t;return o}hasInnerTextByChecksumId(e){return this.htmlReducer.hasInnerTextByChecksumId(e)}async getSelectorByPosition(e,t){let r=document.elementFromPoint(e,t),{selector:i,locator:o,parentFramesSelectors:a}=await this.elementSelector.getSelectorAndLocator(r);return{selector:i,locator:o,parentFramesSelectors:a}}isInput(e){let t=de(e);if(t.length)return["input","textarea"].includes(t[0].tagName.toLowerCase())}querySelectorExtended(e){return de(e)}getReactTree(e){return Gw(e)}isHidden(e,t){return vt(e,t)}showGrid(){this.removeGrid();let e=document.createElement("style");e.id="checksum_grid_style",e.innerHTML=`
|
|
78
78
|
.checksum_grid {
|
|
79
79
|
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAJ1JREFUaEPtksEJgDAUxX73H1oRxAECkSrppacXaNI1M8f84Kz7Idf95XP0kM3yVWSzIFORikgG+lqSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddKwIpJYjK0IVicNKyKJxdiKYHXSsCKSWIytCFYnDSsiicXYimB10rAikliMrQhWJw0rIonF2IpgddLwKSLx38Oej8ZiASoSUGMAAAAASUVORK5CYII=");
|
|
80
80
|
background-repeat: repeat;
|
|
@@ -88,34 +88,34 @@ ${t.locator}`);r!==null&&this.sessionRecorder.addCustomEvent("assertion",{matche
|
|
|
88
88
|
height: 100%;
|
|
89
89
|
z-index: 1000;
|
|
90
90
|
}
|
|
91
|
-
`,document.body.prepend(e);let t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}removeGrid(){let e=document.querySelector("#checksum_grid_style");e&&e.remove();let t=document.querySelector(".checksum_grid");t&&t.remove()}clearHighlights(){Br.clearHighlights()}highlightElement(e,t={}){this.config.skipElementHighlighting||Br.highlightElement(e,t)}async getInspectedElementSelectionResultByRRwebId(e,t={ignoredIframesSelectors:[],fromTimeMachine:!1}){let i=await(t.fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror).getNodeById(e);if(i)return await this.elementSelector.getSelectorAndLocator(i,{ignoredIframesSelectors:t.ignoredIframesSelectors})}startListeningForHTMLChanges(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Ol(jw),this.mutationDetector.startListening()}stopListeningForHTMLChanges(e){let t=this.mutationDetector.stopListening();switch(e){default:return t.map(r=>(r.innerText??r.textContent)?.trim())}}scrollScrollableElement(e,t,r){let i=this.sessionMirror.getNodeById(e);return!i||!(i instanceof Element)?{result:!1,error:"Element not found"}:dt.scrollScrollableElement(i,t,r)}extractViewportHTML(){let e=document.documentElement,t={},r=l(a=>{let f=l(()=>a instanceof Element?a:hr(a),"getElement")();if(!f)return!1;let d=f.getBoundingClientRect();return d.top<window.innerHeight&&d.bottom>0&&d.left<window.innerWidth&&d.right>0},"isInViewport"),i=l(a=>{let u=r(a),f=[];if(ei(a).forEach(p=>{let g=i(p);g&&f.push(g)}),!u&&f.length===0)return null;let d=a.cloneNode(!1);if(a instanceof Element){let{canScrollX:p,canScrollY:g,progressX:y,progressY:w}=dt.getScrollData(a),S=d,C=p||g,v={};p&&(S.setAttribute("data-scrollable-x","true"),S.setAttribute("data-scrollable-x-progress",y.toString()),v.x=y),g&&(S.setAttribute("data-scrollable-y","true"),S.setAttribute("data-scrollable-y-progress",w.toString()),v.y=w);let M=null;try{let{id:A}=this.sessionMirror.getMeta(a);A&&(S.setAttribute("rrwebId",A.toString()),M=A)}catch(A){console.error("Error adding rrwebId",a,A)}M&&C&&(t[M]=v)}return f.forEach(p=>{d.appendChild(p)}),d},"copyVisibleElements");return{html:i(e).outerHTML,scrollableElements:t}}async generateLocatorByRrwebId(e){let t=await this.sessionMirror.getNodeById(e);if(!t)return;let{locator:r}=await this.elementSelector.getSelectorAndLocator(t);return r}async scrollElementIntoView(e){return e?(new dt(e).scrollIntoView(),!0):!1}async scrollElementIntoViewByChecksumId(e){let t=await this.getElementForChecksumId(e);return this.scrollElementIntoView(t)}async scrollElementIntoViewByRrwebId(e){let t=await this.sessionMirror.getNodeById(e);return this.scrollElementIntoView(t)}async scrollIntoViewAndHighlight(e){let t=await this.elementSelector.selector(e);t&&(t.scrollIntoView(),this.highlightElement(t))}async recordScrollPosition(e){let t=await this.getElementForChecksumId(e);if(!t)return;let r=new dt(t);r.getScrollableParentsPositions(),t._checksumScrollHelper=r}async restoreScrollPosition(e){let t=await this.getElementForChecksumId(e);!t||!("_checksumScrollHelper"in t)||(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}determineClosestNode(e,t,r){return rd(e,r)-rd(t,r)}addForceIncludeElement(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}async makeMatchingElementSelectionData(e,t,r){try{let i=this.setAndGetTestId(e),o=this.getVisibleParent(e),a=this.setAndGetTestId(o),u=this.getElementAtCenterOfElement(e),f=this.setAndGetTestId(u),d={element:i,visibleElement:a===i?void 0:a,atPointElement:f===i||f===a?void 0:f},p=await this.elementSelector.getSelectorAndLocator(e,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),g=await this.elementSelector.getSelectorAndLocator(u,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),y=await this.elementSelector.getSelectorAndLocator(o,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),w={element:p?.selector,visibleElement:y?.selector,atPointElement:g?.selector},S={element:p?.parentFramesSelectors,visibleElement:y?.parentFramesSelectors,atPointElement:g?.parentFramesSelectors},C=l(L=>({tag:L.tagName.toLowerCase()}),"makeElementData"),v={element:C(e),visibleElement:d.visibleElement?C(o):void 0,atPointElement:d.atPointElement?C(u):void 0},M=l(async L=>L===e&&r?r:new Dr(document).extract(L).toMetadata(),"makeESRAMetadata"),A={element:await M(e),visibleElement:d.visibleElement?await M(o):void 0,atPointElement:d.atPointElement?await M(u):void 0},T=p?.locator;return{testIds:d,selectors:w,parentFramesSelectors:S,elementData:v,score:t,esraMetadata:A,generatedLocator:T}}catch(i){return console.log("[makeMatchingElementSelectionData] exception",i),{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0}}}getElementAtCenterOfElement(e){let{x:t,y:r}=e.getBoundingClientRect(),i=e.ownerDocument.elementFromPoint(t,r);return i instanceof HTMLElement?i:void 0}setAndGetTestId(e){if(!e)return;let t=e.getAttribute("data-checksum-testid");if(t)return t;let r=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",r),r}getVisibleParent(e){return!(e instanceof HTMLElement)||e.offsetParent!==null?e:this.getVisibleParent(hr(e))}};var Xl=class{static{l(this,"EventHandlersBase")}setSessionReplayer(e){}skipEvents(e){}preCastEvent(e){}async 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){}handleNativeDialog(e,t){}handleRecordAssertion(e,t){}handleRecordHover(e,t){}};var ki=class{static{l(this,"BlobStoreManager")}static storeBlob(e){if(window.parent.blobs||(window.parent.blobs={}),e.originalUrl){let t=new Uint8Array(e.blobData),r=new Blob([t],{type:e.mimeType});window.parent.blobs[e.originalUrl]=URL.createObjectURL(r)}}static getBlobUrl(e){return window.parent.blobs?.[e]}static async replaceBlobUrls(e){if(e==null)return e;if(typeof e=="string"){if(e.includes("blob:")){try{await this.waitForBlob(e)}catch(r){return console.error(`Waiting for blob failed: ${r}`),e}return this.getBlobUrl(e)||e}return e}if(Array.isArray(e))return await Promise.all(e.map(t=>this.replaceBlobUrls(t)));if(typeof e=="object"){let t={};for(let[r,i]of Object.entries(e))t[r]=await this.replaceBlobUrls(i);return t}return e}static async waitForBlob(e,t=5e3){return new Promise((r,i)=>{let o=Date.now(),a=l(()=>{if(this.hasBlob(e)){r();return}if(Date.now()-o>t){i(new Error(`Timeout waiting for blob: ${e}`));return}setTimeout(a,100)},"checkBlob");a()})}static hasBlob(e){return e in(window.parent.blobs??{})}};var Zl=class{constructor({eventHandlers:e}){this.filter={only:[],exclude:[]};this.preCastEvent=l(async e=>this.handlers.preCastEvent(e),"preCastEvent");this.processEvent=l(async(e,t=!0)=>{await this.handlers.preEvent(e);let r=t?await this.handleEvent(e):void 0,i=await this.handlers.postEvent(e,r);return this.handlers.controlledReturn?this.handlers.getReturnValue():i},"processEvent");this.skipEvents=l(async e=>this.handlers.skipEvents(e),"skipEvents");this.shouldProcess=l(e=>{let{only:t,exclude:r}=this.filter,i=l(o=>e.type===Y.Custom&&e.data.tag==="filter"?!0:o.type!==e.type?!1:e.type===Y.Custom?o.tag===e.data.tag:e.type===Y.IncrementalSnapshot?e.data.source===o.source:!0,"matchFilter");return!(t.length>0&&!t.some(i)||r.length>0&&r.some(i))},"shouldProcess");this.handlers=e}static{l(this,"EventProcessor")}setHandlers(e){this.handlers=e}async handleEvent(e){if(this.shouldProcess(e))switch(e.type){case Y.Meta:return this.handlers.handleMeta(e.data,e);case Y.IncrementalSnapshot:switch(e.data.source){case z.ViewportResize:return this.handlers.handleViewportResize(e.data,e);case z.Mutation:return this.handlers.handleMutation(e.data,e);case z.Input:return this.handlers.handleInput(e.data,e);case z.MouseInteraction:return this.handleMouseInteraction(e.data,e);case z.MouseMove:return this.handlers.handleMouseMove(e.data,e);default:break}break;case Y.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);case"native-dialog-event":return this.handlers.handleNativeDialog(e.data.payload,e);case"assertion":return this.handlers.handleRecordAssertion(e.data.payload,e);case"hover":return this.handlers.handleRecordHover(e.data.payload,e);case"filter":this.handleFilterEvent(e.data.payload);break;case"blob-data":let t=e.data.payload;ki.storeBlob(t);break}break;default:break}}async handleMouseInteraction(e,t){switch(e.type){case ie.Click:return this.handlers.handleClick(e,t);case ie.DblClick:return this.handlers.handleDblClick(e,t);case ie.MouseDown:return this.handlers.handleMouseDown(e,t);case ie.MouseUp:return this.handlers.handleMouseUp(e,t);case ie.Focus:return this.handlers.handleFocus(e,t);case ie.Blur:return this.handlers.handleBlur(e,t);default:break}}handleFilterEvent(e){this.filter.exclude=e.filter.exclude,this.filter.only=e.filter.only}};var mP={[Y.DomContentLoaded]:"DomContentLoaded",[Y.Load]:"Load",[Y.FullSnapshot]:"FullSnapshot",[Y.IncrementalSnapshot]:"IncrementalSnapshot",[Y.Meta]:"Meta",[Y.Custom]:"Custom",[Y.Plugin]:"Plugin"},gP={[z.Mutation]:"Mutation",[z.MouseMove]:"MouseMove",[z.MouseInteraction]:"MouseInteraction",[z.Scroll]:"Scroll",[z.ViewportResize]:"ViewportResize",[z.Input]:"Input",[z.TouchMove]:"TouchMove",[z.MediaInteraction]:"MediaInteraction",[z.StyleSheetRule]:"StyleSheetRule",[z.CanvasMutation]:"CanvasMutation",[z.Font]:"Font",[z.Log]:"Log",[z.Drag]:"Drag",[z.StyleDeclaration]:"StyleDeclaration"},yP={[ie.MouseUp]:"MouseUp",[ie.MouseDown]:"MouseDown",[ie.Click]:"Click",[ie.ContextMenu]:"ContextMenu",[ie.DblClick]:"DblClick",[ie.Focus]:"Focus",[ie.Blur]:"Blur",[ie.TouchStart]:"TouchStart",[ie.TouchMove_Departed]:"TouchMove_Departed",[ie.TouchEnd]:"TouchEnd"},Sd=l(n=>({...n,type:mP[n.type],data:{...n.data,source:n.type===Y.IncrementalSnapshot?gP[n.data.source]??n.data.source:n.data.source,type:n.data.source===z.MouseInteraction?yP[n.data.type]:n.data.type}}),"stringifyEvent"),Ed=l((n,{includeBlur:e=!0,includeFocus:t=!0}={})=>{switch(n.type){case Y.Meta:return!1;case Y.IncrementalSnapshot:switch(n.data.source){case z.Input:return n.data.userTriggered;case z.MouseInteraction:return!(!e&&n.data.type===ie.Blur||!t&&n.data.type===ie.Focus);case z.MouseMove:case z.Drag:case z.Selection:return!0;default:return!1}case Y.Custom:switch(n.data.tag){case"contenteditable-input":case"hover":return!0;default:return!1}default:return!1}},"isActionEvent");var MS=l(n=>{n.querySelectorAll("a, button, input").forEach(e=>{e.addEventListener("click",t=>t.preventDefault()),e.addEventListener("keydown",t=>t.preventDefault())})},"disableInteractiveElements");var Cd=class{static{l(this,"Logger")}static formatMessage(e,t){let{level:r,message:i,timestamp:o,data:a}=e,u=`[${o}] [${r.toUpperCase()}]`;return t&&(u+=` [${t}]`),u+=` ${i}`,a?`${u}
|
|
91
|
+
`,document.body.prepend(e);let t=document.createElement("div");t.classList.add("checksum_grid"),document.body.prepend(t)}removeGrid(){let e=document.querySelector("#checksum_grid_style");e&&e.remove();let t=document.querySelector(".checksum_grid");t&&t.remove()}clearHighlights(){Br.clearHighlights()}highlightElement(e,t={}){this.config.skipElementHighlighting||Br.highlightElement(e,t)}async getInspectedElementSelectionResultByRRwebId(e,t={ignoredIframesSelectors:[],fromTimeMachine:!1}){let i=await(t.fromTimeMachine?window.checksum.timeMachine.sessionReplayer:this.sessionMirror).getNodeById(e);if(i)return await this.elementSelector.getSelectorAndLocator(i,{ignoredIframesSelectors:t.ignoredIframesSelectors})}startListeningForHTMLChanges(){this.mutationDetector&&this.mutationDetector.stopListening(),this.mutationDetector=new Nl(jw),this.mutationDetector.startListening()}stopListeningForHTMLChanges(e){let t=this.mutationDetector.stopListening();switch(e){default:return t.map(r=>(r.innerText??r.textContent)?.trim())}}scrollScrollableElement(e,t,r){let i=this.sessionMirror.getNodeById(e);return!i||!(i instanceof Element)?{result:!1,error:"Element not found"}:dt.scrollScrollableElement(i,t,r)}extractViewportHTML(){let e=document.documentElement,t={},r=l(a=>{let f=l(()=>a instanceof Element?a:hr(a),"getElement")();if(!f)return!1;let d=f.getBoundingClientRect();return d.top<window.innerHeight&&d.bottom>0&&d.left<window.innerWidth&&d.right>0},"isInViewport"),i=l(a=>{let u=r(a),f=[];if(ti(a).forEach(p=>{let g=i(p);g&&f.push(g)}),!u&&f.length===0)return null;let d=a.cloneNode(!1);if(a instanceof Element){let{canScrollX:p,canScrollY:g,progressX:y,progressY:w}=dt.getScrollData(a),S=d,E=p||g,v={};p&&(S.setAttribute("data-scrollable-x","true"),S.setAttribute("data-scrollable-x-progress",y.toString()),v.x=y),g&&(S.setAttribute("data-scrollable-y","true"),S.setAttribute("data-scrollable-y-progress",w.toString()),v.y=w);let M=null;try{let{id:A}=this.sessionMirror.getMeta(a);A&&(S.setAttribute("rrwebId",A.toString()),M=A)}catch(A){console.error("Error adding rrwebId",a,A)}M&&E&&(t[M]=v)}return f.forEach(p=>{d.appendChild(p)}),d},"copyVisibleElements");return{html:i(e).outerHTML,scrollableElements:t}}async generateLocatorByRrwebId(e){let t=await this.sessionMirror.getNodeById(e);if(!t)return;let{locator:r}=await this.elementSelector.getSelectorAndLocator(t);return r}async scrollElementIntoView(e){return e?(new dt(e).scrollIntoView(),!0):!1}async scrollElementIntoViewByChecksumId(e){let t=await this.getElementForChecksumId(e);return this.scrollElementIntoView(t)}async scrollElementIntoViewByRrwebId(e){let t=await this.sessionMirror.getNodeById(e);return this.scrollElementIntoView(t)}async scrollIntoViewAndHighlight(e){let t=await this.elementSelector.selector(e);t&&(t.scrollIntoView(),this.highlightElement(t))}async recordScrollPosition(e){let t=await this.getElementForChecksumId(e);if(!t)return;let r=new dt(t);r.getScrollableParentsPositions(),t._checksumScrollHelper=r}async restoreScrollPosition(e){let t=await this.getElementForChecksumId(e);!t||!("_checksumScrollHelper"in t)||(t._checksumScrollHelper.restore(),delete t._checksumScrollHelper)}determineClosestNode(e,t,r){return nd(e,r)-nd(t,r)}addForceIncludeElement(e,t){this.htmlReducer.addForceIncludeElement({element:e,checksumid:t})}async makeMatchingElementSelectionData(e,t,r){try{let i=this.setAndGetTestId(e),o=this.getVisibleParent(e),a=this.setAndGetTestId(o),u=this.getElementAtCenterOfElement(e),f=this.setAndGetTestId(u),d={element:i,visibleElement:a===i?void 0:a,atPointElement:f===i||f===a?void 0:f},p=await this.elementSelector.getSelectorAndLocator(e,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),g=await this.elementSelector.getSelectorAndLocator(u,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),y=await this.elementSelector.getSelectorAndLocator(o,{testIdSelector:this.appSpecificRules?.esraSelectionRules?.testIdSelector}),w={element:p?.selector,visibleElement:y?.selector,atPointElement:g?.selector},S={element:p?.parentFramesSelectors,visibleElement:y?.parentFramesSelectors,atPointElement:g?.parentFramesSelectors},E=l(L=>({tag:L.tagName.toLowerCase()}),"makeElementData"),v={element:E(e),visibleElement:d.visibleElement?E(o):void 0,atPointElement:d.atPointElement?E(u):void 0},M=l(async L=>L===e&&r?r:new Dr(document).extract(L).toMetadata(),"makeESRAMetadata"),A={element:await M(e),visibleElement:d.visibleElement?await M(o):void 0,atPointElement:d.atPointElement?await M(u):void 0},T=p?.locator;return{testIds:d,selectors:w,parentFramesSelectors:S,elementData:v,score:t,esraMetadata:A,generatedLocator:T}}catch(i){return console.log("[makeMatchingElementSelectionData] exception",i),{testIds:{element:void 0},selectors:{element:void 0},parentFramesSelectors:{element:void 0},elementData:{element:void 0},esraMetadata:{element:void 0},generatedLocator:void 0}}}getElementAtCenterOfElement(e){let{x:t,y:r}=e.getBoundingClientRect(),i=e.ownerDocument.elementFromPoint(t,r);return i instanceof HTMLElement?i:void 0}setAndGetTestId(e){if(!e)return;let t=e.getAttribute("data-checksum-testid");if(t)return t;let r=(this.testIdCounter++).toString();return e.setAttribute("data-checksum-testid",r),r}getVisibleParent(e){return!(e instanceof HTMLElement)||e.offsetParent!==null?e:this.getVisibleParent(hr(e))}};var Ql=class{static{l(this,"EventHandlersBase")}setSessionReplayer(e){}skipEvents(e){}preCastEvent(e){}async 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){}handleNativeDialog(e,t){}handleRecordAssertion(e,t){}handleRecordHover(e,t){}};var ki=class{static{l(this,"BlobStoreManager")}static storeBlob(e){if(window.parent.blobs||(window.parent.blobs={}),e.originalUrl){let t=new Uint8Array(e.blobData),r=new Blob([t],{type:e.mimeType});window.parent.blobs[e.originalUrl]=URL.createObjectURL(r)}}static getBlobUrl(e){return window.parent.blobs?.[e]}static async replaceBlobUrls(e){if(e==null)return e;if(typeof e=="string"){if(e.includes("blob:")){try{await this.waitForBlob(e)}catch(r){return console.error(`Waiting for blob failed: ${r}`),e}return this.getBlobUrl(e)||e}return e}if(Array.isArray(e))return await Promise.all(e.map(t=>this.replaceBlobUrls(t)));if(typeof e=="object"){let t={};for(let[r,i]of Object.entries(e))t[r]=await this.replaceBlobUrls(i);return t}return e}static async waitForBlob(e,t=5e3){return new Promise((r,i)=>{let o=Date.now(),a=l(()=>{if(this.hasBlob(e)){r();return}if(Date.now()-o>t){i(new Error(`Timeout waiting for blob: ${e}`));return}setTimeout(a,100)},"checkBlob");a()})}static hasBlob(e){return e in(window.parent.blobs??{})}};var ec=class{constructor({eventHandlers:e}){this.filter={only:[],exclude:[]};this.preCastEvent=l(async e=>this.handlers.preCastEvent(e),"preCastEvent");this.processEvent=l(async(e,t=!0)=>{await this.handlers.preEvent(e);let r=t?await this.handleEvent(e):void 0,i=await this.handlers.postEvent(e,r);return this.handlers.controlledReturn?this.handlers.getReturnValue():i},"processEvent");this.skipEvents=l(async e=>this.handlers.skipEvents(e),"skipEvents");this.shouldProcess=l(e=>{let{only:t,exclude:r}=this.filter,i=l(o=>e.type===Y.Custom&&e.data.tag==="filter"?!0:o.type!==e.type?!1:e.type===Y.Custom?o.tag===e.data.tag:e.type===Y.IncrementalSnapshot?e.data.source===o.source:!0,"matchFilter");return!(t.length>0&&!t.some(i)||r.length>0&&r.some(i))},"shouldProcess");this.handlers=e}static{l(this,"EventProcessor")}setHandlers(e){this.handlers=e}async handleEvent(e){if(this.shouldProcess(e))switch(e.type){case Y.Meta:return this.handlers.handleMeta(e.data,e);case Y.IncrementalSnapshot:switch(e.data.source){case z.ViewportResize:return this.handlers.handleViewportResize(e.data,e);case z.Mutation:return this.handlers.handleMutation(e.data,e);case z.Input:return this.handlers.handleInput(e.data,e);case z.MouseInteraction:return this.handleMouseInteraction(e.data,e);case z.MouseMove:return this.handlers.handleMouseMove(e.data,e);default:break}break;case Y.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);case"native-dialog-event":return this.handlers.handleNativeDialog(e.data.payload,e);case"assertion":return this.handlers.handleRecordAssertion(e.data.payload,e);case"hover":return this.handlers.handleRecordHover(e.data.payload,e);case"filter":this.handleFilterEvent(e.data.payload);break;case"blob-data":let t=e.data.payload;ki.storeBlob(t);break}break;default:break}}async handleMouseInteraction(e,t){switch(e.type){case ie.Click:return this.handlers.handleClick(e,t);case ie.DblClick:return this.handlers.handleDblClick(e,t);case ie.MouseDown:return this.handlers.handleMouseDown(e,t);case ie.MouseUp:return this.handlers.handleMouseUp(e,t);case ie.Focus:return this.handlers.handleFocus(e,t);case ie.Blur:return this.handlers.handleBlur(e,t);default:break}}handleFilterEvent(e){this.filter.exclude=e.filter.exclude,this.filter.only=e.filter.only}};var yP={[Y.DomContentLoaded]:"DomContentLoaded",[Y.Load]:"Load",[Y.FullSnapshot]:"FullSnapshot",[Y.IncrementalSnapshot]:"IncrementalSnapshot",[Y.Meta]:"Meta",[Y.Custom]:"Custom",[Y.Plugin]:"Plugin"},bP={[z.Mutation]:"Mutation",[z.MouseMove]:"MouseMove",[z.MouseInteraction]:"MouseInteraction",[z.Scroll]:"Scroll",[z.ViewportResize]:"ViewportResize",[z.Input]:"Input",[z.TouchMove]:"TouchMove",[z.MediaInteraction]:"MediaInteraction",[z.StyleSheetRule]:"StyleSheetRule",[z.CanvasMutation]:"CanvasMutation",[z.Font]:"Font",[z.Log]:"Log",[z.Drag]:"Drag",[z.StyleDeclaration]:"StyleDeclaration"},vP={[ie.MouseUp]:"MouseUp",[ie.MouseDown]:"MouseDown",[ie.Click]:"Click",[ie.ContextMenu]:"ContextMenu",[ie.DblClick]:"DblClick",[ie.Focus]:"Focus",[ie.Blur]:"Blur",[ie.TouchStart]:"TouchStart",[ie.TouchMove_Departed]:"TouchMove_Departed",[ie.TouchEnd]:"TouchEnd"},Ed=l(n=>({...n,type:yP[n.type],data:{...n.data,source:n.type===Y.IncrementalSnapshot?bP[n.data.source]??n.data.source:n.data.source,type:n.data.source===z.MouseInteraction?vP[n.data.type]:n.data.type}}),"stringifyEvent"),Cd=l((n,{includeBlur:e=!0,includeFocus:t=!0}={})=>{switch(n.type){case Y.Meta:return!1;case Y.IncrementalSnapshot:switch(n.data.source){case z.Input:return n.data.userTriggered;case z.MouseInteraction:return!(!e&&n.data.type===ie.Blur||!t&&n.data.type===ie.Focus);case z.MouseMove:case z.Drag:case z.Selection:return!0;default:return!1}case Y.Custom:switch(n.data.tag){case"contenteditable-input":case"hover":return!0;default:return!1}default:return!1}},"isActionEvent");var MS=l(n=>{n.querySelectorAll("a, button, input").forEach(e=>{e.addEventListener("click",t=>t.preventDefault()),e.addEventListener("keydown",t=>t.preventDefault())})},"disableInteractiveElements");var xd=class{static{l(this,"Logger")}static formatMessage(e,t){let{level:r,message:i,timestamp:o,data:a}=e,u=`[${o}] [${r.toUpperCase()}]`;return t&&(u+=` [${t}]`),u+=` ${i}`,a?`${u}
|
|
92
92
|
Data: ${JSON.stringify(a)}`:u}static getCallerInfo(){let r=(new Error().stack?.split(`
|
|
93
|
-
`)||[])[4];if(r){let i=r.match(/at\s+.+\s+\((.+):(\d+):(\d+)\)/)||r.match(/at\s+(.+):(\d+):(\d+)/);if(i){let[,o,a]=i;return`${o.split("/").pop()||o}:${a}`}}return"unknown"}static log(e,t,r){let i={level:e,message:t,timestamp:new Date().toISOString(),data:r},o=this.getCallerInfo(),a=this.formatMessage(i,o);switch(e){case"error":console.error(a);break;case"warn":console.warn(a);break;case"debug":console.debug(a);break;case"rrweb":break;default:console.log(a)}}static info(e,t){this.log("info",e,t)}static warn(e,t){this.log("warn",e,t)}static error(e,t){this.log("error",e,t)}static debug(e,t){this.log("debug",e,t)}static rrweb(e,t){this.log("rrweb",e,t)}},Ne=Cd;var Qs=class{constructor(e,t){this.replayer=e;this.events=t}static{l(this,"ReplayerHelper")}pause(e){let t=this.events.find(o=>o.timestamp>=e),r=this.replayer.getMetaData().startTime,i=t?t.timestamp-r:e-r;this.replayer.pause(i)}goLive(){this.replayer.play(Date.now())}};var bP=!0,Jl=class{constructor(e={}){this.interactionEventsTimestamps=[];this.initialEventsBuffer=[];this.config={enableInteract:!1};this.eventSubscribers={};this.stop=l(()=>{Ne.info("Stopping replayer");try{this.replayer&&this.replayer.destroy()}catch(e){Ne.error("Error destroying replayer",e)}},"stop");this.getNodeById=l(e=>this.replayer.getMirror().getNode(e),"getNodeById");this.getMeta=l(e=>this.replayer?.getMirror()?.getMeta(e),"getMeta");this.getLastInteractionEventTimestamp=l(e=>{let t=this.interactionEventsTimestamps.sort((r,i)=>r-i).reverse().find(r=>r<=e);return Ne.rrweb("Getting last interaction event timestamp",{inputTimestamp:e,lastTimestamp:t}),t},"getLastInteractionEventTimestamp");Ne.info("Initializing SessionReplayer",{config:e}),this.config={...this.config,...e}}static{l(this,"SessionReplayer")}makeReplayerConfig(){let e={mouseTail:!1,pauseAnimation:!1,speed:360,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0,useVirtualDom:!1};return this.config.root&&(e.root=this.config.root),Ne.rrweb("Creating replayer configuration",{playerConfig:e}),e}makeReplayer(e=[],{baselineTime:t=Date.now()}={}){Ne.info("Creating replayer instance",{eventsCount:e.length,baselineTime:t,config:this.config}),this.replayer=new cl(e,this.makeReplayerConfig()),this.config.enableInteract?(Ne.rrweb("Enabling interact mode"),this.replayer.enableInteract()):(Ne.rrweb("Disabling interact mode"),this.replayer?.disableInteract()),this.config.onlyLive?(Ne.info("Starting live mode",{baselineTime:t}),this.replayer.startLive(t)):(Ne.info("Starting playback"),this.replayer.play()),bP&&(Ne.rrweb("Setting up debug mode"),this.setupDebugMode()),Object.values(Ee).forEach(r=>{this.replayer.on(r,i=>{this.notifySubscribers(r,i)})}),this.disableInteractiveElements()}isConnected(){let e=!!this.replayer;return Ne.rrweb("Checking replayer connection status",{connected:e}),e}subscribeTo(e,t,r){Ne.rrweb("Subscribing to events",{id:e,events:t}),t.forEach(i=>{this.eventSubscribers[i]||(this.eventSubscribers[i]={}),this.eventSubscribers[i][e]=r})}unsubscribeFrom(e){Ne.rrweb("Unsubscribing from events",{id:e}),Object.keys(this.eventSubscribers).forEach(t=>{this.eventSubscribers[t][e]&&delete this.eventSubscribers[t][e]})}notifySubscribers(e,t){Object.values(this.eventSubscribers[e]??{}).forEach(r=>{try{r(t)}catch(i){Ne.error("Error in event cast subscriber",{eventType:e,error:i})}})}getFirstEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().startTime;return Ne.rrweb("Getting first event timestamp",{timestamp:e}),e}getLastEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().endTime;return Ne.rrweb("Getting last event timestamp",{timestamp:e}),e}getCurrentTimestamp(){try{let e=this.replayer.getCurrentTime()+this.getFirstEventTimestamp();return Ne.rrweb("Getting current timestamp",{timestamp:e}),e}catch(e){return Ne.error("Error getting current timestamp",e),0}}getIframeDocument(){return Ne.rrweb("Getting iframe document"),this.replayer.iframe.contentDocument}start(e,t=[]){}async fastForward(e){if(Ne.rrweb("Fast forwarding events",{eventsCount:e.length}),!this.replayer)if(this.config.onlyLive)Ne.rrweb("Creating live replayer",{baselineTime:e[0].timestamp}),this.makeReplayer([],{baselineTime:e[0].timestamp});else if(this.initialEventsBuffer.push(...e),Ne.rrweb("Buffering initial events",{bufferSize:this.initialEventsBuffer.length}),this.initialEventsBuffer.length>=2)this.makeReplayer(this.initialEventsBuffer);else return;let t=0,r=new Promise(i=>{this.subscribeTo("fastForward",[Ee.EventCast],()=>{t++,t===e.length&&(this.unsubscribeFrom("fastForward"),i())})});for(let i of e){i.type===Y.FullSnapshot&&(Ne.rrweb("Updating last snapshot"),this.lastSnapshot=i);let o=i;try{o=await ki.replaceBlobUrls(i)}finally{this.replayer.addEvent(o)}Ed(i,{includeBlur:!1,includeFocus:!1})&&this.interactionEventsTimestamps.push(i.timestamp)}return r}goLive(){Ne.info("Going live"),new Qs(this.replayer,this.getReplayerContext().events).goLive()}goBack(e){Ne.info("Going back to timestamp",{timestamp:e}),new Qs(this.replayer,this.getReplayerContext().events).pause(e)}getReplayerContext(){return this.replayer.service.state.context}setupDebugMode(){window.__chkreplayer={events:l(()=>this.getReplayerContext().events,"events"),stringifyEvents:l(()=>this.getReplayerContext().events.map(Sd),"stringifyEvents"),stringifyActionEvents:l(()=>this.getReplayerContext().events.filter(e=>Ed(e)).map(Sd),"stringifyActionEvents"),back:l(e=>this.goBack(e),"back"),live:l(()=>this.goLive(),"live"),currentTime:l(()=>this.replayer.getCurrentTime(),"currentTime"),getReplayer:l(()=>this.replayer,"getReplayer"),getThis:l(()=>this,"getThis")}}disableInteractiveElements(){Ne.rrweb("Disabling interactive elements");let e=this.replayer.iframe.contentDocument||this.replayer.iframe.contentWindow.document;new MutationObserver(()=>MS(e)).observe(e,{childList:!0,subtree:!0})}};var Ql=class{static{l(this,"Streamer")}constructor(e={}){this.sessionReplayer=new Jl(e),this.eventProcessor=new Zl({eventHandlers:new Xl})}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)}handleEvents(e){return this.skipEvents(e)}async skipEvents(e){await this.eventProcessor.skipEvents(e),await this.sessionReplayer.fastForward(e)}stop(){this.sessionReplayer.stop()}};var vP=Object.defineProperty,wP=l((n,e,t)=>e in n?vP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),TS=l((n,e,t)=>wP(n,typeof e!="symbol"?e+"":e,t),"__publicField"),lt=(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",n))(lt||{}),IS={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},RS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ec={},SP=l(()=>!!globalThis.Zone,"isAngularZonePresent");function Xd(n){if(ec[n])return ec[n];let e=globalThis[n],t=e.prototype,r=n in IS?IS[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in RS?RS[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!SP())return ec[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?ec[n]=d:t}catch{return t}}l(Xd,"getUntaintedPrototype");var xd={};function mn(n,e,t){var r;let i=`${n}.${String(t)}`;if(xd[i])return xd[i].call(e);let o=Xd(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(xd[i]=a,a.call(e)):e[t]}l(mn,"getUntaintedAccessor");var Md={};function KS(n,e,t){let r=`${n}.${String(t)}`;if(Md[r])return Md[r].bind(e);let o=Xd(n)[t];return typeof o!="function"?e[t]:(Md[r]=o,o.bind(e))}l(KS,"getUntaintedMethod");function EP(n){return mn("Node",n,"childNodes")}l(EP,"childNodes");function CP(n){return mn("Node",n,"parentNode")}l(CP,"parentNode");function xP(n){return mn("Node",n,"parentElement")}l(xP,"parentElement");function MP(n){return mn("Node",n,"textContent")}l(MP,"textContent");function TP(n,e){return KS("Node",n,"contains")(e)}l(TP,"contains");function IP(n){return KS("Node",n,"getRootNode")()}l(IP,"getRootNode");function RP(n){return!n||!("host"in n)?null:mn("ShadowRoot",n,"host")}l(RP,"host");function AP(n){return n.styleSheets}l(AP,"styleSheets");function OP(n){return!n||!("shadowRoot"in n)?null:mn("Element",n,"shadowRoot")}l(OP,"shadowRoot");function _P(n,e){return mn("Element",n,"querySelector")(e)}l(_P,"querySelector");function LP(n,e){return mn("Element",n,"querySelectorAll")(e)}l(LP,"querySelectorAll");function NP(){return Xd("MutationObserver").constructor}l(NP,"mutationObserverCtor");var St={childNodes:EP,parentNode:CP,parentElement:xP,textContent:MP,contains:TP,getRootNode:IP,host:RP,styleSheets:AP,shadowRoot:OP,querySelector:_P,querySelectorAll:LP,mutationObserver:NP};function XS(n){return n.nodeType===n.ELEMENT_NODE}l(XS,"isElement");function DP(n){let e=n&&"host"in n&&"mode"in n&&St.host(n)||null;return!!(e&&"shadowRoot"in e&&St.shadowRoot(e)===n)}l(DP,"isShadowRoot");function Td(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}l(Td,"isNativeShadowDom");function kP(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}l(kP,"fixBrowserCompatibilityIssuesInCSS");function PP(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(" ")+";"}l(PP,"escapeImportStatement");function Ld(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>FP(i,t)).join("");return kP(r)}catch{return null}}l(Ld,"stringifyStylesheet");function FP(n,e){if(HP(n)){let t;try{t=Ld(n.styleSheet)||PP(n)}catch{t=n.cssText}return n.styleSheet.href?hc(t,n.styleSheet.href):t}else{let t=n.cssText;return BP(n)&&n.selectorText.includes(":")&&(t=$P(t)),e?hc(t,e):t}}l(FP,"stringifyRule");function $P(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}l($P,"fixSafariColons");function HP(n){return"styleSheet"in n}l(HP,"isCSSImportRule");function BP(n){return"selectorText"in n}l(BP,"isCSSStyleRule");var Nd=class{static{l(this,"Mirror")}constructor(){TS(this,"idNodeMap",new Map),TS(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function WP({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let a=i||"",u=r&&yc(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?a=o(a,n):a="*".repeat(a.length)),a}l(WP,"maskInputValue");function yc(n){return n.toLowerCase()}l(yc,"toLowerCase");var AS="__rrweb_original__";function UP(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,a=AS in o?o[AS]:o;if(new Uint32Array(a.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}l(UP,"is2DCanvasBlank");function VP(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?yc(e):null}l(VP,"getInputType");function ZS(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}l(ZS,"extractFileExtension");function zP(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}l(zP,"extractOrigin");var GP=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,jP=/^(?:[a-z+]+:)?\/\//i,qP=/^www\..*/i,YP=/^(data:)([^,]*),(.*)/i;function hc(n,e){return(n||"").replace(GP,(t,r,i,o,a,u)=>{let f=i||a||u,d=r||o||"";if(!f)return t;if(jP.test(f)||qP.test(f))return`url(${d}${f}${d})`;if(YP.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${zP(e)+f}${d})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${d}${p.join("/")}${d})`})}l(hc,"absolutifyURLs");function Id(n){return n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}l(Id,"normalizeCssString");function KP(n,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&n&&typeof n=="string"){let i=Id(n);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){let a=Id(t[o].textContent);for(let u=3;u<a.length;u++){let f=a.substring(0,u);if(i.split(f).length===2){let d=i.indexOf(f);for(let p=d;p<n.length;p++)if(Id(n.substring(0,p)).length===d){r.push(n.substring(0,p)),n=n.substring(p);break}break}}}}return r.push(n),r}l(KP,"splitCssText");function XP(n,e){return KP(n,e).join("/* rr_split */")}l(XP,"markCssSplits");var ZP=1,JP=new RegExp("[^a-z0-9-_:]"),OS=-2;function QP(){return ZP++}l(QP,"genId");function eF(n){if(n instanceof HTMLFormElement)return"form";let e=yc(n.tagName);return JP.test(e)?"div":e}l(eF,"getValidTagName");var Pi,_S,tF=/^[^ \t\n\r\u000c]+/,rF=/^[, \t\n\r\u000c]+/;function nF(n,e){if(e.trim()==="")return e;let t=0;function r(o){let a,u=o.exec(e.substring(t));return u?(a=u[0],t+=a.length,a):""}l(r,"collectCharacters");let i=[];for(;r(rF),!(t>=e.length);){let o=r(tF);if(o.slice(-1)===",")o=Fi(n,o.substring(0,o.length-1)),i.push(o);else{let a="";o=Fi(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,t+=1}}}return i.join(", ")}l(nF,"getAbsoluteSrcsetString");var LS=new WeakMap;function Fi(n,e){return!e||e.trim()===""?e:Zd(n,e)}l(Fi,"absoluteToDoc");function iF(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}l(iF,"isSVGElement");function Zd(n,e){let t=LS.get(n);if(t||(t=n.createElement("a"),LS.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}l(Zd,"getHref");function sF(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Fi(n,r):t==="srcset"?nF(n,r):t==="style"?hc(r,Zd(n)):e==="object"&&t==="data"?Fi(n,r):r)}l(sF,"transformAttribute");function oF(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}l(oF,"ignoreAttribute");function aF(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}l(aF,"_isBlockedElement");function Dd(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?Dd(St.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?Dd(St.parentNode(n),e,t):!1}l(Dd,"classMatchesRegex");function lF(n,e,t,r){let i;if(XS(n)){if(i=n,!St.childNodes(i).length)return!1}else{if(St.parentElement(n)===null)return!1;i=St.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Dd(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}l(lF,"needMaskingText");function cF(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let a="about:blank";if(r.location.href!==a||n.src===a||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}l(cF,"onceIframeLoaded");function uF(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}l(uF,"onceStylesheetLoaded");function fF(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:C=!1,cssCaptured:v=!1}=e,M=hF(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:lt.Document,childNodes:[],compatMode:n.compatMode}:{type:lt.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:lt.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return pF(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case n.TEXT_NODE:return dF(n,{doc:t,needsMask:a,maskTextFn:d,rootId:M,cssCaptured:v});case n.CDATA_SECTION_NODE:return{type:lt.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:lt.Comment,textContent:St.textContent(n)||"",rootId:M};default:return!1}}l(fF,"serializeNode");function hF(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}l(hF,"getRootId");function dF(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,a=St.parentNode(n),u=a&&a.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=St.textContent(n),d&&f&&(f=hc(f,Zd(e.doc)))),!d&&!p&&f&&t&&(f=r?r(f,St.parentElement(n)):f.replace(/[\S]/g,"*")),{type:lt.Text,textContent:f||"",rootId:i}}l(dF,"serializeTextNode");function pF(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:w}=e,S=aF(n,r,i),C=eF(n),v={},M=n.attributes.length;for(let T=0;T<M;T++){let L=n.attributes[T];oF(C,L.name,L.value)||(v[L.name]=sF(t,C,yc(L.name),L.value))}if(C==="link"&&o){let T=Array.from(t.styleSheets).find(V=>V.href===n.href),L=null;T&&(L=Ld(T)),L&&(delete v.rel,delete v.href,v._cssText=L)}if(C==="style"&&n.sheet){let T=Ld(n.sheet);T&&(n.childNodes.length>1&&(T=XP(T,n)),v._cssText=T)}if(C==="input"||C==="textarea"||C==="select"){let T=n.value,L=n.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&T?v.value=WP({element:n,type:VP(n),tagName:C,value:T,maskInputOptions:a,maskInputFn:u}):L&&(v.checked=L)}if(C==="option"&&(n.selected&&!a.select?v.selected=!0:delete v.selected),C==="dialog"&&n.open&&(v.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),C==="canvas"&&p){if(n.__context==="2d")UP(n)||(v.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let T=n.toDataURL(f.type,f.quality),L=t.createElement("canvas");L.width=n.width,L.height=n.height;let V=L.toDataURL(f.type,f.quality);T!==V&&(v.rr_dataURL=T)}}if(C==="img"&&d){Pi||(Pi=t.createElement("canvas"),_S=Pi.getContext("2d"));let T=n,L=T.currentSrc||T.getAttribute("src")||"<unknown-src>",V=T.crossOrigin,U=l(()=>{T.removeEventListener("load",U);try{Pi.width=T.naturalWidth,Pi.height=T.naturalHeight,_S.drawImage(T,0,0),v.rr_dataURL=Pi.toDataURL(f.type,f.quality)}catch(Z){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${L}! Error: ${Z}`)}T.crossOrigin==="anonymous"&&(V?v.crossOrigin=V:T.removeAttribute("crossorigin"))},"recordInlineImage");T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U)}if(C==="audio"||C==="video"){let T=v;T.rr_mediaState=n.paused?"paused":"played",T.rr_mediaCurrentTime=n.currentTime,T.rr_mediaPlaybackRate=n.playbackRate,T.rr_mediaMuted=n.muted,T.rr_mediaLoop=n.loop,T.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(v.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(v.rr_scrollTop=n.scrollTop)),S){let{width:T,height:L}=n.getBoundingClientRect();v={class:v.class,rr_width:`${T}px`,rr_height:`${L}px`}}C==="iframe"&&!g(v.src)&&(n.contentDocument||(v.rr_src=v.src),delete v.src);let A;try{customElements.get(C)&&(A=!0)}catch{}return{type:lt.Element,tagName:C,attributes:v,childNodes:[],isSVG:iF(n)||void 0,needBlock:S,rootId:w,isCustom:A}}l(pF,"serializeElementNode");function Be(n){return n==null?"":n.toLowerCase()}l(Be,"lowerIfExists");function mF(n,e){if(e.comment&&n.type===lt.Comment)return!0;if(n.type===lt.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"&&ZS(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(Be(n.attributes.name).match(/^msapplication-tile(image|color)$/)||Be(n.attributes.name)==="application-name"||Be(n.attributes.rel)==="icon"||Be(n.attributes.rel)==="apple-touch-icon"||Be(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&Be(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Be(n.attributes.property).match(/^(og|twitter|fb):/)||Be(n.attributes.name).match(/^(og|twitter):/)||Be(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Be(n.attributes.name)==="robots"||Be(n.attributes.name)==="googlebot"||Be(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Be(n.attributes.name)==="author"||Be(n.attributes.name)==="generator"||Be(n.attributes.name)==="framework"||Be(n.attributes.name)==="publisher"||Be(n.attributes.name)==="progid"||Be(n.attributes.property).match(/^article:/)||Be(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Be(n.attributes.name)==="google-site-verification"||Be(n.attributes.name)==="yandex-verification"||Be(n.attributes.name)==="csrf-token"||Be(n.attributes.name)==="p:domain_verify"||Be(n.attributes.name)==="verify-v1"||Be(n.attributes.name)==="verification"||Be(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}l(mF,"slimDOMExcluded");function ro(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S={},inlineImages:C=!1,recordCanvas:v=!1,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T=5e3,onStylesheetLoad:L,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:U=l(()=>!1,"keepIframeSrcFn"),newlyAddedElement:Z=!1,cssCaptured:W=!1}=e,{needsMask:G}=e,{preserveWhiteSpace:re=!0}=e;G||(G=lF(n,a,u,G===void 0));let B=fF(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:C,recordCanvas:v,keepIframeSrcFn:U,newlyAddedElement:Z,cssCaptured:W});if(!B)return console.warn(n,"not serialized"),null;let j;r.hasNode(n)?j=r.getId(n):mF(B,w)||!re&&B.type===lt.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?j=OS:j=QP();let k=Object.assign(B,{id:j});if(r.add(n,k),j===OS)return null;M&&M(n);let Q=!f;if(k.type===lt.Element){Q=Q&&!k.needBlock,delete k.needBlock;let q=St.shadowRoot(n);q&&Td(q)&&(k.isShadowHost=!0)}if((k.type===lt.Document||k.type===lt.Element)&&Q){w.headWhitespace&&k.type===lt.Element&&k.tagName==="head"&&(re=!1);let q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U,cssCaptured:!1};if(!(k.type===lt.Element&&k.tagName==="textarea"&&k.attributes.value!==void 0)){k.type===lt.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText=="string"&&(q.cssCaptured=!0);for(let rt of Array.from(St.childNodes(n))){let De=ro(rt,q);De&&k.childNodes.push(De)}}let ae=null;if(XS(n)&&(ae=St.shadowRoot(n)))for(let rt of Array.from(St.childNodes(ae))){let De=ro(rt,q);De&&(Td(ae)&&(De.isShadow=!0),k.childNodes.push(De))}}let ee=St.parentNode(n);return ee&&DP(ee)&&Td(ee)&&(k.isShadow=!0),k.type===lt.Element&&k.tagName==="iframe"&&cF(n,()=>{let q=n.contentDocument;if(q&&A){let ae=ro(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});ae&&A(n,ae)}},T),k.type===lt.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&ZS(k.attributes.href)==="css")&&uF(n,()=>{if(L){let q=ro(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:C,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});q&&L(n,q)}},V),k}l(ro,"serializeNodeWithId");function JS(n,e){let{mirror:t=new Nd,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:C,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V=l(()=>!1,"keepIframeSrcFn")}=e||{};return ro(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,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:g,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:S,inlineImages:f,recordCanvas:d,preserveWhiteSpace:C,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V,newlyAddedElement:!1})}l(JS,"snapshot");var gF=/(max|min)-device-(width|height)/,H9=new RegExp(gF.source,"g");function yF(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}l(yF,"getDefaultExportFromCjs");function bF(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=l(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a2");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:l(function(){return n[r]},"get")})}),t}l(bF,"getAugmentedNamespace");var Jd={exports:{}},je=String,QS=l(function(){return{isColorSupported:!1,reset:je,bold:je,dim:je,italic:je,underline:je,inverse:je,hidden:je,strikethrough:je,black:je,red:je,green:je,yellow:je,blue:je,magenta:je,cyan:je,white:je,gray:je,bgBlack:je,bgRed:je,bgGreen:je,bgYellow:je,bgBlue:je,bgMagenta:je,bgCyan:je,bgWhite:je}},"create");Jd.exports=QS();Jd.exports.createColors=QS;var vF=Jd.exports,wF={},SF=Object.freeze(Object.defineProperty({__proto__:null,default:wF},Symbol.toStringTag,{value:"Module"})),lr=bF(SF),NS=vF,DS=lr,kd=class eE extends Error{static{l(this,"CssSyntaxError")}constructor(e,t,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,eE)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=NS.isColorSupported),DS&&e&&(t=DS(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=NS.createColors(!0);u=l(y=>d(g(y)),"mark"),f=l(y=>p(y),"aside")}else u=f=l(d=>d,"aside");return r.slice(i,o).map((d,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let w=f(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+d+`
|
|
93
|
+
`)||[])[4];if(r){let i=r.match(/at\s+.+\s+\((.+):(\d+):(\d+)\)/)||r.match(/at\s+(.+):(\d+):(\d+)/);if(i){let[,o,a]=i;return`${o.split("/").pop()||o}:${a}`}}return"unknown"}static log(e,t,r){let i={level:e,message:t,timestamp:new Date().toISOString(),data:r},o=this.getCallerInfo(),a=this.formatMessage(i,o);switch(e){case"error":console.error(a);break;case"warn":console.warn(a);break;case"debug":console.debug(a);break;case"rrweb":break;default:console.log(a)}}static info(e,t){this.log("info",e,t)}static warn(e,t){this.log("warn",e,t)}static error(e,t){this.log("error",e,t)}static debug(e,t){this.log("debug",e,t)}static rrweb(e,t){this.log("rrweb",e,t)}},Ne=xd;var Qs=class{constructor(e,t){this.replayer=e;this.events=t}static{l(this,"ReplayerHelper")}pause(e){let t=this.events.find(o=>o.timestamp>=e),r=this.replayer.getMetaData().startTime,i=t?t.timestamp-r:e-r;this.replayer.pause(i)}goLive(){this.replayer.play(Date.now())}};var wP=!0,tc=class{constructor(e={}){this.interactionEventsTimestamps=[];this.initialEventsBuffer=[];this.config={enableInteract:!1};this.eventSubscribers={};this.stop=l(()=>{Ne.info("Stopping replayer");try{this.replayer&&this.replayer.destroy()}catch(e){Ne.error("Error destroying replayer",e)}},"stop");this.getNodeById=l(e=>this.replayer.getMirror().getNode(e),"getNodeById");this.getMeta=l(e=>this.replayer?.getMirror()?.getMeta(e),"getMeta");this.getLastInteractionEventTimestamp=l(e=>{let t=this.interactionEventsTimestamps.sort((r,i)=>r-i).reverse().find(r=>r<=e);return Ne.rrweb("Getting last interaction event timestamp",{inputTimestamp:e,lastTimestamp:t}),t},"getLastInteractionEventTimestamp");Ne.info("Initializing SessionReplayer",{config:e}),this.config={...this.config,...e}}static{l(this,"SessionReplayer")}makeReplayerConfig(){let e={mouseTail:!1,pauseAnimation:!1,speed:360,triggerFocus:!0,UNSAFE_replayCanvas:!0,liveMode:!0,showDebug:!1,skipInactive:!0,useVirtualDom:!1};return this.config.root&&(e.root=this.config.root),Ne.rrweb("Creating replayer configuration",{playerConfig:e}),e}makeReplayer(e=[],{baselineTime:t=Date.now()}={}){Ne.info("Creating replayer instance",{eventsCount:e.length,baselineTime:t,config:this.config}),this.replayer=new hl(e,this.makeReplayerConfig()),this.config.enableInteract?(Ne.rrweb("Enabling interact mode"),this.replayer.enableInteract()):(Ne.rrweb("Disabling interact mode"),this.replayer?.disableInteract()),this.config.onlyLive?(Ne.info("Starting live mode",{baselineTime:t}),this.replayer.startLive(t)):(Ne.info("Starting playback"),this.replayer.play()),wP&&(Ne.rrweb("Setting up debug mode"),this.setupDebugMode()),Object.values(Ee).forEach(r=>{this.replayer.on(r,i=>{this.notifySubscribers(r,i)})}),this.disableInteractiveElements()}isConnected(){let e=!!this.replayer;return Ne.rrweb("Checking replayer connection status",{connected:e}),e}subscribeTo(e,t,r){Ne.rrweb("Subscribing to events",{id:e,events:t}),t.forEach(i=>{this.eventSubscribers[i]||(this.eventSubscribers[i]={}),this.eventSubscribers[i][e]=r})}unsubscribeFrom(e){Ne.rrweb("Unsubscribing from events",{id:e}),Object.keys(this.eventSubscribers).forEach(t=>{this.eventSubscribers[t][e]&&delete this.eventSubscribers[t][e]})}notifySubscribers(e,t){Object.values(this.eventSubscribers[e]??{}).forEach(r=>{try{r(t)}catch(i){Ne.error("Error in event cast subscriber",{eventType:e,error:i})}})}getFirstEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().startTime;return Ne.rrweb("Getting first event timestamp",{timestamp:e}),e}getLastEventTimestamp(){if(!this.replayer)return 0;let e=this.replayer.getMetaData().endTime;return Ne.rrweb("Getting last event timestamp",{timestamp:e}),e}getCurrentTimestamp(){try{let e=this.replayer.getCurrentTime()+this.getFirstEventTimestamp();return Ne.rrweb("Getting current timestamp",{timestamp:e}),e}catch(e){return Ne.error("Error getting current timestamp",e),0}}getIframeDocument(){return Ne.rrweb("Getting iframe document"),this.replayer.iframe.contentDocument}start(e,t=[]){}async fastForward(e){if(Ne.rrweb("Fast forwarding events",{eventsCount:e.length}),!this.replayer)if(this.config.onlyLive)Ne.rrweb("Creating live replayer",{baselineTime:e[0].timestamp}),this.makeReplayer([],{baselineTime:e[0].timestamp});else if(this.initialEventsBuffer.push(...e),Ne.rrweb("Buffering initial events",{bufferSize:this.initialEventsBuffer.length}),this.initialEventsBuffer.length>=2)this.makeReplayer(this.initialEventsBuffer);else return;let t=0,r=new Promise(i=>{this.subscribeTo("fastForward",[Ee.EventCast],()=>{t++,t===e.length&&(this.unsubscribeFrom("fastForward"),i())})});for(let i of e){i.type===Y.FullSnapshot&&(Ne.rrweb("Updating last snapshot"),this.lastSnapshot=i);let o=i;try{o=await ki.replaceBlobUrls(i)}finally{this.replayer.addEvent(o)}Cd(i,{includeBlur:!1,includeFocus:!1})&&this.interactionEventsTimestamps.push(i.timestamp)}return r}goLive(){Ne.info("Going live"),new Qs(this.replayer,this.getReplayerContext().events).goLive()}goBack(e){Ne.info("Going back to timestamp",{timestamp:e}),new Qs(this.replayer,this.getReplayerContext().events).pause(e)}getReplayerContext(){return this.replayer.service.state.context}setupDebugMode(){window.__chkreplayer={events:l(()=>this.getReplayerContext().events,"events"),stringifyEvents:l(()=>this.getReplayerContext().events.map(Ed),"stringifyEvents"),stringifyActionEvents:l(()=>this.getReplayerContext().events.filter(e=>Cd(e)).map(Ed),"stringifyActionEvents"),back:l(e=>this.goBack(e),"back"),live:l(()=>this.goLive(),"live"),currentTime:l(()=>this.replayer.getCurrentTime(),"currentTime"),getReplayer:l(()=>this.replayer,"getReplayer"),getThis:l(()=>this,"getThis")}}disableInteractiveElements(){Ne.rrweb("Disabling interactive elements");let e=this.replayer.iframe.contentDocument||this.replayer.iframe.contentWindow.document;new MutationObserver(()=>MS(e)).observe(e,{childList:!0,subtree:!0})}};var rc=class{static{l(this,"Streamer")}constructor(e={}){this.sessionReplayer=new tc(e),this.eventProcessor=new ec({eventHandlers:new Ql})}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)}handleEvents(e){return this.skipEvents(e)}async skipEvents(e){await this.eventProcessor.skipEvents(e),await this.sessionReplayer.fastForward(e)}stop(){this.sessionReplayer.stop()}};var SP=Object.defineProperty,EP=l((n,e,t)=>e in n?SP(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,"__defNormalProp"),TS=l((n,e,t)=>EP(n,typeof e!="symbol"?e+"":e,t),"__publicField"),lt=(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",n))(lt||{}),IS={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},RS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},nc={},CP=l(()=>!!globalThis.Zone,"isAngularZonePresent");function Zd(n){if(nc[n])return nc[n];let e=globalThis[n],t=e.prototype,r=n in IS?IS[n]:void 0,i=!!(r&&r.every(u=>{var f,d;return!!((d=(f=Object.getOwnPropertyDescriptor(t,u))==null?void 0:f.get)!=null&&d.toString().includes("[native code]"))})),o=n in RS?RS[n]:void 0,a=!!(o&&o.every(u=>{var f;return typeof t[u]=="function"&&((f=t[u])==null?void 0:f.toString().includes("[native code]"))}));if(i&&a&&!CP())return nc[n]=e.prototype,e.prototype;try{let u=document.createElement("iframe");document.body.appendChild(u);let f=u.contentWindow;if(!f)return e.prototype;let d=f[n].prototype;return document.body.removeChild(u),d?nc[n]=d:t}catch{return t}}l(Zd,"getUntaintedPrototype");var Md={};function mn(n,e,t){var r;let i=`${n}.${String(t)}`;if(Md[i])return Md[i].call(e);let o=Zd(n),a=(r=Object.getOwnPropertyDescriptor(o,t))==null?void 0:r.get;return a?(Md[i]=a,a.call(e)):e[t]}l(mn,"getUntaintedAccessor");var Td={};function KS(n,e,t){let r=`${n}.${String(t)}`;if(Td[r])return Td[r].bind(e);let o=Zd(n)[t];return typeof o!="function"?e[t]:(Td[r]=o,o.bind(e))}l(KS,"getUntaintedMethod");function xP(n){return mn("Node",n,"childNodes")}l(xP,"childNodes");function MP(n){return mn("Node",n,"parentNode")}l(MP,"parentNode");function TP(n){return mn("Node",n,"parentElement")}l(TP,"parentElement");function IP(n){return mn("Node",n,"textContent")}l(IP,"textContent");function RP(n,e){return KS("Node",n,"contains")(e)}l(RP,"contains");function AP(n){return KS("Node",n,"getRootNode")()}l(AP,"getRootNode");function OP(n){return!n||!("host"in n)?null:mn("ShadowRoot",n,"host")}l(OP,"host");function _P(n){return n.styleSheets}l(_P,"styleSheets");function LP(n){return!n||!("shadowRoot"in n)?null:mn("Element",n,"shadowRoot")}l(LP,"shadowRoot");function NP(n,e){return mn("Element",n,"querySelector")(e)}l(NP,"querySelector");function DP(n,e){return mn("Element",n,"querySelectorAll")(e)}l(DP,"querySelectorAll");function kP(){return Zd("MutationObserver").constructor}l(kP,"mutationObserverCtor");var St={childNodes:xP,parentNode:MP,parentElement:TP,textContent:IP,contains:RP,getRootNode:AP,host:OP,styleSheets:_P,shadowRoot:LP,querySelector:NP,querySelectorAll:DP,mutationObserver:kP};function XS(n){return n.nodeType===n.ELEMENT_NODE}l(XS,"isElement");function PP(n){let e=n&&"host"in n&&"mode"in n&&St.host(n)||null;return!!(e&&"shadowRoot"in e&&St.shadowRoot(e)===n)}l(PP,"isShadowRoot");function Id(n){return Object.prototype.toString.call(n)==="[object ShadowRoot]"}l(Id,"isNativeShadowDom");function FP(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}l(FP,"fixBrowserCompatibilityIssuesInCSS");function $P(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(" ")+";"}l($P,"escapeImportStatement");function Nd(n){try{let e=n.rules||n.cssRules;if(!e)return null;let t=n.href;!t&&n.ownerNode&&n.ownerNode.ownerDocument&&(t=n.ownerNode.ownerDocument.location.href);let r=Array.from(e,i=>HP(i,t)).join("");return FP(r)}catch{return null}}l(Nd,"stringifyStylesheet");function HP(n,e){if(WP(n)){let t;try{t=Nd(n.styleSheet)||$P(n)}catch{t=n.cssText}return n.styleSheet.href?mc(t,n.styleSheet.href):t}else{let t=n.cssText;return UP(n)&&n.selectorText.includes(":")&&(t=BP(t)),e?mc(t,e):t}}l(HP,"stringifyRule");function BP(n){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return n.replace(e,"$1\\$2")}l(BP,"fixSafariColons");function WP(n){return"styleSheet"in n}l(WP,"isCSSImportRule");function UP(n){return"selectorText"in n}l(UP,"isCSSStyleRule");var Dd=class{static{l(this,"Mirror")}constructor(){TS(this,"idNodeMap",new Map),TS(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function VP({element:n,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:o}){let a=i||"",u=r&&wc(r);return(e[t.toLowerCase()]||u&&e[u])&&(o?a=o(a,n):a="*".repeat(a.length)),a}l(VP,"maskInputValue");function wc(n){return n.toLowerCase()}l(wc,"toLowerCase");var AS="__rrweb_original__";function zP(n){let e=n.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<n.width;r+=t)for(let i=0;i<n.height;i+=t){let o=e.getImageData,a=AS in o?o[AS]:o;if(new Uint32Array(a.call(e,r,i,Math.min(t,n.width-r),Math.min(t,n.height-i)).data.buffer).some(f=>f!==0))return!1}return!0}l(zP,"is2DCanvasBlank");function GP(n){let e=n.type;return n.hasAttribute("data-rr-is-password")?"password":e?wc(e):null}l(GP,"getInputType");function ZS(n,e){let t;try{t=new URL(n,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}l(ZS,"extractFileExtension");function jP(n){let e="";return n.indexOf("//")>-1?e=n.split("/").slice(0,3).join("/"):e=n.split("/")[0],e=e.split("?")[0],e}l(jP,"extractOrigin");var qP=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,YP=/^(?:[a-z+]+:)?\/\//i,KP=/^www\..*/i,XP=/^(data:)([^,]*),(.*)/i;function mc(n,e){return(n||"").replace(qP,(t,r,i,o,a,u)=>{let f=i||a||u,d=r||o||"";if(!f)return t;if(YP.test(f)||KP.test(f))return`url(${d}${f}${d})`;if(XP.test(f))return`url(${d}${f}${d})`;if(f[0]==="/")return`url(${d}${jP(e)+f}${d})`;let p=e.split("/"),g=f.split("/");p.pop();for(let y of g)y!=="."&&(y===".."?p.pop():p.push(y));return`url(${d}${p.join("/")}${d})`})}l(mc,"absolutifyURLs");function Rd(n){return n.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}l(Rd,"normalizeCssString");function ZP(n,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&n&&typeof n=="string"){let i=Rd(n);for(let o=1;o<t.length;o++)if(t[o].textContent&&typeof t[o].textContent=="string"){let a=Rd(t[o].textContent);for(let u=3;u<a.length;u++){let f=a.substring(0,u);if(i.split(f).length===2){let d=i.indexOf(f);for(let p=d;p<n.length;p++)if(Rd(n.substring(0,p)).length===d){r.push(n.substring(0,p)),n=n.substring(p);break}break}}}}return r.push(n),r}l(ZP,"splitCssText");function JP(n,e){return ZP(n,e).join("/* rr_split */")}l(JP,"markCssSplits");var QP=1,eF=new RegExp("[^a-z0-9-_:]"),OS=-2;function tF(){return QP++}l(tF,"genId");function rF(n){if(n instanceof HTMLFormElement)return"form";let e=wc(n.tagName);return eF.test(e)?"div":e}l(rF,"getValidTagName");var Pi,_S,nF=/^[^ \t\n\r\u000c]+/,iF=/^[, \t\n\r\u000c]+/;function sF(n,e){if(e.trim()==="")return e;let t=0;function r(o){let a,u=o.exec(e.substring(t));return u?(a=u[0],t+=a.length,a):""}l(r,"collectCharacters");let i=[];for(;r(iF),!(t>=e.length);){let o=r(nF);if(o.slice(-1)===",")o=Fi(n,o.substring(0,o.length-1)),i.push(o);else{let a="";o=Fi(n,o);let u=!1;for(;;){let f=e.charAt(t);if(f===""){i.push((o+a).trim());break}else if(u)f===")"&&(u=!1);else if(f===","){t+=1,i.push((o+a).trim());break}else f==="("&&(u=!0);a+=f,t+=1}}}return i.join(", ")}l(sF,"getAbsoluteSrcsetString");var LS=new WeakMap;function Fi(n,e){return!e||e.trim()===""?e:Jd(n,e)}l(Fi,"absoluteToDoc");function oF(n){return!!(n.tagName==="svg"||n.ownerSVGElement)}l(oF,"isSVGElement");function Jd(n,e){let t=LS.get(n);if(t||(t=n.createElement("a"),LS.set(n,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}l(Jd,"getHref");function aF(n,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&(e==="table"||e==="td"||e==="th")?Fi(n,r):t==="srcset"?sF(n,r):t==="style"?mc(r,Jd(n)):e==="object"&&t==="data"?Fi(n,r):r)}l(aF,"transformAttribute");function lF(n,e,t){return(n==="video"||n==="audio")&&e==="autoplay"}l(lF,"ignoreAttribute");function cF(n,e,t){try{if(typeof e=="string"){if(n.classList.contains(e))return!0}else for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}if(t)return n.matches(t)}catch{}return!1}l(cF,"_isBlockedElement");function kd(n,e,t){if(!n)return!1;if(n.nodeType!==n.ELEMENT_NODE)return t?kd(St.parentNode(n),e,t):!1;for(let r=n.classList.length;r--;){let i=n.classList[r];if(e.test(i))return!0}return t?kd(St.parentNode(n),e,t):!1}l(kd,"classMatchesRegex");function uF(n,e,t,r){let i;if(XS(n)){if(i=n,!St.childNodes(i).length)return!1}else{if(St.parentElement(n)===null)return!1;i=St.parentElement(n)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(kd(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}l(uF,"needMaskingText");function fF(n,e,t){let r=n.contentWindow;if(!r)return;let i=!1,o;try{o=r.document.readyState}catch{return}if(o!=="complete"){let u=setTimeout(()=>{i||(e(),i=!0)},t);n.addEventListener("load",()=>{clearTimeout(u),i=!0,e()});return}let a="about:blank";if(r.location.href!==a||n.src===a||n.src==="")return setTimeout(e,0),n.addEventListener("load",e);n.addEventListener("load",e)}l(fF,"onceIframeLoaded");function hF(n,e,t){let r=!1,i;try{i=n.sheet}catch{return}if(i)return;let o=setTimeout(()=>{r||(e(),r=!0)},t);n.addEventListener("load",()=>{clearTimeout(o),r=!0,e()})}l(hF,"onceStylesheetLoaded");function dF(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:a,inlineStylesheet:u,maskInputOptions:f={},maskTextFn:d,maskInputFn:p,dataURLOptions:g={},inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E=!1,cssCaptured:v=!1}=e,M=pF(t,r);switch(n.nodeType){case n.DOCUMENT_NODE:return n.compatMode!=="CSS1Compat"?{type:lt.Document,childNodes:[],compatMode:n.compatMode}:{type:lt.Document,childNodes:[]};case n.DOCUMENT_TYPE_NODE:return{type:lt.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId,rootId:M};case n.ELEMENT_NODE:return gF(n,{doc:t,blockClass:i,blockSelector:o,inlineStylesheet:u,maskInputOptions:f,maskInputFn:p,dataURLOptions:g,inlineImages:y,recordCanvas:w,keepIframeSrcFn:S,newlyAddedElement:E,rootId:M});case n.TEXT_NODE:return mF(n,{doc:t,needsMask:a,maskTextFn:d,rootId:M,cssCaptured:v});case n.CDATA_SECTION_NODE:return{type:lt.CDATA,textContent:"",rootId:M};case n.COMMENT_NODE:return{type:lt.Comment,textContent:St.textContent(n)||"",rootId:M};default:return!1}}l(dF,"serializeNode");function pF(n,e){if(!e.hasNode(n))return;let t=e.getId(n);return t===1?void 0:t}l(pF,"getRootId");function mF(n,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:o}=e,a=St.parentNode(n),u=a&&a.tagName,f="",d=u==="STYLE"?!0:void 0,p=u==="SCRIPT"?!0:void 0;return p?f="SCRIPT_PLACEHOLDER":o||(f=St.textContent(n),d&&f&&(f=mc(f,Jd(e.doc)))),!d&&!p&&f&&t&&(f=r?r(f,St.parentElement(n)):f.replace(/[\S]/g,"*")),{type:lt.Text,textContent:f||"",rootId:i}}l(mF,"serializeTextNode");function gF(n,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:u,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:g,newlyAddedElement:y=!1,rootId:w}=e,S=cF(n,r,i),E=rF(n),v={},M=n.attributes.length;for(let T=0;T<M;T++){let L=n.attributes[T];lF(E,L.name,L.value)||(v[L.name]=aF(t,E,wc(L.name),L.value))}if(E==="link"&&o){let T=Array.from(t.styleSheets).find(V=>V.href===n.href),L=null;T&&(L=Nd(T)),L&&(delete v.rel,delete v.href,v._cssText=L)}if(E==="style"&&n.sheet){let T=Nd(n.sheet);T&&(n.childNodes.length>1&&(T=JP(T,n)),v._cssText=T)}if(E==="input"||E==="textarea"||E==="select"){let T=n.value,L=n.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&T?v.value=VP({element:n,type:GP(n),tagName:E,value:T,maskInputOptions:a,maskInputFn:u}):L&&(v.checked=L)}if(E==="option"&&(n.selected&&!a.select?v.selected=!0:delete v.selected),E==="dialog"&&n.open&&(v.rr_open_mode=n.matches("dialog:modal")?"modal":"non-modal"),E==="canvas"&&p){if(n.__context==="2d")zP(n)||(v.rr_dataURL=n.toDataURL(f.type,f.quality));else if(!("__context"in n)){let T=n.toDataURL(f.type,f.quality),L=t.createElement("canvas");L.width=n.width,L.height=n.height;let V=L.toDataURL(f.type,f.quality);T!==V&&(v.rr_dataURL=T)}}if(E==="img"&&d){Pi||(Pi=t.createElement("canvas"),_S=Pi.getContext("2d"));let T=n,L=T.currentSrc||T.getAttribute("src")||"<unknown-src>",V=T.crossOrigin,U=l(()=>{T.removeEventListener("load",U);try{Pi.width=T.naturalWidth,Pi.height=T.naturalHeight,_S.drawImage(T,0,0),v.rr_dataURL=Pi.toDataURL(f.type,f.quality)}catch(Z){if(T.crossOrigin!=="anonymous"){T.crossOrigin="anonymous",T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U);return}else console.warn(`Cannot inline img src=${L}! Error: ${Z}`)}T.crossOrigin==="anonymous"&&(V?v.crossOrigin=V:T.removeAttribute("crossorigin"))},"recordInlineImage");T.complete&&T.naturalWidth!==0?U():T.addEventListener("load",U)}if(E==="audio"||E==="video"){let T=v;T.rr_mediaState=n.paused?"paused":"played",T.rr_mediaCurrentTime=n.currentTime,T.rr_mediaPlaybackRate=n.playbackRate,T.rr_mediaMuted=n.muted,T.rr_mediaLoop=n.loop,T.rr_mediaVolume=n.volume}if(y||(n.scrollLeft&&(v.rr_scrollLeft=n.scrollLeft),n.scrollTop&&(v.rr_scrollTop=n.scrollTop)),S){let{width:T,height:L}=n.getBoundingClientRect();v={class:v.class,rr_width:`${T}px`,rr_height:`${L}px`}}E==="iframe"&&!g(v.src)&&(n.contentDocument||(v.rr_src=v.src),delete v.src);let A;try{customElements.get(E)&&(A=!0)}catch{}return{type:lt.Element,tagName:E,attributes:v,childNodes:[],isSVG:oF(n)||void 0,needBlock:S,rootId:w,isCustom:A}}l(gF,"serializeElementNode");function Be(n){return n==null?"":n.toLowerCase()}l(Be,"lowerIfExists");function yF(n,e){if(e.comment&&n.type===lt.Comment)return!0;if(n.type===lt.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"&&ZS(n.attributes.href)==="js"))return!0;if(e.headFavicon&&(n.tagName==="link"&&n.attributes.rel==="shortcut icon"||n.tagName==="meta"&&(Be(n.attributes.name).match(/^msapplication-tile(image|color)$/)||Be(n.attributes.name)==="application-name"||Be(n.attributes.rel)==="icon"||Be(n.attributes.rel)==="apple-touch-icon"||Be(n.attributes.rel)==="shortcut icon")))return!0;if(n.tagName==="meta"){if(e.headMetaDescKeywords&&Be(n.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Be(n.attributes.property).match(/^(og|twitter|fb):/)||Be(n.attributes.name).match(/^(og|twitter):/)||Be(n.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Be(n.attributes.name)==="robots"||Be(n.attributes.name)==="googlebot"||Be(n.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&n.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Be(n.attributes.name)==="author"||Be(n.attributes.name)==="generator"||Be(n.attributes.name)==="framework"||Be(n.attributes.name)==="publisher"||Be(n.attributes.name)==="progid"||Be(n.attributes.property).match(/^article:/)||Be(n.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Be(n.attributes.name)==="google-site-verification"||Be(n.attributes.name)==="yandex-verification"||Be(n.attributes.name)==="csrf-token"||Be(n.attributes.name)==="p:domain_verify"||Be(n.attributes.name)==="verify-v1"||Be(n.attributes.name)==="verification"||Be(n.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}l(yF,"slimDOMExcluded");function ro(n,e){let{doc:t,mirror:r,blockClass:i,blockSelector:o,maskTextClass:a,maskTextSelector:u,skipChild:f=!1,inlineStylesheet:d=!0,maskInputOptions:p={},maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S={},inlineImages:E=!1,recordCanvas:v=!1,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T=5e3,onStylesheetLoad:L,stylesheetLoadTimeout:V=5e3,keepIframeSrcFn:U=l(()=>!1,"keepIframeSrcFn"),newlyAddedElement:Z=!1,cssCaptured:W=!1}=e,{needsMask:G}=e,{preserveWhiteSpace:re=!0}=e;G||(G=uF(n,a,u,G===void 0));let B=dF(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,dataURLOptions:S,inlineImages:E,recordCanvas:v,keepIframeSrcFn:U,newlyAddedElement:Z,cssCaptured:W});if(!B)return console.warn(n,"not serialized"),null;let j;r.hasNode(n)?j=r.getId(n):yF(B,w)||!re&&B.type===lt.Text&&!B.textContent.replace(/^\s+|\s+$/gm,"").length?j=OS:j=tF();let k=Object.assign(B,{id:j});if(r.add(n,k),j===OS)return null;M&&M(n);let Q=!f;if(k.type===lt.Element){Q=Q&&!k.needBlock,delete k.needBlock;let q=St.shadowRoot(n);q&&Id(q)&&(k.isShadowHost=!0)}if((k.type===lt.Document||k.type===lt.Element)&&Q){w.headWhitespace&&k.type===lt.Element&&k.tagName==="head"&&(re=!1);let q={doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:f,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U,cssCaptured:!1};if(!(k.type===lt.Element&&k.tagName==="textarea"&&k.attributes.value!==void 0)){k.type===lt.Element&&k.attributes._cssText!==void 0&&typeof k.attributes._cssText=="string"&&(q.cssCaptured=!0);for(let rt of Array.from(St.childNodes(n))){let De=ro(rt,q);De&&k.childNodes.push(De)}}let ae=null;if(XS(n)&&(ae=St.shadowRoot(n)))for(let rt of Array.from(St.childNodes(ae))){let De=ro(rt,q);De&&(Id(ae)&&(De.isShadow=!0),k.childNodes.push(De))}}let ee=St.parentNode(n);return ee&&PP(ee)&&Id(ee)&&(k.isShadow=!0),k.type===lt.Element&&k.tagName==="iframe"&&fF(n,()=>{let q=n.contentDocument;if(q&&A){let ae=ro(q,{doc:q,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});ae&&A(n,ae)}},T),k.type===lt.Element&&k.tagName==="link"&&typeof k.attributes.rel=="string"&&(k.attributes.rel==="stylesheet"||k.attributes.rel==="preload"&&typeof k.attributes.href=="string"&&ZS(k.attributes.href)==="css")&&hF(n,()=>{if(L){let q=ro(n,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:G,maskTextClass:a,maskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:p,maskTextFn:g,maskInputFn:y,slimDOMOptions:w,dataURLOptions:S,inlineImages:E,recordCanvas:v,preserveWhiteSpace:re,onSerialize:M,onIframeLoad:A,iframeLoadTimeout:T,onStylesheetLoad:L,stylesheetLoadTimeout:V,keepIframeSrcFn:U});q&&L(n,q)}},V),k}l(ro,"serializeNodeWithId");function JS(n,e){let{mirror:t=new Dd,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:u=!0,inlineImages:f=!1,recordCanvas:d=!1,maskAllInputs:p=!1,maskTextFn:g,maskInputFn:y,slimDOM:w=!1,dataURLOptions:S,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V=l(()=>!1,"keepIframeSrcFn")}=e||{};return ro(n,{doc:n,mirror:t,blockClass:r,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:u,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:g,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:S,inlineImages:f,recordCanvas:d,preserveWhiteSpace:E,onSerialize:v,onIframeLoad:M,iframeLoadTimeout:A,onStylesheetLoad:T,stylesheetLoadTimeout:L,keepIframeSrcFn:V,newlyAddedElement:!1})}l(JS,"snapshot");var bF=/(max|min)-device-(width|height)/,W9=new RegExp(bF.source,"g");function vF(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}l(vF,"getDefaultExportFromCjs");function wF(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=l(function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)},"a2");t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:l(function(){return n[r]},"get")})}),t}l(wF,"getAugmentedNamespace");var Qd={exports:{}},je=String,QS=l(function(){return{isColorSupported:!1,reset:je,bold:je,dim:je,italic:je,underline:je,inverse:je,hidden:je,strikethrough:je,black:je,red:je,green:je,yellow:je,blue:je,magenta:je,cyan:je,white:je,gray:je,bgBlack:je,bgRed:je,bgGreen:je,bgYellow:je,bgBlue:je,bgMagenta:je,bgCyan:je,bgWhite:je}},"create");Qd.exports=QS();Qd.exports.createColors=QS;var SF=Qd.exports,EF={},CF=Object.freeze(Object.defineProperty({__proto__:null,default:EF},Symbol.toStringTag,{value:"Module"})),lr=wF(CF),NS=SF,DS=lr,Pd=class eE extends Error{static{l(this,"CssSyntaxError")}constructor(e,t,r,i,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),i&&(this.source=i),a&&(this.plugin=a),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,eE)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=NS.isColorSupported),DS&&e&&(t=DS(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),a=String(o).length,u,f;if(e){let{bold:d,gray:p,red:g}=NS.createColors(!0);u=l(y=>d(g(y)),"mark"),f=l(y=>p(y),"aside")}else u=f=l(d=>d,"aside");return r.slice(i,o).map((d,p)=>{let g=i+1+p,y=" "+(" "+g).slice(-a)+" | ";if(g===this.line){let w=f(y.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return u(">")+f(y)+d+`
|
|
94
94
|
`+w+u("^")}return" "+f(y)+d}).join(`
|
|
95
95
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
96
96
|
|
|
97
97
|
`+e+`
|
|
98
|
-
`),this.name+": "+this.message+e}},
|
|
98
|
+
`),this.name+": "+this.message+e}},ep=Pd;Pd.default=Pd;var ao={};ao.isClean=Symbol("isClean");ao.my=Symbol("my");var kS={after:`
|
|
99
99
|
`,beforeClose:`
|
|
100
100
|
`,beforeComment:`
|
|
101
101
|
`,beforeDecl:`
|
|
102
102
|
`,beforeOpen:" ",beforeRule:`
|
|
103
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
104
|
-
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return kS[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+
|
|
103
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xF(n){return n[0].toUpperCase()+n.slice(1)}l(xF,"capitalize");var Fd=class{static{l(this,"Stringifier")}constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+i+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,o=0;for(;i&&i.type!=="root";)o+=1,i=i.parent;if(r.includes(`
|
|
104
|
+
`)){let a=this.raw(e,null,"indent");if(a.length)for(let u=0;u<o;u++)r+=a}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i],a=this.raw(o,"before");a&&this.builder(a),this.stringify(o,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return kS[r];let a=e.root();if(a.rawCache||(a.rawCache={}),typeof a.rawCache[r]<"u")return a.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let u="raw"+xF(r);this[u]?i=this[u](a,e):a.walk(f=>{if(i=f.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=kS[r]),a.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
105
105
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
106
106
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
107
107
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
108
108
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let o=r.raws.before.split(`
|
|
109
|
-
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},tE=
|
|
110
|
-
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
111
|
-
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[
|
|
109
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},tE=Fd;Fd.default=Fd;var MF=tE;function $d(n,e){new MF(e).stringify(n)}l($d,"stringify$4");var Sc=$d;$d.default=$d;var{isClean:ic,my:TF}=ao,IF=ep,RF=tE,AF=Sc;function Hd(n,e){let t=new n.constructor;for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r)||r==="proxyCache")continue;let i=n[r],o=typeof i;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(a=>Hd(a,t)):(o==="object"&&i!==null&&(i=Hd(i)),t[r]=i)}return t}l(Hd,"cloneNode");var Bd=class{static{l(this,"Node")}constructor(e={}){this.raws={},this[ic]=!1,this[TF]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Hd(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new IF(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[ic]){this[ic]=!1;let e=this;for(;e=e.parent;)e[ic]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,o=this.source.start.line;for(let a=0;a<e;a++)r[a]===`
|
|
110
|
+
`?(i=1,o+=1):i+=1;return{column:i,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),o=i.indexOf(e.word);o!==-1&&(t=this.positionInside(o,i),r=this.positionInside(o+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new RF().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let o=0;for(let a in this){if(!Object.prototype.hasOwnProperty.call(this,a)||a==="parent"||a==="proxyCache")continue;let u=this[a];if(Array.isArray(u))r[a]=u.map(f=>typeof f=="object"&&f.toJSON?f.toJSON(null,t):f);else if(typeof u=="object"&&u.toJSON)r[a]=u.toJSON(null,t);else if(a==="source"){let f=t.get(u.input);f==null&&(f=o,t.set(u.input,o),o++),r[a]={end:u.end,inputId:f,start:u.start}}else r[a]=u}return i&&(r.inputs=[...t.keys()].map(a=>a.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=AF){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let o in r)i[o]=r[o];return e.warn(t,i)}get proxyOf(){return this}},Ec=Bd;Bd.default=Bd;var OF=Ec,Wd=class extends OF{static{l(this,"Declaration")}constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Cc=Wd;Wd.default=Wd;var _F="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",LF=l((n,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=n[Math.random()*n.length|0];return r},"customAlphabet"),NF=l((n=21)=>{let e="",t=n;for(;t--;)e+=_F[Math.random()*64|0];return e},"nanoid$1"),DF={nanoid:NF,customAlphabet:LF},{SourceMapConsumer:PS,SourceMapGenerator:FS}=lr,{existsSync:kF,readFileSync:PF}=lr,{dirname:Ad,join:FF}=lr;function $F(n){return Buffer?Buffer.from(n,"base64").toString():window.atob(n)}l($F,"fromBase64");var Ud=class{static{l(this,"PreviousMap")}constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ad(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new PS(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(i.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return $F(e.substr(RegExp.lastMatch.length));let a=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+a)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Ad(e),kF(e))return this.mapFile=e,PF(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof PS)return FS.fromSourceMap(t).toString();if(t instanceof FS)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=FF(Ad(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},rE=Ud;Ud.default=Ud;var{SourceMapConsumer:HF,SourceMapGenerator:BF}=lr,{fileURLToPath:$S,pathToFileURL:sc}=lr,{isAbsolute:Vd,resolve:zd}=lr,{nanoid:WF}=DF,Od=lr,HS=ep,UF=rE,_d=Symbol("fromOffsetCache"),VF=!!(HF&&BF),BS=!!(zd&&Vd),gc=class{static{l(this,"Input")}constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!BS||/^\w+:\/\//.test(t.from)||Vd(t.from)?this.file=t.from:this.file=zd(t.from)),BS&&VF){let r=new UF(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+WF(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let o,a,u;if(t&&typeof t=="object"){let d=t,p=r;if(typeof d.offset=="number"){let g=this.fromOffset(d.offset);t=g.line,r=g.col}else t=d.line,r=d.column;if(typeof p.offset=="number"){let g=this.fromOffset(p.offset);a=g.line,u=g.col}else a=p.line,u=p.column}else if(!r){let d=this.fromOffset(t);t=d.line,r=d.col}let f=this.origin(t,r,a,u);return f?o=new HS(e,f.endLine===void 0?f.line:{column:f.column,line:f.line},f.endLine===void 0?f.column:{column:f.endColumn,line:f.endLine},f.source,f.file,i.plugin):o=new HS(e,a===void 0?t:{column:r,line:t},a===void 0?r:{column:u,line:a},this.css,this.file,i.plugin),o.input={column:r,endColumn:u,endLine:a,line:t,source:this.css},this.file&&(sc&&(o.input.url=sc(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[_d])r=this[_d];else{let o=this.css.split(`
|
|
111
|
+
`);r=new Array(o.length);let a=0;for(let u=0,f=o.length;u<f;u++)r[u]=a,a+=o[u].length+1;this[_d]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let o=r.length-2,a;for(;i<o;)if(a=i+(o-i>>1),e<r[a])o=a-1;else if(e>=r[a+1])i=a+1;else{i=a;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:zd(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;let u;typeof r=="number"&&(u=o.originalPositionFor({column:i,line:r}));let f;Vd(a.source)?f=sc(a.source):f=new URL(a.source,this.map.consumer().sourceRoot||sc(this.map.mapFile));let d={column:a.column,endColumn:u&&u.column,endLine:u&&u.line,line:a.line,url:f.toString()};if(f.protocol==="file:")if($S)d.file=$S(f);else throw new Error("file: protocol is not available in this PostCSS build");let p=o.sourceContentFor(a.source);return p&&(d.source=p),d}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},xc=gc;gc.default=gc;Od&&Od.registerInput&&Od.registerInput(gc);var{SourceMapConsumer:nE,SourceMapGenerator:dc}=lr,{dirname:pc,relative:iE,resolve:sE,sep:oE}=lr,{pathToFileURL:WS}=lr,zF=xc,GF=!!(nE&&dc),jF=!!(pc&&sE&&iE&&oE),qF=class{static{l(this,"MapGenerator")}constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
112
112
|
`;this.css.includes(`\r
|
|
113
113
|
`)&&(t=`\r
|
|
114
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
115
|
-
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?fc(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=fc(sE(r,this.mapOpts.annotation)));let i=iE(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new UF(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(WS){let r=WS(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;oE==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},aE=GF,jF=vc,zd=class extends jF{static{l(this,"Comment")}constructor(e){super(e),this.type="comment"}},Ec=zd;zd.default=zd;var{isClean:lE,my:cE}=ao,uE=wc,fE=Ec,qF=vc,hE,ep,tp,dE;function pE(n){return n.map(e=>(e.nodes&&(e.nodes=pE(e.nodes)),delete e.source,e))}l(pE,"cleanSource");function mE(n){if(n[lE]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)mE(e)}l(mE,"markDirtyUp");var zr=class gE extends qF{static{l(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=pE(hE(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new uE(e)]}else if(e.selector)e=[new ep(e)];else if(e.name)e=[new tp(e)];else if(e.text)e=[new fE(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[cE]||gE.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[lE]&&mE(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};zr.registerParse=n=>{hE=n};zr.registerRule=n=>{ep=n};zr.registerAtRule=n=>{tp=n};zr.registerRoot=n=>{dE=n};var Fn=zr;zr.default=zr;zr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,tp.prototype):n.type==="rule"?Object.setPrototypeOf(n,ep.prototype):n.type==="decl"?Object.setPrototypeOf(n,uE.prototype):n.type==="comment"?Object.setPrototypeOf(n,fE.prototype):n.type==="root"&&Object.setPrototypeOf(n,dE.prototype),n[cE]=!0,n.nodes&&n.nodes.forEach(e=>{zr.rebuild(e)})};var YF=Fn,yE,bE,no=class extends YF{static{l(this,"Document")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new yE(new bE,this,e).stringify()}};no.registerLazyResult=n=>{yE=n};no.registerProcessor=n=>{bE=n};var rp=no;no.default=no;var Gd=class{static{l(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},vE=Gd;Gd.default=Gd;var KF=vE,jd=class{static{l(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new KF(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},np=jd;jd.default=jd;var _d=39,US=34,nc=92,VS=47,ic=10,eo=32,sc=12,oc=9,ac=13,XF=91,ZF=93,JF=40,QF=41,e$=123,t$=125,r$=59,n$=42,i$=58,s$=64,lc=/[\t\n\f\r "#'()/;[\\\]{}]/g,cc=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,o$=/.[\r\n"'(/\\]/,zS=/[\da-f]/i,a$=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,C=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=C}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=C)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case ic:case eo:case oc:case ac:case sc:{a=v;do a+=1,o=r.charCodeAt(a);while(o===eo||o===ic||o===oc||o===ac||o===sc);S=["space",r.slice(v,a)],v=a-1;break}case XF:case ZF:case e$:case t$:case i$:case r$:case QF:{let re=String.fromCharCode(o);S=[re,re,v];break}case JF:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==_d&&w!==US&&w!==eo&&w!==ic&&w!==oc&&w!==sc&&w!==ac){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===nc;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||o$.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case _d:case US:{u=o===_d?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===nc;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case s$:{lc.lastIndex=v+1,lc.test(r),lc.lastIndex===0?a=r.length-1:a=lc.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case nc:{for(a=v,d=!0;r.charCodeAt(a+1)===nc;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==VS&&o!==eo&&o!==ic&&o!==oc&&o!==ac&&o!==sc&&(a+=1,zS.test(r.charAt(a)))){for(;zS.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===eo&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===VS&&r.charCodeAt(v+1)===n$?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(cc.lastIndex=v+1,cc.test(r),cc.lastIndex===0?a=r.length-1:a=cc.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer"),wE=Fn,pc=class extends wE{static{l(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},ip=pc;pc.default=pc;wE.registerAtRule(pc);var SE=Fn,EE,CE,$i=class extends SE{static{l(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new EE(new CE,this,e).stringify()}};$i.registerLazyResult=n=>{EE=n};$i.registerProcessor=n=>{CE=n};var lo=$i;$i.default=$i;SE.registerRoot($i);var io={comma(n){return io.split(n,[","],!0)},space(n){let e=[" ",`
|
|
116
|
-
`," "];return io.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},xE=io;io.default=io;var ME=Fn,l$=xE,mc=class extends ME{static{l(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return l$.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},sp=mc;mc.default=mc;ME.registerRule(mc);var c$=wc,u$=a$,f$=Ec,h$=ip,d$=lo,GS=sp,jS={empty:!0,space:!0};function p$(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(p$,"findLastWithPosition");var m$=class{static{l(this,"Parser")}constructor(e){this.input=e,this.root=new d$,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new h$;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new f$;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=u$(this.input)}decl(e,t){let r=new c$;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||p$(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new GS;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!jS[g]&&!jS[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new GS;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},g$=m$,y$=Fn,b$=g$,v$=Sc;function gc(n,e){let t=new v$(n,e),r=new b$(t);try{r.parse()}catch(i){throw i}return r.root}l(gc,"parse$3");var op=gc;gc.default=gc;y$.registerParse(gc);var{isClean:Cr,my:w$}=ao,S$=aE,E$=bc,C$=Fn,x$=rp;var qS=np,M$=op,T$=lo,I$={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},R$={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},A$={Once:!0,postcssPlugin:!0,prepare:!0},Hi=0;function to(n){return typeof n=="object"&&typeof n.then=="function"}l(to,"isPromise");function TE(n){let e=!1,t=I$[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Hi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Hi,t+"Exit"]:[t,t+"Exit"]}l(TE,"getEvents");function YS(n){let e;return n.type==="document"?e=["Document",Hi,"DocumentExit"]:n.type==="root"?e=["Root",Hi,"RootExit"]:e=TE(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(YS,"toStack");function qd(n){return n[Cr]=!1,n.nodes&&n.nodes.forEach(e=>qd(e)),n}l(qd,"cleanMarks");var Yd={},Bi=class IE{static{l(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=qd(t);else if(t instanceof IE||t instanceof qS)i=qd(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=M$;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[w$]&&C$.rebuild(i)}this.result=new qS(e,i,r),this.helpers={...Yd,postcss:Yd,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!R$[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!A$[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(to(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cr];){e[Cr]=!0;let t=[YS(e)];for(;t.length>0;){let r=this.visitTick(t);if(to(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return to(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=E$;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new S$(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(to(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cr];)e[Cr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(to(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[Cr]){u[Cr]=!0,e.push(YS(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===Hi){r.nodes&&r.nodes.length&&(r[Cr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Cr]=!0;let t=TE(e);for(let r of t)if(r===Hi)e.nodes&&e.each(i=>{i[Cr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Bi.registerPostcss=n=>{Yd=n};var RE=Bi;Bi.default=Bi;T$.registerLazyResult(Bi);x$.registerLazyResult(Bi);var O$=aE,_$=bc;var L$=op,N$=np,Kd=class{static{l(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=_$;this.result=new N$(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new O$(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=L$;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},D$=Kd;Kd.default=Kd;var k$=D$,P$=RE,F$=rp,$$=lo,so=class{static{l(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new k$(this,e,t):new P$(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},H$=so;so.default=so;$$.registerProcessor(so);F$.registerProcessor(so);var B$=wc,W$=rE,U$=Ec,V$=ip,z$=Sc,G$=lo,j$=sp;function oo(n,e){if(Array.isArray(n))return n.map(i=>oo(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:z$.prototype};o.map&&(o.map={...o.map,__proto__:W$.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>oo(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new G$(r);if(r.type==="decl")return new B$(r);if(r.type==="rule")return new j$(r);if(r.type==="comment")return new U$(r);if(r.type==="atrule")return new V$(r);throw new Error("Unknown node type: "+n.type)}l(oo,"fromJSON$1");var q$=oo;oo.default=oo;var Y$=Qd,AE=wc,K$=RE,X$=Fn,ap=H$,Z$=bc,J$=q$,OE=rp,Q$=vE,_E=Ec,LE=ip,eH=np,tH=Sc,rH=op,nH=xE,NE=sp,DE=lo,iH=vc;function _e(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new ap(n)}l(_e,"postcss");_e.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
114
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||pc(e.file),i;this.mapOpts.sourcesContent===!1?(i=new nE(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),jF&&GF&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=dc.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new dc({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new dc({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,a;this.stringify(this.root,(u,f,d)=>{if(this.css+=u,f&&d!=="end"&&(i.generated.line=e,i.generated.column=t-1,f.source&&f.source.start?(i.source=this.sourcePath(f),i.original.line=f.source.start.line,i.original.column=f.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),o=u.match(/\n/g),o?(e+=o.length,a=u.lastIndexOf(`
|
|
115
|
+
`),t=u.length-a):t+=u.length,f&&d!=="start"){let p=f.parent||{raws:{}};(!(f.type==="decl"||f.type==="atrule"&&!f.nodes)||f!==p.last||p.raws.semicolon)&&(f.source&&f.source.end?(i.source=this.sourcePath(f),i.original.line=f.source.end.line,i.original.column=f.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?pc(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=pc(sE(r,this.mapOpts.annotation)));let i=iE(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new zF(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(WS){let r=WS(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;oE==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},aE=qF,YF=Ec,Gd=class extends YF{static{l(this,"Comment")}constructor(e){super(e),this.type="comment"}},Mc=Gd;Gd.default=Gd;var{isClean:lE,my:cE}=ao,uE=Cc,fE=Mc,KF=Ec,hE,tp,rp,dE;function pE(n){return n.map(e=>(e.nodes&&(e.nodes=pE(e.nodes)),delete e.source,e))}l(pE,"cleanSource");function mE(n){if(n[lE]=!1,n.proxyOf.nodes)for(let e of n.proxyOf.nodes)mE(e)}l(mE,"markDirtyUp");var zr=class gE extends KF{static{l(this,"Container")}append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(o,a)=>i(o.toProxy(),a):i)):t==="every"||t==="some"?r=>e[t]((i,...o)=>r(i.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let o;for(let a in this.indexes)o=this.indexes[a],r<o&&(this.indexes[a]=o+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let u of o)this.proxyOf.nodes.splice(r,0,u);let a;for(let u in this.indexes)a=this.indexes[u],r<=a&&(this.indexes[u]=a+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=pE(hE(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new uE(e)]}else if(e.selector)e=[new tp(e)];else if(e.name)e=[new rp(e)];else if(e.text)e=[new fE(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[cE]||gE.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[lE]&&mE(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(o){throw t.addToError(o)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};zr.registerParse=n=>{hE=n};zr.registerRule=n=>{tp=n};zr.registerAtRule=n=>{rp=n};zr.registerRoot=n=>{dE=n};var $n=zr;zr.default=zr;zr.rebuild=n=>{n.type==="atrule"?Object.setPrototypeOf(n,rp.prototype):n.type==="rule"?Object.setPrototypeOf(n,tp.prototype):n.type==="decl"?Object.setPrototypeOf(n,uE.prototype):n.type==="comment"?Object.setPrototypeOf(n,fE.prototype):n.type==="root"&&Object.setPrototypeOf(n,dE.prototype),n[cE]=!0,n.nodes&&n.nodes.forEach(e=>{zr.rebuild(e)})};var XF=$n,yE,bE,no=class extends XF{static{l(this,"Document")}constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new yE(new bE,this,e).stringify()}};no.registerLazyResult=n=>{yE=n};no.registerProcessor=n=>{bE=n};var np=no;no.default=no;var jd=class{static{l(this,"Warning")}constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},vE=jd;jd.default=jd;var ZF=vE,qd=class{static{l(this,"Result")}constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ZF(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ip=qd;qd.default=qd;var Ld=39,US=34,oc=92,VS=47,ac=10,eo=32,lc=12,cc=9,uc=13,JF=91,QF=93,e$=40,t$=41,r$=123,n$=125,i$=59,s$=42,o$=58,a$=64,fc=/[\t\n\f\r "#'()/;[\\\]{}]/g,hc=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,l$=/.[\r\n"'(/\\]/,zS=/[\da-f]/i,c$=l(function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,o,a,u,f,d,p,g,y,w,S,E=r.length,v=0,M=[],A=[];function T(){return v}l(T,"position");function L(W){throw e.error("Unclosed "+W,v)}l(L,"unclosed");function V(){return A.length===0&&v>=E}l(V,"endOfFile");function U(W){if(A.length)return A.pop();if(v>=E)return;let G=W?W.ignoreUnclosed:!1;switch(o=r.charCodeAt(v),o){case ac:case eo:case cc:case uc:case lc:{a=v;do a+=1,o=r.charCodeAt(a);while(o===eo||o===ac||o===cc||o===uc||o===lc);S=["space",r.slice(v,a)],v=a-1;break}case JF:case QF:case r$:case n$:case o$:case i$:case t$:{let re=String.fromCharCode(o);S=[re,re,v];break}case e$:{if(y=M.length?M.pop()[1]:"",w=r.charCodeAt(v+1),y==="url"&&w!==Ld&&w!==US&&w!==eo&&w!==ac&&w!==cc&&w!==lc&&w!==uc){a=v;do{if(p=!1,a=r.indexOf(")",a+1),a===-1)if(i||G){a=v;break}else L("bracket");for(g=a;r.charCodeAt(g-1)===oc;)g-=1,p=!p}while(p);S=["brackets",r.slice(v,a+1),v,a],v=a}else a=r.indexOf(")",v+1),f=r.slice(v,a+1),a===-1||l$.test(f)?S=["(","(",v]:(S=["brackets",f,v,a],v=a);break}case Ld:case US:{u=o===Ld?"'":'"',a=v;do{if(p=!1,a=r.indexOf(u,a+1),a===-1)if(i||G){a=v+1;break}else L("string");for(g=a;r.charCodeAt(g-1)===oc;)g-=1,p=!p}while(p);S=["string",r.slice(v,a+1),v,a],v=a;break}case a$:{fc.lastIndex=v+1,fc.test(r),fc.lastIndex===0?a=r.length-1:a=fc.lastIndex-2,S=["at-word",r.slice(v,a+1),v,a],v=a;break}case oc:{for(a=v,d=!0;r.charCodeAt(a+1)===oc;)a+=1,d=!d;if(o=r.charCodeAt(a+1),d&&o!==VS&&o!==eo&&o!==ac&&o!==cc&&o!==uc&&o!==lc&&(a+=1,zS.test(r.charAt(a)))){for(;zS.test(r.charAt(a+1));)a+=1;r.charCodeAt(a+1)===eo&&(a+=1)}S=["word",r.slice(v,a+1),v,a],v=a;break}default:{o===VS&&r.charCodeAt(v+1)===s$?(a=r.indexOf("*/",v+2)+1,a===0&&(i||G?a=r.length:L("comment")),S=["comment",r.slice(v,a+1),v,a],v=a):(hc.lastIndex=v+1,hc.test(r),hc.lastIndex===0?a=r.length-1:a=hc.lastIndex-2,S=["word",r.slice(v,a+1),v,a],M.push(S),v=a);break}}return v++,S}l(U,"nextToken");function Z(W){A.push(W)}return l(Z,"back"),{back:Z,endOfFile:V,nextToken:U,position:T}},"tokenizer"),wE=$n,yc=class extends wE{static{l(this,"AtRule")}constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},sp=yc;yc.default=yc;wE.registerAtRule(yc);var SE=$n,EE,CE,$i=class extends SE{static{l(this,"Root")}constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of i)o.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new EE(new CE,this,e).stringify()}};$i.registerLazyResult=n=>{EE=n};$i.registerProcessor=n=>{CE=n};var lo=$i;$i.default=$i;SE.registerRoot($i);var io={comma(n){return io.split(n,[","],!0)},space(n){let e=[" ",`
|
|
116
|
+
`," "];return io.split(n,e)},split(n,e,t){let r=[],i="",o=!1,a=0,u=!1,f="",d=!1;for(let p of n)d?d=!1:p==="\\"?d=!0:u?p===f&&(u=!1):p==='"'||p==="'"?(u=!0,f=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&e.includes(p)&&(o=!0),o?(i!==""&&r.push(i.trim()),i="",o=!1):i+=p;return(t||i!=="")&&r.push(i.trim()),r}},xE=io;io.default=io;var ME=$n,u$=xE,bc=class extends ME{static{l(this,"Rule")}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return u$.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},op=bc;bc.default=bc;ME.registerRule(bc);var f$=Cc,h$=c$,d$=Mc,p$=sp,m$=lo,GS=op,jS={empty:!0,space:!0};function g$(n){for(let e=n.length-1;e>=0;e--){let t=n[e],r=t[3]||t[2];if(r)return r}}l(g$,"findLastWithPosition");var y$=class{static{l(this,"Parser")}constructor(e){this.input=e,this.root=new m$,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new p$;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,o,a=!1,u=!1,f=[],d=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?d.push(r==="("?")":"]"):r==="{"&&d.length>0?d.push("}"):r===d[d.length-1]&&d.pop(),d.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){u=!0;break}else if(r==="}"){if(f.length>0){for(o=f.length-1,i=f[o];i&&i[0]==="space";)i=f[--o];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else f.push(e);else f.push(e);if(this.tokenizer.endOfFile()){a=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(f),f.length?(t.raws.afterName=this.spacesAndCommentsFromStart(f),this.raw(t,"params",f),a&&(e=f[f.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),u&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let o=t-1;o>=0&&(i=e[o],!(i[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,o;for(let[a,u]of e.entries()){if(r=u,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return a}o=r}return!1}comment(e){let t=new d$;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=h$(this.input)}decl(e,t){let r=new f$;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||g$(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let d=e[0][0];if(d===":"||d==="space"||d==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a=[],u;for(;e.length&&(u=e[0][0],!(u!=="space"&&u!=="comment"));)a.push(e.shift());this.precheckMissedSemicolon(e);for(let d=e.length-1;d>=0;d--){if(o=e[d],o[1].toLowerCase()==="!important"){r.important=!0;let p=this.stringFrom(e,d);p=this.spacesFromEnd(e)+p,p!==" !important"&&(r.raws.important=p);break}else if(o[1].toLowerCase()==="important"){let p=e.slice(0),g="";for(let y=d;y>0;y--){let w=p[y][0];if(g.trim().indexOf("!")===0&&w!=="space")break;g=p.pop()[1]+g}g.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=g,e=p)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(d=>d[0]!=="space"&&d[0]!=="comment")&&(r.raws.between+=a.map(d=>d[1]).join(""),a=[]),this.raw(r,"value",a.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new GS;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,o=null,a=[],u=e[1].startsWith("--"),f=[],d=e;for(;d;){if(r=d[0],f.push(d),r==="("||r==="[")o||(o=d),a.push(r==="("?")":"]");else if(u&&i&&r==="{")o||(o=d),a.push("}");else if(a.length===0)if(r===";")if(i){this.decl(f,u);return}else break;else if(r==="{"){this.rule(f);return}else if(r==="}"){this.tokenizer.back(f.pop()),t=!0;break}else r===":"&&(i=!0);else r===a[a.length-1]&&(a.pop(),a.length===0&&(o=null));d=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),a.length>0&&this.unclosedBracket(o),t&&i){if(!u)for(;f.length&&(d=f[f.length-1][0],!(d!=="space"&&d!=="comment"));)this.tokenizer.back(f.pop());this.decl(f,u)}else this.unknownWord(f)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let o,a,u=r.length,f="",d=!0,p,g;for(let y=0;y<u;y+=1)o=r[y],a=o[0],a==="space"&&y===u-1&&!i?d=!1:a==="comment"?(g=r[y-1]?r[y-1][0]:"empty",p=r[y+1]?r[y+1][0]:"empty",!jS[g]&&!jS[p]?f.slice(-1)===","?d=!1:f+=o[1]:d=!1):f+=o[1];if(!d){let y=r.reduce((w,S)=>w+S[1],"");e.raws[t]={raw:y,value:f}}e[t]=f}rule(e){e.pop();let t=new GS;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},b$=y$,v$=$n,w$=b$,S$=xc;function vc(n,e){let t=new S$(n,e),r=new w$(t);try{r.parse()}catch(i){throw i}return r.root}l(vc,"parse$3");var ap=vc;vc.default=vc;v$.registerParse(vc);var{isClean:Cr,my:E$}=ao,C$=aE,x$=Sc,M$=$n,T$=np;var qS=ip,I$=ap,R$=lo,A$={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},O$={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},_$={Once:!0,postcssPlugin:!0,prepare:!0},Hi=0;function to(n){return typeof n=="object"&&typeof n.then=="function"}l(to,"isPromise");function TE(n){let e=!1,t=A$[n.type];return n.type==="decl"?e=n.prop.toLowerCase():n.type==="atrule"&&(e=n.name.toLowerCase()),e&&n.append?[t,t+"-"+e,Hi,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:n.append?[t,Hi,t+"Exit"]:[t,t+"Exit"]}l(TE,"getEvents");function YS(n){let e;return n.type==="document"?e=["Document",Hi,"DocumentExit"]:n.type==="root"?e=["Root",Hi,"RootExit"]:e=TE(n),{eventIndex:0,events:e,iterator:0,node:n,visitorIndex:0,visitors:[]}}l(YS,"toStack");function Yd(n){return n[Cr]=!1,n.nodes&&n.nodes.forEach(e=>Yd(e)),n}l(Yd,"cleanMarks");var Kd={},Bi=class IE{static{l(this,"LazyResult")}constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Yd(t);else if(t instanceof IE||t instanceof qS)i=Yd(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=I$;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{i=o(t,r)}catch(a){this.processed=!0,this.error=a}i&&!i[E$]&&M$.rebuild(i)}this.result=new qS(e,i,r),this.helpers={...Kd,postcss:Kd,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=l((t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])},"add");for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!O$[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!_$[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(to(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cr];){e[Cr]=!0;let t=[YS(e)];for(;t.length>0;){let r=this.visitTick(t);if(to(r))try{await r}catch(i){let o=t[t.length-1].node;throw this.handleError(i,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(o=>r(o,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return to(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=x$;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new C$(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(to(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Cr];)e[Cr]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let o;try{o=i(t,this.helpers)}catch(a){throw this.handleError(a,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(to(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[a,u]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=a;try{return u(r.toProxy(),this.helpers)}catch(f){throw this.handleError(f,r)}}if(t.iterator!==0){let a=t.iterator,u;for(;u=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!u[Cr]){u[Cr]=!0,e.push(YS(u));return}t.iterator=0,delete r.indexes[a]}let o=t.events;for(;t.eventIndex<o.length;){let a=o[t.eventIndex];if(t.eventIndex+=1,a===Hi){r.nodes&&r.nodes.length&&(r[Cr]=!0,t.iterator=r.getIterator());return}else if(this.listeners[a]){t.visitors=this.listeners[a];return}}e.pop()}walkSync(e){e[Cr]=!0;let t=TE(e);for(let r of t)if(r===Hi)e.nodes&&e.each(i=>{i[Cr]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Bi.registerPostcss=n=>{Kd=n};var RE=Bi;Bi.default=Bi;R$.registerLazyResult(Bi);T$.registerLazyResult(Bi);var L$=aE,N$=Sc;var D$=ap,k$=ip,Xd=class{static{l(this,"NoWorkResult")}constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,o=N$;this.result=new k$(this._processor,i,this._opts),this.result.css=t;let a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});let u=new L$(o,i,this._opts,t);if(u.isMap()){let[f,d]=u.generate();f&&(this.result.css=f),d&&(this.result.map=d)}else u.clearAnnotation(),this.result.css=u.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=D$;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},P$=Xd;Xd.default=Xd;var F$=P$,$$=RE,H$=np,B$=lo,so=class{static{l(this,"Processor")}constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new F$(this,e,t):new $$(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},W$=so;so.default=so;B$.registerProcessor(so);H$.registerProcessor(so);var U$=Cc,V$=rE,z$=Mc,G$=sp,j$=xc,q$=lo,Y$=op;function oo(n,e){if(Array.isArray(n))return n.map(i=>oo(i));let{inputs:t,...r}=n;if(t){e=[];for(let i of t){let o={...i,__proto__:j$.prototype};o.map&&(o.map={...o.map,__proto__:V$.prototype}),e.push(o)}}if(r.nodes&&(r.nodes=n.nodes.map(i=>oo(i,e))),r.source){let{inputId:i,...o}=r.source;r.source=o,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new q$(r);if(r.type==="decl")return new U$(r);if(r.type==="rule")return new Y$(r);if(r.type==="comment")return new z$(r);if(r.type==="atrule")return new G$(r);throw new Error("Unknown node type: "+n.type)}l(oo,"fromJSON$1");var K$=oo;oo.default=oo;var X$=ep,AE=Cc,Z$=RE,J$=$n,lp=W$,Q$=Sc,eH=K$,OE=np,tH=vE,_E=Mc,LE=sp,rH=ip,nH=xc,iH=ap,sH=xE,NE=op,DE=lo,oH=Ec;function _e(...n){return n.length===1&&Array.isArray(n[0])&&(n=n[0]),new lp(n)}l(_e,"postcss");_e.plugin=l(function(e,t){let r=!1;function i(...a){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
117
117
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
118
|
-
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new
|
|
118
|
+
https://www.w3ctech.com/topic/2226`));let u=t(...a);return u.postcssPlugin=e,u.postcssVersion=new lp().version,u}l(i,"creator");let o;return Object.defineProperty(i,"postcss",{get(){return o||(o=i()),o}}),i.process=function(a,u,f){return _e([i(f)]).process(a,u)},i},"plugin");_e.stringify=Q$;_e.parse=iH;_e.fromJSON=eH;_e.list=sH;_e.comment=n=>new _E(n);_e.atRule=n=>new LE(n);_e.decl=n=>new AE(n);_e.rule=n=>new NE(n);_e.root=n=>new DE(n);_e.document=n=>new OE(n);_e.CssSyntaxError=X$;_e.Declaration=AE;_e.Container=J$;_e.Processor=lp;_e.Document=OE;_e.Comment=_E;_e.Warning=tH;_e.AtRule=LE;_e.Result=rH;_e.Input=nH;_e.Rule=NE;_e.Root=DE;_e.Node=oH;Z$.registerPostcss(_e);var aH=_e;_e.default=_e;var Ze=vF(aH);Ze.stringify;Ze.fromJSON;Ze.plugin;Ze.parse;Ze.list;Ze.document;Ze.comment;Ze.atRule;Ze.rule;Ze.decl;Ze.root;Ze.CssSyntaxError;Ze.Declaration;Ze.Container;Ze.Processor;Ze.Document;Ze.Comment;Ze.Warning;Ze.AtRule;Ze.Result;Ze.Input;Ze.Rule;Ze.Root;Ze.Node;var Tc=class{constructor(e){this.timeMachine=e;this.seekbarMin=Date.now();this.seekbarMax=Date.now();this.seekBar=null;this.label=null}static{l(this,"TimeMachineSeeker")}open(){this.removeExistingSeekbar(),this.updateTimestampRange(),this.createSeekbar()}removeExistingSeekbar(){let e=document.getElementById("time-machine-seekbar");e&&e.remove()}updateTimestampRange(){this.seekbarMax=Date.now(),console.log("Creating seekbar with min/max timestamp",this.seekbarMin,this.seekbarMax),console.log("Current timestamp",this.timeMachine.getCurrentTimestamp())}createSeekbar(){let e=this.createContainer();this.seekBar=this.createSeekBar(),this.label=this.createLabel();let t=this.createRefreshButton();this.setupEventListeners(),e.appendChild(this.seekBar),e.appendChild(this.label),e.appendChild(t),document.body.appendChild(e)}createContainer(){let e=document.createElement("div");return e.id="time-machine-seekbar",Object.assign(e.style,{position:"absolute",width:"90%",bottom:"0",background:"white",opacity:"0.75",display:"flex",justifyContent:"center",alignItems:"center",padding:"10px",margin:"0 20px",gap:"10px"}),e}createSeekBar(){let e=document.createElement("input");return e.type="range",e.min="0",e.max="100",e.step="1",e.value="100",e.style.flexGrow="1",e}createLabel(){let e=document.createElement("span");return e.textContent=this.formatTimestamp(this.seekbarMax),e}createRefreshButton(){let e=document.createElement("button");return e.textContent="Refresh",e.addEventListener("click",()=>{this.open()}),e}setupEventListeners(){if(!this.seekBar||!this.label)return;let e=l(()=>{let t=parseFloat(this.seekBar.value)/100,r=this.getTimestamp(t);console.log("Seeking to timestamp",r),this.label.textContent=this.formatTimestamp(r),this.timeMachine.goBack(r)},"handleSeek");this.seekBar.addEventListener("input",e),this.seekBar.addEventListener("change",e)}getTimestamp(e){let t=Math.round(this.seekbarMin+e*(this.seekbarMax-this.seekbarMin));return Math.max(this.seekbarMin,Math.min(this.seekbarMax,t))}formatTimestamp(e){let t=Math.max(0,Math.floor((e-this.seekbarMin)/1e3)),r=Math.floor(t/60),i=t%60;return`${String(r).padStart(2,"0")}:${String(i).padStart(2,"0")}`}};var Ic=class extends rc{constructor(){super({enableInteract:!0});this.shouldHandleEvents=!0;this.name="timeMachine";this.rrwebSnapshot=JS}static{l(this,"TimeMachine")}setEventHandlers(t,r=!0){this.shouldHandleEvents=r,super.setEventHandlers(t)}async handleEvents(t){try{t=t.filter(r=>r.timestamp>=(this.lastSeenTimestamp?this.lastSeenTimestamp:0)),t.length&&(this.lastSeenTimestamp=t[t.length-1].timestamp);for(let r of t)await this.eventProcessor.processEvent(r,this.shouldHandleEvents),await this.skipEvents([r])}catch(r){console.error(r)}}setShouldHandleEvents(t){this.shouldHandleEvents=t}async goBack(t){return t?this.sessionReplayer.goBack(t):this.goLive()}getElementByRRwebId(t){return this.sessionReplayer.getNodeById(t)}goLive(){return this.sessionReplayer.goLive()}getCurrentTimestamp(){return this.sessionReplayer.getCurrentTimestamp()}getFirstEventTimestamp(){return this.sessionReplayer.getFirstEventTimestamp()}subscribeToEventCast(t,r,i){this.sessionReplayer.subscribeTo(t,r,i)}isConnected(){return this.sessionReplayer.isConnected()}unsubscribeFromEventCast(t){this.sessionReplayer.unsubscribeFrom(t)}openSeekbar(){this.seeker||(this.seeker=new Tc(this)),this.seeker.open()}};(function(){let n=Element.prototype.addEventListener;Element.prototype.addEventListener=function(e,t,r){n.call(this,e,t,r),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 Jl,e=new Ic;window.checksum={testGenerator:n,timeMachine:e},window.checksumRRWeb&&console.log(`Using forked rrweb@${window.checksumRRWeb.version}`)}})();
|
|
119
119
|
/*! Bundled license information:
|
|
120
120
|
|
|
121
121
|
lodash/lodash.js:
|