tdem-web-sdk 1.0.1 → 1.0.7

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.
@@ -1,10 +1,10 @@
1
1
  /**
2
- * ===============================================================
3
- * tdem-web-sdk@1.0.1 (c) 2026 TencentCloud Real User Monitoring.
2
+ * ===========================================================================
3
+ * tdem-web-sdk@1.0.7 (c) 2026 TencentCloud Real User Monitoring.
4
4
  * Author pumpkincai.
5
- * Last Release Time Wed Apr 22 2026 11:00:35 GMT+0800 (中国标准时间).
5
+ * Last Release Time Thu Jul 30 2026 15:20:53 GMT+0800 (China Standard Time).
6
6
  * Released under the MIT License.
7
7
  * Thanks for supporting TDEM!
8
- * ===============================================================
8
+ * ===========================================================================
9
9
  **/
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";var L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var s,F,a,m,D,x=(a=function(e){return e&&e.Math===Math&&e})("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof L&&L)||a("object"==typeof L&&L)||function(){return this}()||Function("return this")(),h=!(m=function(e){try{return!!e()}catch(o){return!0}})(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),U=!m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),B=Function.prototype.call,E=U?B.bind(B):function(){return B.apply(B,arguments)},e={}.propertyIsEnumerable,z={f:(D=Object.getOwnPropertyDescriptor)&&!e.call({1:2},1)?function(e){e=D(this,e);return!!e&&e.enumerable}:e},j=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},e=Function.prototype,W=e.call,e=U&&e.bind.bind(W,W),y=U?e:function(e){return function(){return W.apply(e,arguments)}},H=y({}.toString),V=y("".slice),Z=function(e){return V(H(e),8,-1)},Y=Object,J=y("".split),q=m(function(){return!Y("z").propertyIsEnumerable(0)})?function(e){return"String"===Z(e)?J(e,""):Y(e)}:Y,K=function(e){return null===e||e===undefined},X=TypeError,$=function(e){if(K(e))throw new X("Can't call method on "+e);return e},Q=function(e){return q($(e))},ee="object"==typeof document&&document.all,_=void 0===ee&&ee!==undefined?function(e){return"function"==typeof e||e===ee}:function(e){return"function"==typeof e},R=function(e){return"object"==typeof e?null!==e:_(e)},te=function(e,t){return arguments.length<2?(n=x[e],_(n)?n:undefined):x[e]&&x[e][t];var n},ne=y({}.isPrototypeOf),e=x.navigator,e=e&&e.userAgent,re=e?String(e):"",e=x.process,t=x.Deno,e=e&&e.versions||t&&t.version,t=e&&e.v8,ie=F=!(F=t?0<(s=t.split("."))[0]&&s[0]<4?1:+(s[0]+s[1]):F)&&re&&(!(s=re.match(/Edge\/(\d+)/))||74<=s[1])&&(s=re.match(/Chrome\/(\d+)/))?+s[1]:F,oe=x.String,se=!!Object.getOwnPropertySymbols&&!m(function(){var e=Symbol("symbol detection");return!oe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ie&&ie<41}),e=se&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ae=Object,le=e?function(e){return"symbol"==typeof e}:function(e){var t=te("Symbol");return _(t)&&ne(t.prototype,ae(e))},ue=String,ce=function(e){try{return ue(e)}catch(o){return"Object"}},de=TypeError,he=function(e){if(_(e))return e;throw new de(ce(e)+" is not a function")},fe=function(e,t){t=e[t];return K(t)?undefined:he(t)},pe=TypeError,ge=Object.defineProperty,me=function(e,t){try{ge(x,e,{value:t,configurable:!0,writable:!0})}catch(s){x[e]=t}return t},ye=o(function(e){e=e.exports=x["__core-js_shared__"]||me("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.49.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),t=function(e,t){return ye[e]||(ye[e]=t||{})},ve=Object,we=function(e){return ve($(e))},be=y({}.hasOwnProperty),A=Object.hasOwn||function(e,t){return be(we(e),t)},Se=0,ke=Math.random(),_e=y(1.1.toString),Ce=function(e){return"Symbol("+(e===undefined?"":e)+")_"+_e(++Se+ke,36)},Ie=x.Symbol,xe=t("wks"),Ee=e?Ie["for"]||Ie:Ie&&Ie.withoutSetter||Ce,Re=function(e){return A(xe,e)||(xe[e]=se&&A(Ie,e)?Ie[e]:Ee("Symbol."+e)),xe[e]},Ae=TypeError,Oe=Re("toPrimitive"),Te=function(e,t){if(!R(e)||le(e))return e;var n,r,i=fe(e,Oe);if(i){if(t===undefined&&(t="default"),i=E(i,e,t),!R(i)||le(i))return i;throw new Ae("Can't convert object to primitive value")}t===undefined&&(t="number");i=e,e=t;if("string"===e&&_(n=i.toString)&&!R(r=E(n,i)))return r;if(_(n=i.valueOf)&&!R(r=E(n,i)))return r;if("string"!==e&&_(n=i.toString)&&!R(r=E(n,i)))return r;throw new pe("Can't convert object to primitive value")},Me=function(e){e=Te(e,"string");return le(e)?e:e+""},Pe=x.document,Ne=R(Pe)&&R(Pe.createElement),Le=function(e){return Ne?Pe.createElement(e):{}},Fe=!h&&!m(function(){return 7!==Object.defineProperty(Le("div"),"a",{get:function(){return 7}}).a}),De=Object.getOwnPropertyDescriptor,Ue={f:h?De:function(e,t){if(e=Q(e),t=Me(t),Fe)try{return De(e,t)}catch(s){}if(A(e,t))return j(!E(z.f,e,t),e[t])}},e=h&&m(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Be=String,ze=TypeError,C=function(e){if(R(e))return e;throw new ze(Be(e)+" is not an object")},je=TypeError,We=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Ve={f:h?e?function(e,t,n){var r;return C(e),t=Me(t),C(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable&&(r=He(e,t))&&r.writable&&(e[t]=n.value,n={configurable:("configurable"in n?n:r).configurable,enumerable:("enumerable"in n?n:r).enumerable,writable:!1}),We(e,t,n)}:We:function(e,t,n){if(C(e),t=Me(t),C(n),Fe)try{return We(e,t,n)}catch(F){}if("get"in n||"set"in n)throw new je("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},Ze=h?function(e,t,n){return Ve.f(e,t,j(1,n))}:function(e,t,n){return e[t]=n,e},n=Function.prototype,r=h&&Object.getOwnPropertyDescriptor,i=A(n,"name"),Ge={EXISTS:i,PROPER:i&&"something"===function(){}.name,CONFIGURABLE:i&&(!h||r(n,"name").configurable)},Ye=y(Function.toString);_(ye.inspectSource)||(ye.inspectSource=function(e){return Ye(e)});var Je,qe,Ke,Xe,$e=ye.inspectSource,i=x.WeakMap,n=_(i)&&/native code/.test(String(i)),Qe=t("keys"),r=function(e){return Qe[e]||(Qe[e]=Ce(e))},et={},tt=x.TypeError,i=x.WeakMap,nt=n||ye.state?((Ke=ye.state||(ye.state=new i)).get=Ke.get,Ke.has=Ke.has,Ke.set=Ke.set,Je=function(e,t){if(Ke.has(e))throw new tt("Object already initialized");return t.facade=e,Ke.set(e,t),t},qe=function(e){return Ke.get(e)||{}},function(e){return Ke.has(e)}):(Xe=r("state"),et[Xe]=!0,Je=function(e,t){if(A(e,Xe))throw new tt("Object already initialized");return t.facade=e,Ze(e,Xe,t),t},qe=function(e){return A(e,Xe)?e[Xe]:{}},function(e){return A(e,Xe)}),rt={set:Je,get:qe,has:nt,enforce:function(e){return nt(e)?qe(e):Je(e,{})},getterFor:function(t){return function(e){if(R(e)&&(e=qe(e)).type===t)return e;throw new tt("Incompatible receiver, "+t+" required")}}},it=o(function(e){var r=Ge.CONFIGURABLE,i=rt.enforce,t=rt.get,o=String,s=Object.defineProperty,a=y("".slice),l=y("".replace),u=y([].join),c=h&&!m(function(){return 8!==s(function(){},"length",{value:8}).length}),d=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===a(o(t),0,7)&&(t="["+l(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!A(e,"name")||r&&e.name!==t)&&(h?s(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&A(n,"arity")&&e.length!==n.arity&&s(e,"length",{value:n.arity});try{n&&A(n,"constructor")&&n.constructor?h&&s(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(j){}n=i(e);return A(n,"source")||(n.source=u(d,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return _(this)&&t(this).source||$e(this)},"toString")}),ot=function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(_(n)&&it(n,o,r),r.global)i?e[t]=n:me(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(m){}i?e[t]=n:Ve.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},st=Math.ceil,at=Math.floor,lt=Math.trunc||function(e){e=+e;return(0<e?at:st)(e)},ut=function(e){e=+e;return e!=e||0==e?0:lt(e)},ct=Math.max,dt=Math.min,ht=function(e,t){e=ut(e);return e<0?ct(e+t,0):dt(e,t)},ft=Math.min,pt=function(e){e=ut(e);return 0<e?ft(e,9007199254740991):0},gt=function(e){return pt(e.length)},n=function(a){return function(e,t,n){var r=Q(e),i=gt(r);if(0!==i){var o,s=ht(n,i);if(a&&t!=t){for(;s<i;)if((o=r[s++])!=o)return!0}else for(;s<i;s++)if((a||s in r)&&r[s]===t)return a||s||0}return!a&&-1}},i={includes:n(!0),indexOf:n(!1)},mt=i.indexOf,yt=y([].push),vt=function(e,t){var n,r=Q(e),i=0,o=[];for(n in r)!A(et,n)&&A(r,n)&&yt(o,n);for(;t.length>i;)!A(r,n=t[i++])||~mt(o,n)||yt(o,n);return o},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],bt=wt.concat("length","prototype"),St={f:Object.getOwnPropertyNames||function(e){return vt(e,bt)}},kt={f:Object.getOwnPropertySymbols},_t=y([].concat),Ct=te("Reflect","ownKeys")||function(e){var t=St.f(C(e)),n=kt.f;return n?_t(t,n(e)):t},It=function(e,t,n){for(var r=Ct(t),i=Ve.f,o=Ue.f,s=0;s<r.length;s++){var a=r[s];A(e,a)||n&&A(n,a)||i(e,a,o(t,a))}},xt=/#|\.prototype\./,n=function(e,t){e=Rt[Et(e)];return e===Ot||e!==At&&(_(t)?m(t):!!t)},Et=n.normalize=function(e){return String(e).replace(xt,".").toLowerCase()},Rt=n.data={},At=n.NATIVE="N",Ot=n.POLYFILL="P",Tt=n,Mt=Ue.f,O=function(e,t){var n,r,i,o,s=e.target,a=e.global,l=e.stat;if(n=a?x:l?x[s]||me(s,{}):x[s]&&x[s].prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(o=Mt(n,r))&&o.value:n[r],!Tt(a?r:s+(l?".":"#")+r,e.forced)&&o!==undefined){if(typeof i==typeof o)continue;It(i,o)}(e.sham||o&&o.sham)&&Ze(i,"sham",!0),ot(n,r,i,e)}},n=function(e){if("Function"===Z(e))return y(e)},Pt=n(n.bind),Nt=function(e,t){return he(e),t===undefined?e:U?Pt(e,t):function(){return e.apply(t,arguments)}},Lt=Array.isArray||function(e){return"Array"===Z(e)},l={},l=(l[Re("toStringTag")]="z","[object z]"===String(l)),Ft=Re("toStringTag"),Dt=Object,Ut="Arguments"===Z(function(){return arguments}()),Bt=l?Z:function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=Dt(e),Ft))?n:Ut?Z(e):"Object"===(t=Z(e))&&_(e.callee)?"Arguments":t},zt=function(){},jt=te("Reflect","construct"),Wt=/^\s*(?:class|function)\b/,Ht=y(Wt.exec),Vt=!Wt.test(zt),Zt=function(e){if(!_(e))return!1;try{return jt(zt,[],e),!0}catch(o){return!1}},Gt=function(e){if(!_(e))return!1;switch(Bt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Vt||!!Ht(Wt,$e(e))}catch(o){return!0}};Gt.sham=!0;var Yt,Jt=!jt||m(function(){var e;return Zt(Zt.call)||!Zt(Object)||!Zt(function(){e=!0})||e})?Gt:Zt,qt=Re("species"),Kt=Array,Xt=function(e,t){return new((n=Lt(e=e)&&(n=e.constructor,Jt(n)&&(n===Kt||Lt(n.prototype))||R(n)&&null===(n=n[qt]))?undefined:n)===undefined?Kt:n)(0===t?0:t);var n},$t=function(e,t,n){h?Ve.f(e,t,j(0,n)):e[t]=n},Gt=function(h){var f=1===h,p=2===h,g=3===h,m=4===h,y=6===h,v=7===h,w=5===h||y;return function(e,t,n){for(var r,i,o=we(e),s=q(o),a=gt(s),l=Nt(t,n),u=0,c=0,d=f?Xt(e,a):p||v?Xt(e,0):undefined;u<a;u++)if((w||u in s)&&(i=l(r=s[u],u,o),h))if(f)$t(d,u,i);else if(i)switch(h){case 3:return!0;case 5:return r;case 6:return u;case 2:$t(d,c++,r)}else switch(h){case 4:return!1;case 7:$t(d,c++,r)}return y?-1:g||m?m:d}},Qt={forEach:Gt(0),map:Gt(1),filter:Gt(2),some:Gt(3),every:Gt(4),find:Gt(5),findIndex:Gt(6),filterReject:Gt(7)},en=Object.keys||function(e){return vt(e,wt)},tn={f:h&&!e?Object.defineProperties:function(e,t){C(e);for(var n,r=Q(t),i=en(t),o=i.length,s=0;s<o;)Ve.f(e,n=i[s++],r[n]);return e}},nn=te("document","documentElement"),rn=r("IE_PROTO"),on=function(){},sn=function(e){return"<script>"+e+"<\/script>"},an=function(e){e.write(sn("")),e.close();var t=e.parentWindow.Object;return e=null,t},ln=function(){try{Yt=new ActiveXObject("htmlfile")}catch(F){}var e;ln="undefined"==typeof document||document.domain&&Yt?an(Yt):((e=Le("iframe")).style.display="none",nn.appendChild(e),e.src=String("javascript:"),(e=e.contentWindow.document).open(),e.write(sn("document.F=Object")),e.close(),e.F);for(var t=wt.length;t--;)delete ln.prototype[wt[t]];return ln()},un=(et[rn]=!0,Object.create||function(e,t){var n;return null!==e?(on.prototype=C(e),n=new on,on.prototype=null,n[rn]=e):n=ln(),t===undefined?n:tn.f(n,t)}),Gt=Ve.f,cn=Re("unscopables"),dn=Array.prototype,e=(dn[cn]===undefined&&Gt(dn,cn,{configurable:!0,value:un(null)}),function(e){dn[cn][e]=!0}),hn=Qt.find,fn=!0,Gt=("find"in[]&&Array(1).find(function(){fn=!1}),O({target:"Array",proto:!0,forced:fn},{find:function(e){return hn(this,e,1<arguments.length?arguments[1]:undefined)}}),e("find"),function(e,t){var n=[][e];return!!n&&m(function(){n.call(null,t||function(){return 1},1)})}),pn=Qt.forEach,gn=Gt("forEach")?[].forEach:function(e){return pn(this,e,1<arguments.length?arguments[1]:undefined)};O({target:"Array",proto:!0,forced:[].forEach!==gn},{forEach:gn});var mn,yn={},vn=!m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),wn=r("IE_PROTO"),bn=Object,Sn=bn.prototype,kn=vn?bn.getPrototypeOf:function(e){var t,e=we(e);return A(e,wn)?e[wn]:(t=e.constructor,_(t)&&e instanceof t?t.prototype:e instanceof bn?Sn:null)},_n=Re("iterator"),r=!1,Cn=([].keys&&("next"in(Cn=[].keys())?(Cn=kn(kn(Cn)))!==Object.prototype&&(mn=Cn):r=!0),R(mn)&&!m(function(){var e={};return mn[_n].call(e)!==e})||(mn={}),_(mn[_n])||ot(mn,_n,function(){return this}),{IteratorPrototype:mn,BUGGY_SAFARI_ITERATORS:r}),In=Ve.f,xn=Re("toStringTag"),En=function(e,t,n){(e=e&&!n?e.prototype:e)&&!A(e,xn)&&In(e,xn,{configurable:!0,value:t})},Rn=Cn.IteratorPrototype,An=function(){return this},On=function(e,t,n,r){t+=" Iterator";return e.prototype=un(Rn,{next:j(+!r,n)}),En(e,t,!1),yn[t]=An,e},Tn=String,Mn=TypeError,Pn=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=function(e){try{return y(he(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(F){}}(Object.prototype))(e,[]),r=e instanceof Array}catch(F){}return function(e,t){return $(e),function(e){if(R(t=e)||null===t)return;var t;throw new Mn("Can't set "+Tn(e)+" as a prototype")}(t),R(e)&&(r?n(e,t):e.__proto__=t),e}}():undefined),Nn=Ge.PROPER,Ln=Ge.CONFIGURABLE,Fn=Cn.IteratorPrototype,Dn=Cn.BUGGY_SAFARI_ITERATORS,Un=Re("iterator"),Bn=function(){return this},zn=function(e,t,n,r,i,o,s){On(n,t,r);var a,l,r=function(e){if(e===i&&f)return f;if(!Dn&&e&&e in d)return d[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},u=t+" Iterator",c=!1,d=e.prototype,h=d[Un]||d["@@iterator"]||i&&d[i],f=!Dn&&h||r(i),p="Array"===t&&d.entries||h;if(p&&(e=kn(p.call(new e)))!==Object.prototype&&e.next&&(kn(e)!==Fn&&(Pn?Pn(e,Fn):_(e[Un])||ot(e,Un,Bn)),En(e,u,!0)),Nn&&"values"===i&&h&&"values"!==h.name&&(Ln?Ze(d,"name","values"):(c=!0,f=function(){return E(h,this)})),i)if(a={values:r("values"),keys:o?f:r("keys"),entries:r("entries")},s)for(l in a)!Dn&&!c&&l in d||ot(d,l,a[l]);else O({target:t,proto:!0,forced:Dn||c},a);return d[Un]!==f&&ot(d,Un,f,{name:i}),yn[t]=f,a},jn=function(e,t){return{value:e,done:t}},r=Ve.f,Wn=rt.set,Hn=rt.getterFor("Array Iterator"),Vn=zn(Array,"Array",function(e,t){Wn(this,{type:"Array Iterator",target:Q(e),index:0,kind:t})},function(){var e=Hn(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,jn(undefined,!0);switch(e.kind){case"keys":return jn(n,!1);case"values":return jn(t[n],!1)}return jn([n,t[n]],!1)},"values"),Zn=yn.Arguments=yn.Array;if(e("keys"),e("values"),e("entries"),h&&"values"!==Zn.name)try{r(Zn,"name",{value:"values"})}catch(G){}var Gn=Date,Yn=y(Gn.prototype.getTime),Jn=(O({target:"Date",stat:!0},{now:function(){return Yn(new Gn)}}),function(e,t,n){return n.get&&it(n.get,t,{getter:!0}),n.set&&it(n.set,t,{setter:!0}),Ve.f(e,t,n)}),Zn=Ge.EXISTS,r=Function.prototype,qn=y(r.toString),Kn=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Xn=y(Kn.exec),Zn=(h&&!Zn&&Jn(r,"name",{configurable:!0,get:function(){try{return Xn(Kn,qn(this))[1]}catch(G){return""}}}),Ve.f),r=(O({target:"Object",stat:!0,forced:Object.defineProperty!==Zn,sham:!h},{defineProperty:Zn}),l?{}.toString:function(){return"[object "+Bt(this)+"]"}),$n=(l||ot(Object.prototype,"toString",r,{unsafe:!0}),String),I=function(e){if("Symbol"===Bt(e))throw new TypeError("Cannot convert a Symbol value to a string");return $n(e)},Qn=y("".charAt),er=y("".charCodeAt),tr=y("".slice),Zn=function(i){return function(e,t){var n,e=I($(e)),t=ut(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=er(e,t))<55296||56319<n||t+1===r||(r=er(e,t+1))<56320||57343<r?i?Qn(e,t):n:i?tr(e,t,t+2):r-56320+(n-55296<<10)+65536}},l={codeAt:Zn(!1),charAt:Zn(!0)},nr=l.charAt,rr=rt.set,ir=rt.getterFor("String Iterator"),or=(zn(String,"String",function(e){rr(this,{type:"String Iterator",string:I(e),index:0})},function(){var e=ir(this),t=e.string,n=e.index;return n>=t.length?jn(undefined,!0):(t=nr(t,n),e.index+=t.length,jn(t,!1))}),y([].slice)),sr=St.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],lr={f:function(e){if(!ar||"Window"!==Z(e))return sr(Q(e));try{return sr(e)}catch(G){return or(ar)}}},ur=m(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})}),cr=Object.isExtensible,dr=m(function(){cr(1)})||ur?function(e){return!!R(e)&&(!ur||"ArrayBuffer"!==Z(e))&&(!cr||cr(e))}:cr,hr=!m(function(){return Object.isExtensible(Object.preventExtensions({}))}),fr=o(function(e){var t=Ve.f,n=!1,s=Ce("meta"),r=0,i=function(e){t(e,s,{value:{objectID:"O"+r++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var i=St.f,o=y([].splice),e={};e[s]=1,i(e).length&&(St.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===s){o(t,n,1);break}return t},O({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:lr.f}))},fastKey:function(e,t){if(!R(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!A(e,s)){if(!dr(e))return"F";if(!t)return"E";i(e)}return e[s].objectID},getWeakData:function(e,t){if(!A(e,s)){if(!dr(e))return!0;if(!t)return!1;i(e)}return e[s].weakData},onFreeze:function(e){return hr&&n&&dr(e)&&!A(e,s)&&i(e),e}};et[s]=!0}),pr=Re("iterator"),gr=Array.prototype,mr=function(e){return e!==undefined&&(yn.Array===e||gr[pr]===e)},yr=Re("iterator"),vr=function(e){if(!K(e))return fe(e,yr)||fe(e,"@@iterator")||yn[Bt(e)]},wr=TypeError,br=function(e,t){t=arguments.length<2?vr(e):t;if(he(t))return C(E(t,e));throw new wr(ce(e)+" is not iterable")},Sr=function(e,t,n){var r,i;C(e);try{if(!(r=fe(e,"return"))){if("throw"===t)throw n;return n}r=E(r,e)}catch(G){i=!0,r=G}if("throw"===t)throw n;if(i)throw r;return C(r),n},kr=TypeError,_r=function(e,t){this.stopped=e,this.result=t},Cr=_r.prototype,Ir=function(e,t,n){var r,i,o,s,a,l=n&&n.that,u=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),f=Nt(t,l),p=function(e){var t=r;return r=undefined,t&&Sr(t,"normal"),new _r(!0,e)},g=function(e){return u?(C(e),h?f(e[0],e[1],p):f(e[0],e[1])):h?f(e,p):f(e)};if(c)r=e.iterator;else if(d)r=e;else{if(!(n=vr(e)))throw new kr(ce(e)+" is not iterable");if(mr(n)){for(i=0,o=gt(e);i<o;i++)if((s=g(e[i]))&&ne(Cr,s))return s;return new _r(!1)}r=br(e,n)}for(a=(c?e:r).next;!(m=E(a,r)).done;){var m=m.value;try{s=g(m)}catch(G){if(!r)throw G;Sr(r,"throw",G)}if("object"==typeof s&&s&&ne(Cr,s))return s}return new _r(!1)},xr=TypeError,Er=function(e,t){if(ne(t,e))return e;throw new xr("Incorrect invocation")},Rr=Re("iterator"),Ar=!1;try{var Or=0,Tr={next:function(){return{done:!!Or++}},"return":function(){Ar=!0}};Tr[Rr]=function(){return this},Array.from(Tr,function(){throw 2})}catch(G){}var Mr,Pr=function(e,t){try{if(!t&&!Ar)return!1}catch(G){return!1}var n=!1;try{var r={};r[Rr]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(G){}return n},Nr=function(e,t,n){return Pn&&_(t=t.constructor)&&t!==n&&R(t=t.prototype)&&t!==n.prototype&&Pn(e,t),e},r=function(e,t,n){var r,i,o,s,a,l=-1!==e.indexOf("Map"),u=-1!==e.indexOf("Weak"),c=l?"set":"add",d=x[e],h=d&&d.prototype,f=d,p={},g=function(e){var n=y(h[e]);ot(h,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(u&&!R(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return u&&!R(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(u&&!R(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return Tt(e,!_(d)||!(u||h.forEach&&!m(function(){(new d).entries().next()})))?(f=n.getConstructor(t,e,l,c),fr.enable()):Tt(e,!0)&&(i=(r=new f)[c](u?{}:-0,1)!==r,o=m(function(){r.has(1)}),s=Pr(function(e){new d(e)}),a=!u&&m(function(){for(var e=new d,t=5;t--;)e[c](t,t);return!e.has(-0)}),s||(((f=t(function(e,t){Er(e,h);e=Nr(new d,e,f);return K(t)||Ir(t,e[c],{that:e,AS_ENTRIES:l}),e})).prototype=h).constructor=f),(o||a)&&(g("delete"),g("has"),l)&&g("get"),(a||i)&&g(c),u)&&h.clear&&delete h.clear,O({global:!0,constructor:!0,forced:(p[e]=f)!==d},p),En(f,e),u||n.setStrong(f,e,l),f},Lr=function(e,t,n){for(var r in t)ot(e,r,t[r],n);return e},Fr=fr.getWeakData,Dr=rt.set,Ur=rt.getterFor,Br=Qt.find,zr=Qt.findIndex,jr=y([].splice),Wr=0,Hr=function(e){return e.frozen||(e.frozen=new Vr)},Vr=function(){this.entries=[]},Zr=function(e,t){return Br(e.entries,function(e){return e[0]===t})},Gr=(Vr.prototype={get:function(e){e=Zr(this,e);if(e)return e[1]},has:function(e){return!!Zr(this,e)},set:function(e,t){var n=Zr(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=zr(this.entries,function(e){return e[0]===t});return~e&&jr(this.entries,e,1),!!~e}},r("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){Er(e,o),Dr(e,{type:n,id:Wr++,frozen:null}),K(t)||Ir(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,s=Ur(n),a=function(e,t,n){var r=s(e),i=Fr(C(t),!0);return!0===i?Hr(r).set(t,n):i[r.id]=n,e};return Lr(o,{"delete":function(e){var t,n=s(this);return!!R(e)&&(!0===(t=Fr(e))?Hr(n)["delete"](e):t&&A(t,n.id)&&delete t[n.id])},has:function(e){var t,n=s(this);return!!R(e)&&(!0===(t=Fr(e))?Hr(n).has(e):t&&A(t,n.id))}}),Lr(o,r?{get:function(e){var t,n=s(this);if(R(e))return!0===(t=Fr(e))?Hr(n).get(e):t?t[n.id]:void 0},set:function(e,t){return a(this,e,t)}}:{add:function(e){return a(this,e,!0)}}),e}}),Cn.IteratorPrototype),Zn=Re("toStringTag"),Yr=TypeError,Jr=x.Iterator,Tr=!_(Jr)||Jr.prototype!==Gr||!m(function(){Jr({})}),qr=function(){if(Er(this,Gr),kn(this)===Gr)throw new Yr("Abstract class Iterator not directly constructable")},Kr=function(t,e){h?Jn(Gr,t,{configurable:!0,get:function(){return e},set:function(e){if(C(this),this===Gr)throw new Yr("You can't redefine this property");A(this,t)?this[t]=e:$t(this,t,e)}}):Gr[t]=e},Xr=(A(Gr,Zn)||Kr(Zn,"Iterator"),!Tr&&A(Gr,"constructor")&&Gr.constructor!==Object||Kr("constructor",qr),qr.prototype=Gr,O({global:!0,constructor:!0,forced:Tr},{Iterator:qr}),function(e){return{iterator:e,next:e.next,done:!1}}),Zn=function(e,t){var n=x.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(G){G instanceof t||(r=!1)}if(!r)return e},$r=Zn("forEach",TypeError),Qr=(O({target:"Iterator",proto:!0,real:!0,forced:$r},{forEach:function(t){C(this);try{he(t)}catch(G){Sr(this,"throw",G)}if($r)return E($r,this,t);var e=Xr(this),n=0;Ir(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),Kr=Le("span").classList,Tr=Kr&&Kr.constructor&&Kr.constructor.prototype,qr=Tr===Object.prototype?undefined:Tr,ei=function(e){if(e&&e.forEach!==gn)try{Ze(e,"forEach",gn)}catch(G){e.forEach=gn}};for(Mr in Qr)Qr[Mr]&&ei(x[Mr]&&x[Mr].prototype);ei(qr);var ti,ni,ri,ii=Re("iterator"),oi=Vn.values,si=function(e,t){if(e){if(e[ii]!==oi)try{Ze(e,ii,oi)}catch(G){e[ii]=oi}if(En(e,t,!0),Qr[t])for(var n in Vn)if(e[n]!==Vn[n])try{Ze(e,n,Vn[n])}catch(G){e[n]=Vn[n]}}};for(ti in Qr)si(x[ti]&&x[ti].prototype,ti);function ai(e){this.name="__st"+(1e9*Math.random()>>>0)+ni+"__",null!=e&&e.forEach(this.add,this),ni+=1}si(qr,"DOMTokenList"),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(ni=Date.now()%1e9,ai.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},ai.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},ai.prototype.has=function(e){return!!e[this.name]},ri=ai,Object.defineProperty(window,"WeakSet",{value:function(e){return new ri(e)}}));var li=Object.assign,ui=Object.defineProperty,ci=y([].concat),Kr=!li||m(function(){var e,t,n;return!(!h||1===li({b:1},li(ui({},"a",{enumerable:!0,get:function(){ui(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==li({},e)[n])||"abcdefghijklmnopqrst"!==en(li({},t)).join("")})?function(e,t){for(var n=we(e),r=arguments.length,i=1,o=kt.f,s=z.f;i<r;)for(var a,l=q(arguments[i++]),u=o?ci(en(l),o(l)):en(l),c=u.length,d=0;d<c;)a=u[d++],h&&!E(s,l,a)||(n[a]=l[a]);return n}:li,di=(O({target:"Object",stat:!0,arity:2,forced:Object.assign!==Kr},{assign:Kr}),Ue.f),Tr=!h||m(function(){di(1)}),qr=(O({target:"Object",stat:!0,forced:Tr,sham:!h},{getOwnPropertyDescriptor:function(e,t){return di(Q(e),t)}}),m(function(){en(1)}));function hi(e){return(hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}O({target:"Object",stat:!0,forced:qr},{keys:function(e){return en(we(e))}}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,s=i.length;o<s;o++){var a=i[o],l=Object.getOwnPropertyDescriptor(r,a);null!=l&&l.enumerable&&(t[a]=r[a])}return t}});var fi=Re("species"),Tr=function(t){return 51<=ie||!m(function(){var e=[];return(e.constructor={})[fi]=function(){return{foo:1}},1!==e[t](Boolean).foo})},pi=Qt.filter,qr=Tr("filter"),gi=(O({target:"Array",proto:!0,forced:!qr},{filter:function(e){return pi(this,e,1<arguments.length?arguments[1]:undefined)}}),function(e,t,n,r){try{return r?t(C(n)[0],n[1]):t(n)}catch(G){Sr(e,"throw",G)}}),mi=TypeError,yi=Object.getOwnPropertyDescriptor,vi=h&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(G){return G instanceof TypeError}}()?function(e,t){if(Lt(e)&&!yi(e,"length").writable)throw new mi("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wi=Array,bi=function(e){var t=Jt(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=Nt(r,2<n?arguments[2]:undefined));var o,s,a,l,u,c,d=we(e),n=vr(d),h=0;if(!n||this===wi&&mr(n))for(o=gt(d),s=t?new this(o):wi(o);h<o;h++)c=i?r(d[h],h):d[h],$t(s,h,c);else for(s=t?new this:[],u=(l=br(d,n)).next;!(a=E(u,l)).done;h++){c=i?gi(l,r,[a.value,h],!0):a.value;try{$t(s,h,c)}catch(G){Sr(l,"throw",G)}}return vi(s,h),s},qr=!Pr(function(e){Array.from(e)}),Si=(O({target:"Array",stat:!0,forced:qr},{from:bi}),i.indexOf),ki=n([].indexOf),_i=!!ki&&1/ki([1],1,-0)<0,qr=_i||!Gt("indexOf"),Ci=(O({target:"Array",proto:!0,forced:qr},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return _i?ki(this,e,t)||0:Si(this,e,t)}}),O({target:"Array",stat:!0},{isArray:Lt}),Qt.map),qr=Tr("map"),qr=(O({target:"Array",proto:!0,forced:!qr},{map:function(e){return Ci(this,e,1<arguments.length?arguments[1]:undefined)}}),Tr("slice")),Ii=Re("species"),xi=Array,Ei=Math.max,Ri=(O({target:"Array",proto:!0,forced:!qr},{slice:function(e,t){var n,r,i,o=Q(this),s=gt(o),a=ht(e,s),l=ht(t===undefined?s:t,s);if(Lt(o)&&(n=o.constructor,(n=Jt(n)&&(n===xi||Lt(n.prototype))||R(n)&&null===(n=n[Ii])?undefined:n)===xi||n===undefined))return or(o,a,l);for(r=new(n===undefined?xi:n)(Ei(l-a,0)),i=0;a<l;a++,i++)a in o&&$t(r,i,o[a]);return vi(r,i),r}}),TypeError),Ai=function(e){if(9007199254740991<e)throw new Ri("Maximum allowed index exceeded");return e},Oi=TypeError,Ti=function(e,t){if(!delete e[t])throw new Oi("Cannot delete property "+ce(t)+" of "+ce(e))},qr=Tr("splice"),Mi=Math.max,Pi=Math.min,qr=(O({target:"Array",proto:!0,forced:!qr},{splice:function(e,t){var n,r,i,o,s,a,l=we(this),u=gt(l),c=ht(e,u),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,u-c):(n=e-2,Pi(Mi(ut(t),0),u-c)),Ai(u+n-r),i=Xt(l,r),o=0;o<r;o++)(s=c+o)in l&&$t(i,o,l[s]);if(vi(i,r),n<r){for(o=c;o<u-r;o++)a=o+n,(s=o+r)in l?l[a]=l[s]:Ti(l,a);for(o=u;u-r+n<o;o--)Ti(l,o-1)}else if(r<n)for(o=u-r;c<o;o--)a=o+n-1,(s=o+r-1)in l?l[a]=l[s]:Ti(l,a);for(o=0;o<n;o++)l[o+c]=arguments[o+2];return vi(l,u-r+n),i}}),m(function(){kn(1)})),Ni=(O({target:"Object",stat:!0,forced:qr,sham:!vn},{getPrototypeOf:function(e){return kn(we(e))}}),O({target:"Object",stat:!0},{setPrototypeOf:Pn}),Re("species")),Li=function(e){e=te(e);h&&e&&!e[Ni]&&Jn(e,Ni,{configurable:!0,get:function(){return this}})},Fi=fr.fastKey,Di=rt.set,Ui=rt.getterFor,qr={getConstructor:function(e,n,r,i){var e=e(function(e,t){Er(e,o),Di(e,{type:n,index:un(null),first:null,last:null,size:0}),h||(e.size=0),K(t)||Ir(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,s=Ui(n),a=function(e,t,n){var r,i=s(e),o=l(e,t);return o?o.value=n:(i.last=o={index:r=Fi(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),h?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},l=function(e,t){var n,e=s(e),r=Fi(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Lr(o,{clear:function(){for(var e=s(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=un(null),h?e.size=0:this.size=0},"delete":function(e){var t,n,r=s(this),e=l(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),h?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=s(this),r=Nt(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!l(this,e)}}),Lr(o,r?{get:function(e){e=l(this,e);return e&&e.value},set:function(e,t){return a(this,0===e?0:e,t)}}:{add:function(e){return a(this,e=0===e?0:e,e)}}),h&&Jn(o,"size",{configurable:!0,get:function(){return s(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=Ui(t),o=Ui(r);zn(e,t,function(e,t){Di(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?jn("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,jn(undefined,!0))},n?"entries":"values",!n,!0),Li(t)}},Bi=(r("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},qr),Cn.IteratorPrototype),vn=Re("toStringTag"),zi=rt.set,Cn=function(l){var u=rt.getterFor(l?"WrapForValidIterator":"IteratorHelper");return Lr(un(Bi),{next:function(){var e=u(this);if(l)return e.nextHandler();if(e.done)return jn(undefined,!0);try{var t=e.nextHandler();return e.returnHandlerResult?t:jn(t,e.done)}catch(G){throw e.done=!0,G}},"return":function(){var e,t=u(this),n=t.iterator,r=t.done;if(t.done=!0,l)return(e=fe(n,"return"))?E(e,n):jn(undefined,!0);if(!r){if(t.inner)try{Sr(t.inner.iterator,"normal")}catch(G){return Sr(n,"throw",G)}if(t.openIters)try{for(var i=t.openIters,o="normal",s=void 0,a=i.length-1;0<=a;a--)if(i[a]!==undefined)try{s=Sr(i[a].iterator,o,s)}catch(G){o="throw",s=G}if("throw"===o)throw s}catch(G){if(n)return Sr(n,"throw",G);throw G}n&&Sr(n,"normal")}return jn(undefined,!0)}})},ji=Cn(!0),Wi=Cn(!1),Cn=(Ze(Wi,vn,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,zi(this,t)};return e.prototype=r?ji:Wi,e}),vn=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(G){return!0}},Hi=!vn("filter",function(){}),Vi=!Hi&&Zn("filter",TypeError),Hi=Hi||Vi,Zi=Cn(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=C(E(r,t)),this.done=!!e.done)return;if(gi(t,n,[e=e.value,this.counter++],!0))return e}}),Hi=(O({target:"Iterator",proto:!0,real:!0,forced:Hi},{filter:function(e){C(this);try{he(e)}catch(G){Sr(this,"throw",G)}return Vi?E(Vi,this,e):new Zi(Xr(this),{predicate:e})}}),!vn("map",function(){})),Gi=!Hi&&Zn("map",TypeError),Hi=Hi||Gi,Yi=Cn(function(){var e=this.iterator,t=C(E(this.next,e));if(!(this.done=!!t.done))return gi(e,this.mapper,[t.value,this.counter++],!0)}),Ji=(O({target:"Iterator",proto:!0,real:!0,forced:Hi},{map:function(e){C(this);try{he(e)}catch(G){Sr(this,"throw",G)}return Gi?E(Gi,this,e):new Yi(Xr(this),{mapper:e})}}),function(e,t){return(Ji=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),p=function(){return(p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function qi(e,s,a,l){return new(a=a||Promise)(function(n,t){function r(e){try{o(l.next(e))}catch(s){t(s)}}function i(e){try{o(l["throw"](e))}catch(s){t(s)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(r,i)}o((l=l.apply(e,s||[])).next())})}function Ki(r,i){var o,s,a,l={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;l;)try{if(o=1,s&&(a=2&t[0]?s["return"]:t[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!((a=0<(a=l.trys).length&&a[a.length-1])||6!==t[0]&&2!==t[0])){l=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))l.label=t[1];else if(6===t[0]&&l.label<a[1])l.label=a[1],a=t;else{if(!(a&&l.label<a[2])){a[2]&&l.ops.pop(),l.trys.pop();continue}l.label=a[2],l.ops.push(t)}}t=i.call(r,l)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function Xi(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}var $i=/_?t(\d)?(imestamp)?=\d+&?/g,Qi=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],eo=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],to=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],no=["static","fetch"],ro="unknown",io=Re("isConcatSpreadable"),Hi=51<=ie||!m(function(){var e=[];return e[io]=!1,e.concat()[0]!==e}),Hi=!Hi||!Tr("concat"),oo=(O({target:"Array",proto:!0,arity:1,forced:Hi},{concat:function(e){for(var t,n,r,i,o,s=we(this),a=Xt(s,0),l=0,u=-1,c=arguments.length;u<c;u++)if(i=r=-1===u?s:arguments[u],o=void 0,!R(i)||((o=i[io])!==undefined?!o:!Lt(i)))Ai(l+1),$t(a,l++,r);else for(n=gt(r),Ai(l+n),t=0;t<n;t++,l++)t in r&&$t(a,l,r[t]);return vi(a,l),a}}),function(e,t,n,r,i,o,s,a){for(var l,u,c=i,d=0,h=!!s&&Nt(s,a);d<r;)d in n&&(l=h?h(n[d],d,t):n[d],0<o&&Lt(l)?(u=gt(l),c=oo(e,t,l,u,c,o-1)-1):(Ai(c+1),$t(e,c,l)),c++),d++;return c}),so=oo,ao=(O({target:"Array",proto:!0},{flatMap:function(e){var t,n=we(this),r=gt(n);return he(e),t=Xt(n,0),so(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),i.includes),Tr=m(function(){return!Array(1).includes()}),Hi=m(function(){return[,1].includes(undefined,1)}),lo=(O({target:"Array",proto:!0,forced:Tr||Hi},{includes:function(e){return ao(this,e,1<arguments.length?arguments[1]:undefined)}}),e("includes"),y([].join)),Tr=q!==Object||!Gt("join",","),uo=(O({target:"Array",proto:!0,forced:Tr},{join:function(e){return lo(Q(this),e===undefined?",":e)}}),Qt.some),Hi=Gt("some"),Tr=(O({target:"Array",proto:!0,forced:!Hi},{some:function(e){return uo(this,e,1<arguments.length?arguments[1]:undefined)}}),e("flatMap"),m(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),Hi=(O({target:"Date",proto:!0,arity:1,forced:Tr},{toJSON:function(e){var t=we(this),n=Te(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}}),Date.prototype),co=y(Hi.toString),ho=y(Hi.getTime),Tr=("Invalid Date"!==String(new Date(NaN))&&ot(Hi,"toString",function(){var e=ho(this);return e==e?co(this):"Invalid Date"}),Function.prototype),fo=Tr.apply,po=Tr.call,go="object"==typeof Reflect&&Reflect.apply||(U?po.bind(fo):function(){return po.apply(fo,arguments)}),mo=rt.get,yo=SyntaxError,vo=parseInt,wo=String.fromCharCode,bo=y("".charAt),So=y("".slice),ko=y(/./.exec),_o={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},Co=/^[\da-f]{4}$/i,Io=/^[\u0000-\u001F]$/,xo=!m(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)}),Eo=String,Ro=te("JSON","stringify"),Ao=y(/./.exec),Oo=y("".charAt),To=y("".charCodeAt),Mo=y("".replace),Po=y("".slice),No=y([].push),Lo=y(1.1.toString),Fo=/[\uD800-\uDFFF]/g,Do=/^[\uD800-\uDBFF]$/,Uo=/^[\uDC00-\uDFFF]$/,Bo=Ce(),zo=Bo.length,Hi=!se||m(function(){var e=te("Symbol")("stringify detection");return"[null]"!==Ro([e])||"{}"!==Ro({a:e})||"{}"!==Ro(Object(e))}),jo=m(function(){return'"\\udf06\\ud834"'!==Ro("\udf06\ud834")||'"\\udead"'!==Ro("\udead")}),Wo=Hi?function(e,t){var n=or(arguments),r=Vo(t);if(_(r)||e!==undefined&&!le(e))return n[1]=function(e,t){if(_(r)&&(t=E(r,this,Eo(e),t)),!le(t))return t},go(Ro,null,n)}:Ro,Ho=function(e,t,n){var r=Oo(n,t-1),n=Oo(n,t+1);return Ao(Do,e)&&!Ao(Uo,n)||Ao(Uo,e)&&!Ao(Do,r)?"\\u"+Lo(To(e,0),16):e},Vo=function(e){if(_(e))return e;if(Lt(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?No(r,i):"number"!=typeof i&&"Number"!==Z(i)&&"String"!==Z(i)||No(r,I(i))}var o=r.length,s=!0;return function(e,t){if(s)return s=!1,t;if(Lt(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},Tr=(Ro&&O({target:"JSON",stat:!0,arity:3,forced:Hi||jo||!xo},{stringify:function(e,t,n){var r=Vo(t),i=[],o=Wo(e,function(e,t){e=_(r)?E(r,this,Eo(e),t):t;return!xo&&function(e){if(R(e))return(e=mo(e))&&"RawJSON"===e.type}(e)?Bo+(No(i,e.rawJSON)-1):e},n);if("string"!=typeof o)return o;if(jo&&(o=Mo(o,Fo,Ho)),xo)return o;for(var s="",a=o.length,l=0;l<a;l++){var u,c,d=Oo(o,l);'"'===d?(u=function(e,t){for(var n=!0,r="";t<e.length;){var i=bo(e,t);if("\\"===i){var o=So(e,t,t+2);if(A(_o,o))r+=_o[o],t+=2;else{if("\\u"!==o)throw new yo('Unknown escape sequence: "'+o+'"');o=So(e,t+=2,t+4);if(!ko(Co,o))throw new yo("Bad Unicode escape at: "+t);r+=wo(vo(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(ko(Io,i))throw new yo("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new yo("Unterminated string at: "+t);return{value:r,end:t}}(o,++l).end-1,c=Po(o,l,u),s+=Po(c,0,zo)===Bo?i[Po(c,zo)]:'"'+c+'"',l=u):s+=d}return s}}),lr.f),Hi=m(function(){return!Object.getOwnPropertyNames(1)}),Zo=(O({target:"Object",stat:!0,forced:Hi},{getOwnPropertyNames:Tr}),Re("match")),Go=function(e){var t;return R(e)&&((t=e[Zo])!==undefined?!!t:"RegExp"===Z(e))},Yo=x.RegExp,Jo=!m(function(){var e=!0;try{Yo(".","d")}catch(G){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(Yo.prototype,"flags").get.call(n)!==i||r!==i}),qo=function(){var e=C(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Ko=RegExp.prototype,Xo=Jo?function(e){return e.flags}:function(e){return Jo||!ne(Ko,e)||A(e,"flags")?e.flags:E(qo,e)},$o=x.RegExp,Hi=m(function(){var e=$o("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),Tr=Hi||m(function(){return!$o("a","y").sticky}),Tr={BROKEN_CARET:Hi||m(function(){var e=$o("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:Tr,UNSUPPORTED_Y:Hi},Qo=Ve.f,es=x.RegExp,ts=m(function(){var e=es(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),ns=x.RegExp,rs=m(function(){var e=ns("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),Hi=St.f,is=rt.enforce,os=Re("match"),ss=x.RegExp,as=ss.prototype,ls=x.SyntaxError,us=y(as.exec),cs=y("".charAt),ds=y("".replace),hs=y("".indexOf),fs=y("".slice),ps=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,gs=/a/g,ms=/a/g,u=new ss(gs)!==gs,ys=Tr.MISSED_STICKY,vs=Tr.UNSUPPORTED_Y,u=h&&(!u||ys||ts||rs||m(function(){return ms[os]=!1,ss(gs)!==gs||ss(ms)===ms||"/a/i"!==String(ss(gs,"i"))}));if(Tt("RegExp",u)){for(var ws=function(e,t){var n,r,i=ne(as,this),o=Go(e),s=t===undefined,a=[],l=e;if(!i&&o&&s&&e.constructor===ws)return e;if((o||ne(as,e))&&(e=e.source,s)&&(t=Xo(l)),e=e===undefined?"":I(e),t=t===undefined?"":I(t),l=e,o=t=ts&&"dotAll"in gs&&(n=!!t&&-1<hs(t,"s"))?ds(t,/s/g,""):t,ys&&"sticky"in gs&&(r=!!t&&-1<hs(t,"y"))&&vs&&(t=ds(t,/y/g,"")),rs&&(e=(s=function(e){for(var t,n=e.length,r=0,i="",o=[],s=un(null),a=!1,l=!1,u=0,c="";r<n;r++){if("\\"===(t=cs(e,r))){if(t+=cs(e,++r),!l&&"\\"===cs(t,1)){i+="\\x5c";continue}}else if("]"===t)a=!1;else if(!a)switch(!0){case"["===t:a=!0;break;case"("===t:i+=t,us(ps,fs(e,r+1))?(r+=2,l=!0,u++):"?"!==cs(e,r+1)&&u++;continue;case">"===t&&l:if(""===c||A(s,c))throw new ls("Invalid capture group name");s[c]=!0,l=!(o[o.length]=[c,u]),c="";continue}l?c+=t:i+=t}for(var d=0;d<o.length;d++)for(var h="\\k<"+o[d][0]+">",f="\\"+o[d][1];-1<hs(i,h);)i=ds(i,h,f);return[i,o]}(e))[0],a=s[1]),s=Nr(ss(e,t),i?this:as,ws),(n||r||a.length)&&(t=is(s),n&&(t.dotAll=!0,t.raw=ws(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=cs(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+cs(e,++r);return i}(e),o)),r&&(t.sticky=!0),a.length)&&(t.groups=a),e!==l)try{Ze(s,"source",""===l?"(?:)":l)}catch(G){}return s},bs=Hi(ss),Ss=0;bs.length>Ss;)!function(e,t,n){n in e||Qo(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(ws,ss,bs[Ss++]);(as.constructor=ws).prototype=as,ot(x,"RegExp",ws,{constructor:!0})}Li("RegExp");var ks=rt.get,_s=t("native-string-replace",String.prototype.replace),Cs=RegExp.prototype.exec,Is=Cs,xs=y("".charAt),Es=y("".indexOf),Rs=y("".replace),As=y("".slice),Os=(u=/b*/g,E(Cs,Hi=/a/,"a"),E(Cs,u,"a"),0!==Hi.lastIndex||0!==u.lastIndex),Ts=Tr.BROKEN_CARET,Ms=/()??/.exec("")[1]!==undefined,Ps=function(e,t){for(var n=e.groups=un(null),r=0;r<t.length;r++){var i=t[r];n[i[0]]=e[i[1]]}},Ns=Is=Os||Ms||Ts||ts||rs?function(e){var t,n,r,i,o,s,a,l=this,u=ks(l),e=I(e),c=u.raw;return c?(c.lastIndex=l.lastIndex,n=E(Is,c,e),l.lastIndex=c.lastIndex,n&&u.groups&&Ps(n,u.groups),n):(c=u.groups,n=Ts&&l.sticky,u=E(qo,l),r=l.source,i=0,o=e,n&&(u=Rs(u,"y",""),-1===Es(u,"g")&&(u+="g"),o=As(e,l.lastIndex),s=0<l.lastIndex&&xs(e,l.lastIndex-1),0<l.lastIndex&&(!l.multiline||(l.multiline,"\n"!==s&&"\r"!==s&&"\u2028"!==s&&"\u2029"!==s))&&(r="(?: (?:"+r+"))",o=" "+o,i++),s=new RegExp("^(?:"+r+")",u)),Ms&&(s=new RegExp("^"+r+"$(?!\\s)",u)),Os&&(t=l.lastIndex),a=E(Cs,n?s:l,o),n?a?(a.input=e,a[0]=As(a[0],i),a.index=l.lastIndex,l.lastIndex+=a[0].length):l.lastIndex=0:Os&&a&&(l.lastIndex=l.global?a.index+a[0].length:t),Ms&&a&&1<a.length&&E(_s,a[0],s,function(){for(var e=1;e<arguments.length-2;e++)arguments[e]===undefined&&(a[e]=undefined)}),a&&c&&Ps(a,c),a)}:Is;O({target:"RegExp",proto:!0,forced:/./.exec!==Ns},{exec:Ns});var Ls=rt.get,Fs=RegExp.prototype,Ds=TypeError;h&&Tr.MISSED_STICKY&&Jn(Fs,"sticky",{configurable:!0,get:function(){if(this!==Fs){if("RegExp"===Z(this))return!!Ls(this).sticky;throw new Ds("Incompatible receiver, RegExp required")}}});Us=!1,(t=/[ac]/).exec=function(){return Us=!0,/./.exec.apply(this,arguments)};var Us,Hi=!0===t.test("abc")&&Us,Bs=/./.test,u=(O({target:"RegExp",proto:!0,forced:!Hi},{test:function(e){var t=C(this),e=I(e),n=t.exec;return _(n)?null!==(n=E(n,t,e))&&(C(n),!0):E(Bs,t,e)}}),Ge.PROPER),t=RegExp.prototype,zs=t.toString,Hi=m(function(){return"/a/b"!==zs.call({source:"a",flags:"b"})}),u=u&&"toString"!==zs.name,js=((Hi||u)&&ot(t,"toString",function(){var e=C(this);return"/"+I(e.source)+"/"+I(Xo(e))},{unsafe:!0}),Re("species")),Ws=RegExp.prototype,Hi=function(r,e,t,n){var s,i=Re(r),a=!m(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=a&&!m(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[js]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});a&&o&&!t||(s=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===Ns||o===Ws.exec?a&&!i?{done:!0,value:E(s,t,n,r)}:{done:!0,value:E(e,n,t,r)}:{done:!1}}),ot(String.prototype,r,o[0]),ot(Ws,i,o[1])),n&&Ze(Ws[i],"sham",!0)},Hs=l.charAt,Vs=function(e,t,n){return t+(n&&Hs(e,t).length||1)},Zs=Math.floor,Gs=y("".charAt),Ys=y("".replace),Js=y("".slice),qs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ks=/\$([$&'`]|\d{1,2})/g,Xs=TypeError,$s=function(e,t){var n=e.exec;if(_(n))return null!==(n=E(n,e,t))&&C(n),n;if("RegExp"===Z(e))return E(Ns,e,t);throw new Xs("RegExp#exec called on incompatible receiver")},Qs=Re("replace"),ea=Math.max,ta=Math.min,na=y([].concat),ra=y([].push),ia=y("".indexOf),oa=y("".slice),u="$0"==="a".replace(/./,"$0"),sa=!!/./[Qs]&&""===/./[Qs]("a","$0"),t=(Hi("replace",function(e,b,S){var k=sa?"$":"$0";return[function(e,t){var n=$(this),r=R(e)?fe(e,Qs):undefined;return r?E(r,e,n,t):E(b,I(n),e,t)},function(e,t){var n=C(this),r=I(e),i=_(t),e=(i||(t=I(t)),I(Xo(n)));if("string"==typeof t&&!~ia(t,k)&&!~ia(t,"$<")&&!~ia(e,"y")){var o=S(b,n,r,t);if(o.done)return o.value}var s,a=!!~ia(e,"g");a&&(s=!!~ia(e,"u")||!!~ia(e,"v"),n.lastIndex=0);for(var l,u=[];null!==(l=$s(n,r))&&(ra(u,l),a);)""===I(l[0])&&(n.lastIndex=Vs(r,pt(n.lastIndex),s));for(var c,d="",h=0,f=0;f<u.length;f++){for(var p=I((l=u[f])[0]),g=ea(ta(ut(l.index),r.length),0),m=[],y=1;y<l.length;y++)ra(m,(c=l[y])===undefined?c:String(c));var v=l.groups,w=i?(w=na([p],m,g,r),v!==undefined&&ra(w,v),I(go(t,undefined,w))):function(o,s,a,l,u,e){var c=a+o.length,d=l.length,t=Ks;return u!==undefined&&(u=we(u),t=qs),Ys(e,t,function(e,t){var n;switch(Gs(t,0)){case"$":return"$";case"&":return o;case"`":return Js(s,0,a);case"'":return Js(s,c);case"<":n=u[Js(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(d<i)return 0!==(r=Zs(i/10))&&r<=d?l[r-1]===undefined?Gs(t,1):l[r-1]+Gs(t,1):e;n=l[i-1]}return n===undefined?"":n})}(p,r,g,m,v,t);h<=g&&(d+=oa(r,h,g)+w,h=g+p.length)}return d+oa(r,h)}]},!!m(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!u||sa),!vn("flatMap",function(){})),aa=!t&&Zn("flatMap",TypeError),u=t||aa||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e["return"]()}catch(G){return!0}}(),la=Cn(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=C(E(t.next,t.iterator))).done)return e.value;this.inner=null}catch(G){Sr(n,"throw",G)}if(e=C(E(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||C(e);t=vr(e);return Xr(C(t!==undefined?E(t,e):e))}(r(e.value,this.counter++),!1)}catch(G){Sr(n,"throw",G)}}}),ua=(O({target:"Iterator",proto:!0,real:!0,forced:u},{flatMap:function(e){C(this);try{he(e)}catch(G){Sr(this,"throw",G)}return aa?E(aa,this,e):new la(Xr(this),{mapper:e,inner:null})}}),Zn("some",TypeError));O({target:"Iterator",proto:!0,real:!0,forced:ua},{some:function(n){C(this);try{he(n)}catch(G){Sr(this,"throw",G)}var e,r;return ua?E(ua,this,n):(e=Xr(this),Ir(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}});ga.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},ga.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},ga.prototype.one=function(e,t){this.on(e,t,1)},ga.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(a){}}return null}},ga.prototype.clear=function(){this.eventsList={}};var ca,da=ga,ha=function(e){try{return localStorage.getItem(e)}catch(Oy){return null}},fa=function(e,t){try{localStorage.setItem(e,t)}catch(Oy){}},pa=function(e,t){try{return e?JSON.parse(e):t}catch(Oy){return t}};function ga(){var s=this;this.emit=function(e,t){if(s){var n;if(null!=(r=s.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(s,[t]);if(1===n.type&&s.remove(e,n.callback),!1===o)break}catch(h){throw h}}return s}},this.eventsList={}}(vn=ca=ca||{})[vn.number=-1]="number",vn.string="";var ma,ya,va=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?ca.string:ca.number},wa=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},ba=function(e,t){return void 0===t&&(t=2048),String(e).replace($i,"").slice(0,t)},Sa=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},ka=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],_a=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,Ca=["ret","retcode","code","errcode"],Ia=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?ro:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:ro,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(Ca=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Ca.indexOf(e.toLowerCase())});return s.length?{code:""+(o="未知"!==(o=e[s[0]])&&""!==o?o:ro),isErr:0!==o&&"0"!==o&&o!==ro}:{code:ro,isErr:!1}}catch(U){return{code:ro,isErr:!1}}},xa=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return Oa(r).slice(0,10240)}catch(a){return""}},Ea=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===hi(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},Ra=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,Ea(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,Ea(),2)||"undefined"}catch(o){return"error happen when tdem stringify: \n "+o.message+" \n "+o.stack}},Aa=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,Ea())||"undefined"}catch(o){return"error happen when tdem stringify: \n "+o.message+" \n "+o.stack}},Oa=function(n,r){void 0===r&&(r=3);var i,o,s,a="";return Array.isArray(n)?(a+="[",i=n.length,n.forEach(function(e,t){"object"===hi(e)&&1<r?a+=Oa(e,r-1):a+=Ma(e),a+=t===i-1?"":","}),a+="]"):n instanceof Object||"object"===hi(n)?(a="{",o=Object.keys(n),s=o.length,o.forEach(function(e,t){"object"===hi(n[e])&&1<r?a+='"'+e+'":'+Oa(n[e],r-1):a+=Ta(e,n[e]),a+=t===s-1||t<s-1&&"undefined"==typeof n[o[t+1]]?"":","}),a+="}"):a+=n,a},Ta=function(e,t){var n=hi(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===hi(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},Ma=function(e){var t=hi(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},Pa=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},Na=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=Pa(e);r[e.type].push(t)}):(n=Pa(e),r[e.type].push(n)),i.append("payload",Aa(p({duration:r},t))),i},La=/data:(image|text|application|font)\/.*;base64/,Fa=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||La.test(t)||Qi.some(function(e){return-1<t.indexOf(e)})},Da=(0,0,(t=ma=ma||{}).LOG="log",t.SPEED="speed",t.PERFORMANCE="performance",t.OFFLINE="offline",t.WHITE_LIST="whiteList",t.VITALS="vitals",t.PV="pv",t.CUSTOM_PV="customPV",t.EVENT="event",t.CUSTOM="custom",t.SDK_ERROR="sdkError",t.SET_DATA="setData",t.LOAD_PACKAGE="loadPackage",t.MEMORY="memory",(Cn=ya=ya||{}).production="production",Cn.development="development",Cn.gray="gray",Cn.pre="pre",Cn.daily="daily",Cn.local="local",Cn.test="test",Cn.others="others","\t\n\x0B\f\r                 \u2028\u2029\ufeff"),Ua=y("".replace),Ba=RegExp("^["+Da+"]+"),za=RegExp("(^|[^"+Da+"])["+Da+"]+$"),u=function(t){return function(e){e=I($(e));return 1&t&&(e=Ua(e,Ba,"")),e=2&t?Ua(e,za,"$1"):e}},vn={start:u(1),end:u(2),trim:u(3)},ja=vn.trim,Wa=x.parseInt,t=x.Symbol,Ha=t&&t.iterator,Va=/^[+-]?0x/i,Za=y(Va.exec),u=8!==Wa(Da+"08")||22!==Wa(Da+"0x16")||Ha&&!m(function(){Wa(Object(Ha))})?function(e,t){e=ja(I(e));return Wa(e,t>>>0||(Za(Va,e)?16:10))}:Wa,Ga=(O({global:!0,forced:parseInt!==u},{parseInt:u}),TypeError),Ya=function(e){if(Go(e))throw new Ga("The method doesn't accept regular expressions");return e},Ja=Re("match"),t=function(e){var t=/./;try{"/./"[e](t)}catch(s){try{return t[Ja]=!1,"/./"[e](t)}catch(F){}}return!1},qa=y("".indexOf);O({target:"String",proto:!0,forced:!t("includes")},{includes:function(e){return!!~qa(I($(this)),I(Ya(e)),1<arguments.length?arguments[1]:undefined)}});var f,Ka,Xa=y("".indexOf);function $a(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function Qa(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,s,a,l,u,c=i[r],d=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);d?(o=d[1],s=d[2],a=d[3],l=d[4],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,"function":o||"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++})):(d=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(s=d[1],a=d[2],l=d[3],u=s.split("/").pop()||s,t.push({abs_path:s,colno:parseInt(l,10),filename:u,"function":"(anonymous)",lineno:parseInt(a,10),in_app:s.includes("node_modules")||s.includes("cdn")?0:1,stack_level:n++}))}return t}Hi("match",function(r,a,l){return[function(e){var t=$(this),n=R(e)?fe(e,r):undefined;return n?E(n,e,t):new RegExp(e)[r](I(t))},function(e){var t=C(this),n=I(e),e=l(a,t,n);if(e.done)return e.value;e=I(Xo(t));if(!~Xa(e,"g"))return $s(t,n);for(var r=!!~Xa(e,"u")||!!~Xa(e,"v"),i=[],o=t.lastIndex=0;null!==(s=$s(t,n));){var s=I(s[0]);""===(i[o]=s)&&(t.lastIndex=Vs(n,pt(t.lastIndex),r)),o++}return 0===o?null:i}]}),(u=f=f||{}).JS_ERROR="js_error",u.PROMISE_ERROR="promise_error",u.RESOURCE_ERROR="resource_error",u.API_ERROR="api_error",u.PAGE_LOAD="page_load",u.RESOURCE_LOAD="resource_load",u.API_CALL="api_call",u["true"]="web_vitals",u.CLICK="click",u.PAGE_VIEW="page_view",u.FORM_FOCUS="form_focus",u.FORM_BLUR="form_blur",u.FORM_CHANGE="form_change",u.FORM_SUBMIT="form_submit",u.FORM_SUBMIT_RESULT="form_submit_result",u.STRUGGLE="struggle",u.CUSTOM="custom",u.LOG="log",(u=Ka=Ka||{}).ERROR="error",u.PERFORMANCE="performance",u.BEHAVIOR="behavior",u.NETWORK="network",u.LOG="log",u.CUSTOM="custom";var el=TypeError,tl="Reduce of empty array with no initial value",u=function(u){return function(e,t,n,r){var i=we(e),o=q(i),s=gt(i);if(he(t),0===s&&n<2)throw new el(tl);var a=u?s-1:0,l=u?-1:1;if(n<2)for(;;){if(a in o){r=o[a],a+=l;break}if(a+=l,u?a<0:s<=a)throw new el(tl)}for(;u?0<=a:a<s;a+=l)a in o&&(r=t(r,o[a],a,i));return r}},u={left:u(!1),right:u(!0)},c=function(e){return re.slice(0,e.length)===e},nl=c("Bun/")?"BUN":c("Cloudflare-Workers")?"CLOUDFLARE":c("Deno/")?"DENO":c("Node.js/")?"NODE":x.Bun&&"string"==typeof Bun.version?"BUN":x.Deno&&"object"==typeof Deno.version?"DENO":"process"===Z(x.process)?"NODE":x.window&&x.document?"BROWSER":"REST",rl="NODE"==nl,il=u.left,c=!rl&&79<ie&&ie<83||!Gt("reduce"),ol=(O({target:"Array",proto:!0,forced:c},{reduce:function(e){var t=arguments.length;return il(this,e,t,1<t?arguments[1]:undefined)}}),TypeError),c=m(function(){[].keys().reduce(function(){},undefined)}),sl=!c&&Zn("reduce",ol),al=(O({target:"Iterator",proto:!0,real:!0,forced:c||sl},{reduce:function(t){C(this);try{he(t)}catch(G){Sr(this,"throw",G)}var n=arguments.length<2,r=n?undefined:arguments[1];if(sl)return go(sl,this,n?[t]:[t,r]);var e=Xr(this),i=0;if(Ir(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new ol("Reduce of empty iterator with no initial value");return r}}),Zn("find",TypeError)),ll=(O({target:"Iterator",proto:!0,real:!0,forced:al},{find:function(n){C(this);try{he(n)}catch(G){Sr(this,"throw",G)}var e,r;return al?E(al,this,n):(e=Xr(this),Ir(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),TypeError),ul=function(e,t){if(e<t)throw new ll("Not enough arguments");return e},cl=x.Function,dl=/MSIE .\./.test(re)||"BUN"==nl&&((c=x.Bun.version.split(".")).length<3||"0"===c[0]&&(c[1]<3||"3"===c[1]&&"0"===c[2])),Zn=function(o,s){var a=s?2:1;return dl?function(e,t){var n=ul(arguments.length,1)>a,r=_(e)?e:cl(e),i=n?or(arguments,a):[],e=n?function(){go(r,this,i)}:r;return s?o(e,t):o(e)}:o},c=Zn(x.setInterval,!0),c=(O({global:!0,bind:!0,forced:x.setInterval!==c},{setInterval:c}),Zn(x.setTimeout,!0)),hl=(O({global:!0,bind:!0,forced:x.setTimeout!==c},{setTimeout:c}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),fl=RangeError,pl=Math.floor,Zn=function(e){var t=I($(this)),n="",r=ut(e);if(r<0||r===Infinity)throw new fl("Wrong number of repetitions");for(;0<r;(r=pl(r/2))&&(t+=t))r%2&&(n+=t);return n},gl=(O({target:"String",proto:!0},{repeat:Zn}),{}),ml={},yl=function(e){return gl[e]||(gl[e]=setTimeout(function(){ml[e]={},gl[e]=null},6e4)),gl[e]},vl=function(c,d){return function(i,o){var s,a,l,u,e,t,n;null!=i&&i.log&&null!=i&&i.type?(a=function(e,t){var n,r,t=p(p({},c.bean),{from:t}),i=p({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(s){}}()?Na(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(p({duration:r},e)),i)},l=function(e,t,n,r){switch(t){case ma.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),s={};return o.forEach(function(t){s[t]=i.map(function(e){return e[t]||""})}),s.count=i.length,Aa(s);case ma.SPEED:return a(e,n);case ma.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(u={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,u[t]||(u[t]=[]),u[t].push(e)}),Object.keys(u).forEach(function(e){var t,n=u[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(p(p({},i),{url:t,log:1===n.length?n[0]:n,data:l(n,d,e,i.data)}))):(t=i.url+r+"from="+e,o(p(p({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:Xi(i.beanFilter||[],["from"]),data:l(n,d,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(s=i.url)&&s.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(p(p({},i),{url:n,log:e,beanFilter:Xi(i.beanFilter||[],["from"]),data:l(e,d,t,i.data)}))):(n=""+i.url,o(p(p({},i),{url:n,log:e,data:l(e,d,t,i.data)}))))):o(i)}},wl=function(l,u){return function(e,t){var n,r,i,o=Array.isArray(e),s=o?e:[e],a=(l.lifeCycle.emit("beforeRequest",e),l.config.beforeRequest);(s="function"==typeof a?s.map(function(e){try{var t=a({logs:e,logType:u});return(null==t?void 0:t.logType)===u&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(G){return e}}).filter(function(e){return!1!==e}):s).length&&(n=s,e=to,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),p(p({},t),e)}))),s=n,t(o?s:s[0]))}},bl=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===hi(r)&&"url"in r&&(e=r)}catch(G){console.error(G)}t(e)}},Sl=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},c=x,kl=y(1.1.valueOf),_l=St.f,Cl=Ue.f,Il=Ve.f,xl=vn.trim,El=x.Number,Rl=(c.Number,El.prototype),Al=x.TypeError,Ol=y("".slice),Tl=y("".charCodeAt),Ml=function(e){var t,n,r,i,o,s,a,l=Te(e,"number");if(le(l))throw new Al("Cannot convert a Symbol value to a number");if("string"==typeof l&&2<l.length)if(l=xl(l),43===(e=Tl(l,0))||45===e){if(88===(t=Tl(l,2))||120===t)return NaN}else if(48===e){switch(Tl(l,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+l}for(o=(i=Ol(l,2)).length,s=0;s<o;s++)if((a=Tl(i,s))<48||r<a)return NaN;return parseInt(i,n)}return+l},Pl=Tt("Number",!El(" 0o1")||!El("0b1")||El("+0x1")),Nl=function(e){var t,e=arguments.length<1?0:El(function(e){e=Te(e,"number");return"bigint"==typeof e?e:Ml(e)}(e));return ne(Rl,t=this)&&m(function(){kl(t)})?Nr(Object(e),this,Nl):e};if(Nl.prototype=Rl,Pl&&(Rl.constructor=Nl),O({global:!0,constructor:!0,wrap:!0,forced:Pl},{Number:Nl}),Pl)for(var Ll=c.Number,Fl=El,Dl,Ul=h?_l(Fl):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Bl=0;Ul.length>Bl;Bl++)A(Fl,Dl=Ul[Bl])&&!A(Ll,Dl)&&Il(Ll,Dl,Cl(Fl,Dl));var zl={generateTraceId:Wl(16),generateSpanId:Wl(8)},jl=Array(32);function Wl(t){return function(){for(var e=0;e<2*t;e++)jl[e]=Math.floor(16*Math.random())+48,58<=jl[e]&&(jl[e]+=39);return String.fromCharCode.apply(null,jl.slice(0,2*t))}}function Hl(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Vl,Zl=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Gl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Yl=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Jl=function(e){for(var t,n,r,i="",o=0,s=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=Gl.charAt((t=t<<16|n<<8|r)>>18&63)+Gl.charAt(t>>12&63)+Gl.charAt(t>>6&63)+Gl.charAt(63&t)}return s?i.slice(0,s-3)+"===".substring(s):i},ql=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!Yl.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=Gl.indexOf(e.charAt(o++))<<18|Gl.indexOf(e.charAt(o++))<<12|(n=Gl.indexOf(e.charAt(o++)))<<6|(r=Gl.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},Kl=(tu.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},tu.prototype.createTraceparent=function(){var e=zl.generateSpanId();return"00-"+zl.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},tu.prototype.createB3=function(){var e=zl.generateSpanId();return zl.generateTraceId()+"-"+e+"-"+this.traceFlag},tu.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Jl,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Zl(),i=Zl();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.1"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},tu.prototype.createSentryTrace=function(){var e=Hl().substring(16);return Hl()+"-"+e+"-"+this.traceFlag},tu.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},tu.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},tu.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},tu),Xl={sw8:function(e){var t="function"==typeof atob?atob:ql,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},$l=function(e){var t,n="";return n="object"===hi(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Xl)))[0])?Xl[t](e[1]):n},Ql=Ge.PROPER,eu=vn.trim;function tu(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function nu(o){return function(e){e&&0!==e.length&&o.sendPipeline([function(t,e){var n,r,i={protocol_version:2,project_key:String(o.config.id||""),sdk:{name:"tdem-web-sdk",version:lu.version},app:{version:String(o.config.version||"1.0.0")},context:(n=o,i=String((null==(r=null==(i=null==(r=n.sessionManager)?void 0:r.getSession)?void 0:i.call(r))?void 0:r.id)||n.bean.sessionId||""),r=String(n.config.uin||""),n={session_id:i,platform:(i=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","android","ios","unknown"].includes(i)?i:["wx","my","qq","tt"].includes(i)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},r&&(n.user_id=r),"undefined"!=typeof navigator&&(n.user_agent=navigator.userAgent,n.language=navigator.language),"undefined"!=typeof screen&&(n.screen_resolution=screen.width+"x"+screen.height),n),events:t};e({url:(o.config.apiUrl||o.config.url)+"/api/v1/collect/events",data:JSON.stringify(i),method:"POST",contentType:"application/json",addBean:!1,type:ma.EVENT,log:t,success:function(){o.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){o.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],ma.EVENT)(e)}}O({target:"String",proto:!0,forced:(Vl="trim",m(function(){return!!Da[Vl]()||"​…᠎"!=="​…᠎"[Vl]()||Ql&&Da[Vl].name!==Vl}))},{trim:function(){return eu(this)}});var ru=function(){},iu=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||ru)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=ru),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},ou=(O({target:"Object",stat:!0,sham:!h},{getOwnPropertyDescriptors:function(e){for(var t,n,r=Q(e),i=Ue.f,o=Ct(r),s={},a=0;o.length>a;)(n=i(r,t=o[a++]))!==undefined&&$t(s,t,n);return s}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),su={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},au={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},lu=(d.use=function(e){-1===d.installedPlugins.indexOf(e)&&e.tdemPlugin&&d.installedPlugins.push(e)},d.unuse=function(e){e=d.installedPlugins.indexOf(e);-1!==e&&d.installedPlugins.splice(e,1)},d.prototype.init=function(e){var t;this.setConfig(e),this.config=(t=this.config,e=e.hostUrl,t.url=""+(e="string"!=typeof(e=void 0===e?"https://rumt-zh.com":e)?"https://rumt-zh.com":e),t.offlineUrl=e+"/offline",t.whiteListUrl=e+"/collect/whitelist",t.pvUrl=e+"/collect/pv",t.eventUrl=e+"/collect/events",t.speedUrl=e+"/speed",t.customTimeUrl=e+"/speed/custom",t.performanceUrl=e+"/speed/performance",t.performanceUrlForHippy=e+"/speed/hippyPerformance",t.webVitalsUrl=e+"/speed/webvitals",t.setDataReportUrl=e+"/speed/miniProgramData",t);for(var n=0;n<d.installedPlugins.length;n++)try{d.installedPlugins[n].patch(this)}catch(F){this.sendSDKError(F)}this.lifeCycle.emit("onInited")},d.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=d.instances.indexOf(this);-1!==r&&d.instances.splice(r,1);for(var i=d.installedPlugins.length-1;0<=i;i--)try{d.installedPlugins[i].unpatch(this)}catch(B){this.sendSDKError(B)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&ou(o,this),o=Object.getPrototypeOf(o););0===d.instances.length&&(r=Object.getPrototypeOf(this).constructor,ou(r),ou(d))}},d.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.ext1,o=e.ext2,s=e.ext3,a=e.aid,l=e.env,u=void 0===l?"production":l,l=e.pageUrl,e=this.bean.id!==t||this.bean.uin!==n||this.bean.aid!==a;return this.bean.id=t||"",this.bean.uin=n||"",this.bean.version=r||"1.0.1",this.bean.aid=a||"",this.bean.env=function(){switch(u){case ya.production:case ya.development:case ya.gray:case ya.pre:case ya.daily:case ya.local:case ya.test:case ya.others:return 1;default:return}}()?u:ya.others,l&&this.extendBean("from",encodeURIComponent(l.slice(0,2048))),i&&this.extendBean("ext1",encodeURIComponent(i)),o&&this.extendBean("ext2",encodeURIComponent(o)),s&&this.extendBean("ext3",encodeURIComponent(s)),e&&this.lifeCycle.emit("onConfigChange",this.config),this.config},d.prototype.extendBean=function(e,t){this.bean[e]=t},d.prototype.send=function(e,i,o){var t=this;return iu([bl(this),vl(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},Sl(this)])(e)},d.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(Ra(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.1)",addBean:!1,method:"get",type:ma.SDK_ERROR,log:e})}],ma.SDK_ERROR)(e)},d.prototype.sendPipeline=function(e,t){var n,o=this;return iu(Xi([function(e,t){if(e&&e.type===ma.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},wl(n=this,t)],e,[vl(this,t),bl(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,Xi([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,Xi([r],t))})},Sl(this)]))},d.prototype.validateRange=function(e){return 0<=e&&e<=127?e:-1},d.prototype.reportEvent=function(e){e&&((e="string"==typeof e?{name:e,ext1:this.config.ext1||"",ext2:this.config.ext2||"",ext3:this.config.ext3||"",originFrom:this.getOriginFrom()}:p(p({},e),{originFrom:e.originFrom||this.getOriginFrom()})).name?("string"!=typeof e.name&&(console.warn("reportEvent params name must be string"),e.name=String(e.name)),e={event_id:$a(),event_type:f.CUSTOM,event_category:Ka.CUSTOM,timestamp:Date.now(),page_url:e.originFrom||"",data:{event_name:e.name,tags:{ext1:String(e.ext1||"").slice(0,1024),ext2:String(e.ext2||"").slice(0,1024),ext3:String(e.ext3||"").slice(0,1024),ext4:String(e.ext4||""),ext5:String(e.ext5||""),ext6:String(e.ext6||""),ext7:String(e.ext7||""),ext8:String(e.ext8||""),ext9:String(e.ext9||""),ext10:String(e.ext10||"")}}},this.reportTDEMEvent(e)):console.warn("reportEvent params error"))},d.prototype.reportTDEMEvent=function(e){var t=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){return p(p({},e),{page_url:e.page_url||t.getCurrentEventPageUrl()})}),this.lifeCycle.emit("tdemEventCreated",e),this.tdemEventPipeline(e))},d.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:su[r],n="number"==typeof e.weight?e.weight:au[r],r={event_id:$a(),event_type:f.STRUGGLE,event_category:Ka.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getCurrentReplayId()||undefined,tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()}}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},d.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:$a(),event_type:f.FORM_SUBMIT_RESULT,event_category:Ka.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getCurrentReplayId()||undefined,tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},d.prototype.setPage=function(e,t){var n,r,i;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,i=Date.now(),r=this.getCurrentReplayId()||undefined,i={event_id:$a(),event_type:f.PAGE_VIEW,event_category:Ka.BEHAVIOR,timestamp:i,page_url:e,data:{page_title:(null==t?void 0:t.pageTitle)||"",replay_id:r,tags:p({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{}),event_properties:{navigation_type:"push",from_page:(n||"").slice(0,512),to_page:e.slice(0,512),is_first_visit:"0"}}},this.reportTDEMEvent(i),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},d.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},d.prototype.infoTDEM=function(e,t){e={event_id:$a(),event_type:f.CUSTOM,event_category:Ka.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(),data:{event_name:"info",replay_id:this.getCurrentReplayId()||undefined,tags:p({message:e},t)}};this.reportTDEMEvent(e)},d.prototype.errorTDEM=function(e,t){e="string"==typeof e?new Error(e):e,e={event_id:$a(),event_type:f.JS_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:Qa(e),replay_id:this.getCurrentReplayId()||undefined,tags:t||{}}};this.reportTDEMEvent(e)},d.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(N){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},d.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},d.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},d.prototype.sanitizeEventTags=function(n){var r;return n&&"object"===hi(n)&&(r={},Object.keys(n).forEach(function(e){var t=n[e];t!==undefined&&null!==t&&(r[e]=String(t).slice(0,1024))}),Object.keys(r).length)?r:undefined},d.prototype.sanitizeEventPayload=function(n,e){var r;return n&&"object"===hi(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=n[e])!==undefined&&null!==t&&("string"==typeof t?r[e]=t.slice(0,256):"number"==typeof t||"boolean"==typeof t?r[e]=t:Array.isArray(t)?r[e]=t.slice(0,10).map(function(e){return"string"==typeof e?e.slice(0,256):"number"==typeof e||"boolean"==typeof e?e:String(e).slice(0,256)}):r[e]=String(t).slice(0,256))}),Object.keys(r).length)?r:undefined},d.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(Xi(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},d.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},d.prototype.reportT=function(e){var t=e.name,n=e.duration,r=e.ext1,r=void 0===r?"":r,i=e.ext2,i=void 0===i?"":i,o=e.ext3,o=void 0===o?"":o,s=e.ext4,a=e.ext5,l=e.ext6,u=e.ext7,c=e.ext8,d=e.ext9,h=e.ext10,e=e.from;if("string"==typeof t&&"number"==typeof n&&"string"==typeof r&&"string"==typeof i&&"string"==typeof o){if(!(n<0||2147483646<n))return this.submitCustomTime(t,n,r,i,o,void 0===s?"":s,void 0===a?"":a,void 0===l?"":l,void 0===u?"":u,void 0===c?"":c,void 0===d?"":d,void 0===h?"":h,void 0===e?"":e);console.warn("reportTime: duration must between 0 and 2147483646")}else console.warn("reportTime: params error")},d.prototype.reportTime=function(e,t){if("object"===hi(e))return this.reportT(e);"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("reportTime: duration must between 0 and 2147483646"):this.submitCustomTime(e,t):console.warn("reportTime: second param must be number"):console.warn("reportTime: first param must be a string")},d.prototype.time=function(e){"string"==typeof e?this.timeMap[e]?console.warn("Timer "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("time: first param must be a string")},d.prototype.timeEnd=function(e){var t;"object"!==hi(e)||null===e?"string"==typeof e?(t=this.getTimeEventDuration(e))!==undefined?(this.submitCustomTime(e,t),delete this.timeMap[e]):console.warn("Timer "+e+" does not exist"):console.warn("timeEnd: first param must be a string"):(t=this.getTimeEventDuration(e.name))!==undefined?(this.reportT(p(p({},e),{duration:t})),delete this.timeMap[e.name]):console.warn("Timer "+e.name+" does not exist")},d.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},d.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},d.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},d.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(d.prototype,"__version__",{get:function(){return"1.0.1"},enumerable:!1,configurable:!0}),d.prototype.reportPv=function(e){e&&console.warn("reportPv is deprecated, please use reportEvent")},d.prototype.submitCustomTime=function(e,t,n,r,i,o,s,a,l,u,c,d,h){n={ext1:String(n||this.config.ext1||"").slice(0,1024),ext2:String(r||this.config.ext2||"").slice(0,1024),ext3:String(i||this.config.ext3||"").slice(0,1024)},o&&(n.ext4=String(o||this.config.ext4||"")),s&&(n.ext5=String(s||this.config.ext5||"")),a&&(n.ext6=String(a||this.config.ext6||"")),l&&(n.ext7=String(l||this.config.ext7||"")),u&&(n.ext8=String(u||this.config.ext8||"")),c&&(n.ext9=String(c||this.config.ext9||"")),d&&(n.ext10=String(d||this.config.ext10||"")),h&&(n.from=h),i={event_id:$a(),event_type:f.CUSTOM,event_category:Ka.CUSTOM,timestamp:Date.now(),page_url:(null==(r=this.getOriginFrom)?void 0:r.call(this))||"",data:{event_name:e,measurements:{duration:t},tags:n}};this.reportTDEMEvent(i)},d.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},d.version="1.0.1",d.instances=[],d.environment=ya,d.installedPlugins=[],d),uu=Function,cu=y([].concat),du=y([].join),hu={},Pl=U?uu.bind:function(t){var n=he(this),e=n.prototype,r=or(arguments,1),i=function(){var e=cu(r,or(arguments));return this instanceof i?function(e,t,n){if(!A(hu,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";hu[t]=uu("C,a","return new C("+du(r,",")+")")}return hu[t](e,n)}(n,e.length,e):n.apply(t,e)};return R(e)&&(i.prototype=e),i};function d(e){var n,r,i,o,t,s,a,l;this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,hostUrl:"https://rumt-zh.com",env:"production",url:"",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:"",reportImmediately:!0,tdemConfig:!0},this.isWhiteList=!1,this.lifeCycle=new da,this.bean={},this._customPageUrl=null,this.tdemEventPipeline=iu([(r=n=!1,i=[],this._tdemSampleGate={decide:function(e){n=!0,(r=e)&&i.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),i=[]},reDecide:function(e){return r=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return r}},function(e,t){n?r&&t(e):i.length<1e3&&i.push({event:e,resolve:t})}),(t=100,a=Math.max(Number(t)||1,1),l=[],function(e,t){var e=Array.isArray(e)?e:[e],n=(l.push.apply(l,e),function(){for(;0<l.length;)t(l.splice(0,a))});clearTimeout(s),a<=l.length?n():s=setTimeout(function(){0<l.length&&n()},5e3)}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(o.lifeCycle.emit("beforeReport",r),o.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(m){t(e)}},nu(o=this)]),this.timeMap={},this.failRequestCount=0,d.instances.push(this)}O({target:"Function",proto:!0,forced:Function.bind!==Pl},{bind:Pl});_u.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},_u.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},_u.prototype.countInstance=function(){return this.instances.length},_u.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},_u.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},_u.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==hi(e))||!!e},_u.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},_u.prototype.exist=function(e){return-1===this.instances.indexOf(e)},_u.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},_u.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))};var _l=_u,vn=new _l({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Zl(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(s){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),fu=RangeError,pu=String,gu=Math.floor,mu=y(Zn),yu=y("".slice),vu=y(1.1.toFixed),wu=function(e,t,n){return 0===t?n:t%2==1?wu(e,t-1,n*e):wu(e*e,t/2,n)},bu=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=gu(i/1e7)},Su=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=gu(r/t),r=r%t*1e7},ku=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=pu(e[n]),r=""===r?t:r+mu("0",7-t.length)+t);return r},Pl=m(function(){return"0.000"!==vu(8e-5,3)||"1"!==vu(.9,0)||"1.25"!==vu(1.255,2)||"1000000000000000128"!==vu(0xde0b6b3a7640080,0)})||!m(function(){vu({})});function _u(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}O({target:"Number",proto:!0,forced:Pl},{toFixed:function(e){var t,n,r,i=kl(this),e=ut(e),o=[0,0,0,0,0,0],s="",a="0";if(e<0||20<e)throw new fu("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return pu(i);if(i<0&&(s="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*wu(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*wu(2,-t,1):i/wu(2,t,1),r*=4503599627370496,0<(t=52-t)){for(bu(o,0,r),n=e;7<=n;)bu(o,1e7,0),n-=7;for(bu(o,wu(10,n,1),0),n=t-1;23<=n;)Su(o,1<<23),n-=23;Su(o,1<<n),bu(o,1,1),Su(o,2),a=ku(o)}else bu(o,0,r),bu(o,1<<-t,0),a=ku(o)+mu("0",e);return 0<e?s+((r=a.length)<=e?"0."+mu("0",e-r)+a:yu(a,0,r-e)+"."+yu(a,r-e)):s+a}});var Cu=function(t){return"string"!=typeof t||!t||eo.some(function(e){return-1<t.indexOf(e)})||Qi.some(function(e){return-1<t.indexOf(e)})},Iu=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function xu(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var Eu=new _l({name:"reportAssetSpeed"}),Zn=Eu=new _l({name:"reportAssetSpeed",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){return e.getCurrentPageUrl()},onNewTdem:function(e){var t=this;Iu()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:$a(),event_type:f.RESOURCE_LOAD,event_category:Ka.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:xu(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var s=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(s.initiatorType)||Fa(s.name,n.hostUrl)||this.publish(this.generateLog(s,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===Eu.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===Eu.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,s=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=s.api)?void 0:e.resourceTypeHandler)?null==(e=s.api)?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),Fa(t,s.hostUrl))||(n=o.getFromParam(i),r={url:ba(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:Sa(t),urlQuery:wa(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===Eu.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:ba(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:Sa(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:wa(e.name,!0),domainLookup:va(e.domainLookupEnd-e.domainLookupStart),connectTime:va(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Iu()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}}),Ru=Qt.findIndex,Au=!0;"findIndex"in[]&&Array(1).findIndex(function(){Au=!1}),O({target:"Array",proto:!0,forced:Au},{findIndex:function(e){return Ru(this,e,1<arguments.length?arguments[1]:undefined)}}),e("findIndex"),r("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},qr);var Ou,Tu,Mu=TypeError,Pu=function(e){if(Jt(e))return e;throw new Mu(ce(e)+" is not a constructor")},Nu=Re("species"),Lu=function(e,t){var e=C(e).constructor;return e===undefined||K(e=C(e)[Nu])?t:Pu(e)},Pl=/ipad|iphone|ipod/i.test(re)&&/applewebkit/i.test(re),e=x.setImmediate,qr=x.clearImmediate,Fu=x.process,Du=x.Dispatch,Uu=x.Function,r=x.MessageChannel,Bu=x.String,zu=0,ju={},Wu=(m(function(){Ou=x.location}),function(e){var t;A(ju,e)&&(t=ju[e],delete ju[e],t())}),Hu=function(e){return function(){Wu(e)}},g=function(e){Wu(e.data)},v=function(e){x.postMessage(Bu(e),Ou.protocol+"//"+Ou.host)},r=(e&&qr||(e=function(e){ul(arguments.length,1);var t=_(e)?e:Uu(e),n=or(arguments,1);return ju[++zu]=function(){go(t,undefined,n)},Tu(zu),zu},qr=function(e){delete ju[e]},rl?Tu=function(e){Fu.nextTick(Hu(e))}:Du&&Du.now?Tu=function(e){Du.now(Hu(e))}:r&&!Pl?(Zu=(r=new r).port2,r.port1.onmessage=g,Tu=Nt(Zu.postMessage,Zu)):x.addEventListener&&_(x.postMessage)&&!x.importScripts&&Ou&&"file:"!==Ou.protocol&&!m(v)?(Tu=v,x.addEventListener("message",g,!1)):Tu="onreadystatechange"in Le("script")?function(e){nn.appendChild(Le("script")).onreadystatechange=function(){nn.removeChild(this),Wu(e)}}:function(e){setTimeout(Hu(e),0)}),{set:e,clear:qr}),Vu=Object.getOwnPropertyDescriptor,Zu=function(e){var t;return h?(t=Vu(x,e))&&t.value:x[e]},v=function(){this.head=null,this.tail=null};v.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var Gu,Yu,Ju,qu,Ku,Xu,$u=v,g=/ipad|iphone|ipod/i.test(re)&&"undefined"!=typeof Pebble,e=/web0s(?!.*chrome)/i.test(re),Qu=r.set,qr=x.MutationObserver||x.WebKitMutationObserver,v=x.document,ec=x.process,tc=x.Promise,nc=Zu("queueMicrotask"),rc=(nc||(qu=new $u,Ku=function(){var e,t;for(rl&&(e=ec.domain)&&e.exit();t=qu.get();)try{t()}catch(G){throw qu.head&&Xu(),G}e&&e.enter()},Xu=Pl||rl||e||!qr||!v?!g&&tc&&tc.resolve?((Pl=tc.resolve(undefined)).constructor=tc,Ju=Nt(Pl.then,Pl),function(){Ju(Ku)}):rl?function(){ec.nextTick(Ku)}:(Qu=Nt(Qu,x),function(){Qu(Ku)}):(Gu=!0,Yu=v.createTextNode(""),new qr(Ku).observe(Yu,{characterData:!0}),function(){Yu.data=Gu=!Gu}),nc=function(e){qu.head||Xu(),qu.add(e)}),nc),ic=function(e){try{return{error:!1,value:e()}}catch(G){return{error:!0,value:G}}},oc=x.Promise;oc&&oc.prototype;var sc,ac,lc,uc,cc=Re("species"),dc=!1,hc=_(x.PromiseRejectionEvent),e={CONSTRUCTOR:Tt("Promise",function(){var e=$e(oc),t=e!==String(oc);if(!t&&66===ie)return!0;if(!ie||ie<51||!/native code/.test(e)){var e=new oc(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[cc]=n,!(dc=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=nl&&"DENO"!=nl||hc)}),REJECTION_EVENT:hc,SUBCLASSING:dc},fc=TypeError,pc=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new fc("Bad Promise constructor");n=e,r=t}),this.resolve=he(n),this.reject=he(r)},gc={f:function(e){return new pc(e)}},mc=r.set,g=e.CONSTRUCTOR,yc=e.REJECTION_EVENT,tc=e.SUBCLASSING,vc=rt.getterFor("Promise"),wc=rt.set,Pl=oc&&oc.prototype,bc=oc,Sc=Pl,kc=x.TypeError,_c=x.document,Cc=x.process,Ic=gc.f,xc=Ic,Ec=!!(_c&&_c.createEvent&&x.dispatchEvent),Rc=function(e){var t;return!(!R(e)||!_(t=e.then))&&t},Ac=function(e,t){var n,r,i,o=t.value,s=1===t.state,a=s?e.ok:e.fail,l=e.resolve,u=e.reject,c=e.domain;try{a?(s||(2===t.rejection&&Nc(t),t.rejection=1),!0===a?n=o:(c&&c.enter(),n=a(o),c&&(c.exit(),i=!0)),n===e.promise?u(new kc("Promise-chain cycle")):(r=Rc(n))?E(r,n,l,u):l(n)):u(o)}catch(G){c&&!i&&c.exit(),u(G)}},Oc=function(n,r){n.notified||(n.notified=!0,rc(function(){for(var e,t=n.reactions;e=t.get();)Ac(e,n);n.notified=!1,r&&!n.rejection&&Mc(n)}))},Tc=function(e,t,n){var r;Ec?((r=_c.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),x.dispatchEvent(r)):r={promise:t,reason:n},!yc&&(t=x["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(G){}}("Unhandled promise rejection",n)},Mc=function(r){E(mc,x,function(){var e,t=r.facade,n=r.value;if(Pc(r)&&(e=ic(function(){rl?Cc.emit("unhandledRejection",n,t):Tc("unhandledrejection",t,n)}),r.rejection=rl||Pc(r)?2:1,e.error))throw e.value})},Pc=function(e){return 1!==e.rejection&&!e.parent},Nc=function(t){E(mc,x,function(){var e=t.facade;rl?Cc.emit("rejectionHandled",e):Tc("rejectionhandled",e,t.value)})},Lc=function(t,n,r){return function(e){t(n,e,r)}},Fc=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,Oc(e,!0))},Dc=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new kc("Promise can't be resolved itself");var r=Rc(n);r?rc(function(){var e={done:!1};try{E(r,n,Lc(Dc,e,t),Lc(Fc,e,t))}catch(G){Fc(e,G,t)}}):(t.value=n,t.state=1,Oc(t,!1))}catch(G){Fc({done:!1},G,t)}}};if(g&&(Sc=(bc=function(e){Er(this,Sc),he(e),E(sc,this);var t=vc(this);try{e(Lc(Dc,t),Lc(Fc,t))}catch(G){Fc(t,G)}}).prototype,(sc=function(e){wc(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new $u,rejection:!1,state:0,value:null})}).prototype=ot(Sc,"then",function(e,t){var n=vc(this),r=Ic(Lu(this,bc));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(t)&&t,r.domain=rl?Cc.domain:undefined,0===n.state?n.reactions.add(r):rc(function(){Ac(r,n)}),r.promise}),ac=function(){var e=new sc,t=vc(e);this.promise=e,this.resolve=Lc(Dc,t),this.reject=Lc(Fc,t)},gc.f=Ic=function(e){return e===bc||e===lc?new ac:xc(e)},_(oc))&&Pl!==Object.prototype){uc=Pl.then,tc||ot(Pl,"then",function(e,t){var n=this;return new bc(function(e,t){E(uc,n,e,t)}).then(e,t)},{unsafe:!0});try{delete Pl.constructor}catch(G){}Pn&&Pn(Pl,Sc)}O({global:!0,constructor:!0,wrap:!0,forced:g},{Promise:bc}),lc=c.Promise,En(bc,"Promise",!1),Li("Promise");var Uc,Bc,zc,v=e.CONSTRUCTOR||!Pr(function(e){oc.all(e).then(undefined,function(){})}),qr=(O({target:"Promise",stat:!0,forced:v},{all:function(e){var a=this,t=gc.f(a),l=t.resolve,u=t.reject,n=ic(function(){var r=he(a.resolve),i=[],o=0,s=1;Ir(e,function(e){var t=o++,n=!1;s++,E(r,a,e).then(function(e){n||(n=!0,i[t]=e,--s)||l(i)},u)}),--s||l(i)});return n.error&&u(n.value),t.promise}}),e.CONSTRUCTOR),nc=oc&&oc.prototype,tc=(O({target:"Promise",proto:!0,forced:qr,real:!0},{"catch":function(e){return this.then(undefined,e)}}),_(oc)&&(r=te("Promise").prototype["catch"],nc["catch"]!==r)&&ot(nc,"catch",r,{unsafe:!0}),O({target:"Promise",stat:!0,forced:v},{race:function(e){var n=this,r=gc.f(n),i=r.reject,t=ic(function(){var t=he(n.resolve);Ir(e,function(e){E(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),O({target:"Promise",stat:!0,forced:e.CONSTRUCTOR},{reject:function(e){var t=gc.f(this);return(0,t.reject)(e),t.promise}}),e.CONSTRUCTOR),jc=(te("Promise"),O({target:"Promise",stat:!0,forced:tc},{resolve:function(e){return e=e,C(t=this),R(e)&&e.constructor===t?e:((0,(t=gc.f(t)).resolve)(e),t.promise);var t}}),window.navigator.userAgent.toLowerCase()),w={},Wc=function(e){return-1!==jc.indexOf(e)},Hc=(w.macos=function(){return Wc("mac")},w.ios=function(){return w.iphone()||w.ipod()||w.ipad()},w.iphone=function(){return!w.windows()&&Wc("iphone")},w.ipod=function(){return Wc("ipod")},w.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return Wc("ipad")||e},w.android=function(){return!w.windows()&&Wc("android")},w.androidPhone=function(){return w.android()&&Wc("mobile")},w.androidTablet=function(){return w.android()&&!Wc("mobile")},w.blackberry=function(){return Wc("blackberry")||Wc("bb10")},w.blackberryPhone=function(){return w.blackberry()&&!Wc("tablet")},w.blackberryTablet=function(){return w.blackberry()&&Wc("tablet")},w.windows=function(){return Wc("windows")},w.windowsPhone=function(){return w.windows()&&Wc("phone")},w.windowsTablet=function(){return w.windows()&&Wc("touch")&&!w.windowsPhone()},w.fxos=function(){return(Wc("(mobile")||Wc("(tablet"))&&Wc(" rv:")},w.fxosPhone=function(){return w.fxos()&&Wc("mobile")},w.fxosTablet=function(){return w.fxos()&&Wc("tablet")},w.meego=function(){return Wc("meego")},w.cordova=function(){return window.cordova&&"file:"===location.protocol},w.nodeWebkit=function(){return"object"===hi(window.process)},w.mobile=function(){return w.androidPhone()||w.iphone()||w.ipod()||w.windowsPhone()||w.blackberryPhone()||w.fxosPhone()||w.meego()},w.tablet=function(){return w.ipad()||w.androidTablet()||w.blackberryTablet()||w.windowsTablet()||w.fxosTablet()},w.desktop=function(){return!w.tablet()&&!w.mobile()},w.isIE=function(){return"ActiveXObject"in window},Re("iterator")),Pl=!m(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!h||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[Hc]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),Vc=/[^\0-\u007E]/,Zc=/[.\u3002\uFF0E\uFF61]/g,Gc="Overflow: input needs wider integers to process",Yc=RangeError,Jc=y(Zc.exec),qc=Math.floor,Kc=String.fromCharCode,Xc=y("".charCodeAt),$c=y([].join),Qc=y([].push),ed=y("".replace),td=y("".split),nd=y("".toLowerCase),rd=function(e){return e+22+75*(e<26)},id=function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=Xc(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=Xc(e,n++)))?Qc(t,((1023&o)<<10)+(1023&i)+65536):(Qc(t,o),n--):Qc(t,o)}return t}(e)).length,i=128,o=0,s=72;for(c=0;c<e.length;c++)(t=e[c])<128&&Qc(n,Kc(t));var a=n.length,l=a;for(a&&Qc(n,"-");l<r;){for(var u=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<u&&(u=t);var d=l+1;if(u-i>qc((2147483647-o)/d))throw new Yc(Gc);for(o+=(u-i)*d,i=u,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new Yc(Gc);if(t===i){for(var h=o,f=36;;){var p=f<=s?1:s+26<=f?26:f-s;if(h<p)break;var g=h-p,m=36-p;Qc(n,Kc(rd(p+g%m))),h=qc(g/m),f+=36}Qc(n,Kc(rd(h))),s=function(e,t,n){var r=0;for(e=n?qc(e/700):e>>1,e+=qc(e/t);455<e;)e=qc(e/35),r+=36;return qc(r+36*e/(e+38))}(o,d,l===a),o=0,l++}}o++,i++}return $c(n,"")},od=RangeError,sd=String.fromCharCode,g=String.fromCodePoint,ad=y([].join),c=!!g&&1!==g.length,ld=(O({target:"String",stat:!0,arity:1,forced:c},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(ht(t=+arguments[i],1114111)!==t)throw new od(t+" is not a valid code point");n[i++]=t<65536?sd(t):sd(55296+((t-=65536)>>10),t%1024+56320)}return ad(n,"")}}),Math.floor),ud=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var s=ld(n/2),a=ud(or(e,0,s),t),l=ud(or(e,s),t),u=a.length,c=l.length,d=0,h=0;d<u||h<c;)e[d+h]=d<u&&h<c?t(a[d],l[h])<=0?a[d++]:l[h++]:d<u?a[d++]:l[h++];return e},cd=ud,qr=Re("iterator"),dd=rt.set,hd=rt.getterFor("URLSearchParams"),fd=rt.getterFor("URLSearchParamsIterator"),pd=Zu("fetch"),gd=Zu("Request"),md=Zu("Headers"),yd=gd&&gd.prototype,nc=md&&md.prototype,vd=x.TypeError,wd=x.encodeURIComponent,bd=String.fromCharCode,Sd=te("String","fromCodePoint"),kd=parseInt,_d=y("".charAt),Cd=y([].join),Id=y([].push),xd=y("".replace),Ed=y([].shift),Rd=y([].splice),Ad=y("".split),Od=y("".slice),Td=y(/./.exec),Md=/\+/g,Pd=/^[0-9a-f]+$/i,Nd=function(e,t){e=Od(e,t,t+2);return Td(Pd,e)?kd(e,16):NaN},Ld=function(e){for(var t=(e=xd(e,Md," ")).length,n="",r=0;r<t;){var i=_d(e,r);if("%"===i){if("%"===_d(e,r+1)||t<r+3){n+="%",r++;continue}var o=Nd(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var s=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===s)i=bd(o);else{if(1===s||4<s){n+="�",r++;continue}for(var a=[o],l=1;l<s&&!(++r+3>t||"%"!==_d(e,r));){var u=Nd(e,r+1);if(u!=u||191<u||u<128)break;if(1===l){if(224===o&&u<160)break;if(237===o&&159<u)break;if(240===o&&u<144)break;if(244===o&&143<u)break}Id(a,u),r+=2,l++}if(a.length!==s){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(a);if(null===c){for(var d=0;d<s;d++)n+="�";r++;continue}i=Sd(c)}}n+=i,r++}return n},Fd=/[!'()~]|%20/g,Dd={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Ud=function(e){return Dd[e]},Bd=function(e){return xd(wd(e),Fd,Ud)},zd=On(function(e,t){dd(this,{type:"URLSearchParamsIterator",target:hd(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=fd(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,jn(undefined,!0);var r=t[n];switch(e.kind){case"keys":return jn(r.key,!1);case"values":return jn(r.value,!1)}return jn([r.key,r.value],!1)},!0),jd=function(e){this.entries=[],this.url=null,e!==undefined&&(R(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_d(e,0)?Od(e,1):e:I(e)))},r=(jd.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,s,a=this.entries,l=vr(e);if(l)for(n=(t=br(e,l)).next;!(r=E(n,t)).done;){if(i=(r=br(C(r.value))).next,(o=E(i,r)).done||(s=E(i,r)).done||!E(i,r).done)throw new vd("Expected sequence with length 2");Id(a,{key:I(o.value),value:I(s.value)})}else for(var u in e)A(e,u)&&Id(a,{key:u,value:I(e[u])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=Ad(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=Ad(t,"="),Id(n,{key:Ld(Ed(t)),value:Ld(Cd(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Id(n,Bd(e.key)+"="+Bd(e.value));return Cd(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){Er(this,Wd);var e=0<arguments.length?arguments[0]:undefined,e=dd(this,new jd(e));h||(this.size=e.entries.length)}),Wd=r.prototype;Lr(Wd,{append:function(e,t){var n=hd(this);ul(arguments.length,2),Id(n.entries,{key:I(e),value:I(t)}),h||this.size++,n.updateURL()},"delete":function(e){for(var t=hd(this),n=ul(arguments.length,1),r=t.entries,i=I(e),e=n<2?undefined:arguments[1],o=e===undefined?e:I(e),s=0;s<r.length;){var a=r[s];a.key!==i||o!==undefined&&a.value!==o?s++:Rd(r,s,1)}h||(this.size=r.length),t.updateURL()},get:function(e){var t=hd(this).entries;ul(arguments.length,1);for(var n=I(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=hd(this).entries;ul(arguments.length,1);for(var n=I(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Id(r,t[i].value);return r},has:function(e){for(var t=hd(this).entries,n=ul(arguments.length,1),r=I(e),e=n<2?undefined:arguments[1],i=e===undefined?e:I(e),o=0;o<t.length;){var s=t[o++];if(s.key===r&&(i===undefined||s.value===i))return!0}return!1},set:function(e,t){var n=hd(this);ul(arguments.length,2);for(var r,i=n.entries,o=!1,s=I(e),a=I(t),l=0;l<i.length;l++)(r=i[l]).key===s&&(o?Rd(i,l--,1):(o=!0,r.value=a));o||Id(i,{key:s,value:a}),h||(this.size=i.length),n.updateURL()},sort:function(){var e=hd(this);cd(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=hd(this).entries,r=Nt(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new zd(this,"keys")},values:function(){return new zd(this,"values")},entries:function(){return new zd(this,"entries")}},{enumerable:!0}),ot(Wd,qr,Wd.entries,{name:"entries"}),ot(Wd,"toString",function(){return hd(this).serialize()},{enumerable:!0}),h&&Jn(Wd,"size",{get:function(){return hd(this).entries.length},configurable:!0,enumerable:!0}),En(r,"URLSearchParams"),O({global:!0,constructor:!0,forced:!Pl},{URLSearchParams:r}),!Pl&&_(md)&&(Uc=y(nc.has),Bc=y(nc.set),zc=function(e){if(R(e)){var t,n=e.body;if("URLSearchParams"===Bt(n))return t=e.headers?new md(e.headers):new md,Uc(t,"content-type")||Bc(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),un(e,{body:j(0,I(n)),headers:j(0,t)})}return e},_(pd)&&O({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return pd(e,1<arguments.length?zc(arguments[1]):{})}}),_(gd))&&((yd.constructor=v=function(e){return Er(this,yd),new gd(e,1<arguments.length?zc(arguments[1]):{})}).prototype=yd,O({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:v}));var Hd,e={URLSearchParams:r,getState:hd},Vd=l.codeAt,Zd=rt.set,Gd=rt.getterFor("URL"),Yd=e.URLSearchParams,Jd=e.getState,tc=x.URL,qd=x.TypeError,Kd=x.encodeURIComponent,Xd=x.parseInt,$d=Math.floor,Qd=Math.pow,eh=y("".charAt),th=y(/./.exec),nh=y([].join),rh=y(1.1.toString),ih=y([].pop),oh=y([].push),sh=y("".replace),ah=y([].shift),lh=y("".split),uh=y("".slice),ch=y("".toLowerCase),dh=y([].unshift),hh=/[a-z]/i,fh=/[\d+\-.a-z]/i,ph=/\d/,gh=/^0x/i,mh=/^[0-7]+$/,yh=/^\d+$/,vh=/^[\da-f]+$/i,wh=/[\0\t\n\r #%/:<>?@[\\\]^|]/,bh=/[\0\t\n\r #/:<>?@[\\\]^|]/,Sh=/^[\u0000-\u0020]+/,kh=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,_h=/[\t\n\r]/g,Ch=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)dh(t,e%256),e=$d(e/256);return nh(t,".")}if("object"!=typeof e)return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=rh(e[n],16),n<7&&(t+=":")));return"["+t+"]"},Ih={},xh=Kr({},Ih,{" ":1,'"':1,"#":1,"<":1,">":1}),Eh=Kr({},xh,{"'":1}),Rh=Kr({},Ih,{" ":1,'"':1,"<":1,">":1,"`":1}),Ah=Kr({},Rh,{"#":1,"?":1,"{":1,"}":1,"^":1}),Oh=Kr({},Ah,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Th=function(e,t){var n=Vd(e,0);return 32<=n&&n<127&&!A(t,e)?e:"'"===e&&A(t,e)?"%27":Kd(e)},Mh={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ph=function(e,t){return 2===e.length&&th(hh,eh(e,0))&&(":"===(e=eh(e,1))||!t&&"|"===e)},Nh=function(e){return 1<e.length&&Ph(uh(e,0,2))&&(2===e.length||"/"===(e=eh(e,2))||"\\"===e||"?"===e||"#"===e)},Lh={},Fh={},Dh={},Uh={},Bh={},zh={},jh={},Wh={},Hh={},Vh={},Zh={},Gh={},Yh={},Jh={},qh={},Kh={},Xh={},$h={},Qh={},ef={},tf={},nf=function(e,t,n){var r,i,e=I(e);if(t){if(i=this.parse(e))throw new qd(i);this.searchParams=null}else{if(n!==undefined&&(r=new nf(n,!0)),i=this.parse(e,null,r))throw new qd(i);(t=Jd(new Yd)).bindURL(this),this.searchParams=t}},rf=(nf.prototype={type:"URL",parse:function(e,t,n){var r,i,o,s,a=this,l=t||Lh,u=0,c="",d=!1,h=!1,f=!1;for(e=I(e),t||(a.scheme="",a.username="",a.password="",a.host=null,a.port=null,a.path=[],a.query=null,a.fragment=null,a.cannotBeABaseURL=!1,e=sh(e,Sh,""),e=sh(e,kh,"$1")),e=sh(e,_h,""),r=bi(e);u<=r.length;){switch(i=r[u],l){case Lh:if(!i||!th(hh,i)){if(t)return"Invalid scheme";l=Dh;continue}c+=ch(i),l=Fh;break;case Fh:if(i&&th(fh,i))c+=ch(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",l=Dh,u=0;continue}if(t&&(a.isSpecial()!==A(Mh,c)||"file"===c&&(a.includesCredentials()||null!==a.port)||"file"===a.scheme&&""===a.host))return;if(a.scheme=c,t)return void(a.isSpecial()&&Mh[a.scheme]===a.port&&(a.port=null));c="","file"===a.scheme?l=Jh:a.isSpecial()&&n&&n.scheme===a.scheme?l=Uh:a.isSpecial()?l=Wh:"/"===r[u+1]?(l=Bh,u++):(a.cannotBeABaseURL=!0,oh(a.path,""),l=Qh)}break;case Dh:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){a.scheme=n.scheme,a.path=or(n.path),a.query=n.query,a.fragment="",a.cannotBeABaseURL=!0,l=tf;break}l="file"===n.scheme?Jh:zh;continue;case Uh:if("/"!==i||"/"!==r[u+1]){l=zh;continue}l=Hh,u++;break;case Bh:if("/"===i){l=Vh;break}l=$h;continue;case zh:if(a.scheme=n.scheme,i===Hd)a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=or(n.path),a.query=n.query;else if("/"===i||"\\"===i&&a.isSpecial())l=jh;else if("?"===i)a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=or(n.path),a.query="",l=ef;else{if("#"!==i){a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=or(n.path),a.path.length&&a.path.length--,l=$h;continue}a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,a.path=or(n.path),a.query=n.query,a.fragment="",l=tf}break;case jh:if(!a.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){a.username=n.username,a.password=n.password,a.host=n.host,a.port=n.port,l=$h;continue}l=Vh}else l=Hh;break;case Wh:if(l=Hh,"/"!==i||"/"!==r[u+1])continue;u++;break;case Hh:if("/"===i||"\\"===i)break;l=Vh;continue;case Vh:if("@"===i){d&&(c="%40"+c);for(var d=!0,p=bi(c),g=0;g<p.length;g++){var m=p[g];":"!==m||f?(m=Th(m,Oh),f?a.password+=m:a.username+=m):f=!0}c=""}else if(i===Hd||"/"===i||"?"===i||"#"===i||"\\"===i&&a.isSpecial()){if(d&&""===c)return"Invalid authority";u-=bi(c).length+1,c="",l=Zh}else c+=i;break;case Zh:case Gh:if(t&&"file"===a.scheme){l=Kh;continue}if(":"!==i||h){if(i===Hd||"/"===i||"?"===i||"#"===i||"\\"===i&&a.isSpecial()){if(a.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(a.includesCredentials()||null!==a.port))return;if(o=a.parseHost(c))return o;if(c="",l=Xh,t)return;continue}"["===i?h=!0:"]"===i&&(h=!1),c+=i}else{if(""===c)return"Invalid host";if(t===Gh)return;if(o=a.parseHost(c))return o;c="",l=Yh}break;case Yh:if(!th(ph,i)){if(i===Hd||"/"===i||"?"===i||"#"===i||"\\"===i&&a.isSpecial()||t){if(""!==c){var y=Xd(c,10);if(65535<y)return"Invalid port";a.port=a.isSpecial()&&y===Mh[a.scheme]?null:y,c=""}if(t)return;l=Xh;continue}return"Invalid port"}c+=i;break;case Jh:if(a.scheme="file",a.host="","/"===i||"\\"===i)l=qh;else{if(!n||"file"!==n.scheme){l=$h;continue}switch(i){case Hd:a.host=n.host,a.path=or(n.path),a.query=n.query;break;case"?":a.host=n.host,a.path=or(n.path),a.query="",l=ef;break;case"#":a.host=n.host,a.path=or(n.path),a.query=n.query,a.fragment="",l=tf;break;default:a.host=n.host,Nh(nh(or(r,u),""))||(a.path=or(n.path),a.shortenPath()),l=$h;continue}}break;case qh:if("/"===i||"\\"===i){l=Kh;break}n&&"file"===n.scheme&&(a.host=n.host,!Nh(nh(or(r,u),"")))&&Ph(n.path[0],!0)&&oh(a.path,n.path[0]),l=$h;continue;case Kh:if(i===Hd||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&Ph(c))l=$h;else{if(""===c){if(a.host="",t)return}else{if(o=a.parseHost(c))return o;if("localhost"===a.host&&(a.host=""),t)return;c=""}l=Xh}continue}c+=i;break;case Xh:if(a.isSpecial()){if(l=$h,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==Hd&&(l=$h,"/"!==i))continue}else a.fragment="",l=tf;else a.query="",l=ef;break;case $h:if(i===Hd||"/"===i||"\\"===i&&a.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(y=ch(c))||"%2e."===y||".%2e"===y||"%2e%2e"===y?(a.shortenPath(),"/"===i||"\\"===i&&a.isSpecial()||oh(a.path,"")):"."===(s=c)||"%2e"===ch(s)?"/"===i||"\\"===i&&a.isSpecial()||oh(a.path,""):("file"===a.scheme&&!a.path.length&&Ph(c)&&(null!==a.host&&""!==a.host&&(a.host=""),c=eh(c,0)+":"),oh(a.path,c)),c="","file"===a.scheme&&(i===Hd||"?"===i||"#"===i))for(;1<a.path.length&&""===a.path[0];)ah(a.path);"?"===i?(a.query="",l=ef):"#"===i&&(a.fragment="",l=tf)}else c+=Th(i,Ah);break;case Qh:"?"===i?(a.query="",l=ef):"#"===i?(a.fragment="",l=tf):i!==Hd&&(a.path[0]+=Th(i,Ih));break;case ef:t||"#"!==i?i!==Hd&&(a.query+=Th(i,a.isSpecial()?Eh:xh)):(a.fragment="",l=tf);break;case tf:i!==Hd&&(a.fragment+=Th(i,Rh))}u++}},parseHost:function(l){var e,t,n;if("["===eh(l,0))return"]"===eh(l,l.length-1)&&(e=function(e){var t,n,r,i,o,s,a,l=[0,0,0,0,0,0,0,0],u=0,c=null,d=0,h=function(){return eh(e,d)};if(":"===h()){if(":"!==eh(e,1))return;d+=2,c=++u}for(;h();){if(8===u)return;if(":"!==h()){for(t=n=0;n<4&&th(vh,h());)t=16*t+Xd(h(),16),d++,n++;if("."===h()){if(0===n)return;if(d-=n,6<u)return;for(r=0;h();){if(i=null,0<r){if(!("."===h()&&r<4))return;d++}if(!th(ph,h()))return;for(;th(ph,h());){if(o=Xd(h(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;d++}l[u]=256*l[u]+i,2!=++r&&4!==r||u++}if(4!==r)return;break}if(":"===h()){if(d++,!h())return}else if(h())return;l[u++]=t}else{if(null!==c)return;d++,c=++u}}if(null!==c)for(s=u-c,u=7;0!==u&&0<s;)a=l[u],l[u--]=l[c+s-1],l[c+--s]=a;else if(8!==u)return;return l}(uh(l,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(l=function(){for(var e,t=[],n=td(ed(nd(l),Zc,"."),"."),r=0;r<n.length;r++)e=n[r],Qc(t,Jc(Vc,e)?"xn--"+id(e):e);return $c(t,".")}(),th(wh,l))return"Invalid host";if(function(){var e=lh(l,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return th(yh,e=e[e.length-1])||th(gh,e)&&(""===(e=uh(e,2))||th(vh,e))}()){if(null===(e=function(){var e,t,n,r,i,o,s,a=lh(l,".");if(a.length&&""===a[a.length-1]&&a.length--,4<(e=a.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=a[n]))return null;if(i=10,1<r.length&&"0"===eh(r,0)&&(i=th(gh,r)?16:8,r=uh(r,8===i?1:2)),""===r)o=0;else{if(!th(10===i?yh:8===i?mh:vh,r))return null;o=Xd(r,i)}oh(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=Qd(256,5-e))return null}else if(255<o)return null;for(s=ih(t),n=0;n<t.length;n++)s+=t[n]*Qd(256,3-n);return s}()))return"Invalid host";this.host=e}else this.host=l}else{if(th(bh,l))return"Invalid host";for(e="",t=bi(l),n=0;n<t.length;n++)e+=Th(t[n],Ih);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return A(Mh,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&Ph(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,s=e.path,a=e.query,l=e.fragment,u=t+":";return null!==i?(u+="//",e.includesCredentials()&&(u+=n+(r?":"+r:"")+"@"),u+=Ch(i),null!==o&&(u+=":"+o)):"file"===t&&(u+="//"),null===i&&!e.cannotBeABaseURL&&1<s.length&&""===s[0]&&(u+="/."),u+=e.cannotBeABaseURL?s[0]:s.length?"/"+nh(s,"/"):"",null!==a&&(u+="?"+a),null!==l&&(u+="#"+l),u},setHref:function(e){e=this.parse(e);if(e)throw new qd(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new rf(this.path[0]).origin}catch(G){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+Ch(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(I(e)+":",Lh)},getUsername:function(){return this.username},setUsername:function(e){var t=bi(I(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=Th(t[n],Oh)}},getPassword:function(){return this.password},setPassword:function(e){var t=bi(I(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=Th(t[n],Oh)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Ch(e):Ch(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Zh)},getHostname:function(){var e=this.host;return null===e?"":Ch(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Gh)},getPort:function(){var e=this.port;return null===e?"":I(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=I(e))?this.port=null:this.parse(e,Yh))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+nh(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Xh))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=I(e))?this.query=null:("?"===eh(e,0)&&(e=uh(e,1)),this.query="",this.parse(e,ef)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=I(e))?("#"===eh(e,0)&&(e=uh(e,1)),this.fragment="",this.parse(e,tf)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=Er(this,of),n=1<ul(arguments.length,1)?arguments[1]:undefined,e=Zd(t,new nf(e,!1,n));h||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),of=rf.prototype,g=function(e,t){return{get:function(){return Gd(this)[e]()},set:t&&function(e){return Gd(this)[t](e)},configurable:!0,enumerable:!0}};h&&(Jn(of,"href",g("serialize","setHref")),Jn(of,"origin",g("getOrigin")),Jn(of,"protocol",g("getProtocol","setProtocol")),Jn(of,"username",g("getUsername","setUsername")),Jn(of,"password",g("getPassword","setPassword")),Jn(of,"host",g("getHost","setHost")),Jn(of,"hostname",g("getHostname","setHostname")),Jn(of,"port",g("getPort","setPort")),Jn(of,"pathname",g("getPathname","setPathname")),Jn(of,"search",g("getSearch","setSearch")),Jn(of,"searchParams",g("getSearchParams")),Jn(of,"hash",g("getHash","setHash"))),ot(of,"toJSON",function(){return Gd(this).serialize()},{enumerable:!0}),ot(of,"toString",function(){return Gd(this).serialize()},{enumerable:!0}),tc&&(c=tc.createObjectURL,Zu=tc.revokeObjectURL,c&&ot(rf,"createObjectURL",Nt(c,tc)),Zu)&&ot(rf,"revokeObjectURL",Nt(Zu,tc)),En(rf,"URL"),O({global:!0,constructor:!0,forced:!Pl,sham:!h},{URL:rf}),O({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return E(URL.prototype.toString,this)}});var sf,af,lf,uf,cf,df,hf,ff,pf,gf,mf,yf,vf,wf,bf,Sf,kf,_f,Cf=function(){return{host:new URL(location.href).host,pathname:location.pathname}},If=!1,xf=[],Ef=/^\/[^/]/,Rf=!1,Af=[],Of=function(r,e,i){return null!=e&&e.length&&"object"===hi(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},Tf={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},Mf={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},Pf=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},Nf=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===no.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=_a.test(i)||ka.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},Lf=function(e,t){return e?Mf.AJAX_ERROR:t?Mf.RET_ERROR:Mf.API_RESPONSE},Ff=function(e,t,n){var r,i;if(!e)return!1;if(null!=(r=null==t?void 0:t.api)&&r.isSlowApi&&"function"==typeof(null==(r=null==t?void 0:t.api)?void 0:r.isSlowApi))try{return null==(i=null==t?void 0:t.api)?void 0:i.isSlowApi(n||{duration:e})}catch(G){return console.warn("[TDEM] isSlowApi function happen error:",G,", this data will not be reported."),!1}return null!=(r=null==t?void 0:t.api)&&r.apiSlowThreshold&&"number"==typeof(null==(n=null==t?void 0:t.api)?void 0:n.apiSlowThreshold)?e>(null==(i=null==t?void 0:t.api)?void 0:i.apiSlowThreshold):1e3<e},Df=function(e,t){if(null!=(e=e.api)&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:Sa(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:va(e.domainLookupEnd-e.domainLookupStart),connectTime:va(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:Sa(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:ca.number,connectTime:ca.number}},qr=(new _l({name:"reportApiSpeed"}),new _l({name:"reportApiSpeed",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new Kl(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},getFromParam:function(e){return e.getCurrentPageUrl()},overrideFetch:function(b,S){var k=this,e=b.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return k.getFromParam(S)},then:function(h,f,p,g,m,y,v){var e,w;Fa(p,b.hostUrl)||(e=h.headers?h.headers.get("content-type"):"","fetch"===(w=Nf(b,e||"",p))?h.clone().text().then(function(r){var e,i=h.status<=0||400<=h.status,t=(null==(t=b.api)?void 0:t.reqHeaders)||[],o=Of(null==g?void 0:g.headers,t,"req"),t=(null==(t=b.api)?void 0:t.resHeaders)||[],s=Of(h.headers,t,"res"),a=$l(null==g?void 0:g.headers),t=Ia(r,b.api,{url:p,ctx:h,payload:null==g?void 0:g.body}),l=t.code,u=t.isErr,t=null==(t=b.api)?void 0:t.apiDetail,c=t?xa(null==g?void 0:g.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:p}):"",d=t?xa(r,null==(e=b.api)?void 0:e.resBodyHandler,{url:p,ctx:h}):"";setTimeout(function(){var e=Df(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==g?void 0:g.method)||"get"}),t=[i?"FETCH_ERROR: "+r:"","fetch req url: "+p,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+m,o,s,"req method: "+(e.method||"GET"),"res retcode: "+l,Pf(c,"req param"),Pf(d,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==g?void 0:g.body,e.ret=l,e.isErr=+u,e.from=y||k.getFromParam(S),{msg:t,code:l,trace:a,errorMsg:"",from:y||k.getFromParam(S),originFrom:v,level:Mf.API_RESPONSE}),n=b.slowApiLog&&Ff(null==e?void 0:e.duration,b,e);t.level=n?Mf.SLOW_NET_REQUEST:Lf(i,u),(n||t.level!==Mf.API_RESPONSE||S.isWhiteList||null!=(n=null==(n=S.config)?void 0:n.api)&&n.reportRequest)&&k.publishNormalLog(t,S),k.publishSpeed(e,S)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=Df(b,{url:p,duration:f,type:w,status:h.status||0,method:(null==g?void 0:g.method)||"get"});e.type="static",e.urlQuery=wa(p,!0),e.from=y||k.getFromParam(S),k.publishSpeed(e,S)},0))},"catch":function(t,n,r,i,o,s,a){var l,e,u,c,d;throw Fa(r,b.hostUrl)||(l=Nf(b,"",r),e=(null==(e=b.api)?void 0:e.reqHeaders)||[],u=Of(null==i?void 0:i.headers,e,"req"),c=$l(null==i?void 0:i.headers),d=null!=(e=b.api)&&e.apiDetail?xa(null==i?void 0:i.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=Df(b,{url:r,duration:n,type:l,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=s||k.getFromParam(S),k.publishSpeed(e,S),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+d+"\n \nres startTime: "+o+"\n \n"+u);k.publishNormalLog({msg:e,level:Mf.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:s||k.getFromParam(S),originFrom:a},S)},0)),t}},h=(this.hackFetchOptions=e,this.hackFetchOptions),f=null==(e=b.api)?void 0:e.ignoreHackReg;if(void 0===f&&(f=/\.flv(\?|$)/i),Af.find(function(e){return e.name===h.name}))throw new Error("name '"+h.name+"' is already in hackFetch option list");Af.push(h),!Rf&&window.fetch&&(Rf=!0,uf=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(s=null==f?void 0:f.test)&&s.call(f,o))return uf(o,i);Ef.test(o)&&(o=""+location.origin+o);var t,n,r,s=(h||{}).traceRequestHeader;s&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=Cf()).host,r=(n=s.generate(o,t,{host:n,pathname:r.pathname})||{}).name,s=n.value)&&r&&(i.headers=Object.assign(t,((n={})[r]=s,n)));for(var a=new Map,l=window.location.href,u=0;u<Af.length;u++){var c=Af[u];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&a.set(c.name,c.getCurrentFrom())}catch(Z){}}var d=Date.now();return uf(e,i).then(function(e){for(var t=e.clone(),n=0;n<Af.length;n++){var r=Af[n];try{"function"==typeof r.then&&r.then(t,Date.now()-d,o,i,d,a.get(r.name),l)}catch(Z){}}return e})["catch"](function(e){for(var t=0;t<Af.length;t++){var n=Af[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-d,o,i,d,a.get(n.name),l)}catch(Z){}}throw e})})},overrideXhr:function(b,S){var e,i,k=this,o={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return k.getFromParam(S)},send:function(h,f,p,g){var e,t,m=Date.now(),y=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=Cf()).host,e=(t=k.traceRequestHeader.generate(h.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&h.setRequestHeader(e,t),h.addEventListener("loadend",function(){var u,n,e,c,d=h.tdemUrl||"";Fa(d,b.hostUrl)||"abort"===h.failType||(u="",(h.failType||!h.status||400<=h.status)&&(u=h.failType||"failed"),n=Date.now()-m,e=h.getResponseHeader("content-type")||"",c=Nf(b,e,d),setTimeout(function(){var r=Df(b,{url:d,duration:n,type:c,status:h.status,method:h.tdemMethod||"get"});if(r.from=p||k.getFromParam(S),"fetch"===c){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],i=Of(h.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=h.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),o=Of(t,e,"res"),s=$l(h.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,a=e?xa(f,null==(t=b.api)?void 0:t.reqParamHandler,{url:d}):"",l=e?xa(h.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:d}):"";try{!function(e,t,n,r){var i,o,s;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?ro:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return s=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===s?ro:s,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:ro,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(Ca=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Ca.indexOf(e.toLowerCase())});if(a.length)return"未知"!==(s=e[a[0]])&&""!==s||(s=ro),null!=r&&r({code:""+s,isErr:0!==s&&"0"!==s&&s!==ro});null!=r&&r({code:ro,isErr:!1})}catch(u){null!=r&&r({code:ro,isErr:!1})}}(h.response,b.api,{url:d,ctx:h,payload:f},function(e){var t=e.code,e=e.isErr,n=[u?"AJAX_ERROR: request "+u:"","fetch req url: "+d,"res status: "+(r.status||0),"res duration: "+r.duration+"ms","res startTime: "+m,i,o,"req method: "+(r.method||"GET"),"res retcode: "+t,Pf(a,"req param"),Pf(l,"res data")].filter(function(e){return e}).join("\n\n");r.ret=t,r.isErr=+e,r.payload=f,b.slowApiLog&&Ff(null==r?void 0:r.duration,b,r)?k.publishNormalLog({msg:n,level:Mf.SLOW_NET_REQUEST,code:t,trace:s,errorMsg:"",from:p||k.getFromParam(S),originFrom:g},S):k.publishNormalLog({msg:n,level:Lf(!!u,e),code:t,trace:s,errorMsg:"",from:p||k.getFromParam(S),originFrom:g},S),k.publishSpeed(r,S)})}catch(_){r.ret=ro,k.publishSpeed(r,S)}}else r.type="static",r.urlQuery=wa(d,!0),k.publishSpeed(r,S);h.removeEventListener("abort",y),h.removeEventListener("error",v),h.removeEventListener("timeout",w)},0))}),function(){h.failType="abort"}),v=function(){h.failType="error"},w=function(){h.failType="timeout"};h.addEventListener("abort",y),h.addEventListener("error",v),h.addEventListener("timeout",w)}};this.hackXHROptions=o,i=this.hackXHROptions,xf.find(function(e){return e.name===i.name})||(xf.push(i),!If&&window.XMLHttpRequest&&(sf=window.XMLHttpRequest.prototype.send,af=window.XMLHttpRequest.prototype.open,lf=window.XMLHttpRequest.prototype.setRequestHeader,If=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Ef.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)w.isIE()||(this.timeout=5e3);else for(var n=0;n<xf.length;n++){var r=xf[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return af.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?lf.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],lf.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<xf.length;n++){var r=xf[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(k){}}return sf.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,s,a,l;[Mf.API_RESPONSE,Mf.AJAX_ERROR,Mf.RET_ERROR,Mf.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",i=(i=null==(i=e.msg)?void 0:i.match(/res status:\s*(\d+)/))?parseInt(i[1],10):0,o=(o=null==(o=e.msg)?void 0:o.match(/res duration:\s*([\d.]+)ms/))?parseFloat(o[1]):0,l=(l=null==(l=e.msg)?void 0:l.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?l[1].trim().slice(0,1e3):undefined,s={},e.trace&&(s.trace_id=e.trace),[Mf.AJAX_ERROR,Mf.RET_ERROR].includes(e.level)||400<=i||0===i?(a={event_id:$a(),event_type:f.API_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:e.from||(null==(a=t.getCurrentPageUrl)?void 0:a.call(t))||window.location.href,data:{url:n,measurements:{duration:o},response_body:l,replay_id:xu(t),tags:0<Object.keys(s).length?s:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(l=t.reportTDEMEvent)&&l.call(t,a)):(l={event_id:$a(),event_type:f.API_CALL,event_category:Ka.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(a=t.getCurrentPageUrl)?void 0:a.call(t))||window.location.href,data:{url:n,measurements:{duration:o},business_code:String(e.code||""),replay_id:xu(t),tags:0<Object.keys(s).length?s:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(a=t.reportTDEMEvent)&&a.call(t,l)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=xf.findIndex(function(e){return e.name===n.name})))&&xf.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Af.findIndex(function(e){return e.name===t.name})))&&Af.splice(e,1),this.option.override=!1}})),Uf={},nc=new _l({name:"reportBridgeSpeed",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){return e.getCurrentPageUrl()},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(u){var c=this,d=u.config;d.reportBridgeSpeed&&d.h5Bridge&&d.h5BridgeFunc.length&&d.h5BridgeFunc.forEach(function(e){var l=d.h5Bridge[e];Uf[e]=l,d.h5Bridge[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],s=Date.now(),a=c.getFromParam(u);l(r,i,n,function(e){var t=Ia(e,d.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-s,type:"bridge",ret:n,isErr:+t,from:a};c.publishSpeed(n,u),o(e)})}})},unHackBridge:function(t){Object.keys(Uf).forEach(function(e){Uf[e]&&(t.config.h5Bridge[e]=Uf[e])}),Uf={}},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),e=((v=cf=cf||{})[v.unknown=100]="unknown",v[v.wifi=1]="wifi",v[v.net2g=2]="net2g",v[v.net3g=3]="net3g",v[v.net4g=4]="net4g",v[v.net5g=5]="net5g",v[v.net6g=6]="net6g",(r=df=df||{})[r.android=1]="android",r[r.ios=2]="ios",r[r.windows=3]="windows",r[r.macos=4]="macos",r[r.linux=5]="linux",r[r.other=100]="other",(l=hf=hf||{})[l.unknown=100]="unknown",l[l.normal=0]="normal",l[l.weak=1]="weak",l[l.disconnected=2]="disconnected",new _l({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",cf.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?df[e]:df.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:Bf)(function(e){cf[e]||(e=cf.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){hf[e]===undefined&&(e=hf.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),Bf=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||ro,0<=(n=String(n).toLowerCase()).indexOf("4g")?cf.net4g:0<=n.indexOf("wifi")?cf.wifi:0<=n.indexOf("5g")?cf.net5g:0<=n.indexOf("6g")?cf.net6g:0<=n.indexOf("3g")?cf.net3g:0<=n.indexOf("2g")?cf.net2g:cf.unknown))},zf=window.WebSocket,jf=[],Wf={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=jf&&jf.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:jf.forEach(function(e){e=e.sendErr;null!=e&&e(p({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:jf.forEach(function(e){(0,e.sendErr)(p({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:jf.forEach(function(e){(0,e.sendErr)(p({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},Hf=new _l({name:"onError"}),Kr=Hf=new _l({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){return e.getCurrentPageUrl()},startListen:function(a){var e,t,n,r,l=this,u=window.onerror,i=(window.onerror=function(e,t,n,r,i){var o,s=Ra(e);Cu(s)||(s=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?Qa(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],s={event_id:$a(),event_type:f.JS_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:l.getFromParam(a),data:{exception_stacks:s,exception_frames:o,replay_id:xu(a),tags:{environment:a.config.env||"production",version:String(a.config.version||"")}}},null!=(o=a.reportTDEMEvent)&&o.call(a,s)),null!=u&&u.call(window,e,t,n,r,i)},function(e){var t,n=e&&Ra(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?Qa(e.reason):[],e={event_id:$a(),event_type:f.PROMISE_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:l.getFromParam(a),data:{exception_stacks:t,exception_frames:n,replay_id:xu(a),tags:{environment:a.config.env||"production"}}},null!=(t=a.reportTDEMEvent))&&t.call(a,e)}),o=(window.addEventListener("unhandledrejection",i),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if(!r||null!=e&&e.error){if(!(Fa(i=t,a.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:$a(),event_type:f.RESOURCE_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:l.getFromParam(a),data:{url:t,resource_type:i,replay_id:xu(a),tags:p({environment:a.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=a.reportTDEMEvent)&&i.call(a,t)}}else console.log("may be media load success because error is undefine")}});window.document.addEventListener("error",o,!0),a.lifeCycle.on("destroy",function(){0===Hf.countInstance()&&(window.removeEventListener("unhandledrejection",i),window.document.removeEventListener("error",o,!0))}),a.config.websocketHack&&(e={key:a.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=l.publishWsErrorLog)&&t.call(l,e,a)},sendErr:function(e){var t;null!=(t=l.publishWsErrorLog)&&t.call(l,e,a)}},this.hackWebsocketConfig=e,e=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(t=window.WebSocket,window&&!t.isHack&&(n=new Proxy(WebSocket,Wf),t.isHack=!0,window.WebSocket=n),r=e,jf.find(function(e){return e.key===r.key})||r&&jf.push(r))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:$a(),event_type:f.JS_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:xu(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=zf,-1!==(e=jf.findIndex(function(e){return e.key===t.key})))&&jf.splice(e,1)}}),Vf=y(z.f),Zf=y([].push),Gf=h&&m(function(){var e=Object.create(null);return e[2]=2,!Vf(e,2)}),g=function(l){return function(e){for(var t,n=Q(e),r=en(n),i=Gf&&null===kn(n),o=r.length,s=0,a=[];s<o;)t=r[s++],h&&!(i?t in n:Vf(n,t))||Zf(a,l?[t,n[t]]:n[t]);return a}},c={entries:g(!0),values:g(!1)},Yf=c.entries,Jf=(O({target:"Object",stat:!0},{entries:function(e){return Yf(e)}}),Tr.UNSUPPORTED_Y),qf=Math.min,Kf=y([].push),Xf=y("".slice),$f=y("".indexOf),Zu=!m(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),Qf="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,ep=(Hi("split",function(i,p,g){var m="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:E(p,this,e,t)}:p;return[function(e,t){var n=$(this),r=R(e)?fe(e,i):undefined;return r?E(r,e,n,t):E(m,I(n),e,t)},function(e,t){var n=C(this),r=I(e);if(!Qf){e=g(m,n,r,t,m!==p);if(e.done)return e.value}var e=Lu(n,RegExp),i=I(Xo(n)),o=!!~$f(i,"u")||!!~$f(i,"v"),s=(Jf?~$f(i,"g")||(i+="g"):~$f(i,"y")||(i+="y"),new e(Jf?"^(?:"+n.source+")":n,i)),a=t===undefined?4294967295:t>>>0;if(0==a)return[];if(0===r.length)return null===$s(s,r)?[r]:[];for(var l=0,u=0,c=[];u<r.length;){s.lastIndex=Jf?0:u;var d,h=$s(s,Jf?Xf(r,u):r);if(null===h||(d=qf(pt(s.lastIndex+(Jf?u:0)),r.length))===l)u=Vs(r,u,o);else{if(Kf(c,Xf(r,l,u)),c.length===a)return c;for(var f=1;f<=h.length-1;f++)if(Kf(c,h[f]),c.length===a)return c;u=l=d}}return Kf(c,Xf(r,l)),c}]},Qf||!Zu,Jf),new _l({name:"clickElementLog"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return ep(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),tp=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},np=function(e,t){return"string"==typeof e?e.split(t):[]},rp=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=rp(n);return t},tc=new _l({name:"clickElementLog",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(s){for(var e=function(o){var e,t,n,r,i;a.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){n=tp((null==(n=(e=e).ignoreElements)?void 0:n.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:tp((null==(e=e.ignoreElements)?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),s=t,a=(np(t.getAttribute("id")||""," "),np(t.getAttribute("class")||"",""),0),l=!1;s&&o&&s.getAttribute;){if(l)return!0;if(10<=a)break;for(var u=np(s.getAttribute("id")||""," "),c=np(s.getAttribute("class")||"",""),d=0,h=u;d<h.length;d++){var f=h[d];if(i.has(f)){l=!0;break}}for(var p=0,g=c;p<g.length;p++){var m=g[p];if(r.has(m)){l=!0;break}}a+=1,s=s.parentNode||s.parentElement}return!1}(s.config,t)&&(i=ep(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=rp(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:$a(),event_type:f.CLICK,event_category:Ka.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:xu(s),tags:{environment:s.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=s.reportTDEMEvent))&&n.call(s,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},a=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),ip=(new _l({name:"consoleLog"}),{log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace}),Pl=new _l({name:"consoleLog",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var u;u=e,["log","error","warn","info","debug","trace"].forEach(function(a){var l=ip[a];console[a]=function(){for(var e,t,n,r,i,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];try{l.apply(console,o),!u.isWhiteList&&["log","info","debug","trace"].includes(a)||(r=o.map(function(e){if("object"===hi(e)&&null!==e)try{return JSON.stringify(e)}catch(a){}return String(e)}).join(" "),i={event_id:$a(),event_type:f.LOG,event_category:Ka.LOG,timestamp:Date.now(),page_url:(null==(e=u.getOriginFrom)?void 0:e.call(u))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===a?"error":"info",replay_id:xu(u),tags:{console_method:a},event_properties:{message:("console."+a+": "+r).slice(0,2048)}}},null!=(n=u.reportTDEMEvent)&&n.call(u,i))}catch(E){ip.error("Console hook error:",E)}}})},destroy:function(){Object.keys(ip).forEach(function(e){console[e]=ip[e]})}}),op=(yf={passive:!0,capture:!0},vf=new Date,v=function(){mf=[],pf=-1,ff=null,kf(addEventListener)},wf=function(e,t){ff||(ff=t,pf=e,gf=new Date,kf(removeEventListener),bf())},bf=function(){var t;0<=pf&&pf<gf-vf&&(t={entryType:"first-input",name:ff.type,target:ff.target,cancelable:ff.cancelable,startTime:ff.timeStamp,processingStart:ff.timeStamp+pf},mf.forEach(function(e){e(t)}),mf=[])},Sf=function(e){var t,n,r,i,o,s;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){wf(n,r),s()},o=function(){s()},s=function(){removeEventListener("pointerup",i,yf),removeEventListener("pointercancel",o,yf)},addEventListener("pointerup",i,yf),addEventListener("pointercancel",o,yf)):wf(t,e))},kf=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Sf,yf)})},_f="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function D(e){"hidden"===document.visibilityState&&(_f=e.timeStamp,removeEventListener("visibilitychange",D,!0))},!0),v(),self.webVitals={firstInputPolyfill:function(e){mf.push(e),bf()},resetFirstInputPolyfill:v,get firstHiddenTime(){return _f}},function(e,t){var n,r=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)};r("visibilitychange",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.visibilitychange),r("pagehide",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.pagehide),r("beforeunload",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.beforeunload)}),r=re.match(/firefox\/(\d+)/i),sp=!!r&&+r[1],ap=/MSIE|Trident/.test(re),l=re.match(/AppleWebKit\/(\d+)\./),lp=!!l&&+l[1],up=[],cp=y(up.sort),dp=y(up.push),g=m(function(){up.sort(undefined)}),Tr=m(function(){up.sort(null)}),Zu=Gt("sort"),hp=!m(function(){if(ie)return ie<70;if(!(sp&&3<sp)){if(ap)return!0;if(lp)return lp<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)up.push({k:e+n,v:t})}for(up.sort(function(e,t){return t.v-e.v}),n=0;n<up.length;n++)e=up[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}});O({target:"Array",proto:!0,forced:g||!Tr||!Zu||!hp},{sort:function(e){e!==undefined&&he(e);var t=we(this);if(hp)return e===undefined?cp(t):cp(t,e);for(var n,r,i=[],o=gt(t),s=0;s<o;s++)s in t&&dp(i,t[s]);for(cd(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=I(e))===(t=I(t))?0:t<e?1:-1})),n=gt(i),s=0;s<n;)t[s]=i[s++];for(;s<o;)Ti(t,s++);return t}}),new _l({name:"webVitals"});var fp,pp={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},gp=(new _l({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),mp=new Map,Hi=new _l({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Iu()&&(mp.set(t,{isPagePerformanceReported:!1}),fp?this.publish(fp,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),op(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=mp.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=mp.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(m){}(fp=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(fp,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:gp(i.domainLookupEnd-i.domainLookupStart),tcp:gp(i.connectEnd-i.connectStart),ssl:gp(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:gp(i.responseStart-i.requestStart),contentDownload:gp(i.responseEnd-i.responseStart),domParse:gp(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:gp(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:gp(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=p(p({},n),{engineInit:gp(t,0,1e4),bundleLoad:gp(e,0,1e4)})),n):undefined},publish:function(r,i){var o=this;this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:$a(),event_type:f.PAGE_LOAD,event_category:Ka.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:pp.lcp,fcp:pp.fcp,fid:pp.fid,cls:pp.cls,ttfb:pp.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:xu(e),device_type:o.getDeviceType(),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=mp.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},getDeviceType:function(){var e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet|ipad/i.test(e)?"Tablet":"Desktop"},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){fp=n.buildPerformanceLog(t,e,r,i);e=mp.get(t);!fp||null!=e&&e.isPagePerformanceReported||n.publish(fp,t)})}catch(a){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==hi(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),yp=Math.min,vp=[].lastIndexOf,wp=!!vp&&1/[1].lastIndexOf(1,-0)<0,v=Gt("lastIndexOf"),bp=wp||!v?function(e){if(wp)return go(vp,this,arguments)||0;var t=Q(this),n=gt(t);if(0!==n){var r=n-1;for((r=1<arguments.length?yp(r,ut(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:vp,Sp=(O({target:"Array",proto:!0,forced:bp!==[].lastIndexOf},{lastIndexOf:bp}),new _l({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),r=new _l({name:"spa",originFireUrl:"",lastPageUrl:"",navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),Sp.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(a,e){var l=this;void 0===e&&(e="reload"),setTimeout(function(){a._customPageUrl=null;var r=location.pathname+location.hash+a.config.id,i=a.getOriginFrom(),o=l.lastPageUrl||undefined,s=l.resolveNavigationType(e,location.href);l.$walk(function(e){var t,n;e===a&&r&&r!==l.originFireUrl&&(n={event_id:$a(),event_type:f.PAGE_VIEW,event_category:Ka.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:xu(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:s,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),l.originFireUrl=r,l.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),kp="__MONITOR_SESSION_V1__";function _p(e){try{sessionStorage.setItem("__MONITOR_SESSION_V1__",JSON.stringify(e))}catch(Oy){}}function Cp(e,t){var n,r;"undefined"!=typeof window&&(n=Date.now(),(r=window[kp])?(r.sessionId=e,r.version+=1,r.source=t,r.createdAt=n,r.lastActivity=n):window[kp]={sessionId:e,createdAt:n,lastActivity:n,source:t,version:1},_p(window[kp]),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:t}})))}var Ip,xp,Ep,Rp,Ap=new Map,Op=(Ji(xp=dg,l=Ip=lu),xp.prototype=null===l?Object.create(l):(hg.prototype=l.prototype,new hg),dg.prototype.addExtBean=function(e,t){t&&this.extendBean(e,encodeURIComponent("string"==typeof t&&["ext1","ext2","ext3"].includes(e)?t.slice(0,1024):t))},dg.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},dg.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},dg.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(N){return""}},dg.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},dg.prototype.request=function(l,n,u){var c,d,h=this;this.config.reportImmediately||this.isReportReady?this.$request(l,c=function(e){var t=pa(ha("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&l.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===l.extraRetryOptions.requestId}),1),fa("tdem-web-retry-report-requests",JSON.stringify(t)),Ap["delete"](l.extraRetryOptions.success),Ap["delete"](l.extraRetryOptions.fail)),null!=n&&n(e)},d=function(e){if(!h.config.reportRetry)return null==u?void 0:u(e);var t,n="boolean"==typeof h.config.reportRetry?Tf:p(p({},Tf),h.config.reportRetry),r=n.maxRetryCount,i=void 0===r?Tf.maxRetryCount:r,r=n.retryInterval,r=void 0===r?Tf.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?Tf.whenRetryEndStillFail:n,s=(l.extraRetryOptions||(l.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),l.extraRetryOptions),a=(s.requestId=s.requestId||l.url+"-"+Date.now()+"-"+Math.random(),s.requestId),n=(s.retriedCount=s.retriedCount||0,s.success=s.success||a+"_successCallback",s.fail=s.fail||a+"_failCallback",pa(ha("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===a})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===a}),n[t]=l):n.push(l),fa("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;s.retriedCount<i?(l.extraRetryOptions.retriedCount+=1,h.$request(l,c,d)):("discard"===o&&((e=pa(ha("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==a})).length?fa("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(Oy){}}("tdem-web-retry-report-requests")),Ap["delete"](s.success),Ap["delete"](s.fail))},"function"==typeof r?r(l.extraRetryOptions.retriedCount):r),null!=u&&u(e),Ap.has(s.success)||Ap.set(s.success,c),Ap.has(s.fail)||Ap.set(s.fail,d)}):this.reportRequestQueue.push({options:l,success:n,fail:u})},dg.prototype.$request=function(a,e,t){var n,r,i,o;if(a&&"string"==typeof a.url&&""!==a.url&&this.bean.id)return o=a.url,!1!==a.addBean&&(o=function(e,t){var n,r,i,o=e,s=a.beanFilter||[];for(n in t)-1===s.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(o,p(p({},this.bean),{from:this.getCurrentPageUrl()}))),a.url=o,o=a.method||"get",r=this.config.onBeforeRequest,(a=r?r(a,this):a)?a.url?void((null!=a&&a.sendBeacon||this.sendNow)&&"function"==typeof(null==navigator?void 0:navigator.sendBeacon)?navigator.sendBeacon(a.url,a.data):((n=new XMLHttpRequest).sendByTdem=!0,n.addEventListener("readystatechange",function(){4===n.readyState&&(400<=n.status||0===n.status?null!=t&&t(n.response):null!=e&&e(n.response))}),"get"===o.toLocaleLowerCase()?(n.open("get",(r=a.url,i=a.data,"string"!=typeof r?"":"object"===hi(i)&&i?(o=Object.getOwnPropertyNames(i).map(function(e){var t=i[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),r+(-1===r.indexOf("?")?"?":"&")+o):r)),n.send()):(n.open("post",a.url),a.contentType&&n.setRequestHeader("Content-Type",a.contentType),"string"==typeof a.data&&(a.data=a.data.replace(/eval/gi,"evaI")),n.send(a.data)))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},dg.prototype.publishPluginsLogs=function(){var e=dg.installedPlugins.find(function(e){return"reportAssetSpeed"===e.name});null!=e&&e.option.collectNotReportedLog(this)},dg.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},dg.prototype.reportWebVitals=function(e){try{var t=dg.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(N){}},dg.sessionID=(l="tdem",g=Hl,("undefined"==typeof window?{sessionId:g(),createdAt:Date.now(),lastActivity:Date.now(),source:l,version:1}:null!=(Tr=window[kp])&&Tr.sessionId?(Tr.lastActivity=Date.now(),_p(Tr),Tr):(Tr=function(){try{var e,t,n=sessionStorage.getItem("__MONITOR_SESSION_V1__");return n?"string"!=typeof(e=JSON.parse(n)).sessionId||"number"!=typeof e.createdAt||"number"!=typeof e.lastActivity||36e5<(t=Date.now())-e.createdAt||9e5<t-e.lastActivity?null:(e.lastActivity=t,e):null}catch(Oy){return null}}())?(_p(window[kp]=Tr),Tr):(Tr={sessionId:g(),createdAt:Date.now(),lastActivity:Date.now(),source:l,version:1},_p(window[kp]=Tr),Tr)).sessionId),dg),Zu=(new _l({name:"ie"}),new _l({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var s=this,a=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=Ra(t[0]);Cu(i)||(r={event_id:$a(),event_type:f.JS_ERROR,event_category:Ka.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},s.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=a&&a.call.apply(a,Xi([window],t))}},overrideTdemSend:function(){Op.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),Gt=(new _l({name:"onClose"}),new _l({name:"onClose",onNewTdem:function(n){var r,i=this;w.desktop()?(r=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=r&&r.call.apply(r,Xi([window],e))}):op(this.publishNotReportedLog.bind(this,n),{once:!0})},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),v="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Tp=RangeError,Mp=function(e){if(e===undefined)return 0;var e=ut(e),t=pt(e);if(e!==t)throw new Tp("Wrong length or index");return t},Pp=Math.sign||function(e){e=+e;return 0==e||e!=e?e:e<0?-1:1},Np=Math.abs,Lp=Math.fround||function(e){return t=1.1920928955078125e-7,n=11754943508222875e-54,r=Np(e=+e),e=Pp(e),r<n?e*(4503599627370496+r/n/t-4503599627370496)*n*t:34028234663852886e22<(t=(n=536870913*r)-(n-r))||t!=t?e*Infinity:e*t;var t,n,r},Fp=Array,Dp=Math.abs,Up=Math.pow,Bp=Math.floor,zp=Math.log,jp=Math.LN2,Wp=function(e){for(var t=we(this),n=gt(t),r=arguments.length,i=ht(1<r?arguments[1]:undefined,n),r=2<r?arguments[2]:undefined,o=r===undefined?n:ht(r,n);i<o;)t[i++]=e;return t},g=Ge.PROPER,Hp=Ge.CONFIGURABLE,Vp=rt.getterFor("ArrayBuffer"),Zp=rt.getterFor("DataView"),Gp=rt.set,Yp=x.ArrayBuffer,Jp=Yp,qp=Jp&&Jp.prototype,l=x.DataView,Kp=l&&l.prototype,b=Object.prototype,Xp=x.Array,$p=x.RangeError,Qp=y(Wp),eg=y([].reverse),tg=function(e,t,n){var r,i,o,s=Fp(n),a=8*n-t-1,n=(1<<a)-1,l=n>>1,u=23===t?Up(2,-24)-Up(2,-77):0,c=e<0||0===e&&1/e<0?1:0,d=0;for((e=Dp(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=Bp(zp(e)/jp),e*(o=Up(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+l?u/o:u*Up(2,1-l))*o&&(r++,o/=2),n<=r+l?(i=0,r=n):1<=r+l?(i=(e*o-1)*Up(2,t),r+=l):(i=e*Up(2,l-1)*Up(2,t),r=0));8<=t;)s[d++]=255&i,i/=256,t-=8;for(r=r<<t|i,a+=t;0<a;)s[d++]=255&r,r/=256,a-=8;return s[d-1]|=128*c,s},ng=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,s=o>>1,a=i-7,l=r-1,i=e[l--],u=127&i;for(i>>=7;0<a;)u=256*u+e[l--],a-=8;for(n=u&(1<<-a)-1,u>>=-a,a+=t;0<a;)n=256*n+e[l--],a-=8;if(0===u)u=1-s;else{if(u===o)return n?NaN:i?-Infinity:Infinity;n+=Up(2,t),u-=s}return(i?-1:1)*n*Up(2,u-t)},rg=function(e){return[255&e]},ig=function(e){return[255&e,e>>8&255]},og=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},sg=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},ag=function(e){return tg(Lp(e),23,4)},lg=function(e){return tg(e,52,8)},S=function(e,t,n){Jn(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},ug=function(e,t,n,r){e=Zp(e),n=Mp(n),r=!!r;if(n+t>e.byteLength)throw new $p("Wrong index");n+=e.byteOffset,e=or(e.bytes,n,n+t);return r?e:eg(e)},cg=function(e,t,n,r,i,o){var e=Zp(e),n=Mp(n),s=r(+i),a=!!o;if(n+t>e.byteLength)throw new $p("Wrong index");for(var l=e.bytes,u=n+e.byteOffset,c=0;c<t;c++)l[u+c]=s[a?c:t-c-1]};function dg(e){var t,n,r,o,s,a,i,l,u,c,d,h=Ip.call(this,e)||this;h.sendNow=!1,h.isReportReady=!1,h.reportRequestQueue=[],h.speedLogPipeline=iu([(c=[],d=(i=h).config,i.lifeCycle.on("destroy",function(){c.length=0}),function(e,t){Array.isArray(e)?c=c.concat(e):c.push(e),l&&c.length>=l||i.sendNow&&0<c.length?(c=hl(c),0<(c=Array.isArray(c)?c:[]).length&&t(c.splice(0,c.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,c=hl(c),0<(c=Array.isArray(c)?c:[]).length&&t(c.splice(0,c.length))},d.delay))}),(a=h.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=ml[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],ml[n]=r):gl[n]||yl(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],ml[n]=r,t(e)):gl[n]||yl(n))}),(r=h,function(t,n){Bf(function(e){r.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=h.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=h.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return h.sendPipeline([function(e,t){t({type:ma.SPEED,url:""+h.config.speedUrl,method:"post",data:Na(e,p(p({},h.bean),{from:h.getCurrentPageUrl()})),log:e})}],ma.SPEED)(e)}]),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(e.uin=e.uin||(null!=(t=document.cookie.match(/\buin=\D+(\d*)/))?t:[])[1]||(null!=(n=document.cookie.match(/\bilive_uin=\D*(\d+)/))?n:[])[1]||""),h.init(e),h.extendBean("sessionId",dg.sessionID),h.extendBean("from",h.getCurrentPageUrl()),"undefined"!=typeof document&&h.extendBean("referer",encodeURIComponent(document.referrer||"")),o=pa(ha("tdem-web-retry-report-requests"),[]),(s=function(){var i;o.length&&(i=o.splice(0,1)[0],fa("tdem-web-retry-report-requests",JSON.stringify(o)),h.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Ap.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{s()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Ap.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{s()}}))})();for(var f=1;f<=10;f++)h.addExtBean("ext"+f,e["ext"+f])}catch(E){console.warn(E),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),h.sendSDKError(E)}return h}function hg(){this.constructor=xp}v?(Ep=g&&"ArrayBuffer"!==Yp.name,m(function(){Yp(1)})&&m(function(){new Yp(-1)})&&!m(function(){return new Yp,new Yp(1.5),new Yp(NaN),1!==Yp.length||Ep&&!Hp})?Ep&&Hp&&Ze(Yp,"name","ArrayBuffer"):(((Jp=function(e){return Er(this,qp),Nr(new Yp(Mp(e)),this,Jp)}).prototype=qp).constructor=Jp,It(Jp,Yp)),Pn&&kn(Kp)!==b&&Pn(Kp,b),g=new l(new Jp(2)),Rp=y(Kp.setInt8),g.setInt8(0,2147483648),g.setInt8(1,2147483649),!g.getInt8(0)&&g.getInt8(1)||Lr(Kp,{setInt8:function(e,t){Rp(this,e,t<<24>>24)},setUint8:function(e,t){Rp(this,e,t<<24>>24)}},{unsafe:!0})):(qp=(Jp=function(e){Er(this,qp);e=Mp(e);Gp(this,{type:"ArrayBuffer",bytes:Qp(Xp(e),0),byteLength:e}),h||(this.byteLength=e,this.detached=!1)}).prototype,Kp=(l=function(e,t,n){Er(this,Kp),Er(e,qp);var r=Vp(e),i=r.byteLength,t=ut(t);if(t<0||i<t)throw new $p("Wrong offset");if(t+(n=n===undefined?i-t:Mp(n))>i)throw new $p("Wrong length");Gp(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),h||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,h&&(S(Jp,"byteLength",Vp),S(l,"buffer",Zp),S(l,"byteLength",Zp),S(l,"byteOffset",Zp)),Lr(Kp,{getInt8:function(e){return ug(this,1,e)[0]<<24>>24},getUint8:function(e){return ug(this,1,e)[0]},getInt16:function(e){e=ug(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=ug(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return sg(ug(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return sg(ug(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return ng(ug(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return ng(ug(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){cg(this,1,e,rg,t)},setUint8:function(e,t){cg(this,1,e,rg,t)},setInt16:function(e,t){cg(this,2,e,ig,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){cg(this,2,e,ig,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){cg(this,4,e,og,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){cg(this,4,e,og,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){cg(this,4,e,ag,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){cg(this,8,e,lg,t,2<arguments.length&&arguments[2])}})),En(Jp,"ArrayBuffer"),En(l,"DataView");var fg={ArrayBuffer:Jp,DataView:l},b=fg.ArrayBuffer,g=x.ArrayBuffer,pg=(O({global:!0,constructor:!0,forced:g!==b},{ArrayBuffer:b}),Li("ArrayBuffer"),fg.ArrayBuffer),gg=fg.DataView,S=gg.prototype,mg=n(pg.prototype.slice),yg=n(S.getUint8),vg=n(S.setUint8),l=m(function(){return!new pg(2).slice(1,undefined).byteLength}),wg=(O({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:l},{slice:function(e,t){if(mg&&t===undefined)return mg(C(this),e);for(var n=C(this).byteLength,r=ht(e,n),i=ht(t===undefined?n:t,n),e=new pg(pt(i-r)),o=new gg(this),s=new gg(e),a=0;r<i;)vg(s,a++,yg(o,r++));return e}}),O({global:!0,constructor:!0,forced:!v},{DataView:fg.DataView}),Math.log),bg=Math.log1p||function(e){e=+e;return-1e-8<e&&e<1e-8?e-e*e/2:wg(1+e)},g=Math.acosh,Sg=Math.log,kg=Math.sqrt,_g=Math.LN2,b=!g||710!==Math.floor(g(Number.MAX_VALUE))||g(Infinity)!==Infinity,S=(O({target:"Math",stat:!0,forced:b},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?Sg(e)+_g:bg(e-1+kg(e-1)*kg(1+e))}}),Math.asinh),Cg=Math.log,Ig=Math.sqrt,xg=Math.LN2,l=!(S&&0<1/S(0)),g=(O({target:"Math",stat:!0,forced:l},{asinh:function IE(e){e=+e;return isFinite(e)&&0!=e?e<0?-IE(-e):94906265.62425156<e?Cg(e)+xg:Cg(e+Ig(e*e+1)):e}}),Math.atanh),b=!(g&&1/g(-0)<0),S=(O({target:"Math",stat:!0,forced:b},{atanh:function(e){e=+e;return 0==e?e:bg(2*e/(1-e))/2}}),Math.expm1),Eg=Math.exp,Rg=!S||22025.465794806718<S(10)||S(10)<22025.465794806718||-2e-17!==S(-2e-17)?function(e){e=+e;return 0==e?e:-1e-6<e&&e<1e-6?e+e*e/2:Eg(e)-1}:S,l=Math.cosh,Ag=Math.abs,Og=Math.E,g=!l||l(710)===Infinity,Tg=(O({target:"Math",stat:!0,forced:g},{cosh:function(e){e=Rg(Ag(e)-1)+1;return(e+1/(e*Og*Og))*(Og/2)}}),O({target:"Math",stat:!0,forced:Rg!==Math.expm1},{expm1:Rg}),O({target:"Math",stat:!0},{log1p:bg}),Math.abs),Mg=Math.exp,Pg=Math.E,b=m(function(){return-2e-17!==Math.sinh(-2e-17)}),Ng=(O({target:"Math",stat:!0,forced:b},{sinh:function(e){e=+e;return Tg(e)<1?(Rg(e)-Rg(-e))/2:(Mg(e-1)-Mg(-e-1))*(Pg/2)}}),Math.exp),Lg=(O({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=Rg(e),n=Rg(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/(Ng(e)+Ng(-e))}}),c.values);O({target:"Object",stat:!0},{values:function(e){return Lg(e)}});var Fg,Dg,Ug,Bg=rt.enforce,zg=rt.get,S=x.Int8Array,jg=S&&S.prototype,l=x.Uint8ClampedArray,g=l&&l.prototype,Wg=S&&kn(S),Hg=jg&&kn(jg),b=Object.prototype,Vg=x.TypeError,c=Re("toStringTag"),Zg=Ce("TYPED_ARRAY_TAG"),Gg=v&&!!Pn&&"Opera"!==Bt(x.opera),l=!1,Yg={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Jg={BigInt64Array:8,BigUint64Array:8},qg=function(e){var t,e=kn(e);if(R(e))return(t=zg(e))&&A(t,"TypedArrayConstructor")?t.TypedArrayConstructor:qg(e)},Kg=function(e){return!!R(e)&&(e=Bt(e),A(Yg,e)||A(Jg,e))};for(Fg in Yg)(Ug=(Dg=x[Fg])&&Dg.prototype)?Bg(Ug).TypedArrayConstructor=Dg:Gg=!1;for(Fg in Jg)(Ug=(Dg=x[Fg])&&Dg.prototype)&&(Bg(Ug).TypedArrayConstructor=Dg);if((!Gg||!_(Wg)||Wg===Function.prototype)&&(Wg=function(){throw new Vg("Incorrect invocation")},Gg))for(Fg in Yg)x[Fg]&&Pn(x[Fg],Wg);if((!Gg||!Hg||Hg===b)&&(Hg=Wg.prototype,Gg))for(Fg in Yg)x[Fg]&&Pn(x[Fg].prototype,Hg);if(Gg&&kn(g)!==Hg&&Pn(g,Hg),h&&!A(Hg,c))for(Fg in Jn(Hg,c,{configurable:l=!0,get:function(){return R(this)?this[Zg]:undefined}}),Yg)x[Fg]&&Ze(x[Fg].prototype,Zg,Fg);var T={NATIVE_ARRAY_BUFFER_VIEWS:Gg,TYPED_ARRAY_TAG:l&&Zg,aTypedArray:function(e){if(Kg(e))return e;throw new Vg("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!_(e)||Pn&&!ne(Wg,e))throw new Vg(ce(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(h){if(n)for(var i in Yg){i=x[i];if(i&&A(i.prototype,e))try{delete i.prototype[e]}catch(G){try{i.prototype[e]=t}catch(U){}}}Hg[e]&&!n||ot(Hg,e,!n&&Gg&&jg[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(h){if(Pn){if(n)for(r in Yg)if((i=x[r])&&A(i,e))try{delete i[e]}catch(G){}if(Wg[e]&&!n)return;try{return ot(Wg,e,!n&&Gg&&Wg[e]||t)}catch(G){}}for(r in Yg)!(i=x[r])||i[e]&&!n||ot(i,e,t)}},getTypedArrayConstructor:qg,isView:function(e){return!!R(e)&&("DataView"===(e=Bt(e))||A(Yg,e)||A(Jg,e))},isTypedArray:Kg,TypedArray:Wg,TypedArrayPrototype:Hg},Xg=x.ArrayBuffer,$g=x.Int8Array,Qg=!T.NATIVE_ARRAY_BUFFER_VIEWS||!m(function(){$g(1)})||!m(function(){new $g(-1)})||!Pr(function(e){new $g,new $g(null),new $g(1.5),new $g(e)},!0)||m(function(){return 1!==new $g(new Xg(2),1,undefined).length}),em=Math.floor,tm=Number.isInteger||function(e){return!R(e)&&isFinite(e)&&em(e)===e},nm=RangeError,rm=RangeError,im=function(t,e){var n=function(){var e=ut(t);if(e<0)throw new nm("The argument can't be less than 0");return e}();if(n%e)throw new rm("Wrong offset");return n},om=Math.floor,sm=TypeError,am=function(e){e=Te(e,"number");if("number"==typeof e)throw new sm("Can't convert number to bigint");return BigInt(e)},lm=T.aTypedArrayConstructor,um=function(e){var t=Pu(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&he(r);var o,s,a,l,u,c,d,h,f=we(e),e=vr(f);if(e&&!mr(e))for(h=(d=br(f,e)).next,f=[];!(c=E(h,d)).done;)f.push(c.value);for(i&&2<n&&(r=Nt(r,arguments[2])),s=gt(f),l=function(e){e=Bt(e);return"BigInt64Array"===e||"BigUint64Array"===e}(a=new(lm(t))(s)),o=0;o<s;o++)u=i?r(f[o],o):f[o],a[o]=l?am(u):+u;return a},cm=function(e,t,n){for(var r=0,i=2<arguments.length?n:gt(t),o=new e(i);r<i;)o[r]=t[r++];return o},S=o(function(e){var r=St.f,l=Qt.forEach,f=rt.get,p=rt.set,g=rt.enforce,m=Ve.f,n=Ue.f,y=x.RangeError,v=fg.ArrayBuffer,t=v.prototype,w=fg.DataView,b=T.NATIVE_ARRAY_BUFFER_VIEWS,S=T.TYPED_ARRAY_TAG,k=T.TypedArray,_=T.TypedArrayPrototype,C=T.isTypedArray,i=function(e,t){Jn(e,t,{configurable:!0,get:function(){return f(this)[t]}})},I=function(e){return ne(t,e)||"ArrayBuffer"===(e=Bt(e))||"SharedArrayBuffer"===e},o=function(e,t){return C(e)&&!le(t)&&t in e&&tm(+t)&&0<=t},s=function(e,t){return t=Me(t),o(e,t)?j(2,e[t]):n(e,t)},a=function(e,t,n){return t=Me(t),!(o(e,t)&&R(n)&&A(n,"value"))||A(n,"get")||A(n,"set")||n.configurable||A(n,"writable")&&!n.writable||A(n,"enumerable")&&!n.enumerable?m(e,t,n):(e[t]=n.value,e)};h?(b||(Ue.f=s,Ve.f=a,i(_,"buffer"),i(_,"byteOffset"),i(_,"byteLength"),i(_,"length")),O({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:s,defineProperty:a}),e.exports=function(e,t,i){var u=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,s="set"+e,a=x[n],c=a,d=c&&c.prototype,e={},h=function(e,r){m(e,r,{get:function(){var e=this,t=r;return(e=f(e)).view[o](t*u+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=f(n=this)).view[s](t*u+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=om(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?Qg&&(c=t(function(e,t,n,r){return Er(e,d),Nr(R(t)?I(t)?r!==undefined?new a(t,im(n,u),r):n!==undefined?new a(t,im(n,u)):new a(t):C(t)?cm(c,t):E(um,c,t):new a(Mp(t)),e,c)}),Pn&&Pn(c,k),l(r(a),function(e){e in c||Ze(c,e,a[e])}),c.prototype=d):(c=t(function(e,t,n,r){Er(e,d);var i,o,s=0,a=0;if(R(t)){if(!I(t))return C(t)?cm(c,t):E(um,c,t);var l=t,a=im(n,u),n=t.byteLength;if(r===undefined){if(n%u)throw new y("Wrong length");if((i=n-a)<0)throw new y("Wrong length")}else if((i=Mp(r)*u)+a>n)throw new y("Wrong length");o=i/u}else o=Mp(t),l=new v(i=o*u);for(p(e,{buffer:l,byteOffset:a,byteLength:i,length:o,view:new w(l)});s<o;)h(e,s++)}),Pn&&Pn(c,k),d=c.prototype=un(_)),d.constructor!==c&&Ze(d,"constructor",c),g(d).TypedArrayConstructor=c,S&&Ze(d,S,n),c!==a);e[n]=c,O({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||Ze(c,"BYTES_PER_ELEMENT",u),"BYTES_PER_ELEMENT"in d||Ze(d,"BYTES_PER_ELEMENT",u),Li(n)}):e.exports=function(){}}),dm=(S("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),S("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),Math.min),hm=y([].copyWithin||function(e,t){var n=we(this),r=gt(n),i=ht(e,r),o=ht(t,r),e=2<arguments.length?arguments[2]:undefined,s=dm((e===undefined?r:ht(e,r))-o,r-i),a=1;for(o<i&&i<o+s&&(a=-1,o+=s-1,i+=s-1);0<s--;)o in n?n[i]=n[o]:Ti(n,i),i+=a,o+=a;return n}),fm=T.aTypedArray,pm=((0,T.exportTypedArrayMethod)("copyWithin",function(e,t){return hm(fm(this),e,t,2<arguments.length?arguments[2]:undefined)}),Qt.every),gm=T.aTypedArray,mm=((0,T.exportTypedArrayMethod)("every",function(e){return pm(gm(this),e,1<arguments.length?arguments[1]:undefined)}),T.aTypedArray),v=T.exportTypedArrayMethod,ym=y("".slice),vm=(v("fill",function(e){var t=arguments.length,e=(mm(this),"Big"===ym(Bt(this),0,3)?am(e):+e);return E(Wp,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},m(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),T.getTypedArrayConstructor),wm=function(e,t){return cm(vm(e),t)},bm=Qt.filter,Sm=T.aTypedArray,km=((0,T.exportTypedArrayMethod)("filter",function(e){e=bm(Sm(this),e,1<arguments.length?arguments[1]:undefined);return wm(this,e)}),Qt.find),_m=T.aTypedArray,Cm=((0,T.exportTypedArrayMethod)("find",function(e){return km(_m(this),e,1<arguments.length?arguments[1]:undefined)}),Qt.findIndex),Im=T.aTypedArray,xm=((0,T.exportTypedArrayMethod)("findIndex",function(e){return Cm(Im(this),e,1<arguments.length?arguments[1]:undefined)}),Qt.forEach),Em=T.aTypedArray,Rm=((0,T.exportTypedArrayMethod)("forEach",function(e){xm(Em(this),e,1<arguments.length?arguments[1]:undefined)}),i.includes),Am=T.aTypedArray,Om=((0,T.exportTypedArrayMethod)("includes",function(e){return Rm(Am(this),e,1<arguments.length?arguments[1]:undefined)}),i.indexOf),Tm=T.aTypedArray,Mm=((0,T.exportTypedArrayMethod)("indexOf",function(e){return Om(Tm(this),e,1<arguments.length?arguments[1]:undefined)}),Re("iterator")),b=x.Uint8Array,Pm=y(Vn.values),Nm=y(Vn.keys),Lm=y(Vn.entries),Fm=T.aTypedArray,g=T.exportTypedArrayMethod,Dm=b&&b.prototype,c=!m(function(){Dm[Mm].call([1])}),l=!!Dm&&Dm.values&&Dm[Mm]===Dm.values&&"values"===Dm.values.name,S=function(){return Pm(Fm(this))},Um=(g("entries",function(){return Lm(Fm(this))},c),g("keys",function(){return Nm(Fm(this))},c),g("values",S,c||!l,{name:"values"}),g(Mm,S,c||!l,{name:"values"}),T.aTypedArray),v=T.exportTypedArrayMethod,Bm=y([].join),zm=(v("join",function(e){return Bm(Um(this),e)}),T.aTypedArray),jm=((0,T.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return go(bp,zm(this),1<t?[e,arguments[1]]:[e])}),Qt.map),Wm=T.aTypedArray,Hm=((0,T.exportTypedArrayMethod)("map",function(e){e=jm(Wm(this),e,1<arguments.length?arguments[1]:undefined);return wm(this,e)}),u.left),Vm=T.aTypedArray,Zm=((0,T.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return Hm(Vm(this),e,t,1<t?arguments[1]:undefined)}),u.right),Gm=T.aTypedArray,Ym=((0,T.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return Zm(Gm(this),e,t,1<t?arguments[1]:undefined)}),T.aTypedArray),i=T.exportTypedArrayMethod,Jm=Math.floor,qm=(i("reverse",function(){for(var e,t=Ym(this).length,n=Jm(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),x.RangeError),Km=x.Int8Array,b=Km&&Km.prototype,Xm=b&&b.set,$m=T.aTypedArray,S=T.exportTypedArrayMethod,Qm=!m(function(){var e=new Uint8ClampedArray(2);return E(Xm,e,{length:1,0:3},1),3!==e[1]}),c=Qm&&T.NATIVE_ARRAY_BUFFER_VIEWS&&m(function(){var e=new Km(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),ey=(S("set",function(e){$m(this);var t=im(1<arguments.length?arguments[1]:undefined,1),n=we(e);if(Qm)return E(Xm,this,n,t);var e=this.length,r=gt(n),i=0;if(e<r+t)throw new qm("Wrong length");for(;i<r;)this[t+i]=n[i++]},!Qm||c),T.aTypedArray),ty=T.getTypedArrayConstructor,ny=((0,T.exportTypedArrayMethod)("slice",function(e,t){for(var n=or(ey(this),e,t),e=ty(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},m(function(){new Int8Array(1).slice()})),Qt.some),ry=T.aTypedArray,iy=((0,T.exportTypedArrayMethod)("some",function(e){return ny(ry(this),e,1<arguments.length?arguments[1]:undefined)}),T.aTypedArray),l=T.exportTypedArrayMethod,oy=x.Uint16Array,sy=oy&&n(oy.prototype.sort),g=!(!sy||m(function(){sy(new oy(2),null)})&&m(function(){sy(new oy(2),{})})),ay=!!sy&&!m(function(){if(ie)return ie<74;if(sp)return sp<67;if(ap)return!0;if(lp)return lp<602;for(var e,t=new oy(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(sy(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),ly=(l("sort",function(e){return e!==undefined&&he(e),ay?sy(this,e):cd(iy(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!ay||g),T.aTypedArray),uy=T.getTypedArrayConstructor,cy=((0,T.exportTypedArrayMethod)("subarray",function(e,t){var n=ly(this),r=n.length,e=ht(e,r);return new(uy(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,pt((t===undefined?r:ht(t,r))-e))}),x.Int8Array),dy=T.aTypedArray,v=T.exportTypedArrayMethod,hy=[].toLocaleString,fy=!!cy&&m(function(){hy.call(new cy(1))}),u=(v("toLocaleString",function(){return go(hy,fy?or(dy(this)):dy(this),or(arguments))},m(function(){return[1,2].toLocaleString()!==new cy([1,2]).toLocaleString()})||!m(function(){cy.prototype.toLocaleString.call([1,2])})),T.exportTypedArrayMethod),i=x.Uint8Array,b=i&&i.prototype||{},py=[].toString,gy=y([].join),c=(m(function(){py.call({})})&&(py=function(){return gy(this)}),b.toString!==py);u("toString",py,c),new _l({name:"aid"});var S=Ue.f,my=n("".slice),yy=Math.min,g=t("startsWith"),v=!(g||!(l=S(String.prototype,"startsWith"))||l.writable);O({target:"String",proto:!0,forced:!v&&!g},{startsWith:function(e){var t=I($(this)),e=(Ya(e),I(e)),n=pt(yy(1<arguments.length?arguments[1]:undefined,t.length));return my(t,n,n+e.length)===e}});Sy.generate=function(){return"rep_"+this.uuid32()},Sy.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var vy=Sy,wy="[SessionReplay]",by=!1;function Sy(){}function k(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];by&&console.log.apply(console,Xi([wy+"["+e+"]"],t))}function ky(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];by&&console.debug.apply(console,Xi([wy+"["+e+"]"],t))}function _y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];by&&console.log.apply(console,Xi([wy+"["+e+"] WARN:"],t))}function Cy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];by&&console.log.apply(console,Xi([wy+"["+e+"] ERROR:"],t))}Ay.prototype.setTdemInstance=function(e){this.tdemInstance=e},Ay.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.id,e=p({id:([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)}),replayId:vy.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousSessionId:t}:{});return this.session=e,this.saveSession(),this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e.id),Cp(e.id,"tdem"),k("SessionManager","Session created:",e.id),e},Ay.prototype.restoreSession=function(){var e;if(!this.config.stickySession)return null;try{var t,n=null==(e=this.getSessionStorage())?void 0:e.getItem("tdem_session");return n?(t=JSON.parse(n)).id&&t.started?this.isSessionExpired(t)?(k("SessionManager","Session expired, creating new session"),null):(t.replayId||(t.replayId=vy.generate()),k("SessionManager","Session restored:",(this.session=t).id),this.tdemInstance&&this.tdemInstance.extendBean("sessionId",t.id),Cp(t.id,"tdem"),t):(_y("SessionManager","Invalid session data"),null):null}catch(G){return Cy("SessionManager","Failed to restore session:",G),null}},Ay.prototype.saveSession=function(){var e;if(this.session&&this.config.stickySession)try{null!=(e=this.getSessionStorage())&&e.setItem("tdem_session",JSON.stringify(this.session))}catch(G){Cy("SessionManager","Failed to save session:",G)}},Ay.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},Ay.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now(),this.saveSession())},Ay.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,this.saveSession(),e):0},Ay.prototype.shouldRefreshSession=function(){return!this.session||this.isSessionExpired(this.session)},Ay.prototype.isSessionExpired=function(e){var t=Date.now();return t-e.started>this.config.maxSessionDuration||t-e.lastActivity>this.config.idleExpireDuration},Ay.prototype.getSession=function(){return this.session},Ay.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},Ay.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},Ay.prototype.getSessionStorage=function(){try{var e=window.sessionStorage;return e.setItem("__test__","1"),e.removeItem("__test__"),e}catch(Oy){return null}},Ay.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=this.getSessionStorage())&&e.removeItem("tdem_session")}catch(o){}};var Iy=Ay,xy=((i={})[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i),Ey=(Ry.prototype.ensureReady=function(){return qi(this,void 0,void 0,function(){return Ki(this,function(e){return[2,this.ready]})})},Ry.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},Ry.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},Ry);function Ry(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function Ay(e){var t;void 0===e&&(e={}),this.session=null,this.tdemInstance=null,this.config={stickySession:null==(t=e.stickySession)||t,idleExpireDuration:null!=(t=e.idleExpireDuration)?t:9e5,maxSessionDuration:null!=(t=e.maxSessionDuration)?t:36e5}}Fy.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),k("CompressionWorker","Worker created successfully"),new Ey(n))}catch(F){return _y("CompressionWorker","Failed to create worker, will fallback to sync buffer:",F),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,k("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){_y("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):k("EventBuffer","Worker not available, using sync buffer")},Fy.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady){var e=this.events;this.events=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addEventToWorker(r)}this.currentSize=0}},Fy.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(s){_y("EventBuffer","Failed to send event to worker:",s)}},Fy.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(_y("EventBuffer","Worker buffer size limit exceeded, dropping old events"),this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e)):(t=this.estimateEventSize(e),this.currentSize+t>this.config.maxSize&&(_y("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},Fy.prototype.getEvents=function(){return Xi(this.events)},Fy.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},Fy.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},Fy.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},Fy.prototype.finishAsync=function(){return qi(this,void 0,void 0,function(){var t,n,r;return Ki(this,function(e){switch(e.label){case 0:if(!(this.useWorker&&this.workerReady&&this.workerHandler&&0<this.workerEventCount))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.workerHandler.postMessage("finish")];case 2:return t=e.sent(),r=this.workerEventCount,n=this.workerSize,this.workerEventCount=0,this.workerSize=0,[2,{events:[],eventCount:r,uncompressedSize:n,eventsJson:t}];case 3:return _y("EventBuffer","Worker finish failed, falling back to sync:",e.sent()),[3,4];case 4:return[2,{events:r=this.getEvents(),eventCount:r.length,uncompressedSize:this.currentSize}]}})})},Fy.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},Fy.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},Fy.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},Fy.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(Oy){return 1024}},Fy.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===xy.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===xy.Meta){r=n;break}for(var i,o=0,s=Math.max(e,.2*this.config.maxSize),a=0;a<r&&o<s;)a++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<s;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},Fy.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===xy.Meta||e.type===xy.FullSnapshot})},Fy.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===xy.FullSnapshot)return t.timestamp}return null},Fy.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var Oy,Ty=Fy,My=Object.defineProperty,M=(e,t,n)=>(n=n,(t="symbol"!=typeof t?t+"":t)in(e=e)?My(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n),Py=Object.defineProperty,Ny=(e,t,n)=>(n=n,(t="symbol"!=typeof t?t+"":t)in(e=e)?Py(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n),Ly=((b=Ly||{})[b.Document=0]="Document",b[b.DocumentType=1]="DocumentType",b[b.Element=2]="Element",b[b.Text=3]="Text",b[b.CDATA=4]="CDATA",b[b.Comment=5]="Comment",b);function Fy(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}const Dy={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Uy={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},By={};function zy(e){if(By[e])return By[e];const t=globalThis[e],n=t.prototype,r=e in Dy?Dy[e]:void 0,i=Boolean(r&&r.every(e=>Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]")))),o=e in Uy?Uy[e]:void 0,s=Boolean(o&&o.every(e=>"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))));if(i&&s&&!globalThis.Zone)return By[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe"),i=(document.body.appendChild(r),r.contentWindow);if(!i)return t.prototype;const o=i[e].prototype;return document.body.removeChild(r),o?By[e]=o:n}catch{return n}}const jy={};function Wy(e,t,n){var r=e+"."+String(n);return jy[r]?jy[r].call(t):(e=zy(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(jy[r]=e).call(t):t[n])}const Hy={};function Vy(e,t,n){var r=e+"."+String(n);return Hy[r]?Hy[r].bind(t):"function"!=typeof(e=zy(e)[n])?t[n]:(Hy[r]=e).bind(t)}const Zy={ownerDocument:function(e){return Wy("Node",e,"ownerDocument")},childNodes:function(e){return Wy("Node",e,"childNodes")},parentNode:function(e){return Wy("Node",e,"parentNode")},parentElement:function(e){return Wy("Node",e,"parentElement")},textContent:function(e){return Wy("Node",e,"textContent")},contains:function(e,t){return Vy("Node",e,"contains")(t)},getRootNode:function(e){return Vy("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Wy("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Wy("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Wy("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Wy("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return zy("MutationObserver").constructor},patch:function(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}};function Gy(e){return e.nodeType===e.ELEMENT_NODE}function Yy(e){var t=e&&"host"in e&&"mode"in e&&Zy.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Zy.shadowRoot(t)===e)}function Jy(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function qy(e){try{var n=e.rules||e.cssRules;if(!n)return null;let t=e.href;return!t&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,e=>Ky(e,t)).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r}catch(G){return null}var r}function Ky(t,n){if("styleSheet"in t){let e;try{e=qy(t.styleSheet)||((i=(r=t).cssText).split('"').length<3?i:(i=["@import",`url(${JSON.stringify(r.href)})`],""===r.layerName?i.push("layer"):r.layerName&&i.push(`layer(${r.layerName})`),r.supportsText&&i.push(`supports(${r.supportsText})`),r.media.length&&i.push(r.media.mediaText),i.join(" ")+";"))}catch(G){e=t.cssText}return t.styleSheet.href?sv(e,t.styleSheet.href):e}var r,i;{let e=t.cssText;return"selectorText"in t&&t.selectorText.includes(":")&&(e=e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),n?sv(e,n):e}}class Xy{constructor(){Ny(this,"idNodeMap",new Map),Ny(this,"nodeMetaMap",new WeakMap)}getId(e){return e?(null==(e=this.getMeta(e))?void 0:e.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){var t=this.getId(e);this.idNodeMap["delete"](t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){var n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $y({element:e,maskInputOptions:t,tagName:n,type:r,value:i,maskInputFn:o}){let s=i||"";i=r&&Qy(r);return s=t[n.toLowerCase()]||i&&t[i]?o?o(s,e):"*".repeat(s.length):s}function Qy(e){return e.toLowerCase()}function ev(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Qy(t):null}function tv(e,t){let n;try{n=new URL(e,t??window.location.href)}catch(N){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==e?void 0:e[1])??null}const nv=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,rv=/^(?:[a-z+]+:)?\/\//i,iv=/^www\..*/i,ov=/^(data:)([^,]*),(.*)/i;function sv(e,a){return(e||"").replace(nv,(e,t,n,r,i,o)=>{n=n||i||o,i=t||r||"";if(!n)return e;if(rv.test(n)||iv.test(n))return`url(${i}${n}${i})`;if(ov.test(n))return`url(${i}${n}${i})`;if("/"===n[0])return`url(${i}${function(e){let t="";return t=(t=-1<e.indexOf("//")?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(a)+n}${i})`;var s=a.split("/"),o=n.split("/");s.pop();for(const e of o)"."!==e&&(".."===e?s.pop():s.push(e));return`url(${i}${s.join("/")}${i})`})}function av(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let lv=1;const uv=new RegExp("[^a-z0-9-_:]");function cv(){return lv++}let dv,hv;const fv=/^[^ \t\n\r\u000c]+/,pv=/^[, \t\n\r\u000c]+/,gv=new WeakMap;function mv(e,t){return t&&""!==t.trim()?yv(e,t):t}function yv(e,t){let n=gv.get(e);if(n||(n=e.createElement("a"),gv.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function vv(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?mv(e,r):"srcset"===n?function(r,i){if(""===i.trim())return i;let o=0;function e(e){var e=e.exec(i.substring(o));return e?(e=e[0],o+=e.length,e):""}for(var s=[];e(pv),!(o>=i.length);){let n=e(fv);if(","===n.slice(-1))n=mv(r,n.substring(0,n.length-1)),s.push(n);else{let e="",t=(n=mv(r,n),!1);for(;;){const r=i.charAt(o);if(""===r){s.push((n+e).trim());break}if(t)")"===r&&(t=!1);else{if(","===r){o+=1,s.push((n+e).trim());break}"("===r&&(t=!0)}e+=r,o+=1}}}return s.join(", ")}(e,r):"style"===n?sv(r,yv(e)):"object"===t&&"data"===n?mv(e,r):r)}function wv(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function bv(t,n,e){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE)for(let e=t.classList.length;e--;){var r=t.classList[e];if(n.test(r))return!0}return!!e&&bv(Zy.parentNode(t),n,e)}function Sv(e,t,n,r){let i;if(Gy(e)){if(i=e,!Zy.childNodes(i).length)return!1}else{if(null===Zy.parentElement(e))return!1;i=Zy.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(bv(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(x){}return!1}function kv(m,e){var t,{doc:y,mirror:e,blockClass:v,blockSelector:w,needsMask:n,inlineStylesheet:b,maskInputOptions:S={},maskTextFn:r,maskInputFn:k,dataURLOptions:_={},inlineImages:C,recordCanvas:I,keepIframeSrcFn:x,newlyAddedElement:E=!1,cssCaptured:i=!1}=e,R=(t=y,!(e=e).hasNode(t)||1===(t=e.getId(t))?void 0:t);switch(m.nodeType){case m.DOCUMENT_NODE:return"CSS1Compat"!==m.compatMode?{type:Ly.Document,childNodes:[],compatMode:m.compatMode}:{type:Ly.Document,childNodes:[]};case m.DOCUMENT_TYPE_NODE:return{type:Ly.DocumentType,name:m.name,publicId:m.publicId,systemId:m.systemId,rootId:R};case m.ELEMENT_NODE:{var A=m;var O={doc:y,blockClass:v,blockSelector:w,inlineStylesheet:b,maskInputOptions:S,maskInputFn:k,dataURLOptions:_,inlineImages:C,recordCanvas:I,keepIframeSrcFn:x,newlyAddedElement:E,rootId:R};let{doc:r,blockClass:i,blockSelector:e,inlineStylesheet:t,maskInputOptions:n={},maskInputFn:o,dataURLOptions:s={},inlineImages:a,recordCanvas:l,keepIframeSrcFn:u,newlyAddedElement:c=!1,rootId:d}=O,h=function(t,n,e){try{if("string"==typeof n){if(t.classList.contains(n))return!0}else for(let e=t.classList.length;e--;){const i=t.classList[e];if(n.test(i))return!0}if(e)return t.matches(e)}catch(i){}return!1}(A,i,e),f=(O=A)instanceof HTMLFormElement?"form":(O=Qy(O.tagName),uv.test(O)?"div":O);let p={};var T,M=A.attributes.length;for(let t=0;t<M;t++){const e=A.attributes[t];wv(f,e.name,e)||(p[e.name]=vv(r,f,Qy(e.name),e.value))}if("link"===f&&t){const O=Array.from(r.styleSheets).find(e=>e.href===A.href);let e=null;(e=O?qy(O):e)&&(delete p.rel,delete p.href,p._cssText=e)}if("style"===f&&A.sheet){let e=qy(A.sheet);e&&(1<A.childNodes.length&&(e=(O=e,T=A,function(s,a=!1){var l=Array.from(T.childNodes),u=[];let c=0;if(1<l.length&&s&&"string"==typeof s){let o=av(s,a);var d=o.length/s.length;for(let i=1;i<l.length;i++)if(l[i].textContent&&"string"==typeof l[i].textContent){var h=av(l[i].textContent,a);let r=3;for(;r<h.length&&(h[r].match(/[a-zA-Z0-9]/)||-1!==h.indexOf(h.substring(0,r),1));r++);for(;r<h.length;r++){let e=h.substring(0,r),t=o.split(e),n=-1;if(2===t.length)n=t[0].length;else if(2<t.length&&""===t[0]&&""!==l[i-1].textContent)n=o.indexOf(e,1);else if(1===t.length){if(e=e.substring(0,e.length-1),(t=o.split(e)).length<=1)return u.push(s),u;r=101}else r===h.length-1&&(n=o.indexOf(e));if(2<=t.length&&100<r){const s=l[i-1].textContent;if(s&&"string"==typeof s){const a=av(s).length;n=o.indexOf(e,a)}-1===n&&(n=t[0].length)}if(-1!==n){let e=Math.floor(n/d);for(;0<e&&e<s.length;){if((c+=1)>50*l.length)return u.push(s),u;var f=av(s.substring(0,e),a);if(f.length===n){u.push(s.substring(0,e)),s=s.substring(e),o=o.substring(n);break}f.length<n?e+=Math.max(1,Math.floor((n-f.length)/d)):e-=Math.max(1,Math.floor((f.length-n)*d))}break}}}}return u.push(s),u}(O).join("/* rr_split */"))),p._cssText=e)}if(["input","textarea","select"].includes(f)){const O=A.value,e=A.checked;"radio"!==p.type&&"checkbox"!==p.type&&"submit"!==p.type&&"button"!==p.type&&O?p.value=$y({element:A,type:ev(A),tagName:f,value:O,maskInputOptions:n,maskInputFn:o}):e&&(p.checked=e)}if("option"===f&&(A.selected&&!n.select?p.selected=!0:delete p.selected),"dialog"===f&&A.open&&(p.rr_open_mode=A.matches("dialog:modal")?"modal":"non-modal"),"canvas"===f&&l)if("2d"===A.__context)!function(n){var r=n.getContext("2d");if(r)for(let t=0;t<n.width;t+=50)for(let e=0;e<n.height;e+=50){var i=r.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(r,t,e,Math.min(50,n.width-t),Math.min(50,n.height-e)).data.buffer).some(e=>0!==e))return}return 1}(A)&&(p.rr_dataURL=A.toDataURL(s.type,s.quality));else if(!("__context"in A)){const O=A.toDataURL(s.type,s.quality),e=r.createElement("canvas"),t=(e.width=A.width,e.height=A.height,e.toDataURL(s.type,s.quality));O!==t&&(p.rr_dataURL=O)}if("img"===f&&a){dv||(dv=r.createElement("canvas"),hv=dv.getContext("2d"));const O=A,e=O.currentSrc||O.getAttribute("src")||"<unknown-src>",t=O.crossOrigin,n=()=>{O.removeEventListener("load",n);try{dv.width=O.naturalWidth,dv.height=O.naturalHeight,hv.drawImage(O,0,0),p.rr_dataURL=dv.toDataURL(s.type,s.quality)}catch(N){if("anonymous"!==O.crossOrigin)return O.crossOrigin="anonymous",void(O.complete&&0!==O.naturalWidth?n():O.addEventListener("load",n));console.warn(`Cannot inline img src=${e}! Error: `+N)}"anonymous"===O.crossOrigin&&(t?p.crossOrigin=t:O.removeAttribute("crossorigin"))};O.complete&&0!==O.naturalWidth?n():O.addEventListener("load",n)}if(["audio","video"].includes(f)){const O=p;O.rr_mediaState=A.paused?"paused":"played",O.rr_mediaCurrentTime=A.currentTime,O.rr_mediaPlaybackRate=A.playbackRate,O.rr_mediaMuted=A.muted,O.rr_mediaLoop=A.loop,O.rr_mediaVolume=A.volume}if(c||(A.scrollLeft&&(p.rr_scrollLeft=A.scrollLeft),A.scrollTop&&(p.rr_scrollTop=A.scrollTop)),h){let{width:e,height:t}=A.getBoundingClientRect();p={"class":p["class"],rr_width:e+"px",rr_height:t+"px"}}"iframe"!==f||u(p.src)||(A.contentDocument||(p.rr_src=p.src),delete p.src);let g;try{customElements.get(f)&&(g=!0)}catch(V){}return{type:Ly.Element,tagName:f,attributes:p,childNodes:[],isSVG:Boolean("svg"===A.tagName||A.ownerSVGElement)||void 0,needBlock:h,rootId:d,isCustom:g};return}case m.TEXT_NODE:{O=m;var o={doc:y,needsMask:n,maskTextFn:r,rootId:R,cssCaptured:i};var{needsMask:s,maskTextFn:a,rootId:l,cssCaptured:u}=o,c=Zy.parentNode(O),c=c&&c.tagName;let e="";var d="STYLE"===c||void 0,c="SCRIPT"===c||void 0;return c?e="SCRIPT_PLACEHOLDER":u||(e=Zy.textContent(O),d&&(e=e&&sv(e,yv(o.doc)))),!d&&!c&&e&&s&&(e=a?a(e,Zy.parentElement(O)):e.replace(/[\S]/g,"*")),{type:Ly.Text,textContent:e||"",rootId:l};return}case m.CDATA_SECTION_NODE:return{type:Ly.CDATA,textContent:"",rootId:R};case m.COMMENT_NODE:return{type:Ly.Comment,textContent:Zy.textContent(m)||"",rootId:R};default:return!1}}function _v(e){return null==e?"":e.toLowerCase()}function Cv(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function Iv(t,n){let{doc:r,mirror:i,blockClass:o,blockSelector:s,maskTextClass:a,maskTextSelector:l,skipChild:u=!1,inlineStylesheet:c=!0,maskInputOptions:d={},maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:k=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:e=!1,cssCaptured:C=!1}=n,I=n.needsMask,{preserveWhiteSpace:x=!0}=n;I=I||Sv(t,a,l,void 0===I);n=kv(t,{doc:r,mirror:i,blockClass:o,blockSelector:s,needsMask:I,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:_,newlyAddedElement:e,cssCaptured:C});if(!n)return console.warn(t,"not serialized"),null;var E=i.hasNode(t)?i.getId(t):function(e,t){if(t.comment&&e.type===Ly.Comment)return 1;if(e.type===Ly.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===tv(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(_v(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===_v(e.attributes.name)||"icon"===_v(e.attributes.rel)||"apple-touch-icon"===_v(e.attributes.rel)||"shortcut icon"===_v(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&_v(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(_v(e.attributes.property).match(/^(og|twitter|fb):/)||_v(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===_v(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===_v(e.attributes.name)||"googlebot"===_v(e.attributes.name)||"bingbot"===_v(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===_v(e.attributes.name)||"generator"===_v(e.attributes.name)||"framework"===_v(e.attributes.name)||"publisher"===_v(e.attributes.name)||"progid"===_v(e.attributes.name)||_v(e.attributes.property).match(/^article:/)||_v(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===_v(e.attributes.name)||"yandex-verification"===_v(e.attributes.name)||"csrf-token"===_v(e.attributes.name)||"p:domain_verify"===_v(e.attributes.name)||"verify-v1"===_v(e.attributes.name)||"verification"===_v(e.attributes.name)||"shopify-checkout-api-token"===_v(e.attributes.name)))return 1}}}(n,p)||!x&&n.type===Ly.Text&&!n.textContent.replace(/^\s+|\s+$/gm,"").length?-2:lv++,R=Object.assign(n,{id:E});if(i.add(t,R),-2===E)return null;v&&v(t);let A=!u;if(R.type===Ly.Element){A=A&&!R.needBlock,delete R.needBlock;const n=Zy.shadowRoot(t);n&&Jy(n)&&(R.isShadowHost=!0)}if((R.type===Ly.Document||R.type===Ly.Element)&&A){p.headWhitespace&&R.type===Ly.Element&&"head"===R.tagName&&(x=!1);const n={doc:r,mirror:i,blockClass:o,blockSelector:s,needsMask:I,maskTextClass:a,maskTextSelector:l,skipChild:u,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_,cssCaptured:!1};if(R.type!==Ly.Element||"textarea"!==R.tagName||void 0===R.attributes.value){R.type===Ly.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(n.cssCaptured=!0);for(const r of Array.from(Zy.childNodes(t))){const t=Iv(r,n);t&&R.childNodes.push(t)}}let e=null;if(Gy(t)&&(e=Zy.shadowRoot(t)))for(const t of Array.from(Zy.childNodes(e))){const r=Iv(t,n);r&&(Jy(e)&&(r.isShadow=!0),R.childNodes.push(r))}}n=Zy.parentNode(t);return n&&Yy(n)&&Jy(n)&&(R.isShadow=!0),R.type===Ly.Element&&"iframe"===R.tagName&&function(n,r,i){const o=n.contentWindow;if(o){let e,t=!1;try{e=o.document.readyState}catch(G){return}if("complete"!==e){const o=setTimeout(()=>{t||(r(),t=!0)},i);return n.addEventListener("load",()=>{clearTimeout(o),t=!0,r()})}if("about:blank"!==o.location.href||"about:blank"===n.src||""===n.src)return setTimeout(r,0),n.addEventListener("load",r);n.addEventListener("load",r)}}(t,()=>{var e=t.contentDocument;e&&w&&(e=Iv(e,{doc:e,mirror:i,blockClass:o,blockSelector:s,needsMask:I,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_}))&&w(t,e)},b),R.type===Ly.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===tv(R.attributes.href))&&function(e,t,n){let r,i=!1;try{r=e.sheet}catch(G){return}if(!r){const o=setTimeout(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{clearTimeout(o),i=!0,t()})}}(t,()=>{var e;S&&(e=Iv(t,{doc:r,mirror:i,blockClass:o,blockSelector:s,needsMask:I,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:h,maskInputFn:f,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:x,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:_}))&&S(t,e)},k),R}var xv,Ev,Rv,c={exports:{}},Av=String,u=function(){return{isColorSupported:!1,reset:Av,bold:Av,dim:Av,italic:Av,underline:Av,inverse:Av,hidden:Av,strikethrough:Av,black:Av,red:Av,green:Av,yellow:Av,blue:Av,magenta:Av,cyan:Av,white:Av,gray:Av,bgBlack:Av,bgRed:Av,bgGreen:Av,bgYellow:Av,bgBlue:Av,bgMagenta:Av,bgCyan:Av,bgWhite:Av}},n=(c.exports=u(),c.exports.createColors=u,c.exports),t=(xv=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?xv:("function"==typeof(Ev=xv["default"])?(Rv=function xv(){return this instanceof xv?Reflect.construct(Ev,arguments,this.constructor):Ev.apply(this,arguments)}).prototype=Ev.prototype:Rv={},Object.defineProperty(Rv,"__esModule",{value:!0}),Object.keys(xv).forEach(function(e){var t=Object.getOwnPropertyDescriptor(xv,e);Object.defineProperty(Rv,e,t.get?t:{enumerable:!0,get:function(){return xv[e]}})}),Rv);let Ov=n,Tv=t,Mv=class L extends Error{constructor(e,t,n,r,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),r&&(this.source=r),o&&(this.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,L)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ov.isColorSupported),Tv&&e&&(t=Tv(t));let i,o,n=t.split(/\r?\n/),r=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),a=String(s).length;if(e){let{bold:t,gray:n,red:r}=Ov.createColors(!0);i=e=>t(r(e)),o=e=>n(e)}else i=o=e=>e;return n.slice(r,s).map((e,t)=>{var t=r+1+t,n=" "+(" "+t).slice(-a)+" | ";return t===this.line?(t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),i(">")+o(n)+e+"\n "+t+i("^")):" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},Pv=Mv;Mv["default"]=Mv;S={};S.isClean=Symbol("isClean"),S.my=Symbol("my");const Nv={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};l=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}beforeAfter(e,t){let n,r=(n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(let e=0;e<i;e++)n+=o}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),(n=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(n),this.builder("}",e,"end")}body(t){let n=t.nodes.length-1;for(;0<n&&"comment"===t.nodes[n].type;)--n;var r=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var i=t.nodes[e],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,n!==e||r)}}comment(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n=n||t,!t||void 0===(r=e.raws[t])){var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return Nv[n];i=e.root();if(i.rawCache||(i.rawCache={}),"undefined"!=typeof i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var o="raw"+((o=n)[0].toUpperCase()+o.slice(1));this[o]?r=this[o](i,e):i.walk(e=>{if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=Nv[n]),i.rawCache[n]=r}return r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let n;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(n){if(n.raws.indent)return n.raws.indent;let r;return n.walk(e=>{var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}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)}},v=l;l["default"]=l;let Lv=v;function Fv(e,t){new Lv(t).stringify(e)}g=Fv;Fv["default"]=Fv;let{isClean:Dv,my:Uv}=S,Bv=Pv,zv=v,jv=g;i=class{constructor(e={}){for(var t in this.raws={},this[Dv]=!1,this[Uv]=!0,e)if("nodes"===t){this.nodes=[];for(var n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var 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={}){var t,n=function s(n,r){let i=new n.constructor;for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&"proxyCache"!==o){let e=n[o],t=typeof e;"parent"===o&&"object"==t?r&&(i[o]=r):"source"===o?i[o]=e:Array.isArray(e)?i[o]=e.map(e=>s(e,i)):("object"==t&&null!==e&&(e=s(e)),i[o]=e)}return i}(this);for(t in e)n[t]=e[t];return n}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var n,r;return this.source?({end:n,start:r}=this.rangeBy(t),this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)):new Bv(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[Dv]){this[Dv]=!1;let e=this;for(;e=e.parent;)e[Dv]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}positionInside(t,e){let n=e||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var r,i;return e.word?-1!==(i=(r=this.toString()).indexOf(e.word))&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1))),{end:n=n.line<t.line||n.line===t.line&&n.column<=t.column?{column:t.column+1,line:t.line}:n,start:t}}raw(e,t){return(new zv).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...n){if(this.parent){let e=this,t=!1;for(var r of n)r===this?t=!0:t?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var n,r={},i=null==t;t=t||new Map;let o=0;for(n in this)if(Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n){var s=this[n];if(Array.isArray(s))r[n]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[n]=s.toJSON(null,t);else if("source"===n){let e=t.get(s.input);null==e&&(e=o,t.set(s.input,o),o++),r[n]={end:s.end,inputId:e,start:s.start}}else r[n]=s}return i&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=jv){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}get proxyOf(){return this}},b=i,i["default"]=i,u=b,c=class extends u{constructor(e){super(e=e&&"undefined"!=typeof e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},n=c,c["default"]=c,l={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(r,i=21)=>(e=i)=>{let t="",n=e;for(;n--;)t+=r[Math.random()*r.length|0];return t}};let{SourceMapConsumer:Wv,SourceMapGenerator:Hv}=t,{existsSync:Vv,readFileSync:Zv}=t,{dirname:Gv,join:Yv}=t;v=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Gv(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new Wv(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}loadFile(e){if(this.root=Gv(e),Vv(e))return this.mapFile=e,Zv(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof Wv)return Hv.fromSourceMap(e).toString();if(e instanceof Hv)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var n=this.loadFile(e);if(n)return n;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=Yv(Gv(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},i=v;v["default"]=v;let{SourceMapConsumer:Jv,SourceMapGenerator:qv}=t,{fileURLToPath:Kv,pathToFileURL:Xv}=t,{isAbsolute:$v,resolve:Qv}=t,e0=l.nanoid,t0=t,n0=Pv,r0=i,i0=Symbol("fromOffsetCache"),o0=Boolean(Jv&&qv),s0=Boolean(Qv&&$v),a0=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!s0||/^\w+:\/\//.test(t.from)||$v(t.from)?this.file=t.from:this.file=Qv(t.from)),s0&&o0&&(e=new r0(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+e0(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,o,s;t&&"object"==typeof t?(a=n,n="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),s="number"==typeof a.offset?(u=this.fromOffset(a.offset),o=u.line,u.col):(o=a.line,a.column)):n||(t=(l=this.fromOffset(t)).line,n=l.col);var a,l,u=this.origin(t,n,o,s);return(i=u?new n0(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):new n0(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(Xv&&(i.input.url=Xv(this.file).toString()),i.input.file=this.file),i}fromOffset(n){let r;if(this[i0])r=this[i0];else{var i=this.css.split("\n");r=new Array(i.length);let n=0;for(let e=0,t=i.length;e<t;e++)r[e]=n,n+=i[e].length+1;this[i0]=r}let o=0;if(r[r.length-1]<=n)o=r.length-1;else{let e,t=r.length-2;for(;o<t;)if(e=o+(t-o>>1),n<r[e])t=e-1;else{if(!(n>=r[e+1])){o=e;break}o=e+1}}return{col:n-r[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qv(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=$v(a.source)?Xv(a.source):new URL(a.source,this.map.consumer().sourceRoot||Xv(this.map.mapFile));t={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!Kv)throw new Error("file: protocol is not available in this PostCSS build");t.file=Kv(o)}e=s.sourceContentFor(a.source);return e&&(t.source=e),t}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},l0=a0,{SourceMapConsumer:u0,SourceMapGenerator:c0}=(a0["default"]=a0,t0&&t0.registerInput&&t0.registerInput(a0),t),{dirname:d0,relative:h0,resolve:f0,sep:p0}=t,g0=t.pathToFileURL,m0=l0,y0=Boolean(u0&&c0),v0=Boolean(d0&&f0&&h0&&p0),w0=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var r of this.previous()){let e,t=this.toUrl(this.path(r.file)),n=r.root||d0(r.file);!1===this.mapOpts.sourcesContent?(e=new u0(r.text)).sourcesContent&&(e.sourcesContent=null):e=r.consumer(),this.map.applySourceMap(e,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){var t;for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),v0&&y0&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=c0.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new c0({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new c0({file:this.outputFile(),ignoreInvalidMapping:!0});let r,i,o=1,s=1,a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(e,t,n)=>{this.css+=e,t&&"end"!==n&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=this.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),this.map.addMapping(a)),(r=e.match(/\n/g))?(o+=r.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(a.source=this.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),this.map.addMapping(a))})}isAnnotation(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?d0(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=d0(f0(n,this.mapOpts.annotation)));t=h0(n,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new m0(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let n={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!n[t]&&(n[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,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){var t=this.memoizedFileURLs.get(e);if(t)return t;if(g0)return t=g0(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===p0&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}};u=b,c=class extends u{constructor(e){super(e),this.type="comment"}},v=c;c["default"]=c;let b0,S0,k0,_0,{isClean:C0,my:I0}=S,x0=n,E0=v,R0=b,A0=class L extends R0{append(...e){for(var t of e){var n;for(n of this.normalize(t,this.last))this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){let e,t,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(e=this.indexes[n],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[n]+=1;return delete this.indexes[n],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(t,r)=>"proxyOf"===r?t:t[r]&&("each"===r||"string"==typeof r&&r.startsWith("walk")?(...e)=>t[r](...e.map(n=>"function"==typeof n?(e,t)=>n(e.toProxy(),t):n)):"every"===r||"some"===r?n=>t[r]((e,...t)=>n(e.toProxy(),...t)):"root"===r?()=>t.root().toProxy():"nodes"===r?t.nodes.map(e=>e.toProxy()):"first"===r||"last"===r?t[r].toProxy():t[r]),set:(e,t,n)=>(e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e);for(r of s)this.proxyOf.nodes.splice(o+1,0,r);for(i in this.indexes)n=this.indexes[i],o<n&&(this.indexes[i]=n+s.length);return this.markDirty(),this}insertBefore(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e);for(r of s)this.proxyOf.nodes.splice(o,0,r);for(i in this.indexes)n=this.indexes[i],o<=n&&(this.indexes[i]=n+s.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function F(e){return e.map(e=>(e.nodes&&(e.nodes=F(e.nodes)),delete e.source,e))}(b0(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var n of e=e.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if("root"===e.type&&"document"!==this.type)for(var r of e=e.nodes.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new x0(e)]}else if(e.selector)e=[new S0(e)];else if(e.name)e=[new k0(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new E0(e)]}return e.map(e=>(e[I0]||L.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[C0]&&function F(e){if(e[C0]=!1,e.proxyOf.nodes)for(var t of e.proxyOf.nodes)F(t)}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var n,r,i=this.normalize(t,this.first,"prepend").reverse();for(n of i)this.proxyOf.nodes.unshift(n);for(r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)t=this.indexes[n],e<=t&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(e=>{n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(r){return this.each((e,t)=>{let n;try{n=r(e,t)}catch(a){throw e.addToError(a)}return n=!1!==n&&e.walk?e.walk(r):n})}walkAtRules(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("atrule"===e.type)return r(e,t)}))}walkComments(n){return this.walk((e,t)=>{if("comment"===e.type)return n(e,t)})}walkDecls(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("decl"===e.type)return r(e,t)}))}walkRules(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("rule"===e.type)return r(e,t)}))}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]}};A0.registerParse=e=>{b0=e},A0.registerRule=e=>{S0=e},A0.registerAtRule=e=>{k0=e},A0.registerRoot=e=>{_0=e};l=A0;(A0["default"]=A0).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,k0.prototype):"rule"===e.type?Object.setPrototypeOf(e,S0.prototype):"decl"===e.type?Object.setPrototypeOf(e,x0.prototype):"comment"===e.type?Object.setPrototypeOf(e,E0.prototype):"root"===e.type&&Object.setPrototypeOf(e,_0.prototype),e[I0]=!0,e.nodes&&e.nodes.forEach(e=>{A0.rebuild(e)})};let O0,T0,M0=l,P0=class extends M0{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new O0(new T0,this,e).stringify()}};P0.registerLazyResult=e=>{O0=e},P0.registerProcessor=e=>{T0=e};t=P0;P0["default"]=P0;let N0={},L0=function(e){N0[e]||(N0[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};u=class{constructor(e,t={}){for(var n in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[n]=t[n]}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}},c=u;u["default"]=u;let F0=c,D0=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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);e=new F0(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},U0=D0;D0["default"]=D0;const B0="'".charCodeAt(0),z0='"'.charCodeAt(0),j0="\\".charCodeAt(0),W0="/".charCodeAt(0),H0="\n".charCodeAt(0),V0=" ".charCodeAt(0),Z0="\f".charCodeAt(0),G0="\t".charCodeAt(0),Y0="\r".charCodeAt(0),J0="[".charCodeAt(0),q0="]".charCodeAt(0),K0="(".charCodeAt(0),X0=")".charCodeAt(0),$0="{".charCodeAt(0),Q0="}".charCodeAt(0),ew=";".charCodeAt(0),tw="*".charCodeAt(0),nw=":".charCodeAt(0),rw="@".charCodeAt(0),iw=/[\t\n\f\r "#'()/;[\\\]{}]/g,ow=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sw=/.[\r\n"'(/\\]/,aw=/[\da-f]/i;var u=l,lw=class extends u{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)}},P=lw;u.registerAtRule(lw["default"]=lw);let uw,cw,dw=l,hw=class extends dw{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){e=super.normalize(e);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var r of e)r.raws.before=t.raws.before;return e}removeChild(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new uw(new cw,this,e).stringify()}};hw.registerLazyResult=e=>{uw=e},hw.registerProcessor=e=>{cw=e};lw=hw;hw["default"]=hw,dw.registerRoot(hw);let fw={comma:e=>fw.split(e,[","],!0),space:e=>fw.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(var c of e)u?u=!1:"\\"===c?u=!0:a?c===l&&(a=!1):'"'===c||"'"===c?(a=!0,l=c):"("===c?s+=1:")"===c?0<s&&--s:0===s&&t.includes(c)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=c;return!n&&""===i||r.push(i.trim()),r}},pw=fw,gw=(fw["default"]=fw,l),mw=pw,yw=class extends gw{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return mw.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},vw=yw,ww=(yw["default"]=yw,gw.registerRule(yw),n),bw=v,Sw=P,kw=lw,_w=vw;const Cw={empty:!0,space:!0};let Iw=l,xw=class{constructor(e){this.input=e,this.root=new kw,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,n,r,i=new Sw,o=(i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]),!1),s=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}checkMissedSemicolon(r){var i=this.colon(r);if(!1!==i){let t,n=0;for(let e=i-1;0<=e&&("space"===(t=r[e])[0]||2!==(n+=1));e--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}}colon(e){let t,n,r,i=0;for(var[o,s]of e.entries()){if("("===(n=(t=s)[0])&&(i+=1),")"===n&&--i,0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(t)}r=t}return!1}comment(e){var t=new bw,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=function(t,e={}){let r,i,o,s,a,l,u,c,d,h,f=t.css.valueOf(),p=e.ignoreErrors,g=f.length,m=0,y=[],v=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=g},nextToken:function(e){if(v.length)return v.pop();if(!(m>=g)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case H0:case V0:case G0:case Y0:case Z0:for(i=m;i+=1,(r=f.charCodeAt(i))===V0||r===H0||r===G0||r===Y0||r===Z0;);h=["space",f.slice(m,i)],m=i-1;break;case J0:case q0:case $0:case Q0:case nw:case ew:case X0:var n=String.fromCharCode(r);h=[n,n,m];break;case K0:if(c=y.length?y.pop()[1]:"",d=f.charCodeAt(m+1),"url"===c&&d!==B0&&d!==z0&&d!==V0&&d!==H0&&d!==G0&&d!==Z0&&d!==Y0){i=m;do{if(l=!1,-1===(i=f.indexOf(")",i+1))){if(p||t){i=m;break}w("bracket")}for(u=i;f.charCodeAt(u-1)===j0;)--u,l=!l}while(l);h=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),s=f.slice(m,i+1),-1===i||sw.test(s)?h=["(","(",m]:(h=["brackets",s,m,i],m=i);break;case B0:case z0:o=r===B0?"'":'"',i=m;do{if(l=!1,-1===(i=f.indexOf(o,i+1))){if(p||t){i=m+1;break}w("string")}for(u=i;f.charCodeAt(u-1)===j0;)--u,l=!l}while(l);h=["string",f.slice(m,i+1),m,i],m=i;break;case rw:iw.lastIndex=m+1,iw.test(f),i=0===iw.lastIndex?f.length-1:iw.lastIndex-2,h=["at-word",f.slice(m,i+1),m,i],m=i;break;case j0:for(i=m,a=!0;f.charCodeAt(i+1)===j0;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==W0&&r!==V0&&r!==H0&&r!==G0&&r!==Y0&&r!==Z0&&(i+=1,aw.test(f.charAt(i)))){for(;aw.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===V0&&(i+=1)}h=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===W0&&f.charCodeAt(m+1)===tw?(0===(i=f.indexOf("*/",m+2)+1)&&(p||t?i=f.length:w("comment")),h=["comment",f.slice(m,i+1),m,i]):(ow.lastIndex=m+1,ow.test(f),i=0===ow.lastIndex?f.length-1:ow.lastIndex-2,h=["word",f.slice(m,i+1),m,i],y.push(h)),i)}return m++,h}},position:function(){return m}}}(this.input)}decl(e,t){var i=new ww;this.init(i,e[0][2]);let n,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;0<=e;e--){var n=t[e],n=n[3]||n[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(":"===(n=e.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let s,a=[];for(;e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(n=e[r])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=r;0<e;e--){var u=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==u)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(i.important=!0,i.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.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){var t=new _w;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){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var 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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(n=l[0],a.push(l),"("===n||"["===n)i=i||l,o.push("("===n?")":"]");else if(s&&r&&"{"===n)i=i||l,o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<o.length&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){for(var e;!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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,o,s,a,l=n.length,u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(i=n[e])[0])&&e===l-1&&!r||"comment"===o&&(a=n[e-1]?n[e-1][0]:"empty",s=n[e+1]?n[e+1][0]:"empty",Cw[a]||Cw[s]||","===u.slice(-1))?c=!1:u+=i[1];var d;c||(d=n.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:d,value:u}),e[t]=u}rule(e){e.pop();var t=new _w;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,n){let r="";for(let e=n;e<t.length;e++)r+=t[e][1];return t.splice(n,t.length-n),r}unclosedBlock(){var 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})}},Ew=l0;function Rw(e,t){e=new Ew(e,t),e=new xw(e);try{e.parse()}catch(a){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===a.name&&t&&t.from&&(/\.scss$/i.test(t.from)?a.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?a.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(a.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),a}return e.root}u=Rw;Rw["default"]=Rw,Iw.registerParse(Rw);let{isClean:Aw,my:Ow}=S,Tw=w0,Mw=g,Pw=l,Nw=t,Lw=L0,Fw=U0,Dw=u,Uw=lw;const Bw={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zw={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},jw={Once:!0,postcssPlugin:!0,prepare:!0};function Ww(e){return"object"==typeof e&&"function"==typeof e.then}function Hw(e){let t=!1,n=Bw[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function Vw(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Hw(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function Zw(e){return e[Aw]=!1,e.nodes&&e.nodes.forEach(e=>Zw(e)),e}let Gw={},Yw=class L{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof L||t instanceof Fw)r=Zw(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=Dw;n.syntax&&(e=n.syntax.parse),(e=n.parser?n.parser:e).parse&&(e=e.parse);try{r=e(t,n)}catch(G){this.processed=!0,this.error=G}r&&!r[Ow]&&Pw.rebuild(r)}else r=Zw(t);this.result=new Fw(e,r,n),this.helpers={...Gw,postcss:Gw,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}"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){var n,r,i,o,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=a.postcssPlugin,e.setMessage())}catch(N){console&&console.error&&console.error(N)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(e of this.plugins)if("object"==typeof e)for(var n in e){if(!zw[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!jw[n])if("object"==typeof e[n])for(var r in e[n])t(e,"*"===r?n:n+"-"+r.toLowerCase(),e[n][r]);else"function"==typeof e[n]&&t(e,n,e[n])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(Ww(t))try{await t}catch(G){throw this.handleError(G)}}if(this.prepareVisitors(),this.hasListener){for(var n,r=this.result.root;!r[Aw];){r[Aw]=!0;for(var e=[Vw(r)];0<e.length;){var i=this.visitTick(e);if(Ww(i))try{await i}catch(L){i=e[e.length-1].node;throw this.handleError(L,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===r.type?(n=r.nodes.map(e=>t(e,this.helpers)),await Promise.all(n)):await t(r,this.helpers)}catch(L){throw this.handleError(L)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?Ww((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(G){throw this.handleError(G)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();let e=this.result.opts,t=Mw;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);var n=new Tw(t,this.result.root,this.result.opts).generate();this.result.css=n[0],this.result.map=n[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e of this.plugins)if(Ww(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[Aw];)t[Aw]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||Lw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(Ww(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:n,visitors:r}=t;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var[i,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=i;try{return o(n.toProxy(),this.helpers)}catch(x){throw this.handleError(x,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[Aw])return s[Aw]=!0,void e.push(Vw(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[Aw]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[Aw]=!0;for(t of Hw(e))if(0===t)e.nodes&&e.each(e=>{e[Aw]||this.walkSync(e)});else{var n=this.listeners[t];if(n&&this.visitSync(n,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"}};Yw.registerPostcss=e=>{Gw=e};S=Yw;Yw["default"]=Yw,Uw.registerLazyResult(Yw),Nw.registerLazyResult(Yw);let Jw=w0,qw=g,Kw=L0,Xw=u;const $w=U0;var Qw=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;e=qw;this.result=new $w(this._processor,void 0,this._opts),this.result.css=t;let r=this;Object.defineProperty(this.result,"root",{get:()=>r.root});n=new Jw(e,void 0,this._opts,t);n.isMap()?([e,t]=n.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(n.clearAnnotation(),this.result.css=n.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"production"===process.env.NODE_ENV||"from"in this._opts||Kw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),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=Xw;try{e=t(this._css,this._opts)}catch(G){this.error=G}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},e1=Qw;Qw["default"]=Qw;let t1=e1,n1=S,r1=t,i1=lw,o1=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?n1:t1)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},s1=o1,a1=(o1["default"]=o1,i1.registerProcessor(o1),r1.registerProcessor(o1),n),l1=i,u1=v,c1=P,d1=l0,h1=lw,f1=vw;function p1(e,n){if(Array.isArray(e))return e.map(e=>p1(e));let{inputs:t,...r}=e;if(t){n=[];for(var i of t){i={...i,__proto__:d1.prototype};i.map&&(i.map={...i.map,__proto__:l1.prototype}),n.push(i)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>p1(e,n))),r.source){let{inputId:e,...t}=r.source;r.source=t,null!=e&&(r.source.input=n[e])}if("root"===r.type)return new h1(r);if("decl"===r.type)return new a1(r);if("rule"===r.type)return new f1(r);if("comment"===r.type)return new u1(r);if("atrule"===r.type)return new c1(r);throw new Error("Unknown node type: "+e.type)}Qw=p1;p1["default"]=p1;let g1=Pv,m1=n,y1=S,v1=l,w1=s1,b1=g,S1=Qw,k1=t,_1=c,C1=v,I1=P,x1=U0,E1=l0,R1=u,A1=pw,O1=vw,T1=lw,M1=b;function P1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new w1(e)}P1.plugin=function(t,n){let e,r=!1;function i(...e){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=n(...e);return e.postcssPlugin=t,e.postcssVersion=(new w1).version,e}return Object.defineProperty(i,"postcss",{get:()=>e=e||i()}),i.process=function(e,t,n){return P1([i(n)]).process(e,t)},i},P1.stringify=b1,P1.parse=R1,P1.fromJSON=S1,P1.list=A1,P1.comment=e=>new C1(e),P1.atRule=e=>new I1(e),P1.decl=e=>new m1(e),P1.rule=e=>new O1(e),P1.root=e=>new T1(e),P1.document=e=>new k1(e),P1.CssSyntaxError=g1,P1.Declaration=m1,P1.Container=v1,P1.Processor=w1,P1.Document=k1,P1.Comment=C1,P1.Warning=_1,P1.AtRule=I1,P1.Result=x1,P1.Input=E1,P1.Rule=O1,P1.Root=T1,P1.Node=M1,y1.registerPostcss(P1);e1=P1,P1["default"]=P1,n=(i=e1)&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i["default"]:i;n.stringify,Object.defineProperty;var N1,L1,F1,S={exports:{}},D1=String,l=function(){return{isColorSupported:!1,reset:D1,bold:D1,dim:D1,italic:D1,underline:D1,inverse:D1,hidden:D1,strikethrough:D1,black:D1,red:D1,green:D1,yellow:D1,blue:D1,magenta:D1,cyan:D1,white:D1,gray:D1,bgBlack:D1,bgRed:D1,bgGreen:D1,bgYellow:D1,bgBlue:D1,bgMagenta:D1,bgCyan:D1,bgWhite:D1}},g=(S.exports=l(),S.exports.createColors=l,S.exports),Qw=(N1=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?N1:("function"==typeof(L1=N1["default"])?(F1=function N1(){return this instanceof N1?Reflect.construct(L1,arguments,this.constructor):L1.apply(this,arguments)}).prototype=L1.prototype:F1={},Object.defineProperty(F1,"__esModule",{value:!0}),Object.keys(N1).forEach(function(e){var t=Object.getOwnPropertyDescriptor(N1,e);Object.defineProperty(F1,e,t.get?t:{enumerable:!0,get:function(){return N1[e]}})}),F1);let U1=g,B1=Qw,z1=class L extends Error{constructor(e,t,n,r,i,o){super(e),this.name="CssSyntaxError",this.reason=e,i&&(this.file=i),r&&(this.source=r),o&&(this.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,L)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=U1.isColorSupported),B1&&e&&(t=B1(t));let i,o,n=t.split(/\r?\n/),r=Math.max(this.line-3,0),s=Math.min(this.line+2,n.length),a=String(s).length;if(e){let{bold:t,gray:n,red:r}=U1.createColors(!0);i=e=>t(r(e)),o=e=>n(e)}else i=o=e=>e;return n.slice(r,s).map((e,t)=>{var t=r+1+t,n=" "+(" "+t).slice(-a)+" | ";return t===this.line?(t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," "),i(">")+o(n)+e+"\n "+t+i("^")):" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e=e&&"\n\n"+e+"\n",this.name+": "+this.message+e}},j1=z1;z1["default"]=z1;t={};t.isClean=Symbol("isClean"),t.my=Symbol("my");const W1={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};c=class{constructor(e){this.builder=e}atrule(e,t){let n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}beforeAfter(e,t){let n,r=(n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),e.parent),i=0;for(;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(let e=0;e<i;e++)n+=o}return n}block(e,t){let n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),(n=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(n),this.builder("}",e,"end")}body(t){let n=t.nodes.length-1;for(;0<n&&"comment"===t.nodes[n].type;)--n;var r=this.raw(t,"semicolon");for(let e=0;e<t.nodes.length;e++){var i=t.nodes[e],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,n!==e||r)}}comment(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,n){let r;if(n=n||t,!t||void 0===(r=e.raws[t])){var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return W1[n];i=e.root();if(i.rawCache||(i.rawCache={}),"undefined"!=typeof i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var o="raw"+((o=n)[0].toUpperCase()+o.slice(1));this[o]?r=this[o](i,e):i.walk(e=>{if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=W1[n]),i.rawCache[n]=r}return r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(t){let n;return t.walk(e=>{if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}rawColon(e){let t;return e.walkDecls(e=>{if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(n){if(n.raws.indent)return n.raws.indent;let r;return n.walk(e=>{var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}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)}},v=c;c["default"]=c;let H1=v;function V1(e,t){new H1(t).stringify(e)}P=V1;V1["default"]=V1;let{isClean:Z1,my:G1}=t,Y1=j1,J1=v,q1=P;u=class{constructor(e={}){for(var t in this.raws={},this[Z1]=!1,this[G1]=!0,e)if("nodes"===t){this.nodes=[];for(var n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)),e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(var 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={}){var t,n=function s(n,r){let i=new n.constructor;for(var o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&"proxyCache"!==o){let e=n[o],t=typeof e;"parent"===o&&"object"==t?r&&(i[o]=r):"source"===o?i[o]=e:Array.isArray(e)?i[o]=e.map(e=>s(e,i)):("object"==t&&null!==e&&(e=s(e)),i[o]=e)}return i}(this);for(t in e)n[t]=e[t];return n}cloneAfter(e={}){e=this.clone(e);return this.parent.insertAfter(this,e),e}cloneBefore(e={}){e=this.clone(e);return this.parent.insertBefore(this,e),e}error(e,t={}){var n,r;return this.source?({end:n,start:r}=this.rangeBy(t),this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)):new Y1(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[Z1]){this[Z1]=!1;let e=this;for(;e=e.parent;)e[Z1]=!1}}next(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}positionBy(e,t){let n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}positionInside(t,e){let n=e||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let e=0;e<t;e++)"\n"===n[e]?(r=1,i+=1):r+=1;return{column:r,line:i}}prev(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};var r,i;return e.word?-1!==(i=(r=this.toString()).indexOf(e.word))&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r)):(e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1))),{end:n=n.line<t.line||n.line===t.line&&n.column<=t.column?{column:t.column+1,line:t.line}:n,start:t}}raw(e,t){return(new J1).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...n){if(this.parent){let e=this,t=!1;for(var r of n)r===this?t=!0:t?(this.parent.insertAfter(e,r),e=r):this.parent.insertBefore(e,r);t||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){var n,r={},i=null==t;t=t||new Map;let o=0;for(n in this)if(Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n){var s=this[n];if(Array.isArray(s))r[n]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[n]=s.toJSON(null,t);else if("source"===n){let e=t.get(s.input);null==e&&(e=o,t.set(s.input,o),o++),r[n]={end:s.end,inputId:e,start:s.start}}else r[n]=s}return i&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=q1){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}get proxyOf(){return this}},lw=u,u["default"]=u,b=lw,e1=class extends b{constructor(e){super(e=e&&"undefined"!=typeof e.value&&"string"!=typeof e.value?{...e,value:String(e.value)}:e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}},i=e1,e1["default"]=e1,n={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(r,i=21)=>(e=i)=>{let t="",n=e;for(;n--;)t+=r[Math.random()*r.length|0];return t}};let{SourceMapConsumer:K1,SourceMapGenerator:X1}=Qw,{existsSync:$1,readFileSync:Q1}=Qw,{dirname:eb,join:tb}=Qw;l=class{constructor(e,t){!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=eb(this.mapFile)),e)&&(this.text=e)}consumer(){return this.consumerCache||(this.consumerCache=new K1(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}loadFile(e){if(this.root=eb(e),$1(e))return this.mapFile=e,Q1(e,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof K1)return X1.fromSourceMap(e).toString();if(e instanceof X1)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}e=e(t);if(e){var n=this.loadFile(e);if(n)return n;throw new Error("Unable to load previous source map: "+e.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return t&&(e=tb(eb(t),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}},S=l;l["default"]=l;let{SourceMapConsumer:nb,SourceMapGenerator:rb}=Qw,{fileURLToPath:ib,pathToFileURL:ob}=Qw,{isAbsolute:sb,resolve:ab}=Qw,lb=n.nanoid,ub=Qw,cb=j1,db=S,hb=Symbol("fromOffsetCache"),fb=Boolean(nb&&rb),pb=Boolean(ab&&sb),gb=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!pb||/^\w+:\/\//.test(t.from)||sb(t.from)?this.file=t.from:this.file=ab(t.from)),pb&&fb&&(e=new db(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+lb(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let i,o,s;t&&"object"==typeof t?(a=n,n="number"==typeof(l=t).offset?(t=(u=this.fromOffset(l.offset)).line,u.col):(t=l.line,l.column),s="number"==typeof a.offset?(u=this.fromOffset(a.offset),o=u.line,u.col):(o=a.line,a.column)):n||(t=(l=this.fromOffset(t)).line,n=l.col);var a,l,u=this.origin(t,n,o,s);return(i=u?new cb(e,void 0===u.endLine?u.line:{column:u.column,line:u.line},void 0===u.endLine?u.column:{column:u.endColumn,line:u.endLine},u.source,u.file,r.plugin):new cb(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:s,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:s,endLine:o,line:t,source:this.css},this.file&&(ob&&(i.input.url=ob(this.file).toString()),i.input.file=this.file),i}fromOffset(n){let r;if(this[hb])r=this[hb];else{var i=this.css.split("\n");r=new Array(i.length);let n=0;for(let e=0,t=i.length;e<t;e++)r[e]=n,n+=i[e].length+1;this[hb]=r}let o=0;if(r[r.length-1]<=n)o=r.length-1;else{let e,t=r.length-2;for(;o<t;)if(e=o+(t-o>>1),n<r[e])t=e-1;else{if(!(n>=r[e+1])){o=e;break}o=e+1}}return{col:n-r[o]+1,line:o+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ab(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let i,o,s=this.map.consumer(),a=s.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof n&&(i=s.originalPositionFor({column:r,line:n})),o=sb(a.source)?ob(a.source):new URL(a.source,this.map.consumer().sourceRoot||ob(this.map.mapFile));t={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:o.toString()};if("file:"===o.protocol){if(!ib)throw new Error("file: protocol is not available in this PostCSS build");t.file=ib(o)}e=s.sourceContentFor(a.source);return e&&(t.source=e),t}toJSON(){var e,t={};for(e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map={...this.map},t.map.consumerCache)&&(t.map.consumerCache=void 0),t}get from(){return this.file||this.id}},mb=gb,{SourceMapConsumer:yb,SourceMapGenerator:vb}=(gb["default"]=gb,ub&&ub.registerInput&&ub.registerInput(gb),Qw),{dirname:wb,relative:bb,resolve:Sb,sep:kb}=Qw,_b=Qw.pathToFileURL,Cb=mb,Ib=Boolean(yb&&vb),xb=Boolean(wb&&Sb&&bb&&kb),Eb=class{constructor(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(var r of this.previous()){let e,t=this.toUrl(this.path(r.file)),n=r.root||wb(r.file);!1===this.mapOpts.sourcesContent?(e=new yb(r.text)).sourcesContent&&(e.sourcesContent=null):e=r.consumer(),this.map.applySourceMap(e,t,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){var t;for(let e=this.root.nodes.length-1;0<=e;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),xb&&Ib&&this.isMap())return this.generateMap();{let t="";return this.stringify(this.root,e=>{t+=e}),[t]}}generateMap(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=vb.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new vb({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new vb({file:this.outputFile(),ignoreInvalidMapping:!0});let r,i,o=1,s=1,a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(e,t,n)=>{this.css+=e,t&&"end"!==n&&(a.generated.line=o,a.generated.column=s-1,t.source&&t.source.start?(a.source=this.sourcePath(t),a.original.line=t.source.start.line,a.original.column=t.source.start.column-1):(a.source="<no source>",a.original.line=1,a.original.column=0),this.map.addMapping(a)),(r=e.match(/\n/g))?(o+=r.length,i=e.lastIndexOf("\n"),s=e.length-i):s+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(a.source=this.sourcePath(t),a.original.line=t.source.end.line,a.original.column=t.source.end.column-1,a.generated.line=o,a.generated.column=s-2):(a.source="<no source>",a.original.line=1,a.original.column=0,a.generated.line=o,a.generated.column=s-1),this.map.addMapping(a))})}isAnnotation(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}isSourcesContent(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?wb(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=wb(Sb(n,this.mapOpts.annotation)));t=bb(n,e);return this.memoizedPaths.set(e,t),t}previous(){var e;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(e=>{e.source&&e.source.input.map&&(e=e.source.input.map,this.previousMaps.includes(e)||this.previousMaps.push(e))}):(e=new Cb(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}setSourcesContent(){let n={};var e;this.root?this.root.walk(e=>{var t;e.source&&(t=e.source.input.from)&&!n[t]&&(n[t]=!0,t=this.usesFileUrls?this.toFileUrl(t):this.toUrl(this.path(t)),this.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,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){var t=this.memoizedFileURLs.get(e);if(t)return t;if(_b)return t=_b(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===kb&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}};g=lw,c=class extends g{constructor(e){super(e),this.type="comment"}},v=c;c["default"]=c;let Rb,Ab,Ob,Tb,{isClean:Mb,my:Pb}=t,Nb=i,Lb=v,Fb=lw,Db=class L extends Fb{append(...e){for(var t of e){var n;for(n of this.normalize(t,this.last))this.proxyOf.nodes.push(n)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(var t of this.nodes)t.cleanRaws(e)}each(r){if(this.proxyOf.nodes){let e,t,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(e=this.indexes[n],!1!==(t=r(this.proxyOf.nodes[e],e)));)this.indexes[n]+=1;return delete this.indexes[n],t}}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(t,r)=>"proxyOf"===r?t:t[r]&&("each"===r||"string"==typeof r&&r.startsWith("walk")?(...e)=>t[r](...e.map(n=>"function"==typeof n?(e,t)=>n(e.toProxy(),t):n)):"every"===r||"some"===r?n=>t[r]((e,...t)=>n(e.toProxy(),...t)):"root"===r?()=>t.root().toProxy():"nodes"===r?t.nodes.map(e=>e.toProxy()):"first"===r||"last"===r?t[r].toProxy():t[r]),set:(e,t,n)=>(e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e);for(r of s)this.proxyOf.nodes.splice(o+1,0,r);for(i in this.indexes)n=this.indexes[i],o<n&&(this.indexes[i]=n+s.length);return this.markDirty(),this}insertBefore(e,t){var n,r,i,o=this.index(e),s=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e);for(r of s)this.proxyOf.nodes.splice(o,0,r);for(i in this.indexes)n=this.indexes[i],o<=n&&(this.indexes[i]=n+s.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=function F(e){return e.map(e=>(e.nodes&&(e.nodes=F(e.nodes)),delete e.source,e))}(Rb(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var n of e=e.slice(0))n.parent&&n.parent.removeChild(n,"ignore");else if("root"===e.type&&"document"!==this.type)for(var r of e=e.nodes.slice(0))r.parent&&r.parent.removeChild(r,"ignore");else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Nb(e)]}else if(e.selector)e=[new Ab(e)];else if(e.name)e=[new Ob(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Lb(e)]}return e.map(e=>(e[Pb]||L.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Mb]&&function F(e){if(e[Mb]=!1,e.proxyOf.nodes)for(var t of e.proxyOf.nodes)F(t)}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){for(var t of e=e.reverse()){var n,r,i=this.normalize(t,this.first,"prepend").reverse();for(n of i)this.proxyOf.nodes.unshift(n);for(r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(e){return(e.parent=this).proxyOf.nodes.push(e),this}removeAll(){for(var e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)t=this.indexes[n],e<=t&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(t,n,r){return r||(r=n,n={}),this.walkDecls(e=>{n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(r){return this.each((e,t)=>{let n;try{n=r(e,t)}catch(a){throw e.addToError(a)}return n=!1!==n&&e.walk?e.walk(r):n})}walkAtRules(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk((e,t)=>{if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("atrule"===e.type)return r(e,t)}))}walkComments(n){return this.walk((e,t)=>{if("comment"===e.type)return n(e,t)})}walkDecls(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk((e,t)=>{if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("decl"===e.type)return r(e,t)}))}walkRules(n,r){return r?n instanceof RegExp?this.walk((e,t)=>{if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk((e,t)=>{if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk((e,t)=>{if("rule"===e.type)return r(e,t)}))}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]}};Db.registerParse=e=>{Rb=e},Db.registerRule=e=>{Ab=e},Db.registerAtRule=e=>{Ob=e},Db.registerRoot=e=>{Tb=e};u=Db;(Db["default"]=Db).rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ob.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ab.prototype):"decl"===e.type?Object.setPrototypeOf(e,Nb.prototype):"comment"===e.type?Object.setPrototypeOf(e,Lb.prototype):"root"===e.type&&Object.setPrototypeOf(e,Tb.prototype),e[Pb]=!0,e.nodes&&e.nodes.forEach(e=>{Db.rebuild(e)})};let Ub,Bb,zb=u,jb=class extends zb{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ub(new Bb,this,e).stringify()}};jb.registerLazyResult=e=>{Ub=e},jb.registerProcessor=e=>{Bb=e};b=jb;jb["default"]=jb;let Wb={},Hb=function(e){Wb[e]||(Wb[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};e1=class{constructor(e,t={}){for(var n in this.type="warning",this.text=e,t.node&&t.node.source&&(e=t.node.rangeBy(t),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),t)this[n]=t[n]}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}},l=e1;e1["default"]=e1;let Vb=l,Zb=class{constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,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);e=new Vb(e,t);return this.messages.push(e),e}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}},Gb=Zb;Zb["default"]=Zb;const Yb="'".charCodeAt(0),Jb='"'.charCodeAt(0),qb="\\".charCodeAt(0),Kb="/".charCodeAt(0),Xb="\n".charCodeAt(0),$b=" ".charCodeAt(0),Qb="\f".charCodeAt(0),eS="\t".charCodeAt(0),tS="\r".charCodeAt(0),nS="[".charCodeAt(0),rS="]".charCodeAt(0),iS="(".charCodeAt(0),oS=")".charCodeAt(0),sS="{".charCodeAt(0),aS="}".charCodeAt(0),lS=";".charCodeAt(0),uS="*".charCodeAt(0),cS=":".charCodeAt(0),dS="@".charCodeAt(0),hS=/[\t\n\f\r "#'()/;[\\\]{}]/g,fS=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,pS=/.[\r\n"'(/\\]/,gS=/[\da-f]/i;n=u,Qw=class extends n{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)}},g=Qw;n.registerAtRule(Qw["default"]=Qw);let mS,yS,vS=u,wS=class extends vS{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){e=super.normalize(e);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(var r of e)r.raws.before=t.raws.before;return e}removeChild(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new mS(new yS,this,e).stringify()}};wS.registerLazyResult=e=>{mS=e},wS.registerProcessor=e=>{yS=e};c=wS;wS["default"]=wS,vS.registerRoot(wS);let bS={comma:e=>bS.split(e,[","],!0),space:e=>bS.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],i="",o=!1,s=0,a=!1,l="",u=!1;for(var c of e)u?u=!1:"\\"===c?u=!0:a?c===l&&(a=!1):'"'===c||"'"===c?(a=!0,l=c):"("===c?s+=1:")"===c?0<s&&--s:0===s&&t.includes(c)&&(o=!0),o?(""!==i&&r.push(i.trim()),i="",o=!1):i+=c;return!n&&""===i||r.push(i.trim()),r}},SS=bS,kS=(bS["default"]=bS,u),_S=SS,CS=class extends kS{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return _S.comma(this.selector)}set selectors(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}},IS=CS,xS=(CS["default"]=CS,kS.registerRule(CS),i),ES=v,RS=g,AS=c,OS=IS;const TS={empty:!0,space:!0};let MS=u,PS=class{constructor(e){this.input=e,this.root=new AS,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,n,r,i=new RS,o=(i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]),!1),s=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&0<l.length?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(0<a.length){for(r=a.length-1,n=a[r];n&&"space"===n[0];)n=a[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(a.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),o&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),s&&(i.nodes=[],this.current=i)}checkMissedSemicolon(r){var i=this.colon(r);if(!1!==i){let t,n=0;for(let e=i-1;0<=e&&("space"===(t=r[e])[0]||2!==(n+=1));e--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}}colon(e){let t,n,r,i=0;for(var[o,s]of e.entries()){if("("===(n=(t=s)[0])&&(i+=1),")"===n&&--i,0===i&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return o}this.doubleColon(t)}r=t}return!1}comment(e){var t=new ES,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}createTokenizer(){this.tokenizer=function(t,e={}){let r,i,o,s,a,l,u,c,d,h,f=t.css.valueOf(),p=e.ignoreErrors,g=f.length,m=0,y=[],v=[];function w(e){throw t.error("Unclosed "+e,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=g},nextToken:function(e){if(v.length)return v.pop();if(!(m>=g)){var t=!!e&&e.ignoreUnclosed;switch(r=f.charCodeAt(m)){case Xb:case $b:case eS:case tS:case Qb:for(i=m;i+=1,(r=f.charCodeAt(i))===$b||r===Xb||r===eS||r===tS||r===Qb;);h=["space",f.slice(m,i)],m=i-1;break;case nS:case rS:case sS:case aS:case cS:case lS:case oS:var n=String.fromCharCode(r);h=[n,n,m];break;case iS:if(c=y.length?y.pop()[1]:"",d=f.charCodeAt(m+1),"url"===c&&d!==Yb&&d!==Jb&&d!==$b&&d!==Xb&&d!==eS&&d!==Qb&&d!==tS){i=m;do{if(l=!1,-1===(i=f.indexOf(")",i+1))){if(p||t){i=m;break}w("bracket")}for(u=i;f.charCodeAt(u-1)===qb;)--u,l=!l}while(l);h=["brackets",f.slice(m,i+1),m,i],m=i}else i=f.indexOf(")",m+1),s=f.slice(m,i+1),-1===i||pS.test(s)?h=["(","(",m]:(h=["brackets",s,m,i],m=i);break;case Yb:case Jb:o=r===Yb?"'":'"',i=m;do{if(l=!1,-1===(i=f.indexOf(o,i+1))){if(p||t){i=m+1;break}w("string")}for(u=i;f.charCodeAt(u-1)===qb;)--u,l=!l}while(l);h=["string",f.slice(m,i+1),m,i],m=i;break;case dS:hS.lastIndex=m+1,hS.test(f),i=0===hS.lastIndex?f.length-1:hS.lastIndex-2,h=["at-word",f.slice(m,i+1),m,i],m=i;break;case qb:for(i=m,a=!0;f.charCodeAt(i+1)===qb;)i+=1,a=!a;if(r=f.charCodeAt(i+1),a&&r!==Kb&&r!==$b&&r!==Xb&&r!==eS&&r!==tS&&r!==Qb&&(i+=1,gS.test(f.charAt(i)))){for(;gS.test(f.charAt(i+1));)i+=1;f.charCodeAt(i+1)===$b&&(i+=1)}h=["word",f.slice(m,i+1),m,i],m=i;break;default:m=(r===Kb&&f.charCodeAt(m+1)===uS?(0===(i=f.indexOf("*/",m+2)+1)&&(p||t?i=f.length:w("comment")),h=["comment",f.slice(m,i+1),m,i]):(fS.lastIndex=m+1,fS.test(f),i=0===fS.lastIndex?f.length-1:fS.lastIndex-2,h=["word",f.slice(m,i+1),m,i],y.push(h)),i)}return m++,h}},position:function(){return m}}}(this.input)}decl(e,t){var i=new xS;this.init(i,e[0][2]);let n,r=e[e.length-1];for(";"===r[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||function(t){for(let e=t.length-1;0<=e;e--){var n=t[e],n=n[3]||n[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(":"===(n=e.shift())[0]){i.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),i.raws.between+=n[1]}"_"!==i.prop[0]&&"*"!==i.prop[0]||(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let s,a=[];for(;e.length&&("space"===(s=e[0][0])||"comment"===s);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let r=e.length-1;0<=r;r--){if("!important"===(n=e[r])[1].toLowerCase()){i.important=!0;var l=this.stringFrom(e,r);" !important"!==(l=this.spacesFromEnd(e)+l)&&(i.raws.important=l);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=r;0<e;e--){var u=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==u)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(i.important=!0,i.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(i,"value",a.concat(e),t),i.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){var t=new OS;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){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}getPosition(e){var 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="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,n,r=!1,i=null,o=[],s=e[1].startsWith("--"),a=[],l=e;for(;l;){if(n=l[0],a.push(l),"("===n||"["===n)i=i||l,o.push("("===n?")":"]");else if(s&&r&&"{"===n)i=i||l,o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(a,s);break}if("{"===n)return void this.rule(a);if("}"===n){this.tokenizer.back(a.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),0<o.length&&this.unclosedBracket(i),t&&r){if(!s)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,s)}else this.unknownWord(a)}parse(){for(var e;!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)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,n,r){let i,o,s,a,l=n.length,u="",c=!0;for(let e=0;e<l;e+=1)"space"===(o=(i=n[e])[0])&&e===l-1&&!r||"comment"===o&&(a=n[e-1]?n[e-1][0]:"empty",s=n[e+1]?n[e+1][0]:"empty",TS[a]||TS[s]||","===u.slice(-1))?c=!1:u+=i[1];var d;c||(d=n.reduce((e,t)=>e+t[1],""),e.raws[t]={raw:d,value:u}),e[t]=u}rule(e){e.pop();var t=new OS;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(t,n){let r="";for(let e=n;e<t.length;e++)r+=t[e][1];return t.splice(n,t.length-n),r}unclosedBlock(){var 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})}},NS=mb;function LS(e,t){e=new NS(e,t),e=new PS(e);try{e.parse()}catch(a){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===a.name&&t&&t.from&&(/\.scss$/i.test(t.from)?a.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?a.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(a.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),a}return e.root}e1=LS;LS["default"]=LS,MS.registerParse(LS);let{isClean:FS,my:DS}=t,US=Eb,BS=P,zS=u,jS=b,WS=Hb,HS=Gb,VS=e1,ZS=c;const GS={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},YS={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},JS={Once:!0,postcssPlugin:!0,prepare:!0};function qS(e){return"object"==typeof e&&"function"==typeof e.then}function KS(e){let t=!1,n=GS[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function XS(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:KS(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function $S(e){return e[FS]=!1,e.nodes&&e.nodes.forEach(e=>$S(e)),e}let QS={},ek=class L{constructor(e,t,n){let r;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof L||t instanceof HS)r=$S(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{let e=VS;n.syntax&&(e=n.syntax.parse),(e=n.parser?n.parser:e).parse&&(e=e.parse);try{r=e(t,n)}catch(G){this.processed=!0,this.error=G}r&&!r[DS]&&zS.rebuild(r)}else r=$S(t);this.result=new HS(e,r,n),this.helpers={...QS,postcss:QS,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}"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){var n,r,i,o,s,a=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?a.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=a.postcssPlugin,r=a.postcssVersion,i=this.result.processor.version,o=r.split("."),s=i.split("."),o[0]!==s[0]||parseInt(o[1])>parseInt(s[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=a.postcssPlugin,e.setMessage())}catch(N){console&&console.error&&console.error(N)}return e}prepareVisitors(){this.listeners={};var e,t=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(e of this.plugins)if("object"==typeof e)for(var n in e){if(!YS[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!JS[n])if("object"==typeof e[n])for(var r in e[n])t(e,"*"===r?n:n+"-"+r.toLowerCase(),e[n][r]);else"function"==typeof e[n]&&t(e,n,e[n])}this.hasListener=0<Object.keys(this.listeners).length}async runAsync(){for(let e=this.plugin=0;e<this.plugins.length;e++){var t=this.plugins[e],t=this.runOnRoot(t);if(qS(t))try{await t}catch(G){throw this.handleError(G)}}if(this.prepareVisitors(),this.hasListener){for(var n,r=this.result.root;!r[FS];){r[FS]=!0;for(var e=[XS(r)];0<e.length;){var i=this.visitTick(e);if(qS(i))try{await i}catch(L){i=e[e.length-1].node;throw this.handleError(L,i)}}}if(this.listeners.OnceExit)for(let[e,t]of this.listeners.OnceExit){this.result.lastPlugin=e;try{"document"===r.type?(n=r.nodes.map(e=>t(e,this.helpers)),await Promise.all(n)):await t(r,this.helpers)}catch(L){throw this.handleError(L)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{var e;return"object"==typeof t&&t.Once?"document"===this.result.root.type?qS((e=this.result.root.nodes.map(e=>t.Once(e,this.helpers)))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(G){throw this.handleError(G)}}stringify(){if(this.error)throw this.error;if(!this.stringified){this.stringified=!0,this.sync();let e=this.result.opts,t=BS;e.syntax&&(t=e.syntax.stringify),(t=e.stringifier?e.stringifier:t).stringify&&(t=t.stringify);var n=new US(t,this.result.root,this.result.opts).generate();this.result.css=n[0],this.result.map=n[1]}return this.result}sync(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e of this.plugins)if(qS(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var t=this.result.root;!t[FS];)t[FS]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(var n of t.nodes)this.visitSync(this.listeners.OnceExit,n);else this.visitSync(this.listeners.OnceExit,t)}}return this.result}then(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||WS("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}toString(){return this.css}visitSync(e,t){for(var[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(qS(e))throw this.getAsyncError()}}visitTick(e){var t=e[e.length-1],{node:n,visitors:r}=t;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var[i,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=i;try{return o(n.toProxy(),this.helpers)}catch(x){throw this.handleError(x,n)}}if(0!==t.iterator){for(var s,a=t.iterator;s=n.nodes[n.indexes[a]];)if(n.indexes[a]+=1,!s[FS])return s[FS]=!0,void e.push(XS(s));t.iterator=0,delete n.indexes[a]}for(var l=t.events;t.eventIndex<l.length;){var u=l[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[FS]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}}e.pop()}walkSync(e){var t;e[FS]=!0;for(t of KS(e))if(0===t)e.nodes&&e.each(e=>{e[FS]||this.walkSync(e)});else{var n=this.listeners[t];if(n&&this.visitSync(n,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"}};ek.registerPostcss=e=>{QS=e};Qw=ek;ek["default"]=ek,ZS.registerLazyResult(ek),jS.registerLazyResult(ek);let tk=Eb,nk=P,rk=Hb,ik=e1;const ok=Gb;n=class{constructor(e,t,n){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;e=nk;this.result=new ok(this._processor,void 0,this._opts),this.result.css=t;let r=this;Object.defineProperty(this.result,"root",{get:()=>r.root});n=new tk(e,void 0,this._opts,t);n.isMap()?([e,t]=n.generate(),e&&(this.result.css=e),t&&(this.result.map=t)):(n.clearAnnotation(),this.result.css=n.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"production"===process.env.NODE_ENV||"from"in this._opts||rk("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),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=ik;try{e=t(this._css,this._opts)}catch(G){this.error=G}if(this.error)throw this.error;return this._root=e}get[Symbol.toStringTag](){return"NoWorkResult"}},t=n;n["default"]=n;let sk=t,ak=Qw,lk=b,uk=c,ck=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(var n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else{if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return new(this.plugins.length||t.parser||t.stringifier||t.syntax?ak:sk)(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},dk=ck,hk=(ck["default"]=ck,uk.registerProcessor(ck),lk.registerProcessor(ck),i),fk=S,pk=v,gk=g,mk=mb,yk=c,vk=IS;function wk(e,n){if(Array.isArray(e))return e.map(e=>wk(e));let{inputs:t,...r}=e;if(t){n=[];for(var i of t){i={...i,__proto__:mk.prototype};i.map&&(i.map={...i.map,__proto__:fk.prototype}),n.push(i)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>wk(e,n))),r.source){let{inputId:e,...t}=r.source;r.source=t,null!=e&&(r.source.input=n[e])}if("root"===r.type)return new yk(r);if("decl"===r.type)return new hk(r);if("rule"===r.type)return new vk(r);if("comment"===r.type)return new pk(r);if("atrule"===r.type)return new gk(r);throw new Error("Unknown node type: "+e.type)}n=wk;wk["default"]=wk;let bk=j1,Sk=i,kk=Qw,_k=u,Ck=dk,Ik=P,xk=n,Ek=b,Rk=l,Ak=v,Ok=g,Tk=Gb,Mk=mb,Pk=e1,Nk=SS,Lk=IS,Fk=c,Dk=lw;function Uk(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ck(e)}Uk.plugin=function(t,n){let e,r=!1;function i(...e){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");e=n(...e);return e.postcssPlugin=t,e.postcssVersion=(new Ck).version,e}return Object.defineProperty(i,"postcss",{get:()=>e=e||i()}),i.process=function(e,t,n){return Uk([i(n)]).process(e,t)},i},Uk.stringify=Ik,Uk.parse=Pk,Uk.fromJSON=xk,Uk.list=Nk,Uk.comment=e=>new Ak(e),Uk.atRule=e=>new Ok(e),Uk.decl=e=>new Sk(e),Uk.rule=e=>new Lk(e),Uk.root=e=>new Fk(e),Uk.document=e=>new Ek(e),Uk.CssSyntaxError=bk,Uk.Declaration=Sk,Uk.Container=_k,Uk.Processor=Ck,Uk.Document=Ek,Uk.Comment=Ak,Uk.Warning=Rk,Uk.AtRule=Ok,Uk.Result=Tk,Uk.Input=Mk,Uk.Rule=Lk,Uk.Root=Fk,Uk.Node=Dk,kk.registerPostcss(Uk);t=Uk,Uk["default"]=Uk,i=(S=t)&&S.__esModule&&Object.prototype.hasOwnProperty.call(S,"default")?S["default"]:S;i.stringify;const Bk={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},zk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},jk={};function Wk(e){if(jk[e])return jk[e];const t=globalThis[e],n=t.prototype,r=e in Bk?Bk[e]:void 0,i=Boolean(r&&r.every(e=>Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]")))),o=e in zk?zk[e]:void 0,s=Boolean(o&&o.every(e=>"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))));if(i&&s&&!globalThis.Zone)return jk[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe"),i=(document.body.appendChild(r),r.contentWindow);if(!i)return t.prototype;const o=i[e].prototype;return document.body.removeChild(r),o?jk[e]=o:n}catch{return n}}const Hk={};function Vk(e,t,n){var r=e+"."+String(n);return Hk[r]?Hk[r].call(t):(e=Wk(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(Hk[r]=e).call(t):t[n])}const Zk={};function Gk(e,t,n){var r=e+"."+String(n);return Zk[r]?Zk[r].bind(t):"function"!=typeof(e=Wk(e)[n])?t[n]:(Zk[r]=e).bind(t)}function Yk(){return Wk("MutationObserver").constructor}function Jk(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}const qk={ownerDocument:function(e){return Vk("Node",e,"ownerDocument")},childNodes:function(e){return Vk("Node",e,"childNodes")},parentNode:function(e){return Vk("Node",e,"parentNode")},parentElement:function(e){return Vk("Node",e,"parentElement")},textContent:function(e){return Vk("Node",e,"textContent")},contains:function(e,t){return Gk("Node",e,"contains")(t)},getRootNode:function(e){return Gk("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Vk("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Vk("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Vk("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Vk("Element",e,"querySelectorAll")(t)},mutationObserver:Yk,patch:Jk};function Kk(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Xk="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";Qw={map:{},getId:()=>(console.error(Xk),-1),getNode:()=>(console.error(Xk),null),removeNodeFromMap(){console.error(Xk)},has:()=>(console.error(Xk),!1),reset(){console.error(Xk)}};function $k(i,o,s={}){let a=null,l=0;return function(...e){var t=Date.now();l||!1!==s.leading||(l=t);const n=o-(t-l),r=this;n<=0||o<n?(a&&(clearTimeout(a),a=null),l=t,i.apply(r,e)):a||!1===s.trailing||(a=setTimeout(()=>{l=!1===s.leading?0:Date.now(),a=null,i.apply(r,e)},n))}}function Qk(e,t,n,r,i=window){const o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Qk(e,t,o||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(Qw,{get:(e,t,n)=>("map"===t&&console.error(Xk),Reflect.get(e,t,n))});let e_=Date.now;function t_(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=qk.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=qk.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function n_(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function r_(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function i_(e){return e?e.nodeType===e.ELEMENT_NODE?e:qk.parentElement(e):null}function o_(e,t,n,r){if(e){e=i_(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(bv(e,t,r))return 1}catch(x){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function s_(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function a_(e){return Boolean(e.changedTouches)}function l_(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function u_(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function c_(e){return e&&(!1&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(qk.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(e_=()=>(new Date).getTime());class d_{constructor(){M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}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 h_(e){let t,n=null;return n="getRootNode"in e&&(null==(t=qk.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&qk.host(qk.getRootNode(e))?qk.host(qk.getRootNode(e)):n}function f_(e){var n,t=qk.ownerDocument(e);return t&&(qk.contains(t,e)||(n=e,!!(t=qk.ownerDocument(n))&&(e=function(){let e,t=n;for(;e=h_(t);)t=e;return t}(),qk.contains(t,e))))}(u={})[u.DomContentLoaded=0]="DomContentLoaded",u[u.Load=1]="Load",u[u.FullSnapshot=2]="FullSnapshot",u[u.IncrementalSnapshot=3]="IncrementalSnapshot",u[u.Meta=4]="Meta",u[u.Custom=5]="Custom",u[u.Plugin=6]="Plugin";var p_=u,g_=((P=g_||{})[P.Mutation=0]="Mutation",P[P.MouseMove=1]="MouseMove",P[P.MouseInteraction=2]="MouseInteraction",P[P.Scroll=3]="Scroll",P[P.ViewportResize=4]="ViewportResize",P[P.Input=5]="Input",P[P.TouchMove=6]="TouchMove",P[P.MediaInteraction=7]="MediaInteraction",P[P.StyleSheetRule=8]="StyleSheetRule",P[P.CanvasMutation=9]="CanvasMutation",P[P.Font=10]="Font",P[P.Log=11]="Log",P[P.Drag=12]="Drag",P[P.StyleDeclaration=13]="StyleDeclaration",P[P.Selection=14]="Selection",P[P.AdoptedStyleSheet=15]="AdoptedStyleSheet",P[P.CustomElement=16]="CustomElement",P),m_=((n=m_||{})[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),y_=((b=y_||{})[b.Mouse=0]="Mouse",b[b.Pen=1]="Pen",b[b.Touch=2]="Touch",b),v_=((l={})[l["2D"]=0]="2D",l[l.WebGL=1]="WebGL",l[l.WebGL2=2]="WebGL2",l),w_=((v=w_||{})[v.Play=0]="Play",v[v.Pause=1]="Pause",v[v.Seeked=2]="Seeked",v[v.VolumeChange=3]="VolumeChange",v[v.RateChange=4]="RateChange",v),b_=((g={})[g.Document=0]="Document",g[g.DocumentType=1]="DocumentType",g[g.Element=2]="Element",g[g.Text=3]="Text",g[g.CDATA=4]="CDATA",g[g.Comment=5]="Comment",g);function S_(e){return"__ln"in e}class k_{constructor(){M(this,"length",0),M(this,"head",null),M(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let e=0;e<t;e++)n=(null==n?void 0:n.next)||null;return n}addNode(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&S_(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&S_(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}removeNode(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}class __{constructor(){M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),M(this,"emit",()=>{if(!this.frozen&&!this.locked){const o=[],s=new Set,a=new k_,l=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},n=t=>{var n=qk.parentNode(t);if(n&&f_(t)){let e=!1;if(t.nodeType===Node.TEXT_NODE){const o=n.tagName;if("TEXTAREA"===o)return;"STYLE"===o&&this.addedSet.has(n)&&(e=!0)}var n=Yy(n)?this.mirror.getId(h_(t)):this.mirror.getId(n),r=l(t);if(-1===n||-1===r)return a.addNode(t);var i=Iv(t,{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:e=>{l_(e,this.mirror)&&this.iframeManager.addIframe(e),u_(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),c_(t)&&this.shadowDomManager.addShadowRoot(qk.shadowRoot(t),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:e});i&&(o.push({parentId:n,nextId:r,node:i}),s.add(i.id))}};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)I_(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(qk.parentNode(o))||n(o);for(const o of this.addedSet)!x_(this.droppedSet,o)&&!I_(this.removesSubTreeCache,o,this.mirror)||x_(this.movedSet,o)?n(o):this.droppedSet.add(o);let e=null;for(;a.length;){let t=null;if(e){const s=this.mirror.getId(qk.parentNode(e.value)),a=l(e.value);-1!==s&&-1!==a&&(t=e)}if(!t){let e=a.tail;for(;e;){const a=e;if(e=e.previous,a){const s=this.mirror.getId(qk.parentNode(a.value));if(-1!==l(a.value)){if(-1!==s){t=a;break}{const s=a.value,l=qk.parentNode(s);if(l&&l.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=qk.host(l);if(-1!==this.mirror.getId(s)){t=a;break}}}}}}}if(!t){for(;a.head;)a.removeNode(a.head.value);break}e=t.previous,a.removeNode(t.value),n(t.value)}var t={texts:this.texts.map(e=>{var t=e.node,n=qk.parentNode(t);return n&&"TEXTAREA"===n.tagName&&this.genTextAreaValueMutation(n),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!s.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:this.mirror.getId(e.node),attributes:r}}).filter(e=>!s.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:o};(t.texts.length||t.attributes.length||t.removes.length||t.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(t))}}),M(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));var n=Array.from(qk.childNodes(e),e=>qk.textContent(e)||"").join("");t.attributes.value=$y({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ev(e),value:n,maskInputFn:this.maskInputFn})}),M(this,"processMutation",s=>{if(!s_(s.target,this.mirror,this.slimDOMOptions))switch(s.type){case"characterData":{const o=qk.textContent(s.target);o_(s.target,this.blockClass,this.blockSelector,!1)||o===s.oldValue||this.texts.push({value:Sv(s.target,this.maskTextClass,this.maskTextSelector,!0)&&o?this.maskTextFn?this.maskTextFn(o,i_(s.target)):o.replace(/[\S]/g,"*"):o,node:s.target});break}case"attributes":{var r=s.target;let e=s.attributeName,t=s.target.getAttribute(e);if("value"===e){const s=ev(r);t=$y({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:s,value:t,maskInputFn:this.maskInputFn})}if(o_(s.target,this.blockClass,this.blockSelector,!1)||t===s.oldValue)return;let n=this.attributeMap.get(s.target);if("IFRAME"===r.tagName&&"src"===e&&!this.keepIframeSrcFn(t)){if(r.contentDocument)return;e="rr_src"}if(n||(n={node:s.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(s.target,n)),"type"===e&&"INPUT"===r.tagName&&"password"===(s.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!wv(r.tagName,e))if(n.attributes[e]=vv(this.doc,Qy(r.tagName),Qy(e),t),"style"===e){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(o){this.unattachedDoc=this.doc}var i=this.unattachedDoc.createElement("span");s.oldValue&&i.setAttribute("style",s.oldValue);for(const s of Array.from(r.style)){const o=r.style.getPropertyValue(s),a=r.style.getPropertyPriority(s);o!==i.style.getPropertyValue(s)||a!==i.style.getPropertyPriority(s)?n.styleDiff[s]=""===a?o:[o,a]:n._unchangedStyles[s]=[o,a]}for(const s of Array.from(i.style))""===r.style.getPropertyValue(s)&&(n.styleDiff[s]=!1)}else"open"===e&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":return o_(s.target,this.blockClass,this.blockSelector,!0)?void 0:"TEXTAREA"===s.target.tagName?void this.genTextAreaValueMutation(s.target):(s.addedNodes.forEach(e=>this.genAdds(e,s.target)),void s.removedNodes.forEach(e=>{var t=this.mirror.getId(e),n=Yy(s.target)?this.mirror.getId(qk.host(s.target)):this.mirror.getId(s.target);if(!o_(s.target,this.blockClass,this.blockSelector,!1)&&!s_(e,this.mirror,this.slimDOMOptions)&&-1!==this.mirror.getId(e)){if(this.addedSet.has(e))C_(this.addedSet,e),this.droppedSet.add(e);else if(!(this.addedSet.has(s.target)&&-1===t||function a(e,t){var n;return!Yy(e)&&(n=t.getId(e),!t.has(n)||(!(n=qk.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||a(n,t)))}(s.target,this.mirror)))if(this.movedSet.has(e)&&this.movedMap[t+"@"+n])C_(this.movedSet,e);else{this.removes.push({parentId:n,id:t,isShadow:!(!Yy(s.target)||!Jy(s.target))||void 0});{var r=e,i=this.removesSubTreeCache;const o=[r];for(;o.length;){const r=o.pop();i.has(r)||(i.add(r),qk.childNodes(r).forEach(e=>o.push(e)))}}}this.mapRemoves.push(e)}}))}}),M(this,"genAdds",(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!this.addedSet.has(t)&&!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(s_(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let e=null;(e=n&&this.mirror.hasNode(n)?this.mirror.getId(n):e)&&-1!==e&&(this.movedMap[this.mirror.getId(t)+"@"+e]=!0)}else this.addedSet.add(t),this.droppedSet["delete"](t);o_(t,this.blockClass,this.blockSelector,!1)||(qk.childNodes(t).forEach(e=>this.genAdds(e)),c_(t)&&qk.childNodes(qk.shadowRoot(t)).forEach(e=>{this.processedNodeManager.add(e,this),this.genAdds(e,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]})}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 C_(t,e){t["delete"](e),qk.childNodes(e).forEach(e=>C_(t,e))}function I_(e,t){return 0!==e.size&&function(e,t){t=qk.parentNode(t);return t&&e.has(t)}(e,t)}function x_(e,t){return 0!==e.size&&function s(e,t){t=qk.parentNode(t);return!!t&&(!!e.has(t)||s(e,t))}(e,t)}let E_;const R_=t=>E_?(...e)=>{try{return t(...e)}catch(G){if(!E_||!0!==E_(G))throw G}}:t,A_=[];function O_(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function T_(e,t){var n=new __,e=(A_.push(n),n.init(e),new(Yk())(R_(n.processMutations.bind(n))));return e.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),e}function M_({mouseInteractionCb:s,doc:r,mirror:a,blockClass:l,blockSelector:u,sampling:e}){if(!1===e.mouseInteraction)return()=>{};const t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,i=[];let c=null;return Object.keys(m_).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]).forEach(e=>{let t=Qy(e);o=e;var o,n=n=>{var r=O_(n);if(!o_(r,l,u,!0)){let e=null,t=o;if("pointerType"in n){switch(n.pointerType){case"mouse":e=y_.Mouse;break;case"touch":e=y_.Touch;break;case"pen":e=y_.Pen}e===y_.Touch?m_[o]===m_.MouseDown?t="TouchStart":m_[o]===m_.MouseUp&&(t="TouchEnd"):y_.Pen}else a_(n)&&(e=y_.Touch);null!==e?(c=e,(t.startsWith("Touch")&&e===y_.Touch||t.startsWith("Mouse")&&e===y_.Mouse)&&(e=null)):m_[o]===m_.Click&&(e=c,c=null);var i,n=a_(n)?n.changedTouches[0]:n;n&&(r=a.getId(r),{clientX:n,clientY:i}=n,R_(s)({type:m_[t],id:r,x:n,y:i,...null!==e&&{pointerType:e}}))}};if(window.PointerEvent)switch(m_[e]){case m_.MouseDown:case m_.MouseUp:t=t.replace("mouse","pointer");break;case m_.TouchStart:case m_.TouchEnd:return}i.push(Kk(t,n,r))}),R_(()=>{i.forEach(e=>e())})}function P_({scrollCb:n,doc:r,mirror:i,blockClass:o,blockSelector:s,sampling:e}){return Kk("scroll",R_($k(R_(e=>{e=O_(e);if(e&&!o_(e,o,s,!0)){var t=i.getId(e);if(e===r&&r.defaultView){const i=t_(r.defaultView);n({id:t,x:i.left,y:i.top})}else n({id:t,x:e.scrollLeft,y:e.scrollTop})}}),e.scroll||100)),r)}const N_=["INPUT","TEXTAREA","SELECT"],L_=new WeakMap;function F_(e){return e=e,t=[],z_("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||z_("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||z_("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||z_("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n)):e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t;var t,n}function D_(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function U_({mirror:e,stylesheetManager:n},t){var r;let i;i="#document"===t.nodeName?e.getId(t):e.getId(qk.host(t));const o="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(e=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:e.ShadowRoot,s=null!=o&&o.prototype?Object.getOwnPropertyDescriptor(null==o?void 0:o.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&o&&s?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var e;return null==(e=s.get)?void 0:e.call(this)},set(e){var t=null==(t=s.set)?void 0:t.call(this,e);if(null!==i&&-1!==i)try{n.adoptStyleSheets(e,i)}catch(r){}return t}}),R_(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})})):()=>{}}function B_(p,e={}){var t=p.doc.defaultView;if(!t)return()=>{};let n;{var g=p,m=e;let{mutationCb:t,mousemoveCb:n,mouseInteractionCb:r,scrollCb:i,viewportResizeCb:o,inputCb:s,mediaInteractionCb:a,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:c,fontCb:d,selectionCb:h,customElementCb:f}=g;g.mutationCb=(...e)=>{m.mutation&&m.mutation(...e),t(...e)},g.mousemoveCb=(...e)=>{m.mousemove&&m.mousemove(...e),n(...e)},g.mouseInteractionCb=(...e)=>{m.mouseInteraction&&m.mouseInteraction(...e),r(...e)},g.scrollCb=(...e)=>{m.scroll&&m.scroll(...e),i(...e)},g.viewportResizeCb=(...e)=>{m.viewportResize&&m.viewportResize(...e),o(...e)},g.inputCb=(...e)=>{m.input&&m.input(...e),s(...e)},g.mediaInteractionCb=(...e)=>{m.mediaInteaction&&m.mediaInteaction(...e),a(...e)},g.styleSheetRuleCb=(...e)=>{m.styleSheetRule&&m.styleSheetRule(...e),l(...e)},g.styleDeclarationCb=(...e)=>{m.styleDeclaration&&m.styleDeclaration(...e),u(...e)},g.canvasMutationCb=(...e)=>{m.canvasMutation&&m.canvasMutation(...e),c(...e)},g.fontCb=(...e)=>{m.font&&m.font(...e),d(...e)},g.selectionCb=(...e)=>{m.selection&&m.selection(...e),h(...e)},g.customElementCb=(...e)=>{m.customElement&&m.customElement(...e),f(...e)}}p.recordDOM&&(n=T_(p,p.doc));const r=function({mousemoveCb:n,sampling:e,doc:t,mirror:i}){if(!1===e.mousemove)return()=>{};var r="number"==typeof e.mousemove?e.mousemove:50,e="number"==typeof e.mousemoveCallback?e.mousemoveCallback:500;let o,s=[];const a=$k(R_(e=>{const t=Date.now()-o;n(s.map(e=>(e.timeOffset-=t,e)),e),s=[],o=null}),e),l=R_($k(R_(e=>{var t=O_(e),{clientX:n,clientY:r}=a_(e)?e.changedTouches[0]:e;o=o||e_(),s.push({x:n,y:r,id:i.getId(t),timeOffset:e_()-o}),a("undefined"!=typeof DragEvent&&e instanceof DragEvent?g_.Drag:e instanceof MouseEvent?g_.MouseMove:g_.TouchMove)}),r,{trailing:!1})),u=[Kk("mousemove",l,t),Kk("touchmove",l,t),Kk("drag",l,t)];return R_(()=>{u.forEach(e=>e())})}(p),o=M_(p),i=P_(p),s=function({viewportResizeCb:n},{win:e}){let r=-1,i=-1;return Kk("resize",R_($k(R_(()=>{var e=n_(),t=r_();r===e&&i===t||(n({width:Number(t),height:Number(e)}),r=e,i=t)}),200)),e)}(p,{win:t}),a=function({inputCb:r,doc:s,mirror:i,blockClass:e,blockSelector:n,ignoreClass:a,ignoreSelector:l,maskInputOptions:u,maskInputFn:c,sampling:t,userTriggeredOnInput:d}){function o(t){let r=O_(t);var t=t.isTrusted,i=r&&r.tagName;if((r=r&&"OPTION"===i?qk.parentElement(r):r)&&i&&!(N_.indexOf(i)<0)&&!o_(r,e,n,!0)&&!(r.classList.contains(a)||l&&r.matches(l))){let e=r.value,n=!1;var o=ev(r)||"",i=("radio"===o||"checkbox"===o?n=r.checked:(u[i.toLowerCase()]||u[o])&&(e=$y({element:r,maskInputOptions:u,tagName:i,type:o,value:e,maskInputFn:c})),h(r,d?{text:e,isChecked:n,userTriggered:t}:{text:e,isChecked:n}),r.name);"radio"===o&&i&&n&&s.querySelectorAll(`input[type="radio"][name="${i}"]`).forEach(e=>{var t;e!==r&&(t=e.value,h(e,d?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))})}}function h(e,t){const n=L_.get(e);if(!n||n.text!==t.text||n.isChecked!==t.isChecked){L_.set(e,t);const n=i.getId(e);R_(r)({...t,id:n})}}const f=("last"===t.input?["change"]:["input","change"]).map(e=>Kk(e,R_(o),s)),p=s.defaultView;var g;return p?(t=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),g=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]],t&&t.set&&f.push(...g.map(e=>Qk(e[0],e[1],{set(){R_(o)({target:this,isTrusted:!1})}},!1,p))),R_(()=>{f.forEach(e=>e())})):()=>{f.forEach(e=>e())}}(p),l=function({mediaInteractionCb:a,blockClass:l,blockSelector:u,mirror:c,sampling:e,doc:t}){const n=R_(s=>$k(R_(e=>{var t,n,r,i,o,e=O_(e);e&&!o_(e,l,u,!0)&&({currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}=e,a({type:s,id:c.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),e.media||500)),r=[Kk("play",n(w_.Play),t),Kk("pause",n(w_.Pause),t),Kk("seeked",n(w_.Seeked),t),Kk("volumechange",n(w_.VolumeChange),t),Kk("ratechange",n(w_.RateChange),t)];return R_(()=>{r.forEach(e=>e())})}(p);let u=()=>{},c=()=>{},d=()=>{},h=()=>{};p.recordDOM&&(u=function({styleSheetRuleCb:a,mirror:l,stylesheetManager:u},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const e=r.CSSStyleSheet.prototype.insertRule,t=(r.CSSStyleSheet.prototype.insertRule=new Proxy(e,{apply:R_((e,t,n)=>{var[r,i]=n,{id:o,styleId:s}=D_(t,l,u.styleMirror);return(o&&-1!==o||s&&-1!==s)&&a({id:o,styleId:s,adds:[{rule:r,index:i}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,n=this.cssRules.length){return r.CSSStyleSheet.prototype.insertRule.apply(this,[e+` { ${t} }`,n])},r.CSSStyleSheet.prototype.deleteRule);let n,i;r.CSSStyleSheet.prototype.deleteRule=new Proxy(t,{apply:R_((e,t,n)=>{var[r]=n,{id:i,styleId:o}=D_(t,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(n=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(n,{apply:R_((e,t,n)=>{var[r]=n,{id:i,styleId:o}=D_(t,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(i=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(i,{apply:R_((e,t,n)=>{var[r]=n,{id:i,styleId:o}=D_(t,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,replaceSync:r}),e.apply(t,n)})}));const o={},s=(j_("CSSGroupingRule")?o.CSSGroupingRule=r.CSSGroupingRule:(j_("CSSMediaRule")&&(o.CSSMediaRule=r.CSSMediaRule),j_("CSSConditionRule")&&(o.CSSConditionRule=r.CSSConditionRule),j_("CSSSupportsRule")&&(o.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(o).forEach(([e,t])=>{s[e]={insertRule:t.prototype.insertRule,deleteRule:t.prototype.deleteRule},t.prototype.insertRule=new Proxy(s[e].insertRule,{apply:R_((e,t,n)=>{var[r,i]=n,{id:o,styleId:s}=D_(t.parentStyleSheet,l,u.styleMirror);return(o&&-1!==o||s&&-1!==s)&&a({id:o,styleId:s,adds:[{rule:r,index:[...F_(t),i||0]}]}),e.apply(t,n)})}),t.prototype.deleteRule=new Proxy(s[e].deleteRule,{apply:R_((e,t,n)=>{var[r]=n,{id:i,styleId:o}=D_(t.parentStyleSheet,l,u.styleMirror);return(i&&-1!==i||o&&-1!==o)&&a({id:i,styleId:o,removes:[{index:[...F_(t),r]}]}),e.apply(t,n)})})}),R_(()=>{r.CSSStyleSheet.prototype.insertRule=e,r.CSSStyleSheet.prototype.deleteRule=t,n&&(r.CSSStyleSheet.prototype.replace=n),i&&(r.CSSStyleSheet.prototype.replaceSync=i),Object.entries(o).forEach(([e,t])=>{t.prototype.insertRule=s[e].insertRule,t.prototype.deleteRule=s[e].deleteRule})})}(p,{win:t}),c=U_(p,p.doc),d=function({styleDeclarationCb:l,mirror:u,ignoreCSSAttributes:c,stylesheetManager:d},{win:e}){const h=e.CSSStyleDeclaration.prototype.setProperty,s=(e.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:R_((e,t,n)=>{var r,i,[o,s,a]=n;return c.has(o)?h.apply(t,[o,s,a]):({id:r,styleId:i}=D_(null==(r=t.parentRule)?void 0:r.parentStyleSheet,u,d.styleMirror),(r&&-1!==r||i&&-1!==i)&&l({id:r,styleId:i,set:{property:o,value:s,priority:a},index:F_(t.parentRule)}),e.apply(t,n))})}),e.CSSStyleDeclaration.prototype.removeProperty);return e.CSSStyleDeclaration.prototype.removeProperty=new Proxy(s,{apply:R_((e,t,n)=>{var r,i,[o]=n;return c.has(o)?s.apply(t,[o]):({id:r,styleId:i}=D_(null==(r=t.parentRule)?void 0:r.parentStyleSheet,u,d.styleMirror),(r&&-1!==r||i&&-1!==i)&&l({id:r,styleId:i,remove:{property:o},index:F_(t.parentRule)}),e.apply(t,n))})}),R_(()=>{e.CSSStyleDeclaration.prototype.setProperty=h,e.CSSStyleDeclaration.prototype.removeProperty=s})}(p,{win:t}),p.collectFonts)&&(h=function({fontCb:n,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,o=t.FontFace;t.FontFace=function(e,t,n){var r=new o(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};e=Jk(e.fonts,"add",function(e){return function(t){return setTimeout(R_(()=>{var e=i.get(t);e&&(n(e),i["delete"](t))}),0),e.apply(this,[t])}});return r.push(()=>{t.FontFace=o}),r.push(e),R_(()=>{r.forEach(e=>e())})}(p));const f=function(){let{doc:t,mirror:l,blockClass:u,blockSelector:c,selectionCb:n}=p,r=!0;var e=R_(()=>{var s=t.getSelection();if(!(!s||r&&null!=s&&s.isCollapsed)){r=s.isCollapsed||!1;const a=[],e=s.rangeCount||0;for(let o=0;o<e;o++){let e=s.getRangeAt(o),{startContainer:t,startOffset:n,endContainer:r,endOffset:i}=e;o_(t,u,c,!0)||o_(r,u,c,!0)||a.push({start:l.getId(t),startOffset:n,end:l.getId(r),endOffset:i})}n({ranges:a})}});return e(),Kk("selectionchange",e)}(),y=function({doc:e,customElementCb:i}){e=e.defaultView;return e&&e.customElements?Jk(e.customElements,"define",function(r){return function(e,t,n){try{i({define:{name:e}})}catch(o){console.warn("Custom element callback failed for "+e)}return r.apply(this,[e,t,n])}}):()=>{}}(p),v=[];for(const e of p.plugins)v.push(e.observer(e.callback,t,e.options));return R_(()=>{A_.forEach(e=>e.reset()),null!=n&&n.disconnect(),r(),o(),i(),s(),a(),l(),u(),c(),d(),h(),f(),y(),v.forEach(e=>e())})}function z_(e){return"undefined"!=typeof window[e]}function j_(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class W_{constructor(e){M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e);let i=n.get(t);return i||(i=this.generateIdFn(),n.set(t,i),r.set(i,t)),i}getIds(t,e){const n=this.getIdToRemoteIdMap(t),r=this.getRemoteIdToIdMap(t);return e.map(e=>this.getId(t,e,n,r))}getRemoteId(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}getRemoteIds(t,e){const n=this.getRemoteIdToIdMap(t);return e.map(e=>this.getRemoteId(t,e,n))}reset(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}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}}class H_{constructor(e){M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new W_(cv)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new W_(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){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=(e=this.crossOriginIframeMap.get(e.source))&&this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}transformCrossOriginEvent(n,e){var t;switch(e.type){case p_.FullSnapshot:{this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);const t=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,t),this.patchRootIdOnNode(e.data.node,t),{timestamp:e.timestamp,type:p_.IncrementalSnapshot,data:{source:g_.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case p_.Meta:case p_.Load:case p_.DomContentLoaded:return!1;case p_.Plugin:return e;case p_.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case p_.IncrementalSnapshot:switch(e.data.source){case g_.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,n,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,n);var t=this.crossOriginIframeRootIdMap.get(n);t&&this.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(e=>{this.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,n,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,n,["id"])}),e;case g_.Drag:case g_.TouchMove:case g_.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,n,["id"])}),e;case g_.ViewportResize:return!1;case g_.MediaInteraction:case g_.MouseInteraction:case g_.Scroll:case g_.CanvasMutation:case g_.Input:return this.replaceIds(e.data,n,["id"]),e;case g_.StyleSheetRule:case g_.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case g_.Font:return e;case g_.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,n,["start","end"])}),e;case g_.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(e=>{this.replaceStyleIds(e,n,["styleId"])}),e}}return!1}replace(e,t,n,r){for(const i of r)!Array.isArray(t[i])&&"number"!=typeof t[i]||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===b_.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class V_{constructor(e){M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(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(Jy(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);const n=T_({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(P_({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(qk.host(e))),this.restoreHandlers.push(U_({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){const i=this;this.restoreHandlers.push(Jk(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=qk.shadowRoot(this);return t&&f_(this)&&i.addShadowRoot(t,r),e}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(o){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Z_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",G_="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Y_=0;Y_<Z_.length;Y_++)G_[Z_.charCodeAt(Y_)]=Y_;const J_=new Map,q_=(t,n,r)=>{if(t&&(X_(t,n)||"object"==typeof t)){n=function(e,t){let n=J_.get(e);return n||(n=new Map,J_.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(r,t.constructor.name);let e=n.indexOf(t);return-1===e&&(e=n.length,n.push(t)),e}};const K_=(e,t,n)=>e.map(e=>function r(i,t,n){if(i instanceof Array)return i.map(e=>r(e,t,n));if(null===i)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer)return{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=Z_[e[r]>>2])+Z_[(3&e[r])<<4|e[r+1]>>4])+Z_[(15&e[r+1])<<2|e[r+2]>>6])+Z_[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()};if(i instanceof DataView)return{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){let e=i.constructor.name,t=i.src;return{rr_type:e,src:t}}return i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:X_(i,t)||"object"==typeof i?{rr_type:i.constructor.name,index:q_(i,t,n)}:i}(e,t,n)),X_=(t,n)=>{var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof n[e]);return Boolean(e.find(e=>t instanceof n[e]))};function $_(e,r,i,o){const t=[];try{var n=Jk(e.HTMLCanvasElement.prototype,"getContext",function(n){return function(e,...t){if(!o_(this,r,i,!0)){const n="experimental-webgl"===e?"webgl":e;if("__context"in this||(this.__context=n),o&&["webgl","webgl2"].includes(n))if(t[0]&&"object"==typeof t[0]){const n=t[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0)}else t.splice(0,1,{preserveDrawingBuffer:!0})}return n.apply(this,[e,...t])}});t.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{t.forEach(e=>e())}}function Q_(e,r,i,o,s,a){const t=[],n=Object.getOwnPropertyNames(e);for(const l of n)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const n=Jk(e,l,function(n){return function(...e){var t=n.apply(this,e);if(q_(t,a,this),"tagName"in this.canvas&&!o_(this.canvas,o,s,!0)){const n=K_(e,a,this),o={type:r,property:l,args:n};i(this.canvas,o)}return t}});t.push(n)}catch{const o=Qk(e,l,{set(e){i(this.canvas,{type:r,property:l,args:[e],setter:!0})}});t.push(o)}return t}const eC="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",tC="undefined"!=typeof window&&window.Blob&&new Blob([(eC,Uint8Array.from(atob("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo="),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});function nC(e){let t;try{if(!(t=tC&&(window.URL||window.webkitURL).createObjectURL(tC)))throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+eC,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class rC{constructor(e){M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});var{sampling:t="all",win:n,blockClass:r,blockSelector:i,recordCanvas:o,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(n,r,i),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,n,r,i,{dataURLOptions:s})}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,n,r,i,o){const t=$_(n,r,i,!0),s=new Map,a=new nC,l=(a.onmessage=e=>{var t,n,r,i=e.data.id;s.set(i,!1),"base64"in e.data&&({base64:e,type:t,width:n,height:r}=e.data,this.mutationCb({id:i,type:v_["2D"],commands:[{property:"clearRect",args:[0,0,n,r]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:e}],type:t}]},0,0]}]}))},1e3/e);let u,c=0;const d=e=>{c&&e-c<l||(c=e,(()=>{const t=[];return n.document.querySelectorAll("canvas").forEach(e=>{o_(e,r,i,!0)||t.push(e)}),t})().forEach(async e=>{const t=this.mirror.getId(e);if(!s.get(t)&&0!==e.width&&0!==e.height){if(s.set(t,!0),["webgl","webgl2"].includes(e.__context)){const t=e.getContext(e.__context);!1===(null==(n=null==t?void 0:t.getContextAttributes())?void 0:n.preserveDrawingBuffer)&&t.clear(t.COLOR_BUFFER_BIT)}var n=await createImageBitmap(e);a.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:o.dataURLOptions},[n])}})),u=requestAnimationFrame(d)};u=requestAnimationFrame(d),this.resetObservers=()=>{t(),cancelAnimationFrame(u)}}initCanvasMutationObserver(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=$_(e,t,n,!1),i=function(n,r,i,o){const e=[],t=Object.getOwnPropertyNames(r.CanvasRenderingContext2D.prototype);for(const s of t)try{if("function"!=typeof r.CanvasRenderingContext2D.prototype[s])continue;const t=Jk(r.CanvasRenderingContext2D.prototype,s,function(e){return function(...t){return o_(this.canvas,i,o,!0)||setTimeout(()=>{var e=K_(t,r,this);n(this.canvas,{type:v_["2D"],property:s,args:e})},0),e.apply(this,t)}});e.push(t)}catch{const i=Qk(r.CanvasRenderingContext2D.prototype,s,{set(e){n(this.canvas,{type:v_["2D"],property:s,args:[e],setter:!0})}});e.push(i)}return()=>{e.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r){const i=[];return i.push(...Q_(t.WebGLRenderingContext.prototype,v_.WebGL,e,n,r,t)),"undefined"!=typeof t.WebGL2RenderingContext&&i.push(...Q_(t.WebGL2RenderingContext.prototype,v_.WebGL2,e,n,r,t)),()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,n);this.resetObservers=()=>{r(),i(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{var n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(e=>{let{type:t,...n}=e;return n}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}class iC{constructor(e){M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new d_),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,n){if(0!==e.length){var t={id:n,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:Ky(e,n.href),index:t}))})),t.styleIds.push(e)}0<r.length&&(t.styles=r),this.adoptedStyleSheetCb(t)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class oC{constructor(){M(this,"nodeMap",new WeakMap),M(this,"active",!1)}inOtherBuffer(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(e=>e!==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(){}}let sC,aC,lC,uC=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const L=document.createElement("iframe");document.body.appendChild(L),Array.from=(null==(Oy=L.contentWindow)?void 0:Oy.Array.from)||Array.from,document.body.removeChild(L)}}catch(N){console.debug("Unable to override Array.from",N)}const cC=new Xy;function dC(t={}){let{emit:r,checkoutEveryNms:i,checkoutEveryNth:o,blockClass:n="rr-block",blockSelector:s=null,ignoreClass:F="rr-ignore",ignoreSelector:D=null,maskTextClass:a="rr-mask",maskTextSelector:l=null,inlineStylesheet:u=!0,maskAllInputs:U,maskInputOptions:e,slimDOMOptions:B,maskInputFn:c,maskTextFn:d,hooks:z,packFn:h,sampling:f={},dataURLOptions:p={},mousemoveWait:g,recordDOM:m=!0,recordCanvas:y=!1,recordCrossOriginIframes:v=!1,recordAfter:w="DOMContentLoaded"===t.recordAfter?t.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:W=!1,inlineImages:b=!1,plugins:S,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:H=new Set([]),errorHandler:V}=t;E_=V;const _=!v||window.parent===window;let C=!1;if(!_)try{window.parent.document&&(C=!1)}catch(ae){C=!0}if(_&&!r)throw new Error("emit function is required");if(!_&&!C)return()=>{};void 0!==g&&void 0===f.mousemove&&(f.mousemove=g),cC.reset();const I=!0===U?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==e?e:{password:!0},x=Cv(B);let E;"NodeList"in(t=window)&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach);let R=0;const A=e=>{for(const t of S||[])t.eventProcessor&&(e=t.eventProcessor(e));return e=h&&!C?h(e):e},O=(sC=(e,t)=>{var n=e;if(n.timestamp=e_(),null==(e=A_[0])||!e.isFrozen()||n.type===p_.FullSnapshot||n.type===p_.IncrementalSnapshot&&n.data.source===g_.Mutation||A_.forEach(e=>e.unfreeze()),_)null!=r&&r(A(n),t);else if(C){const e={type:"rrweb",event:A(n),origin:window.location.origin,isCheckout:t};window.parent.postMessage(e,"*")}if(n.type===p_.FullSnapshot)E=n,R=0;else if(n.type===p_.IncrementalSnapshot&&(n.data.source!==g_.Mutation||!n.data.isAttachIframe)){R++;const e=o&&R>=o,r=i&&n.timestamp-E.timestamp>i;(e||r)&&aC(!0)}},e=>{sC({type:p_.IncrementalSnapshot,data:{source:g_.Mutation,...e}})}),T=e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.Scroll,...e}}),Z=e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.CanvasMutation,...e}}),M=new iC({mutationCb:O,adoptedStyleSheetCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.AdoptedStyleSheet,...e}})}),P=new H_({mirror:cC,mutationCb:O,stylesheetManager:M,recordCrossOriginIframes:v,wrappedEmit:sC});for(const t of S||[])t.getMirror&&t.getMirror({nodeMirror:cC,crossOriginIframeMirror:P.crossOriginIframeMirror,crossOriginIframeStyleMirror:P.crossOriginIframeStyleMirror});const N=new oC,L=(lC=new rC({recordCanvas:y,mutationCb:Z,win:window,blockClass:n,blockSelector:s,mirror:cC,sampling:f.canvas,dataURLOptions:p}),new V_({mutationCb:O,scrollCb:T,bypassOptions:{blockClass:n,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskInputOptions:I,dataURLOptions:p,maskTextFn:d,maskInputFn:c,recordCanvas:y,inlineImages:b,sampling:f,slimDOMOptions:x,iframeManager:P,stylesheetManager:M,canvasManager:lC,keepIframeSrcFn:k,processedNodeManager:N},mirror:cC}));aC=(e=!1)=>{if(m){sC({type:p_.Meta,data:{href:window.location.href,width:r_(),height:n_()}},e),M.reset(),L.init(),A_.forEach(e=>e.lock());var t=function(e,t){var{mirror:t=new Xy,blockClass:n="rr-block",blockSelector:r=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:s=!0,inlineImages:a=!1,recordCanvas:l=!1,maskAllInputs:u=!1,maskTextFn:c,maskInputFn:d,slimDOM:h=!1,dataURLOptions:f,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:b=()=>!1}=t;return Iv(e,{doc:e,mirror:t,blockClass:n,blockSelector:r,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:s,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===u?{password:!0}:u,maskTextFn:c,maskInputFn:d,slimDOMOptions:Cv(h),dataURLOptions:f,inlineImages:a,recordCanvas:l,preserveWhiteSpace:p,onSerialize:g,onIframeLoad:m,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:w,keepIframeSrcFn:b,newlyAddedElement:!1})}(document,{mirror:cC,blockClass:n,blockSelector:s,maskTextClass:a,maskTextSelector:l,inlineStylesheet:u,maskAllInputs:I,maskTextFn:d,maskInputFn:c,slimDOM:x,dataURLOptions:p,recordCanvas:y,inlineImages:b,onSerialize:e=>{l_(e,cC)&&P.addIframe(e),u_(e,cC)&&M.trackLinkElement(e),c_(e)&&L.addShadowRoot(qk.shadowRoot(e),document)},onIframeLoad:(e,t)=>{P.attachIframe(e,t),L.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{M.attachLinkElement(e,t)},keepIframeSrcFn:k});if(!t)return console.warn("Failed to snapshot the document");sC({type:p_.FullSnapshot,data:{node:t,initialOffset:t_(window)}},e),A_.forEach(e=>e.unlock()),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&M.adoptStyleSheets(document.adoptedStyleSheets,cC.getId(document))}};try{const t=[],r=e=>R_(B_)({mutationCb:O,mousemoveCb:(e,t)=>sC({type:p_.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.MouseInteraction,...e}}),scrollCb:T,viewportResizeCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.ViewportResize,...e}}),inputCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.Input,...e}}),mediaInteractionCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.MediaInteraction,...e}}),styleSheetRuleCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.StyleSheetRule,...e}}),styleDeclarationCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>sC({type:p_.IncrementalSnapshot,data:{source:g_.Font,...e}}),selectionCb:e=>{sC({type:p_.IncrementalSnapshot,data:{source:g_.Selection,...e}})},customElementCb:e=>{sC({type:p_.IncrementalSnapshot,data:{source:g_.CustomElement,...e}})},blockClass:n,ignoreClass:F,ignoreSelector:D,maskTextClass:a,maskTextSelector:l,maskInputOptions:I,inlineStylesheet:u,sampling:f,recordDOM:m,recordCanvas:y,inlineImages:b,userTriggeredOnInput:j,collectFonts:W,doc:e,maskInputFn:c,maskTextFn:d,keepIframeSrcFn:k,blockSelector:s,slimDOMOptions:x,dataURLOptions:p,mirror:cC,iframeManager:P,stylesheetManager:M,shadowDomManager:L,processedNodeManager:N,canvasManager:lC,ignoreCSSAttributes:H,plugins:(null==(e=null==S?void 0:S.filter(e=>e.observer))?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>sC({type:p_.Plugin,data:{plugin:t.name,payload:e}})})))||[]},z),i=(P.addLoadListener(e=>{try{t.push(r(e.contentDocument))}catch(G){console.warn(G)}}),()=>{aC(),t.push(r(document)),uC=!0});return["interactive","complete"].includes(document.readyState)?i():(t.push(Kk("DOMContentLoaded",()=>{sC({type:p_.DomContentLoaded,data:{}}),"DOMContentLoaded"===w&&i()})),t.push(Kk("load",()=>{sC({type:p_.Load,data:{}}),"load"===w&&i()},window))),()=>{t.forEach(e=>{try{e()}catch(G){String(G).toLowerCase().includes("cross-origin")||console.warn(G)}}),N.destroy(),uC=!1,E_=void 0}}catch(G){console.warn(G)}}dC.addCustomEvent=(e,t)=>{if(!uC)throw new Error("please add custom event after start recording");sC({type:p_.Custom,data:{tag:e,payload:t}})},dC.freezePage=()=>{A_.forEach(e=>e.freeze())},dC.takeFullSnapshot=e=>{if(!uC)throw new Error("please take full snapshot after start recording");aC(e)},dC.mirror=cC;var hC='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',fC={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},pC=(gC.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},gC.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},gC.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},gC.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},gC.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},gC.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},gC.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},gC.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,gC.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,gC.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,gC.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,gC.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,gC);function gC(){}function mC(e,t){return void 0===e&&(e={}),p(p(p({},t=void 0===t?fC:t),e),{mask:yC(t.mask,e.mask),block:yC(t.block,e.block),ignore:yC(t.ignore,e.ignore),maskInputOptions:p(p({},t.maskInputOptions),e.maskInputOptions)})}function yC(e,t){e=new Set(Xi(e||[],t||[]));return Array.from(e)}_C.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},_C.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},_C.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},_C.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},_C.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},_C.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},_C.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var s=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var a=this,l=0,u=null!=(t=e.removes)?t:[];l<u.length;l++)!function(t){var e=(null!=(n=s.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(s.adds.splice(e,1),a.cancelledByOffset++):(s.removes=null!=(n=s.removes)?n:[],s.removes.push(t))}(u[l]);for(var c=0,d=null!=(t=e.adds)?t:[];c<d.length;c++){var h=d[c];s.adds=null!=(r=s.adds)?r:[],s.adds.push(h)}for(var f=0,p=null!=(t=e.attributes)?t:[];f<p.length;f++)!function(t){s.attributes=null!=(i=s.attributes)?i:[];var e=s.attributes.findIndex(function(e){return e.id===t.id});0<=e?s.attributes[e]=t:s.attributes.push(t)}(p[f]);for(var g=0,m=null!=(t=e.texts)?t:[];g<m.length;g++)!function(t){s.texts=null!=(o=s.texts)?o:[];var e=s.texts.findIndex(function(e){return e.id===t.id});0<=e?s.texts[e]=t:s.texts.push(t)}(m[g])}},_C.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:Xi(null!=(e=t.adds)?e:[]),removes:Xi(null!=(e=t.removes)?e:[]),attributes:Xi(null!=(e=t.attributes)?e:[]),texts:Xi(null!=(e=t.texts)?e:[])}}},_C.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},_C.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var vC=_C,wC=(kC.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,s=mC(e.privacy||{},fC),a=p(p(p(p({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!w.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=s).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(a=o.mask)&&a.length&&(t.maskTextSelector=o.mask.join(",")),null!=(a=o.block)&&a.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+hC:hC,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(a=o.ignore)&&a.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=pC.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=dC(a),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),k("RecorderManager","Recording started with config:",{maskAllText:s.maskAllText,maskAllInputs:s.maskAllInputs,autoDetectSensitiveData:s.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(G){Cy("RecorderManager","Failed to start recording:",G),this.state="stopped"}}else _y("RecorderManager","Already recording")},kC.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",k("RecorderManager","Recording stopped")},kC.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",k("RecorderManager","Recording paused"))},kC.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),k("RecorderManager","Recording resumed"))},kC.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},ky("RecorderManager","MutationObserver hooked"))}catch(N){_y("RecorderManager","Failed to hook MutationObserver:",N)}},kC.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,ky("RecorderManager","MutationObserver restored"))},kC.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,Cy("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},kC.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(Cy("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},kC.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=dC.addCustomEvent)&&n.call(dC,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(a){}},kC.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=dC.takeFullSnapshot;"function"==typeof o&&(o(!0),ky("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(N){_y("RecorderManager","Inline checkpoint failed:",N)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},kC.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,_y("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=dC.addCustomEvent)&&e.call(dC,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(F){}}return!1}return!0},kC.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=dC.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),ky("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(N){_y("RecorderManager","Checkpoint FullSnapshot failed:",N)}},12e4)},kC.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},kC.prototype.getState=function(){return this.state},kC.prototype.isRecording=function(){return"recording"===this.state},kC.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},kC.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},kC.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},kC),bC=(SC.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,k("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,k("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,k("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},SC.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},SC.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},SC.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,k("SamplerManager","Mode switched: "+t+" -> "+e)},SC.prototype.getCurrentMode=function(){return this.currentMode},SC.prototype.isSampled=function(){return!0===this.samplingDecision},SC.prototype.isSessionMode=function(){return"session"===this.currentMode},SC.prototype.isBufferMode=function(){return"buffer"===this.currentMode},SC.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",k("SamplerManager","Upgraded to session mode due to error"),!0)},SC.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},SC.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},SC.prototype.getConfig=function(){return p({},this.config)},SC);function SC(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function kC(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new vC({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function _C(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function CC(e){let t=e.length;for(;0<=--t;)e[t]=0}const IC=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),xC=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),EC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),RC=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),AC=new Array(576),OC=(CC(AC),new Array(60)),TC=(CC(OC),new Array(512)),MC=(CC(TC),new Array(256)),PC=(CC(MC),new Array(29)),NC=(CC(PC),new Array(30));function LC(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}let FC,DC,UC;function BC(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}CC(NC);const zC=e=>e<256?TC[e]:TC[256+(e>>>7)],jC=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},WC=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,jC(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},HC=(e,t,n)=>{WC(e,n[2*t],n[2*t+1])},VC=(e,t)=>{let n=0;for(;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},ZC=(e,t,n)=>{var r=new Array(16);let i,o,s=0;for(i=1;i<=15;i++)s=s+n[i-1]<<1,r[i]=s;for(o=0;o<=t;o++){var a=e[2*o+1];0!==a&&(e[2*o]=VC(r[a]++,a))}},GC=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},YC=e=>{8<e.bi_valid?jC(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},JC=(e,t,n,r)=>{var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},qC=(e,t,n)=>{var r=e.heap[n];let i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&JC(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!JC(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},KC=(e,t,n)=>{let r,i,o,s,a=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+a++],r+=(255&e.pending_buf[e.sym_buf+a++])<<8,i=e.pending_buf[e.sym_buf+a++],0==r?HC(e,i,t):(o=MC[i],HC(e,o+256+1,t),0!==(s=IC[o])&&(i-=PC[o],WC(e,i,s)),r--,o=zC(r),HC(e,o,n),0!==(s=xC[o])&&(r-=NC[o],WC(e,r,s))),a<e.sym_next;);HC(e,256,t)},XC=(a,l)=>{var e=l.dyn_tree,t=l.stat_desc.static_tree,n=l.stat_desc.has_stree,r=l.stat_desc.elems;let i,o,s,u=-1;for(a.heap_len=0,a.heap_max=573,i=0;i<r;i++)0!==e[2*i]?(a.heap[++a.heap_len]=u=i,a.depth[i]=0):e[2*i+1]=0;for(;a.heap_len<2;)e[2*(s=a.heap[++a.heap_len]=u<2?++u:0)]=1,a.depth[s]=0,a.opt_len--,n&&(a.static_len-=t[2*s+1]);for(l.max_code=u,i=a.heap_len>>1;1<=i;i--)qC(a,e,i);for(s=r;i=a.heap[1],a.heap[1]=a.heap[a.heap_len--],qC(a,e,1),o=a.heap[1],a.heap[--a.heap_max]=i,a.heap[--a.heap_max]=o,e[2*s]=e[2*i]+e[2*o],a.depth[s]=(a.depth[i]>=a.depth[o]?a.depth[i]:a.depth[o])+1,e[2*i+1]=e[2*o+1]=s,a.heap[1]=s++,qC(a,e,1),2<=a.heap_len;);a.heap[--a.heap_max]=a.heap[1];{var c=a,d=l.dyn_tree,h=l.max_code,f=l.stat_desc.static_tree,p=l.stat_desc.has_stree,g=l.stat_desc.extra_bits,m=l.stat_desc.extra_base,y=l.stat_desc.max_length;let e,t,n,r,i,o,s=0;for(r=0;r<=15;r++)c.bl_count[r]=0;for(d[2*c.heap[c.heap_max]+1]=0,e=c.heap_max+1;e<573;e++)t=c.heap[e],(r=d[2*d[2*t+1]+1]+1)>y&&(r=y,s++),d[2*t+1]=r,t>h||(c.bl_count[r]++,i=0,t>=m&&(i=g[t-m]),o=d[2*t],c.opt_len+=o*(r+i),p&&(c.static_len+=o*(f[2*t+1]+i)));if(0!==s){do{for(r=y-1;0===c.bl_count[r];)r--}while(c.bl_count[r]--,c.bl_count[r+1]+=2,c.bl_count[y]--,0<(s-=2));for(r=y;0!==r;r--)for(t=c.bl_count[r];0!==t;)h<(n=c.heap[--e])||(d[2*n+1]!==r&&(c.opt_len+=(r-d[2*n+1])*d[2*n],d[2*n+1]=r),t--)}}ZC(e,u,a.bl_count)},$C=(e,t,n)=>{let r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=s,s=t[2*(r+1)+1],++a<l&&i===s||(a<u?e.bl_tree[2*i]+=a:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,o=i,u=0===s?(l=138,3):i===s?(l=6,3):(l=7,4))},QC=(e,t,n)=>{let r,i,o=-1,s=t[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),r=0;r<=n;r++)if(i=s,s=t[2*(r+1)+1],!(++a<l&&i===s)){if(a<u)for(;HC(e,i,e.bl_tree),0!=--a;);else 0!==i?(i!==o&&(HC(e,i,e.bl_tree),a--),HC(e,16,e.bl_tree),WC(e,a-3,2)):a<=10?(HC(e,17,e.bl_tree),WC(e,a-3,3)):(HC(e,18,e.bl_tree),WC(e,a-11,7));a=0,o=i,u=0===s?(l=138,3):i===s?(l=6,3):(l=7,4)}};let eI=!1;const tI=(e,t,n,r)=>{WC(e,0+(r?1:0),3),YC(e),jC(e,n),jC(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var e1={_tr_init:e=>{if(!eI){{let e,t,n,r,i;var o=new Array(16);for(n=0,r=0;r<28;r++)for(PC[r]=n,e=0;e<1<<IC[r];e++)MC[n++]=r;for(MC[n-1]=r,i=0,r=0;r<16;r++)for(NC[r]=i,e=0;e<1<<xC[r];e++)TC[i++]=r;for(i>>=7;r<30;r++)for(NC[r]=i<<7,e=0;e<1<<xC[r]-7;e++)TC[256+i++]=r;for(t=0;t<=15;t++)o[t]=0;for(e=0;e<=143;)AC[2*e+1]=8,e++,o[8]++;for(;e<=255;)AC[2*e+1]=9,e++,o[9]++;for(;e<=279;)AC[2*e+1]=7,e++,o[7]++;for(;e<=287;)AC[2*e+1]=8,e++,o[8]++;for(ZC(AC,287,o),e=0;e<30;e++)OC[2*e+1]=5,OC[2*e]=VC(e,5);FC=new LC(AC,IC,257,286,15),DC=new LC(OC,xC,0,30,15),UC=new LC(new Array(0),EC,0,19,7)}eI=!0}e.l_desc=new BC(e.dyn_ltree,FC),e.d_desc=new BC(e.dyn_dtree,DC),e.bl_desc=new BC(e.bl_tree,UC),e.bi_buf=0,e.bi_valid=0,GC(e)},_tr_stored_block:tI,_tr_flush_block:(t,n,r,e)=>{let i,o,s=0;if(0<t.level?(2===t.strm.data_type&&(t.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(t)),XC(t,t.l_desc),XC(t,t.d_desc),s=(e=>{let t;for($C(e,e.dyn_ltree,e.l_desc.max_code),$C(e,e.dyn_dtree,e.d_desc.max_code),XC(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*RC[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==n)tI(t,n,r,e);else if(4===t.strategy||o===i)WC(t,2+(e?1:0),3),KC(t,AC,OC);else{WC(t,4+(e?1:0),3);{var a=t,l=(n=t.l_desc.max_code+1,r=t.d_desc.max_code+1,s+1);let e;for(WC(a,n-257,5),WC(a,r-1,5),WC(a,l-4,4),e=0;e<l;e++)WC(a,a.bl_tree[2*RC[e]+1],3);QC(a,a.dyn_ltree,n-1),QC(a,a.dyn_dtree,r-1)}KC(t,t.dyn_ltree,t.dyn_dtree)}GC(t),e&&YC(t)},_tr_tally:(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(MC[n]+256+1)]++,e.dyn_dtree[2*zC(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{WC(e,2,3),HC(e,256,AC),16===(e=e).bi_valid?(jC(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},nI=(e,t,n,r)=>{let i=65535&e|0,o=e>>>16&65535|0,s=0;for(;0!==n;){for(n-=s=2e3<n?2e3:n;i=i+t[r++]|0,o=o+i|0,--s;);i%=65521,o%=65521}return i|o<<16|0};const rI=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var iI=(t,n,e,r)=>{var i=rI,o=r+e;t^=-1;for(let e=r;e<o;e++)t=t>>>8^i[255&(t^n[e])];return-1^t},oI={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},c={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};let{_tr_init:sI,_tr_stored_block:aI,_tr_flush_block:lI,_tr_tally:uI,_tr_align:cI}=e1,{Z_NO_FLUSH:dI,Z_PARTIAL_FLUSH:hI,Z_FULL_FLUSH:fI,Z_FINISH:pI,Z_BLOCK:gI,Z_OK:mI,Z_STREAM_END:yI,Z_STREAM_ERROR:vI,Z_DATA_ERROR:wI,Z_BUF_ERROR:bI,Z_DEFAULT_COMPRESSION:SI,Z_FILTERED:kI,Z_HUFFMAN_ONLY:_I,Z_RLE:CI,Z_FIXED:II,Z_UNKNOWN:xI,Z_DEFLATED:EI}=c,N=(e,t)=>(e.msg=oI[t],t),RI=e=>2*e-(4<e?9:0),AI=e=>{let t=e.length;for(;0<=--t;)e[t]=0},OI=e=>{let t,n,r,i=e.w_size;for(t=e.hash_size,r=t;n=e.head[--r],e.head[r]=n>=i?n-i:0,--t;);for(t=i,r=t;n=e.prev[--r],e.prev[r]=n>=i?n-i:0,--t;);},TI=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const MI=e=>{var t=e.state;let n=t.pending;0!==(n=n>e.avail_out?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},PI=(e,t)=>{lI(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,MI(e.strm)},NI=(e,t)=>{e.pending_buf[e.pending++]=t},LI=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},FI=(e,t,n,r)=>{let i=e.avail_in;return 0===(i=i>r?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=nI(e.adler,t,i,n):2===e.state.wrap&&(e.adler=iI(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},DI=(e,t)=>{let n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match;var l=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,u=e.window,c=e.w_mask,d=e.prev,h=e.strstart+258;let f=u[o+s-1],p=u[o+s];e.good_match<=e.prev_length&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(u[(n=t)+s]===p&&u[n+s-1]===f&&u[n]===u[o]&&u[++n]===u[o+1]){for(o+=2,n++;u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&u[++o]===u[++n]&&o<h;);if(r=258-(h-o),o=h-258,r>s){if(e.match_start=t,(s=r)>=a)break;f=u[o+s-1],p=u[o+s]}}}while((t=d[t&c])>l&&0!=--i);return s<=e.lookahead?s:e.lookahead},UI=e=>{var t=e.w_size;let n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,t+(t-262)<=e.strstart&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.strstart<e.insert&&(e.insert=e.strstart),OI(e),r+=t),0===e.strm.avail_in)break;if(n=FI(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,3<=e.lookahead+e.insert)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=TI(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=TI(e,e.ins_h,e.window[i+3-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},BI=(e,t)=>{let n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,a=e.strm.avail_in;for(;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(i=e.strm.avail_out-i,r=e.strstart-e.block_start,(n=(n=n>r+e.strm.avail_in?r+e.strm.avail_in:n)>i?i:n)<o&&(0===n&&t!==pI||t===dI||n!==r+e.strm.avail_in))||(s=t===pI&&n===r+e.strm.avail_in?1:0,aI(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,MI(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(FI(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==s)););return(a-=e.strm.avail_in)&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=e.w_size-e.insert<a?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==dI&&t!==pI&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(FI(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),i=e.bi_valid+42>>3,i=65535<e.pending_buf_size-i?65535:e.pending_buf_size-i,o=i>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===pI)&&t!==dI&&0===e.strm.avail_in&&r<=i)&&(n=r>i?i:r,s=t===pI&&0===e.strm.avail_in&&n===r?1:0,aI(e,e.block_start,n,s),e.block_start+=n,MI(e.strm)),s?3:1)},zI=(e,t)=>{let n,r;for(;;){if(e.lookahead<262){if(UI(e),e.lookahead<262&&t===dI)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=TI(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=DI(e,n)),3<=e.match_length)if(r=uI(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,e.ins_h=TI(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=TI(e,e.ins_h,e.window[e.strstart+1]);else r=uI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(PI(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===pI?(PI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(PI(e,!1),0===e.strm.avail_out)?1:2},jI=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<262){if(UI(e),e.lookahead<262&&t===dI)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=TI(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=DI(e,n),e.match_length<=5)&&(e.strategy===kI||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=uI(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=TI(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(PI(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=uI(e,0,e.window[e.strstart-1]))&&PI(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=uI(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===pI?(PI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(PI(e,!1),0===e.strm.avail_out)?1:2};function WI(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}const HI=[new WI(0,0,0,0,BI),new WI(4,4,8,4,zI),new WI(4,5,16,8,zI),new WI(4,6,32,32,zI),new WI(4,4,16,16,jI),new WI(8,16,32,32,jI),new WI(8,16,128,128,jI),new WI(8,32,128,256,jI),new WI(32,128,258,1024,jI),new WI(32,258,258,4096,jI)];function VI(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=EI,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),AI(this.dyn_ltree),AI(this.dyn_dtree),AI(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),AI(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),AI(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const ZI=e=>{var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},GI=e=>{if(ZI(e))return N(e,vI);e.total_in=e.total_out=0,e.data_type=xI;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,sI(t),mI},YI=e=>{var t=GI(e);return t===mI&&((e=e.state).window_size=2*e.w_size,AI(e.head),e.max_lazy_match=HI[e.level].max_lazy,e.good_match=HI[e.level].good_length,e.nice_match=HI[e.level].nice_length,e.max_chain_length=HI[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t},JI=(e,t,n,r,i,o)=>{if(!e)return vI;let s=1;if(t===SI&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==EI||r<8||15<r||t<0||9<t||o<0||o>II||8===r&&1!==s)return N(e,vI);8===r&&(r=9);var a=new VI;return(e.state=a).strm=e,a.status=42,a.wrap=s,a.gzhead=null,a.w_bits=r,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=o,a.method=n,YI(e)};var qI=JI,KI=(YI,GI,(e,t)=>ZI(e)||2!==e.state.wrap?vI:(e.state.gzhead=t,mI)),XI=(n,e)=>{if(ZI(n)||e>gI||e<0)return n?N(n,vI):vI;var r=n.state;if(!n.output||0!==n.avail_in&&!n.input||666===r.status&&e!==pI)return N(n,0===n.avail_out?bI:vI);var i=r.last_flush;if(r.last_flush=e,0!==r.pending){if(MI(n),0===n.avail_out)return r.last_flush=-1,mI}else if(0===n.avail_in&&RI(e)<=RI(i)&&e!==pI)return N(n,bI);if(666===r.status&&0!==n.avail_in)return N(n,bI);if(42===r.status&&0===r.wrap&&(r.status=113),42===r.status){let e=EI+(r.w_bits-8<<4)<<8,t;if(t=r.strategy>=_I||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=t<<6,0!==r.strstart&&(e|=32),e+=31-e%31,LI(r,e),0!==r.strstart&&(LI(r,n.adler>>>16),LI(r,65535&n.adler)),n.adler=1,r.status=113,MI(n),0!==r.pending)return r.last_flush=-1,mI}if(57===r.status)if(n.adler=0,NI(r,31),NI(r,139),NI(r,8),r.gzhead)NI(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),NI(r,255&r.gzhead.time),NI(r,r.gzhead.time>>8&255),NI(r,r.gzhead.time>>16&255),NI(r,r.gzhead.time>>24&255),NI(r,9===r.level?2:r.strategy>=_I||r.level<2?4:0),NI(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(NI(r,255&r.gzhead.extra.length),NI(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(n.adler=iI(n.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(NI(r,0),NI(r,0),NI(r,0),NI(r,0),NI(r,0),NI(r,9===r.level?2:r.strategy>=_I||r.level<2?4:0),NI(r,3),r.status=113,MI(n),0!==r.pending)return r.last_flush=-1,mI;if(69===r.status){if(r.gzhead.extra){let e=r.pending,t=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+t>r.pending_buf_size;){var o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(n.adler=iI(n.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=o,MI(n),0!==r.pending)return r.last_flush=-1,mI;e=0,t-=o}i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+t),r.pending),r.pending+=t,r.gzhead.hcrc&&r.pending>e&&(n.adler=iI(n.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,t=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t&&(n.adler=iI(n.adler,r.pending_buf,r.pending-t,t)),MI(n),0!==r.pending)return r.last_flush=-1,mI;t=0}}while(e=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,NI(r,e),0!=e);r.gzhead.hcrc&&r.pending>t&&(n.adler=iI(n.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,t=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>t&&(n.adler=iI(n.adler,r.pending_buf,r.pending-t,t)),MI(n),0!==r.pending)return r.last_flush=-1,mI;t=0}}while(e=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,NI(r,e),0!=e);r.gzhead.hcrc&&r.pending>t&&(n.adler=iI(n.adler,r.pending_buf,r.pending-t,t))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(MI(n),0!==r.pending))return r.last_flush=-1,mI;NI(r,255&n.adler),NI(r,n.adler>>8&255),n.adler=0}if(r.status=113,MI(n),0!==r.pending)return r.last_flush=-1,mI}if(0!==n.avail_in||0!==r.lookahead||e!==dI&&666!==r.status){i=0===r.level?BI(r,e):r.strategy===_I?((e,t)=>{for(var n;;){if(0===e.lookahead&&(UI(e),0===e.lookahead)){if(t===dI)return 1;break}if(e.match_length=0,n=uI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(PI(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pI?(PI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(PI(e,!1),0===e.strm.avail_out)?1:2})(r,e):r.strategy===CI?((e,t)=>{let n,r,i,o;for(var s=e.window;;){if(e.lookahead<=258){if(UI(e),e.lookahead<=258&&t===dI)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(i=e.strstart-1,(r=s[i])===s[++i])&&r===s[++i]&&r===s[++i]){for(o=e.strstart+258;r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=uI(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=uI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(PI(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===pI?(PI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(PI(e,!1),0===e.strm.avail_out)?1:2})(r,e):HI[r.level].func(r,e);if(3!==i&&4!==i||(r.status=666),1===i||3===i)return 0===n.avail_out&&(r.last_flush=-1),mI;if(2===i&&(e===hI?cI(r):e!==gI&&(aI(r,0,0,!1),e===fI)&&(AI(r.head),0===r.lookahead)&&(r.strstart=0,r.block_start=0,r.insert=0),MI(n),0===n.avail_out))return r.last_flush=-1,mI}return e!==pI||!(r.wrap<=0)&&(2===r.wrap?(NI(r,255&n.adler),NI(r,n.adler>>8&255),NI(r,n.adler>>16&255),NI(r,n.adler>>24&255),NI(r,255&n.total_in),NI(r,n.total_in>>8&255),NI(r,n.total_in>>16&255),NI(r,n.total_in>>24&255)):(LI(r,n.adler>>>16),LI(r,65535&n.adler)),MI(n),0<r.wrap&&(r.wrap=-r.wrap),0!==r.pending)?mI:yI},$I=e=>{var t;return ZI(e)?vI:(t=e.state.status,e.state=null,113===t?N(e,wI):mI)},QI=(e,t)=>{let n=t.length;if(ZI(e))return vI;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return vI;1===i&&(e.adler=nI(e.adler,t,n,0)),r.wrap=0,n>=r.w_size&&(0===i&&(AI(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,s=e.next_in,a=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,UI(r);3<=r.lookahead;){let e=r.strstart,t=r.lookahead-2;for(;r.ins_h=TI(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++,--t;);r.strstart=e,r.lookahead=2,UI(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=a,e.avail_in=o,r.wrap=i,mI};const ex=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var tx=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(const t in n)ex(n,t)&&(e[t]=n[t])}}return e},nx=r=>{let n=0;for(let e=0,t=r.length;e<t;e++)n+=r[e].length;var i=new Uint8Array(n);for(let e=0,t=0,n=r.length;e<n;e++){var o=r[e];i.set(o,t),t+=o.length}return i};let rx=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(xE){rx=!1}const ix=new Uint8Array(256);for(let e=0;e<256;e++)ix[e]=252<=e?6:248<=e?5:240<=e?4:224<=e?3:192<=e?2:1;ix[254]=ix[254]=1;var ox=e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,i,o,s=e.length,a=0;for(i=0;i<s;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),o=0,i=0;o<a;i++)55296==(64512&(n=e.charCodeAt(i)))&&i+1<s&&56320==(64512&(r=e.charCodeAt(i+1)))&&(n=65536+(n-55296<<10)+(r-56320),i++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},sx=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};let ax=Object.prototype.toString,{Z_NO_FLUSH:lx,Z_SYNC_FLUSH:ux,Z_FULL_FLUSH:cx,Z_FINISH:dx,Z_OK:hx,Z_STREAM_END:fx,Z_DEFAULT_COMPRESSION:px,Z_DEFAULT_STRATEGY:gx,Z_DEFLATED:mx}=c;function yx(e){this.options=tx({level:px,method:mx,chunkSize:16384,windowBits:15,memLevel:8,strategy:gx},e||{});e=this.options;if(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new sx,this.strm.avail_out=0,(t=qI(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy))!==hx)throw new Error(oI[t]);if(e.header&&KI(this.strm,e.header),e.dictionary){var t,e="string"==typeof e.dictionary?ox(e.dictionary):"[object ArrayBuffer]"===ax.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=QI(this.strm,e))!==hx)throw new Error(oI[t]);this._dict_set=!0}}function vx(e,t){t=new yx(t);if(t.push(e,!0),t.err)throw t.msg||oI[t.err];return t.result}yx.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?dx:lx,"string"==typeof e?i.input=ox(e):"[object ArrayBuffer]"===ax.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===ux||r===cx)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(XI(i,r)===fx)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=$I(this.strm),this.onEnd(n),this.ended=!0,n===hx;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},yx.prototype.onData=function(e){this.chunks.push(e)},yx.prototype.onEnd=function(e){e===hx&&(this.result=nx(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};lw={Deflate:yx,deflate:vx,deflateRaw:function(e,t){return(t=t||{}).raw=!0,vx(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,vx(e,t)},constants:c};const wx=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),bx=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Sx=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),kx=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var _x=(e,t,n,r,i,o,s,a)=>{var l=a.bits;let u,c,d,h,f,p,g=0,m=0,y=0,v=0,w=0,b=0,S=0,k=0,_=0,C=0,I=null;var x=new Uint16Array(16),E=new Uint16Array(16);let R,A,O,T=null;for(g=0;g<=15;g++)x[g]=0;for(m=0;m<r;m++)x[t[n+m]]++;for(w=l,v=15;1<=v&&0===x[v];v--);if(w>v&&(w=v),0===v)i[o++]=20971520,i[o++]=20971520,a.bits=1;else{for(y=1;y<v&&0===x[y];y++);for(w<y&&(w=y),k=1,g=1;g<=15;g++)if((k=(k<<=1)-x[g])<0)return-1;if(0<k&&(0===e||1!==v))return-1;for(E[1]=0,g=1;g<15;g++)E[g+1]=E[g]+x[g];for(m=0;m<r;m++)0!==t[n+m]&&(s[E[t[n+m]]++]=m);if(p=0===e?(I=T=s,20):1===e?(I=wx,T=bx,257):(I=Sx,T=kx,0),C=0,m=0,g=y,f=o,b=w,S=0,d=-1,h=(_=1<<w)-1,1===e&&852<_||2===e&&592<_)return 1;for(;;){for(R=g-S,O=s[m]+1<p?(A=0,s[m]):s[m]>=p?(A=T[s[m]-p],I[s[m]-p]):(A=96,0),u=1<<g-S,c=1<<b,y=c;c-=u,i[f+(C>>S)+c]=R<<24|A<<16|O|0,0!==c;);for(u=1<<g-1;C&u;)u>>=1;if(0!==u?C=(C&=u-1)+u:C=0,m++,0==--x[g]){if(g===v)break;g=t[n+s[m]]}if(g>w&&(C&h)!==d){for(0===S&&(S=w),f+=y,b=g-S,k=1<<b;b+S<v&&!((k-=x[b+S])<=0);)b++,k<<=1;if(_+=1<<b,1===e&&852<_||2===e&&592<_)return 1;i[d=C&h]=w<<24|b<<16|f-o|0}}0!==C&&(i[f+C]=g-S<<24|64<<16|0),a.bits=w}return 0};let{Z_FINISH:Cx,Z_BLOCK:Ix,Z_TREES:xx,Z_OK:Ex,Z_STREAM_END:Rx,Z_NEED_DICT:Ax,Z_STREAM_ERROR:Ox,Z_DATA_ERROR:Tx,Z_MEM_ERROR:Mx,Z_BUF_ERROR:Px,Z_DEFLATED:Nx}=c,Lx=16209,Fx=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Dx(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Ux=e=>{var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},Bx=e=>{var t;return Ux(e)?Ox:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Ex)},zx=e=>{var t;return Ux(e)?Ox:((t=e.state).wsize=0,t.whave=0,t.wnext=0,Bx(e))},jx=(e,t)=>{let n;var r;return Ux(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?Ox:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,zx(e))},Wx=(e,t)=>{var n;return e?(n=new Dx,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=jx(e,t))!==Ex&&(e.state=null),n):Ox};let Hx,Vx,Zx=!0;const Gx=(e,t,n,r)=>{let i;e=e.state;return null===e.window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new Uint8Array(e.wsize)),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0};var Yx=zx,Jx=(jx,Bx,Wx),qx=(e,t)=>{let n,r,i,o,s,a,l,u,c,d,h,f,p,g,m,y,v,w,b,S,k,_,C=0;var I=new Uint8Array(4);let x,E;var R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ux(e)||!e.output||!e.input&&0!==e.avail_in)return Ox;16191===(n=e.state).mode&&(n.mode=16192),s=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,u=n.hold,c=n.bits,d=a,h=l,_=Ex;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}2&n.wrap&&35615===u?(0===n.wbits&&(n.wbits=15),I[n.check=0]=255&u,I[1]=u>>>8&255,n.check=iI(n.check,I,2,0),u=0,c=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&u)<<8)+(u>>8))%31?(e.msg="incorrect header check",n.mode=Lx):(15&u)!==Nx?(e.msg="unknown compression method",n.mode=Lx):(u>>>=4,c-=4,k=8+(15&u),0===n.wbits&&(n.wbits=k),15<k||k>n.wbits?(e.msg="invalid window size",n.mode=Lx):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&u?16189:16191,u=0,c=0)))}break;case 16181:for(;c<16;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(n.flags=u,(255&n.flags)!==Nx){e.msg="unknown compression method",n.mode=Lx;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Lx;break}n.head&&(n.head.text=u>>8&1),512&n.flags&&4&n.wrap&&(I[0]=255&u,I[1]=u>>>8&255,n.check=iI(n.check,I,2,0)),u=0,c=0,n.mode=16182;case 16182:for(;c<32;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.head&&(n.head.time=u),512&n.flags&&4&n.wrap&&(I[0]=255&u,I[1]=u>>>8&255,I[2]=u>>>16&255,I[3]=u>>>24&255,n.check=iI(n.check,I,4,0)),u=0,c=0,n.mode=16183;case 16183:for(;c<16;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&u,n.head.os=u>>8),512&n.flags&&4&n.wrap&&(I[0]=255&u,I[1]=u>>>8&255,n.check=iI(n.check,I,2,0)),u=0,c=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.length=u,n.head&&(n.head.extra_len=u),512&n.flags&&4&n.wrap&&(I[0]=255&u,I[1]=u>>>8&255,n.check=iI(n.check,I,2,0)),u=0,c=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((f=(f=n.length)>a?a:f)&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+f),k)),512&n.flags&&4&n.wrap&&(n.check=iI(n.check,r,f,o)),a-=f,o+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===a)break e;for(f=0;k=r[o+f++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k)),k&&f<a;);if(512&n.flags&&4&n.wrap&&(n.check=iI(n.check,r,f,o)),a-=f,o+=f,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===a)break e;for(f=0;k=r[o+f++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k)),k&&f<a;);if(512&n.flags&&4&n.wrap&&(n.check=iI(n.check,r,f,o)),a-=f,o+=f,k)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(4&n.wrap&&u!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Lx;break}u=0,c=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}e.adler=n.check=Fx(u),u=0,c=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=c,Ax;e.adler=n.check=1,n.mode=16191;case 16191:if(t===Ix||t===xx)break e;case 16192:if(n.last)u>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}switch(n.last=1&u,u>>>=1,--c,3&u){case 0:n.mode=16193;break;case 1:if((t=>{if(Zx){Hx=new Int32Array(512),Vx=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(_x(1,t.lens,0,288,Hx,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;_x(2,t.lens,0,32,Vx,0,t.work,{bits:5}),Zx=!1}t.lencode=Hx,t.lenbits=9,t.distcode=Vx,t.distbits=5})(n),n.mode=16199,t!==xx)break;u>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=Lx}u>>>=2,c-=2}break;case 16193:for(u>>>=7&c,c-=7&c;c<32;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Lx;break}if(n.length=65535&u,u=0,c=0,n.mode=16194,t===xx)break e;case 16194:n.mode=16195;case 16195:if(f=n.length){if(0===(f=(f=f>a?a:f)>l?l:f))break e;i.set(r.subarray(o,o+f),s),a-=f,o+=f,l-=f,s+=f,n.length-=f}else n.mode=16191;break;case 16196:for(;c<14;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(n.nlen=257+(31&u),u>>>=5,c-=5,n.ndist=1+(31&u),u>>>=5,c-=5,n.ncode=4+(15&u),u>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=Lx;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.lens[R[n.have++]]=7&u,u>>>=3,c-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,x={bits:n.lenbits},_=_x(0,n.lens,0,19,n.lencode,0,n.work,x),n.lenbits=x.bits,_){e.msg="invalid code lengths set",n.mode=Lx;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;C=n.lencode[u&(1<<n.lenbits)-1],m=C>>>24,y=C>>>16&255,v=65535&C,!(m<=c);){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(v<16)u>>>=m,c-=m,n.lens[n.have++]=v;else{if(16===v){for(E=m+2;c<E;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(u>>>=m,c-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=Lx;break}k=n.lens[n.have-1],f=3+(3&u),u>>>=2,c-=2}else if(17===v){for(E=m+3;c<E;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}u>>>=m,c-=m,k=0,f=3+(7&u),u>>>=3,c-=3}else{for(E=m+7;c<E;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}u>>>=m,c-=m,k=0,f=11+(127&u),u>>>=7,c-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Lx;break}for(;f--;)n.lens[n.have++]=k}}if(n.mode===Lx)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Lx;break}if(n.lenbits=9,x={bits:n.lenbits},_=_x(1,n.lens,0,n.nlen,n.lencode,0,n.work,x),n.lenbits=x.bits,_){e.msg="invalid literal/lengths set",n.mode=Lx;break}if(n.distbits=6,n.distcode=n.distdyn,x={bits:n.distbits},_=_x(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,x),n.distbits=x.bits,_){e.msg="invalid distances set",n.mode=Lx;break}if(n.mode=16199,t===xx)break e;case 16199:n.mode=16200;case 16200:if(6<=a&&258<=l){e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=c,function(e,t){let n,r,i,o,s,a,l,u,c,d,h,f,p,g,m,y,v,w,b,S,k,_,C,I;var x=e.state;n=e.next_in,C=e.input,r=n+(e.avail_in-5),i=e.next_out,I=e.output,o=i-(t-e.avail_out),s=i+(e.avail_out-257),a=x.dmax,l=x.wsize,u=x.whave,c=x.wnext,d=x.window,h=x.hold,f=x.bits,p=x.lencode,g=x.distcode,m=(1<<x.lenbits)-1,y=(1<<x.distbits)-1;t:do{for(f<15&&(h+=C[n++]<<f,f+=8,h+=C[n++]<<f,f+=8),v=p[h&m];;){if(w=v>>>24,h>>>=w,f-=w,0===(w=v>>>16&255))I[i++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=p[(65535&v)+(h&(1<<w)-1)];continue}if(32&w){x.mode=16191;break t}e.msg="invalid literal/length code",x.mode=16209;break t}for(b=65535&v,(w&=15)&&(f<w&&(h+=C[n++]<<f,f+=8),b+=h&(1<<w)-1,h>>>=w,f-=w),f<15&&(h+=C[n++]<<f,f+=8,h+=C[n++]<<f,f+=8),v=g[h&y];;){if(w=v>>>24,h>>>=w,f-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=g[(65535&v)+(h&(1<<w)-1)];continue}e.msg="invalid distance code",x.mode=16209;break t}if(S=65535&v,w&=15,f<w&&(h+=C[n++]<<f,(f+=8)<w)&&(h+=C[n++]<<f,f+=8),a<(S+=h&(1<<w)-1)){e.msg="invalid distance too far back",x.mode=16209;break t}if(h>>>=w,f-=w,S>(w=i-o)){if((w=S-w)>u&&x.sane){e.msg="invalid distance too far back",x.mode=16209;break t}if(k=0,_=d,0===c){if(k+=l-w,w<b){for(b-=w;I[i++]=d[k++],--w;);k=i-S,_=I}}else if(c<w){if(k+=l+c-w,(w-=c)<b){for(b-=w;I[i++]=d[k++],--w;);if(k=0,c<b){for(w=c,b-=w;I[i++]=d[k++],--w;);k=i-S,_=I}}}else if(k+=c-w,w<b){for(b-=w;I[i++]=d[k++],--w;);k=i-S,_=I}for(;2<b;)I[i++]=_[k++],I[i++]=_[k++],I[i++]=_[k++],b-=3;b&&(I[i++]=_[k++],1<b)&&(I[i++]=_[k++])}else{for(k=i-S;I[i++]=I[k++],I[i++]=I[k++],I[i++]=I[k++],2<(b-=3););b&&(I[i++]=I[k++],1<b)&&(I[i++]=I[k++])}break}}break}}while(n<r&&i<s);b=f>>3,n-=b,f-=b<<3,h&=(1<<f)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=i<s?s-i+257:257-(i-s),x.hold=h,x.bits=f}(e,h),s=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,a=e.avail_in,u=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;C=n.lencode[u&(1<<n.lenbits)-1],m=C>>>24,y=C>>>16&255,v=65535&C,!(m<=c);){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(y&&0==(240&y)){for(w=m,b=y,S=v;C=n.lencode[S+((u&(1<<w+b)-1)>>w)],m=C>>>24,y=C>>>16&255,v=65535&C,!(w+m<=c);){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}u>>>=w,c-=w,n.back+=w}if(u>>>=m,c-=m,n.back+=m,n.length=v,0===y){n.mode=16205;break}if(32&y){n.back=-1,n.mode=16191;break}if(64&y){e.msg="invalid literal/length code",n.mode=Lx;break}n.extra=15&y,n.mode=16201;case 16201:if(n.extra){for(E=n.extra;c<E;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.length+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;C=n.distcode[u&(1<<n.distbits)-1],m=C>>>24,y=C>>>16&255,v=65535&C,!(m<=c);){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(0==(240&y)){for(w=m,b=y,S=v;C=n.distcode[S+((u&(1<<w+b)-1)>>w)],m=C>>>24,y=C>>>16&255,v=65535&C,!(w+m<=c);){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}u>>>=w,c-=w,n.back+=w}if(u>>>=m,c-=m,n.back+=m,64&y){e.msg="invalid distance code",n.mode=Lx;break}n.offset=v,n.extra=15&y,n.mode=16203;case 16203:if(n.extra){for(E=n.extra;c<E;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}n.offset+=u&(1<<n.extra)-1,u>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Lx;break}n.mode=16204;case 16204:if(0===l)break e;if(f=h-l,n.offset>f){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Lx;break}p=f>n.wnext?(f-=n.wnext,n.wsize-f):n.wnext-f,f>n.length&&(f=n.length),g=n.window}else g=i,p=s-n.offset,f=n.length;for(f>l&&(f=l),l-=f,n.length-=f;i[s++]=g[p++],--f;);0===n.length&&(n.mode=16200);break;case 16205:if(0===l)break e;i[s++]=n.length,l--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===a)break e;a--,u|=r[o++]<<c,c+=8}if(h-=l,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=(n.flags?iI:nI)(n.check,i,h,s-h)),h=l,4&n.wrap&&(n.flags?u:Fx(u))!==n.check){e.msg="incorrect data check",n.mode=Lx;break}u=0,c=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===a)break e;a--,u+=r[o++]<<c,c+=8}if(4&n.wrap&&u!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Lx;break}u=0,c=0}n.mode=16208;case 16208:_=Rx;break e;case Lx:_=Tx;break e;case 16210:return Mx;default:return Ox}return e.next_out=s,e.avail_out=l,e.next_in=o,e.avail_in=a,n.hold=u,n.bits=c,(n.wsize||h!==e.avail_out&&n.mode<Lx&&(n.mode<16206||t!==Cx))&&Gx(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=(n.flags?iI:nI)(n.check,i,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),_=(0==d&&0===h||t===Cx)&&_===Ex?Px:_},Kx=e=>{var t;return Ux(e)?Ox:((t=e.state).window&&(t.window=null),e.state=null,Ex)},Xx=(e,t)=>Ux(e)||0==(2&(e=e.state).wrap)?Ox:((e.head=t).done=!1,Ex),$x=(e,t)=>{var n,r=t.length;return Ux(e)||0!==(n=e.state).wrap&&16190!==n.mode?Ox:16190===n.mode&&nI(1,t,r,0)!==n.check?Tx:Gx(e,t,r,r)?(n.mode=16210,Mx):(n.havedict=1,Ex)},Qx=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};let eE=Object.prototype.toString,{Z_NO_FLUSH:tE,Z_FINISH:nE,Z_OK:rE,Z_STREAM_END:iE,Z_NEED_DICT:oE,Z_STREAM_ERROR:sE,Z_DATA_ERROR:aE,Z_MEM_ERROR:lE}=c;function uE(e){this.options=tx({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new sx,this.strm.avail_out=0;let n=Jx(this.strm,t.windowBits);if(n!==rE)throw new Error(oI[n]);if(this.header=new Qx,Xx(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=ox(t.dictionary):"[object ArrayBuffer]"===eE.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(n=$x(this.strm,t.dictionary))!==rE)throw new Error(oI[n])}function cE(e,t){t=new uE(t);if(t.push(e),t.err)throw t.msg||oI[t.err];return t.result}uE.prototype.push=function(e,t){var n,r,i,o=this.strm,s=this.options.chunkSize,a=this.options.dictionary;let l,u,c;if(this.ended)return!1;for(u=t===~~t?t:!0===t?nE:tE,"[object ArrayBuffer]"===eE.call(e)?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(0===o.avail_out&&(o.output=new Uint8Array(s),o.next_out=0,o.avail_out=s),(l=qx(o,u))===oE&&a&&((l=$x(o,a))===rE?l=qx(o,u):l===aE&&(l=oE));0<o.avail_in&&l===iE&&0<o.state.wrap&&0!==e[o.next_in];)Yx(o),l=qx(o,u);switch(l){case sE:case aE:case oE:case lE:return this.onEnd(l),!(this.ended=!0)}if(c=o.avail_out,!o.next_out||0!==o.avail_out&&l!==iE||("string"===this.options.to?(n=((e,t)=>{let n=(t=(t=t||e.length)>e.length?e.length:t)-1;for(;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+ix[e[n]]>t?n:t})(o.output,o.next_out),r=o.next_out-n,i=((n,e)=>{var r=e||n.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(n.subarray(0,e));let i,o;var s=new Array(2*r);for(o=0,i=0;i<r;){let t=n[i++];if(t<128)s[o++]=t;else{let e=ix[t];if(4<e)s[o++]=65533,i+=e-1;else{for(t&=2===e?31:3===e?15:7;1<e&&i<r;)t=t<<6|63&n[i++],e--;1<e?s[o++]=65533:t<65536?s[o++]=t:(t-=65536,s[o++]=55296|t>>10&1023,s[o++]=56320|1023&t)}}}{var a=s,l=o;if(l<65534&&a.subarray&&rx)return String.fromCharCode.apply(null,a.length===l?a:a.subarray(0,l));let t="";for(let e=0;e<l;e++)t+=String.fromCharCode(a[e]);return t}})(o.output,n),o.next_out=r,o.avail_out=s-r,r&&o.output.set(o.output.subarray(n,n+r),0),this.onData(i)):this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out))),l!==rE||0!==c){if(l===iE)return l=Kx(this.strm),this.onEnd(l),this.ended=!0;if(0===o.avail_in)break}}return!0},uE.prototype.onData=function(e){this.chunks.push(e)},uE.prototype.onEnd=function(e){e===rE&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=nx(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var{Deflate:t,deflate:S,deflateRaw:i,gzip:Qw}=lw,{Inflate:u,inflate:P,inflateRaw:n,ungzip:b}={Inflate:uE,inflate:cE,inflateRaw:function(e,t){return(t=t||{}).raw=!0,cE(e,t)},ungzip:cE},dE={Deflate:t,deflate:S,deflateRaw:i,gzip:Qw,Inflate:u,inflate:P,inflateRaw:n,ungzip:b,constants:c},hE=(mE.prototype.uploadReplay=function(n){return qi(this,void 0,void 0,function(){var t;return Ki(this,function(e){switch(e.label){case 0:if(this.isUploading)return _y("Uploader","Upload in progress, skipping"),[2,!1];this.isUploading=!0,e.label=1;case 1:return e.trys.push([1,3,4,5]),(t=this.config.beforeSend(n))?[4,this.doUploadWithRetry(t,0)]:(k("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),k("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return Cy("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},mE.prototype.doUploadWithRetry=function(r,i){return qi(this,void 0,void 0,function(){var t,n;return Ki(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,5]),[4,this.doUpload(r)];case 1:return e.sent(),[3,5];case 2:return t=e.sent(),i<this.config.maxRetries?(k("Uploader","Retrying in "+(n=1e3*Math.pow(2,i))+"ms (attempt "+(i+1)+"/"+this.config.maxRetries+")"),[4,this.sleep(n)]):[3,4];case 3:return e.sent(),[2,this.doUploadWithRetry(r,i+1)];case 4:throw t;case 5:return[2]}})})},mE.prototype.compressData=function(e){var e=JSON.stringify(e),t=e.length,e=dE.gzip(e),n=e.length;return k("Uploader","Compressed: "+Math.round(t/1024)+"KB -> "+Math.round(n/1024)+"KB ("+Math.round(100*(1-n/t))+"% reduction)"),{compressed:e,originalSize:t,compressedSize:n}},mE.prototype.doUpload=function(o){return qi(this,void 0,void 0,function(){var t,n,r,i;return Ki(this,function(e){switch(e.label){case 0:return i={"Content-Type":"application/json","X-App-ID":this.config.appId},this.useCompression?(t=this.compressData(o).compressed,t=t,i["Content-Encoding"]="gzip"):(t=JSON.stringify(o),k("Uploader","Sending uncompressed: "+Math.round(t.length/1024)+"KB")),r="string"==typeof t?t.length:t.byteLength,(n=r<65536)||k("Uploader","Data size "+Math.round(r/1024)+"KB exceeds keepalive limit, using normal fetch"),[4,fetch(this.config.uploadUrl,{method:"POST",headers:i,body:t,keepalive:n})];case 1:if((r=e.sent()).ok)return[4,r.json()];throw new Error("HTTP "+r.status+": "+r.statusText);case 2:if(0!==(i=e.sent()).code)throw new Error("Server error (code "+i.code+"): "+i.message);return[2]}})})},mE.prototype.sendBeacon=function(e){try{var t,n;return this.useCompression?(t=this.compressData(e).compressed,n=new Blob([t],{type:"application/octet-stream"}),navigator.sendBeacon(this.config.uploadUrl+"?encoding=gzip",n)):(n=new Blob([JSON.stringify(e)],{type:"application/json"}),navigator.sendBeacon(this.config.uploadUrl,n))}catch(G){return Cy("Uploader","sendBeacon failed:",G),!1}},mE.prototype.isUploadInProgress=function(){return this.isUploading},mE.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},mE),fE=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),pE=(gE.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,k("ClickDetector","Started"))},gE.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,k("ClickDetector","Stopped"))},gE.prototype.handlePointerDown=function(e){var t=this,e=e.target;this.isClickableElement(e)&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=e,this.slowClickTimeoutId=setTimeout(function(){t.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver())},gE.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},gE.prototype.startMutationObserver=function(){var t=this;this.clickNode&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&t.handleSlowClick("mutation")}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled"]}))},gE.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if("class"===r||"style"===r)return!0}}return!1},gE.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},gE.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},gE.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},gE.prototype.isClickableElement=function(e){return e.matches(fE)||null!==e.closest(fE)},gE.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},gE.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},gE.prototype.isActive=function(){return this.isRunning},gE);function gE(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function mE(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){}}}function yE(e){var t=null==(t=e)?void 0:t._tdemSampleGate;return!t||!t.isDecided||t.isSampled&&!1!==e._replaySampled}new _l({name:"sessionReplay"});var l=new _l({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,_tdemRef:null,_isCheckoutFlushing:!1,init:function(e){},onNewTdem:function(e,t){var t=this.parseConfig(t),n=null!=(n=t.debug)&&n;by=n,t.enabled?(this.replayConfig=t,this._tdemRef=e,this.initializeModules(e,t),(n=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,t,n.mode),this.registerReplaySamplingCheck(e,t),this.listenForErrors(e,t),this.listenForPerformance(e),this.listenForUnload(e),this.isInitialized=!0):k("Plugin","Not sampled by local sampler, skipping")):k("Plugin","disabled")},registerReplaySamplingCheck:function(t,e){var n=this,r=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled?(e=t._replaySampled)!==undefined&&(clearInterval(r),!1===e?(k("Plugin","Replay not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):k("Plugin","Both session and replay sampled, replay continues")):(clearInterval(r),k("Plugin","Session not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()))},50);setTimeout(function(){clearInterval(r)},5e3)},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===hi(e)?p(p({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new Iy({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new Ty({},null!=(r=e.useCompression)&&r),this.samplerManager=new bC({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new wC({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e=n._tdemRef,t=n.replayConfig;e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(k("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),t.config.hostUrl||"");this.uploader=new hE({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError}),this.clickDetector=new pE({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),k("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(k("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=mC(p({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):k("Plugin","Buffer mode - flush on error only")):Cy("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){this.eventBuffer&&this.sessionManager&&(this.sanitizeDataURLs(e),this.eventBuffer.addEvent(e),this.sessionManager.updateActivity())},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var s=0,a=n.attributes;s<a.length;s++){var l=a[s];if(null!=l&&l.attributes)for(var u=0,c=Object.entries(l.attributes);u<c.length;u++){var d=c[u],h=d[0],d=d[1];"string"==typeof d&&1024<d.length&&d.startsWith("data:")&&(l.attributes[h]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],s=n[o];"string"==typeof s&&s.length>t&&s.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var a=0,l=e.childNodes;a<l.length;a++){var u=l[a];this.sanitizeNodeTree(u,t)}}},handleSlowClick:function(e,t){k("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){k("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:p({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},flushReplayData:function(c,d,h){return void 0===h&&(h=!1),qi(this,void 0,void 0,function(){var t,n,r,i,o,s,a,l,u;return Ki(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&yE(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(k("Plugin","Session expired, refreshing"),this.stopReplay(),i=this.sessionManager.refreshSession(),c.lifeCycle.emit("sessionRefreshed"),n=c._replaySampled,i.sampled&&!1!==n&&this.startReplay(c,d,i.sampled),[2]):this.eventBuffer.isEmpty()?[2]:(n=this.eventBuffer.getEventCount(),!h&&n<10?(k("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(_y("Flush","First segment missing FullSnapshot, triggering manual checkout"),this.recorderManager&&this.recorderManager.takeFullSnapshot()),[4,this.eventBuffer.finishAsync()])):[2];case 1:if(0===(r=e.sent()).eventCount)return[2];if(0===(i=r.events).length&&r.eventsJson)try{i=JSON.parse(r.eventsJson)}catch(H){return Cy("Flush","Failed to parse eventsJson from worker:",H),[2]}a=this.splitEventsIntoChunks(i),k("Flush","Flushing "+r.eventCount+" events in "+a.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,s=0,a=a,e.label=2;case 2:return s<a.length?(l=a[s],l=JSON.stringify(l),l={project_key:String(c.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,events:l},[4,this.uploader.uploadReplay(l)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return s++,[3,2];case 5:return l=this.eventBuffer.isUsingWorker(),u=l?"(worker)":"(sync)",k("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+u),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e){if(0===e.length)return[];var t=JSON.stringify(e);if(t.length<=3145728)return[e];_y("Split","Events size "+Math.round(t.length/1024)+"KB exceeds limit "+Math.round(3072)+"KB, splitting");for(var n=[],r=[],i=2,o=0,s=e;o<s.length;o++){var a=s[o],l=JSON.stringify(a).length+1;0<r.length&&3145728<i+l&&(n.push(r),r=[],i=2),5242880<l?_y("Split","Single event too large ("+Math.round(l/1024)+"KB), type="+a.type+", skipping"):(r.push(a),i+=l)}return 0<r.length&&n.push(r),n},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),k("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(k("Plugin","Converting to session mode due to error"),this.flushReplayData(t,n,!0),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(x){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForUnload:function(e){var t=this,n=function(){t.flushOnUnload(e)};window.addEventListener("beforeunload",n),window.addEventListener("pagehide",n),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&yE(e)){var t=this.sessionManager.getSession();if(t&&(this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),!this.eventBuffer.isEmpty())){var n=this.eventBuffer.finish();if(0!==n.eventCount){for(var n=this.splitEventsIntoChunks(n.events),r=0,i=n;r<i.length;r++){var o=i[r],o={project_key:String(e.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,events:JSON.stringify(o)};this.uploader.sendBeacon(o)}k("SessionReplay"," Data sent via sendBeacon on unload ("+n.length+" chunk(s))")}}}},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this.isInitialized=!1,k("Plugin","destroyed")}}),vE={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},wE=new Set([f.JS_ERROR,f.PROMISE_ERROR,f.RESOURCE_ERROR,f.API_ERROR]),v=(new _l({name:"struggleMonitor"}),new _l({name:"struggleMonitor",instanceStates:new Map,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?p({},vE):e&&"object"===hi(e)?p(p(p({},vE),e),{click:p(p({},vE.click),e.click||{}),performance:p(p({},vE.performance),e.performance||{}),form:p(p({},vE.form),e.form||{}),navigation:p(p({},vE.navigation),e.navigation||{}),custom:p(p({},vE.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:vE).payloadAllowlist,enabled:!1!==e.enabled}):p(p({},vE),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new pE({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start())},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,f.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,f.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,f.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,f.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:$a(),event_type:f.FORM_SUBMIT_RESULT,event_category:Ka.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:p(p({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:p(p({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:xu(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:$a(),timestamp:Date.now(),page_url:i};n!==f.FORM_FOCUS?n!==f.FORM_BLUR?n!==f.FORM_CHANGE?(i=p(p({},r),{event_type:f.FORM_SUBMIT,event_category:Ka.BEHAVIOR,data:p(p({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=p(p({},r),{event_type:f.FORM_CHANGE,event_category:Ka.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=p(p({},r),{event_type:f.FORM_BLUR,event_category:Ka.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=p(p({},r),{event_type:f.FORM_FOCUS,event_category:Ka.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){"timeout"===n.endReason&&(t={type:"dead_click",ownerType:"element",ownerKey:n.node.selector||n.node.tagName||"unknown",pageUrl:window.location.href,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeAfterClickMs:n.timeAfterClickMs,selector:n.node.selector||""}},null!=(n=e.reportStruggle))&&n.call(e,t)},handleEventCreated:function(n,r,e){var t,i=this,o=Date.now(),s=r.config.click||vE.click,a=Math.max(null!=(t=s.errorClickWindowMs)?t:3e3,null!=(t=s.rageClickWindowMs)?t:1e3,null!=(t=s.deadClickWindowMs)?t:3e3);r.recentClicks=r.recentClicks.filter(function(e){return o-e.timestamp<=a}),e.forEach(function(e){var t;e&&e.event_type!==f.STRUGGLE&&(e.event_type===f.CLICK?(t=(null==(t=e.data)?void 0:t.target_element)||(null==(t=e.data)?void 0:t.target_id)||(null==(t=e.data)?void 0:t.target_class)||"unknown",r.recentClicks.push({eventId:e.event_id,timestamp:e.timestamp||o,pageUrl:e.page_url||"",ownerKey:t})):wE.has(e.event_type)?i.tryReportErrorClick(n,r,e):e.event_type===f.PAGE_LOAD||e.event_type===f["true"]?i.tryReportSlowPage(n,r,e):e.event_type===f.FORM_FOCUS?(i.trackFormFocus(r,e),i.trackFormChangeAndZigzag(n,r,e)):e.event_type===f.FORM_CHANGE?i.trackFormChangeAndZigzag(n,r,e):e.event_type===f.FORM_BLUR?i.tryReportLongFocusTime(n,r,e):e.event_type===f.FORM_SUBMIT?i.trackFormSubmitResult(r,e):e.event_type===f.FORM_SUBMIT_RESULT?(i.trackFormSubmitResult(r,e),i.tryReportFormValidationError(n,r,e)):e.event_type===f.PAGE_VIEW&&null!=(t=null==(t=e.data)?void 0:t.event_properties)&&t.navigation_type&&i.tryReportBackForward(n,r,e),i.tryReportCustomStruggle(n,r,e))})},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===f.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,s,a;n.event_type!==f.FORM_CHANGE?n.event_type!==f.FORM_FOCUS||(a=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(a=a.slice(-4))[0],s=a[1],!o)||!s||o===s||o!==a[2]||s!==a[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,a=null!=(s=null==(o=t.config.form)?void 0:o.zigzagMinCount)?s:2,i.zigzagHits<a)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(s=null==r?void 0:r.data)?void 0:s.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==f.FORM_SUBMIT&&t.event_type!==f.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==f.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,s,a;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(s=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(s=n.changedFieldIds.size/s)<(a=null!=(a=null==(a=t.config.form)?void 0:a.incompleteMinFieldRatio)?a:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(s.toFixed(4)),threshold_ratio:a}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,s,a=String((null==(a=null==n?void 0:n.data)?void 0:a.field_id)||"");a&&(i=t.focusStartMap.get(a))&&(t.focusStartMap["delete"](a),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(s=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:a,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:a,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:s,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||vE.click).errorClickWindowMs)?o:3e3,o=Xi(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,s=t.config.performance||vE.performance;s.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=s.slowPageLcpThreshold)?o:4e3,s=null!=(s=s.slowPageInpThreshold)?s:500,o<=r||s<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,s=null==(s=null==n?void 0:n.data)?void 0:s.event_properties;"fail"===String((null==s?void 0:s.status)||"")&&(i=null!=s&&s.field_id?"field":"form",o=String((null==s?void 0:s.field_id)||"")||String((null==s?void 0:s.form_id)||"")||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i,ownerKey:o,pageUrl:null==n?void 0:n.page_url,formId:String((null==s?void 0:s.form_id)||""),fieldId:String((null==s?void 0:s.field_id)||""),triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:null==s?void 0:s.validation_code,validation_message:null==(e=null==n?void 0:n.data)?void 0:e.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||vE.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||vE.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=p(p({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e))},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear()}}));function bE(e){return e._tdemSampleGate||null}function SE(e,t,n){e=bE(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random()<t,e.decide(n)):console.warn("[TDEM] Sample gate not found")}function kE(e,t){var n=bE(e);!(n&&n.isDecided&&n.isSampled)||t<=0?e._replaySampled=!1:100<=t?e._replaySampled=!0:(n=100*Math.random(),e._replaySampled=n<t)}function _E(d,h){var f;qi(this,void 0,void 0,function(){var o,s,a,l,u,c;return Ki(this,function(e){switch(e.label){case 0:if(!(o=d.config.id))return CE(d,o,h),[2];if(t=d.config.apiUrl||d.config.url,!(s=t?t.replace(/\/+$/,"")+"/api/v1/config":""))return CE(d,o,h),[2];e.label=1;case 1:return e.trys.push([1,4,,5]),[4,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:o})})];case 2:if((a=e.sent()).ok)return[4,a.json()];throw new Error("HTTP "+a.status);case 3:if(0===(a=e.sent()).code&&a.data){c=a.data.tdem_sample_rate,l=null!=(f=a.data.replay_sample_rate)?f:1,u=a.data.enabled;var t=o,n=c,r=l;try{var i={projectKey:t,sampleRate:n,replaySampleRate:r,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(i))}catch(Oy){}return h._cachedSampleRate=c,h._cachedReplaySampleRate=l,SE(d,c,u),kE(d,l),[3,5]}throw new Error("API error: code="+a.code);case 4:return c=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",c),CE(d,o,h),[3,5];case 5:return[2]}var t})})}function CE(e,t,n){var r=bE(e);r&&((t=t?function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5?t:null:null}catch(Oy){return null}}(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate,"replaySampleRate:",t.replaySampleRate),n._cachedSampleRate=t.sampleRate,n._cachedReplaySampleRate=t.replaySampleRate,SE(e,t.sampleRate,0<t.sampleRate),kE(e,t.replaySampleRate)):(console.warn("[TDEM] No cached config, default to not report"),r.decide(!1),e._replaySampled=!1))}g=new _l({name:"tdemConfig",_cachedSampleRate:null,_cachedReplaySampleRate:null,onNewTdem:function(e){var t=this;_E(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=bE(e);n&&n.isDecided&&null!==(t=this._cachedSampleRate)&&t!==undefined&&((t=n.reDecide(t))?kE(e,null!=(n=this._cachedReplaySampleRate)?n:1):e._replaySampled=!1,console.info("[TDEM] Session refreshed, session="+t+", replay="+e._replaySampled))}});return Op.use(Kr),Op.use(qr),Op.use(Zn),Op.use(Hi),Op.use(vn),Op.use(e),Op.use(r),Op.use(Zu),Op.use(Gt),Op.use(tc),Op.use(Pl),Op.use(l),Op.use(v),Op.use(nc),Op.use(g),Op});
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).TDEM=t()}(this,function(){"use strict";function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function w(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function A(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var r=s.apply(e,a);function i(e){w(r,t,n,i,o,"next",e)}function o(e){w(r,t,n,i,o,"throw",e)}i(void 0)})}}function v(e,t,n){t=N(t);var r=e,e=F()?Reflect.construct(t,n||[],N(e).constructor):t.apply(e,n);if(!e||"object"!=typeof e&&"function"!=typeof e){if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");if(void 0===(e=r))throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e}function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function De(e,t,n){var r;return F()?Reflect.construct.apply(null,arguments):((r=[null]).push.apply(r,t),t=new(e.bind.apply(e,r)),n&&q(t,n.prototype),t)}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G(r.key),r)}}function k(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Me(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a["return"]||a["return"]()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=J(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t,n){return(t=G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(){return(D="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=N(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(null,arguments)}function N(e){return(N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(F=function(){return!!e})()}function j(t,e){var n,r=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)),r}function Ae(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach(function(e){L(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function z(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r={};for(n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function B(){var p,g,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",n=e.toStringTag||"@@toStringTag";function r(e,t,n,r){var i,o,a,s,u,l,c,f,d,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype);return W(t,"_invoke",(i=e,o=n,c=r||[],f=!1,d={p:l=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,t){return a=e,s=0,u=p,d.n=t,m}},function(e,t,n){if(1<l)throw TypeError("Generator is already running");for(f&&1===t&&h(t,n),s=t,u=n;(g=s<2?p:u)||!f;){a||(s?s<3?(1<s&&(d.n=-1),h(s,u)):d.n=u:d.v=u);try{if(l=2,a){if(g=a[e=s?e:"next"]){if(!(g=g.call(a,u)))throw TypeError("iterator result is not an object");if(!g.done)return g;u=g.value,s<2&&(s=0)}else 1===s&&(g=a["return"])&&g.call(a),s<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),s=1);a=p}else if((g=(f=d.n<0)?u:i.call(o,d))!==m)break}catch(g){a=p,s=1,u=g}finally{l=1}}return{value:g,done:f}}),!0),t;function h(e,t){for(s=e,u=t,g=0;!f&&l&&!n&&g<c.length;g++){var n,r=c[g],i=d.p,o=r[2];3<e?(n=o===t)&&(u=r[(s=r[4])?5:s=3],r[4]=r[5]=p):r[0]<=i&&((n=e<2&&i<r[1])?(s=0,d.v=t,d.n=r[1]):i<o&&(n=e<3||r[0]>t||o<t)&&(r[4]=e,r[5]=t,d.n=o,s=0))}if(n||1<e)return m;throw f=!0,t}}var m={};function v(){}function i(){}function o(){}g=Object.getPrototypeOf;var e=[][t]?g(g([][t]())):(W(g={},t,function(){return this}),g),a=o.prototype=v.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,o):(e.__proto__=o,W(e,n,"GeneratorFunction")),e.prototype=Object.create(a),e}return W(a,"constructor",i.prototype=o),W(o,"constructor",i),W(o,n,i.displayName="GeneratorFunction"),W(a),W(a,n,"Generator"),W(a,t,function(){return this}),W(a,"toString",function(){return"[object Generator]"}),(B=function(){return{w:r,m:s}})()}function W(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}(W=function(e,t,n,r){function i(t,n){W(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))})(e,t,n,r)}function H(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function q(e,t){return(q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=n["return"]&&(a=n["return"](),Object(a)!==a))return}finally{if(l)throw i}}return s}}(e,t)||J(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t,n,r){var i=D(N(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof i?function(e){return i.apply(n,e)}:i}function Ue(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||J(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e){e=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);e=t.call(e,"string");if("object"!=typeof e)return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(e);return"symbol"==typeof e?e:e+""}function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(e,t){var n;if(e)return"string"==typeof e?u(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}function $(e){var n="function"==typeof Map?new Map:void 0;return($=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(XS){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return De(e,arguments,N(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),q(t,e)})(e)}var O,m=function(e){try{return!!e()}catch(w){return!0}},Z=void 0,y=((O=void 0)({target:"Array",stat:!0},{isArray:Z}),void 0),K=y({}.toString),Y=y("".slice),Q=function(e){return Y(K(e),8,-1)},ee=(Array.isArray,"object"==("undefined"==typeof document?"undefined":S(document))&&document.all),_=void 0===ee&&ee!==undefined?function(e){return"function"==typeof e||e===ee}:function(e){return"function"==typeof e},x=function(e){return"object"==S(e)?null!==e:_(e)},te=function(e){return null===e||e===undefined},ne=TypeError,re=function(e){if(te(e))throw new ne("Can't call method on "+e);return e},ie=Object,oe=function(e){return ie(re(e))},ae=void 0,se=(O({target:"Math",stat:!0},{trunc:ae}),Math.ceil,function(e){e=+e;return e!=e||0==e?0:ae(e)}),ue=Math.min,le=function(e){e=se(e);return 0<e?ue(e,9007199254740991):0},ce=function(e){return le(e.length)},fe=TypeError,de=function(e){if(9007199254740991<e)throw new fe("Maximum allowed index exceeded");return e},R=void 0,he=R.document,pe=x(he)&&x(he.createElement),ge=function(e){return pe?he.createElement(e):{}},d=void 0,e=(d||m(function(){return 7!==Object.defineProperty(ge("div"),"a",{get:function(){return 7}}).a}),d&&m(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})),me=String,ve=TypeError,E=function(e){if(x(e))return e;throw new ve(me(e)+" is not an object")},ye=!m(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),we=Function.prototype.call,I=ye?we.bind(we):function(){return we.apply(we,arguments)},be=function(e,t){return arguments.length<2?(n=R[e],_(n)?n:undefined):R[e]&&R[e][t];var n},ke=y({}.isPrototypeOf),Se=String,_e=function(e){try{return Se(e)}catch(w){return"Object"}},Ee=TypeError,Ce=function(e){if(_(e))return e;throw new Ee(_e(e)+" is not a function")},Oe=void 0,xe=!m(function(){Reflect.apply(function(){})}),xe=(O({target:"Reflect",stat:!0,forced:xe},{apply:function(e,t,n){return Oe(Ce(e),t,E(n))}}),Function.prototype),Re=xe.apply,xe=xe.call,Ie=("object"==("undefined"==typeof Reflect?"undefined":S(Reflect))&&Reflect.apply||ye&&xe.bind(Re),y({}.hasOwnProperty)),T=Object.hasOwn||function(e,t){return Ie(oe(e),t)},Re=Function.prototype,xe=d&&Object.getOwnPropertyDescriptor,Te=T(Re,"name"),Fe={EXISTS:Te,PROPER:Te&&"something"===function(){}.name,CONFIGURABLE:Te&&(!d||xe(Re,"name").configurable)},Te=function(e,t){var n=[][e];return!!n&&m(function(){n.call(null,t||function(){return 1},1)})},je=void 0,ze=void 0,Be=y([].join),Re=je!==Object||!Te("join",","),xe=(O({target:"Array",proto:!0,forced:Re},{join:function(e){return Be(ze(this),e===undefined?",":e)}}),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{});function We(e,t,n){return e(n={path:t,exports:{},require:function(e,t){throw t!==undefined&&null!==t||n.path,new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}},n.exports),n.exports}var He=Object.defineProperty,qe=function(e,t){try{He(R,e,{value:t,configurable:!0,writable:!0})}catch(A){R[e]=t}return t},Ve=We(function(e){e=e.exports=R["__core-js_shared__"]||qe("__core-js_shared__",{});(e.versions||(e.versions=[])).push({version:"3.49.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),Ge=y(Function.toString);_(Ve.inspectSource)||(Ve.inspectSource=function(e){return Ge(e)});var Je,$e=Ve.inspectSource,Ze=void 0,Ke=Ze("toStringTag"),Ye=Object,Xe="Arguments"===Q(function(){return arguments}()),Qe=function(e){var n,t;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(e=Ye(e),Ke))?n:Xe?Q(e):"Object"===(t=Q(e))&&_(e.callee)?"Arguments":t},et=String,C=function(e){if("Symbol"===Qe(e))throw new TypeError("Cannot convert a Symbol value to a string");return et(e)},Re=(Je=!1,(Re=/[ac]/).exec=function(){return Je=!0,/./.exec.apply(this,arguments)},!0===Re.test("abc")&&Je),tt=/./.test;O({target:"RegExp",proto:!0,forced:!Re},{test:function(e){var t=E(this),e=C(e),n=t.exec;return _(n)?null!==(n=I(n,t,e))&&(E(n),!0):I(tt,t,e)}});var nt,rt,it,ot,Re=R.WeakMap,Re=_(Re)&&/native code/.test(String(Re)),at=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},st=void 0,ut=d?function(e,t,n){return st.f(e,t,at(1,n))}:function(e,t,n){return e[t]=n,e},lt=function(e,t){return Ve[e]||(Ve[e]=t||{})},ct=0,ft=Math.random(),dt=y(1.1.toString),ht=function(e){return"Symbol("+(e===undefined?"":e)+")_"+dt(++ct+ft,36)},pt=lt("keys"),gt=function(e){return pt[e]||(pt[e]=ht(e))},mt={},vt=R.TypeError,yt=R.WeakMap,wt=Re||Ve.state?((it=Ve.state||(Ve.state=new yt)).get=it.get,it.has=it.has,it.set=it.set,nt=function(e,t){if(it.has(e))throw new vt("Object already initialized");return t.facade=e,it.set(e,t),t},rt=function(e){return it.get(e)||{}},function(e){return it.has(e)}):(ot=gt("state"),mt[ot]=!0,nt=function(e,t){if(T(e,ot))throw new vt("Object already initialized");return t.facade=e,ut(e,ot,t),t},rt=function(e){return T(e,ot)?e[ot]:{}},function(e){return T(e,ot)}),bt={set:nt,get:rt,has:wt,enforce:function(e){return wt(e)?rt(e):nt(e,{})},getterFor:function(t){return function(e){if(x(e)&&(e=rt(e)).type===t)return e;throw new vt("Incompatible receiver, "+t+" required")}}},kt=We(function(e){var r=Fe.CONFIGURABLE,i=bt.enforce,t=bt.get,o=String,a=Object.defineProperty,s=y("".slice),u=y("".replace),l=y([].join),c=d&&!m(function(){return 8!==a(function(){},"length",{value:8}).length}),f=String(String).split("String"),e=e.exports=function(e,t,n){"Symbol("===s(o(t),0,7)&&(t="["+u(o(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!T(e,"name")||r&&e.name!==t)&&(d?a(e,"name",{value:t,configurable:!0}):e.name=t),c&&n&&T(n,"arity")&&e.length!==n.arity&&a(e,"length",{value:n.arity});try{n&&T(n,"constructor")&&n.constructor?d&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=undefined)}catch(F){}n=i(e);return T(n,"source")||(n.source=l(f,"string"==typeof t?t:"")),e};Function.prototype.toString=e(function(){return _(this)&&t(this).source||$e(this)},"toString")}),St=function(e,t,n){return n.get&&kt(n.get,t,{getter:!0}),n.set&&kt(n.set,t,{setter:!0}),st.f(e,t,n)},yt=Fe.EXISTS,_t=Function.prototype,Et=y(_t.toString),Ct=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ot=y(Ct.exec),xt=(d&&!yt&&St(_t,"name",{configurable:!0,get:function(){try{return Ot(Ct,Et(this))[1]}catch(u){return""}}}),function(e,t,n,r){var i=(r=r||{}).enumerable,o=r.name!==undefined?r.name:t;if(_(n)&&kt(n,o,r),r.global)i?e[t]=n:qe(t,n);else{try{r.unsafe?e[t]&&(i=!0):delete e[t]}catch(P){}i?e[t]=n:st.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e}),Rt=void 0,It=Ze("species"),Tt=RegExp.prototype,yt=function(r,e,t,n){var a,i=Ze(r),s=!m(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),o=s&&!m(function(){var e,t=!1,n=/a/;return"split"===r&&((e={})[It]=function(){return n},(n={constructor:e,flags:""})[i]=/./[i]),n.exec=function(){return t=!0,null},n[i](""),!t});s&&o&&!t||(a=/./[i],o=e(i,""[r],function(e,t,n,r,i){var o=t.exec;return o===Rt||o===Tt.exec?s&&!i?{done:!0,value:I(a,t,n,r)}:{done:!0,value:I(e,n,t,r)}:{done:!1}}),xt(String.prototype,r,o[0]),xt(Tt,i,o[1])),n&&ut(Tt[i],"sham",!0)},Mt=y("".charAt),At=y("".charCodeAt),Pt=y("".slice),_t=function(i){return function(e,t){var n,e=C(re(e)),t=se(t),r=e.length;return t<0||r<=t?i?"":undefined:(n=At(e,t))<55296||56319<n||t+1===r||(r=At(e,t+1))<56320||57343<r?i?Mt(e,t):n:i?Pt(e,t,t+2):r-56320+(n-55296<<10)+65536}},_t={codeAt:_t(!1),charAt:_t(!0)},Lt=_t.charAt,Dt=function(e,t,n){return t+(n&&Lt(e,t).length||1)},Nt=function(e,t){t=e[t];return te(t)?undefined:Ce(t)},Ut=Math.floor,Ft=y("".charAt),jt=y("".replace),zt=y("".slice),Bt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Wt=/\$([$&'`]|\d{1,2})/g,Ht=R.RegExp,qt={correct:!m(function(){var e=!0;try{Ht(".","d")}catch(k){e=!1}var t,n={},r="",i=e?"dgimsy":"gimsy",o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(t in e&&(o.hasIndices="d"),o)!function(e,t){Object.defineProperty(n,e,{get:function(){return r+=t,!0}})}(t,o[t]);return Object.getOwnPropertyDescriptor(Ht.prototype,"flags").get.call(n)!==i||r!==i})},Vt=function(){var e=E(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Gt=(d&&!qt.correct&&(St(RegExp.prototype,"flags",{configurable:!0,get:Vt}),qt.correct=!0),RegExp.prototype),Jt=qt.correct?function(e){return e.flags}:function(e){return qt.correct||!ke(Gt,e)||T(e,"flags")?e.flags:I(Vt,e)},$t=TypeError,Zt=function(e,t){var n=e.exec;if(_(n))return null!==(n=I(n,e,t))&&E(n),n;if("RegExp"===Q(e))return I(Rt,e,t);throw new $t("RegExp#exec called on incompatible receiver")},Kt=Ze("replace"),Yt=Math.max,Xt=Math.min,Qt=y([].concat),en=y([].push),tn=y("".indexOf),nn=y("".slice),rn="$0"==="a".replace(/./,"$0"),on=!!/./[Kt]&&""===/./[Kt]("a","$0"),an=(yt("replace",function(e,b,k){var S=on?"$":"$0";return[function(e,t){var n=re(this),r=x(e)?Nt(e,Kt):undefined;return r?I(r,e,n,t):I(b,C(n),e,t)},function(e,t){var n=E(this),r=C(e),i=_(t),e=(i||(t=C(t)),C(Jt(n)));if("string"==typeof t&&!~tn(t,S)&&!~tn(t,"$<")&&!~tn(e,"y")){var o=k(b,n,r,t);if(o.done)return o.value}var a,s=!!~tn(e,"g");s&&(a=!!~tn(e,"u")||!!~tn(e,"v"),n.lastIndex=0);for(var u,l=[];null!==(u=Zt(n,r))&&(en(l,u),s);)""===C(u[0])&&(n.lastIndex=Dt(r,le(n.lastIndex),a));for(var c,f="",d=0,h=0;h<l.length;h++){for(var p=C((u=l[h])[0]),g=Yt(Xt(se(u.index),r.length),0),m=[],v=1;v<u.length;v++)en(m,(c=u[v])===undefined?c:String(c));var y=u.groups,w=i?(w=Qt([p],m,g,r),y!==undefined&&en(w,y),C(Oe(t,undefined,w))):function(o,a,s,u,l,e){var c=s+o.length,f=u.length,t=Wt;return l!==undefined&&(l=oe(l),t=Bt),jt(e,t,function(e,t){var n;switch(Ft(t,0)){case"$":return"$";case"&":return o;case"`":return zt(a,0,s);case"'":return zt(a,c);case"<":n=l[zt(t,1,-1)];break;default:var r,i=+t;if(0==i)return e;if(f<i)return 0!==(r=Ut(i/10))&&r<=f?u[r-1]===undefined?Ft(t,1):u[r-1]+Ft(t,1):e;n=u[i-1]}return n===undefined?"":n})}(p,r,g,m,y,t);d<=g&&(f+=nn(r,d,g)+w,d=g+p.length)}return f+nn(r,d)}]},!!m(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!rn||on),function(){}),sn=be("Reflect","construct"),un=/^\s*(?:class|function)\b/,ln=y(un.exec),cn=!un.test(an),fn=function(e){if(!_(e))return!1;try{return sn(an,[],e),!0}catch(w){return!1}},rn=function(e){if(!_(e))return!1;switch(Qe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cn||!!ln(un,$e(e))}catch(w){return!0}},dn=(rn.sham=!0,!sn||m(function(){var e;return fn(fn.call)||!fn(Object)||!fn(function(){e=!0})||e})?rn:fn),hn=Math.max,pn=Math.min,gn=function(e,t){e=se(e);return e<0?hn(e+t,0):pn(e,t)},mn=TypeError,vn=Object.getOwnPropertyDescriptor,yn=d&&!function(){if(this!==undefined)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(u){return u instanceof TypeError}}()?function(e,t){if(Z(e)&&!vn(e,"length").writable)throw new mn("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wn=y("".indexOf);yt("match",function(r,s,u){return[function(e){var t=re(this),n=x(e)?Nt(e,r):undefined;return n?I(n,e,t):new RegExp(e)[r](C(t))},function(e){var t=E(this),n=C(e),e=u(s,t,n);if(e.done)return e.value;e=C(Jt(t));if(!~wn(e,"g"))return Zt(t,n);for(var r=!!~wn(e,"u")||!!~wn(e,"v"),i=[],o=t.lastIndex=0;null!==(a=Zt(t,n));){var a=C(a[0]);""===(i[o]=a)&&(t.lastIndex=Dt(n,le(t.lastIndex),r)),o++}return 0===o?null:i}]});var bn,kn,Sn,_n,En,Cn,On,xn,rn=R.navigator,rn=rn&&rn.userAgent,Rn=rn?String(rn):"",rn=R.process,In=R.Deno,rn=rn&&rn.versions||In&&In.version,In=rn&&rn.v8,Tn=Wn=!(Wn=In?0<(Bn=In.split("."))[0]&&Bn[0]<4?1:+(Bn[0]+Bn[1]):Wn)&&Rn&&(!(Bn=Rn.match(/Edge\/(\d+)/))||74<=Bn[1])&&(Bn=Rn.match(/Chrome\/(\d+)/))?+Bn[1]:Wn,Mn=Ze("species"),rn=function(t){return 51<=Tn||!m(function(){var e=[];return(e.constructor={})[Mn]=function(){return{foo:1}},1!==e[t](Boolean).foo})},An=void 0,Pn=void 0,In=rn("slice"),Ln=Ze("species"),Dn=Array,Nn=Math.max,Un=(O({target:"Array",proto:!0,forced:!In},{slice:function(e,t){var n,r,i,o=ze(this),a=ce(o),s=gn(e,a),u=gn(t===undefined?a:t,a);if(Z(o)&&(n=o.constructor,(n=dn(n)&&(n===Dn||Z(n.prototype))||x(n)&&null===(n=n[Ln])?undefined:n)===Dn||n===undefined))return Pn(o,s,u);for(r=new(n===undefined?Dn:n)(Nn(u-s,0)),i=0;s<u;s++,i++)s in o&&An(r,i,o[s]);return yn(r,i),r}}),y([].slice),void 0),Fn=Un.f,jn="object"==("undefined"==typeof window?"undefined":S(window))&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zn={f:function(e){if(!jn||"Window"!==Q(e))return Fn(ze(e));try{return Fn(e)}catch(w){return Pn(jn)}}},Bn=zn.f,Wn=m(function(){return!Object.getOwnPropertyNames(1)}),In=(O({target:"Object",stat:!0,forced:Wn},{getOwnPropertyNames:Bn}),function(e){if("Function"===Q(e))return y(e)}),Wn=function(s){return function(e,t,n){var r=ze(e),i=ce(r);if(0!==i){var o,a=gn(n,i);if(s&&t!=t){for(;a<i;)if((o=r[a++])!=o)return!0}else for(;a<i;a++)if((s||a in r)&&r[a]===t)return s||a||0}return!s&&-1}},Bn={includes:Wn(!0),indexOf:Wn(!1)},Hn=Bn.indexOf,qn=In([].indexOf),Vn=!!qn&&1/qn([1],1,-0)<0,Wn=Vn||!Te("indexOf"),Gn=(O({target:"Array",proto:!0,forced:Wn},{indexOf:function(e){var t=1<arguments.length?arguments[1]:undefined;return Vn?qn(this,e,t)||0:Hn(this,e,t)}}),y([].push),["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Jn=(Gn.concat("length","prototype"),Object.getOwnPropertyNames,{f:Object.getOwnPropertySymbols}),$n=y([].concat),Zn=be("Reflect","ownKeys")||function(e){var t=Un.f(E(e)),n=Jn.f;return n?$n(t,n(e)):t},Kn=void 0,Wn=function(e,t,n){for(var r=Zn(t),i=st.f,o=Kn.f,a=0;a<r.length;a++){var s=r[a];T(e,s)||n&&T(n,s)||i(e,s,o(t,s))}},Yn=R.Symbol,Xn=Yn&&Yn.prototype,Qn=(!d||!_(Yn)||"description"in Xn&&Yn().description===undefined||(bn={},Wn(nr=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:C(arguments[0]),t=ke(Xn,this)?new Yn(e):e===undefined?Yn():Yn(e);return""===e&&(bn[t]=!0),t},Yn),kn=nr["for"],nr["for"]=function(e){var e=C(e),t=I(kn,this,e);return""===e&&(bn[t]=!0),t},(nr.prototype=Xn).constructor=nr,Sn="Symbol(description detection)"===String(Yn("description detection")),_n=y(Xn.valueOf),En=y(Xn.toString),Cn=/^Symbol\((.*)\)[^)]+$/,On=y("".replace),xn=y("".slice),St(Xn,"description",{configurable:!0,get:function(){var e=_n(this);return T(bn,e)?"":(e=En(e),""===(e=Sn?xn(e,7,-1):On(e,Cn,"$1"))?undefined:e)}}),O({global:!0,constructor:!0,forced:!0},{Symbol:nr})),TypeError),er=function(e,t){if(ke(t,e))return e;throw new Qn("Incorrect invocation")},Wn=!m(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),tr=void 0,nr=m(function(){tr(1)}),nr=(O({target:"Object",stat:!0,forced:nr,sham:!Wn},{getPrototypeOf:function(e){return tr(oe(e))}}),gt("IE_PROTO"),Object),rr=(nr.prototype,Wn&&nr.getPrototypeOf,void 0),Wn=(O({target:"Object",stat:!0,sham:!d},{create:rr}),void 0),nr=Wn.f,ir=(O({target:"Object",stat:!0,forced:Object.defineProperties!==nr,sham:!d},{defineProperties:nr}),void 0),nr=m(function(){ir(1)});O({target:"Object",stat:!0,forced:nr},{keys:function(e){return ir(oe(e))}});Object.keys,d&&!e&&Object.defineProperties;var or,ar=be("document","documentElement"),nr=gt("IE_PROTO"),e=(mt[nr]=!0,st.f),sr=Ze("unscopables"),ur=Array.prototype,nr=(ur[sr]===undefined&&e(ur,sr,{configurable:!0,value:rr(null)}),function(e){ur[sr][e]=!0}),lr={},cr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},e=ge("span").classList,e=e&&e.constructor&&e.constructor.prototype,e=e===Object.prototype?undefined:e,fr=st.f,dr=Ze("toStringTag"),hr=function(e,t,n){(e=e&&!n?e.prototype:e)&&!T(e,dr)&&fr(e,dr,{configurable:!0,value:t})},pr=void 0,gr=Ze("iterator"),mr=pr.values,vr=function(e,t){if(e){if(e[gr]!==mr)try{ut(e,gr,mr)}catch(v){e[gr]=mr}if(hr(e,t,!0),cr[t])for(var n in pr)if(e[n]!==pr[n])try{ut(e,n,pr[n])}catch(v){e[n]=pr[n]}}};for(or in cr)vr(R[or]&&R[or].prototype,or);vr(e,"DOMTokenList");var t=void 0,yr=t.IteratorPrototype,wr=function(){return this},br=function(e,t,n,r){t+=" Iterator";return e.prototype=rr(yr,{next:at(+!r,n)}),hr(e,t,!1),lr[t]=wr,e},kr=void 0,Sr=(O({target:"Object",stat:!0},{setPrototypeOf:kr}),String,TypeError,Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=function(e){try{return y(Ce(Object.getOwnPropertyDescriptor(e,"__proto__").set))}catch(v){}}(Object.prototype))(n,[]),t=n instanceof Array}catch(v){}}():undefined),Fe.PROPER),_r=Fe.CONFIGURABLE,Er=t.IteratorPrototype,Cr=t.BUGGY_SAFARI_ITERATORS,Or=Ze("iterator"),xr=function(){return this},Rr=function(e,t){return{value:e,done:t}},Ir=function(e,t,n,r,i,o,a){br(n,t,r);var s,u,r=function(e){if(e===i&&h)return h;if(!Cr&&e&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,f=e.prototype,d=f[Or]||f["@@iterator"]||i&&f[i],h=!Cr&&d||r(i),p="Array"===t&&f.entries||d;if(p&&(e=tr(p.call(new e)))!==Object.prototype&&e.next&&(tr(e)!==Er&&(kr?kr(e,Er):_(e[Or])||xt(e,Or,xr)),hr(e,l,!0)),Sr&&"values"===i&&d&&"values"!==d.name&&(_r?ut(f,"name","values"):(c=!0,h=function(){return I(d,this)})),i)if(s={values:r("values"),keys:o?h:r("keys"),entries:r("entries")},a)for(u in s)!Cr&&!c&&u in f||xt(f,u,s[u]);else O({target:t,proto:!0,forced:Cr||c},s);return f[Or]!==h&&xt(f,Or,h,{name:i}),lr[t]=h,s},n=st.f,Tr=bt.set,Mr=bt.getterFor("Array Iterator"),Ar=(Ir(Array,"Array",function(e,t){Tr(this,{type:"Array Iterator",target:ze(e),index:0,kind:t})},function(){var e=Mr(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Rr(undefined,!0);switch(e.kind){case"keys":return Rr(n,!1);case"values":return Rr(t[n],!1)}return Rr([n,t[n]],!1)},"values"),lr.Arguments=lr.Array);if(nr("keys"),nr("values"),nr("entries"),d&&"values"!==Ar.name)try{n(Ar,"name",{value:"values"})}catch(X){}var Pr,Lr,Dr=Ze("iterator"),Nr=([].keys&&("next"in(Ar=[].keys())?(n=tr(tr(Ar)))!==Object.prototype&&(Pr=n):0),x(Pr)&&!m(function(){var e={};return Pr[Dr].call(e)!==e})||(Pr={}),_(Pr[Dr])||xt(Pr,Dr,function(){return this}),t.IteratorPrototype),Ar=Ze("toStringTag"),Ur=TypeError,Fr=R.Iterator,n=!_(Fr)||Fr.prototype!==Nr||!m(function(){Fr({})}),r=function(){if(er(this,Nr),tr(this)===Nr)throw new Ur("Abstract class Iterator not directly constructable")},i=function(t,e){d?St(Nr,t,{configurable:!0,get:function(){return e},set:function(e){if(E(this),this===Nr)throw new Ur("You can't redefine this property");T(this,t)?this[t]=e:An(this,t,e)}}):Nr[t]=e},jr=(T(Nr,Ar)||i(Ar,"Iterator"),!n&&T(Nr,"constructor")&&Nr.constructor!==Object||i("constructor",r),r.prototype=Nr,O({global:!0,constructor:!0,forced:n},{Iterator:r}),In(In.bind)),zr=function(e,t){return Ce(e),t===undefined?e:ye?jr(e,t):function(){return e.apply(t,arguments)}},Br=Ze("iterator"),Wr=Array.prototype,Hr=function(e){return e!==undefined&&(lr.Array===e||Wr[Br]===e)},qr=Ze("iterator"),Vr=function(e){if(!te(e))return Nt(e,qr)||Nt(e,"@@iterator")||lr[Qe(e)]},Gr=TypeError,Jr=function(e,t){t=arguments.length<2?Vr(e):t;if(Ce(t))return E(I(t,e));throw new Gr(_e(e)+" is not iterable")},$r=function(e,t,n){var r,i;E(e);try{if(!(r=Nt(e,"return"))){if("throw"===t)throw n;return n}r=I(r,e)}catch(X){i=!0,r=X}if("throw"===t)throw n;if(i)throw r;return E(r),n},Zr=TypeError,Kr=function(e,t){this.stopped=e,this.result=t},Yr=Kr.prototype,Xr=function(e,t,n){var r,i,o,a,s,u=n&&n.that,l=!(!n||!n.AS_ENTRIES),c=!(!n||!n.IS_RECORD),f=!(!n||!n.IS_ITERATOR),d=!(!n||!n.INTERRUPTED),h=zr(t,u),p=function(e){var t=r;return r=undefined,t&&$r(t,"normal"),new Kr(!0,e)},g=function(e){return l?(E(e),d?h(e[0],e[1],p):h(e[0],e[1])):d?h(e,p):h(e)};if(c)r=e.iterator;else if(f)r=e;else{if(!(n=Vr(e)))throw new Zr(_e(e)+" is not iterable");if(Hr(n)){for(i=0,o=ce(e);i<o;i++)if((a=g(e[i]))&&ke(Yr,a))return a;return new Kr(!1)}r=Jr(e,n)}for(s=(c?e:r).next;!(m=I(s,r)).done;){var m=m.value;try{a=g(m)}catch(X){if(!r)throw X;$r(r,"throw",X)}if("object"==S(a)&&a&&ke(Yr,a))return a}return new Kr(!1)},Qr=function(e){return{iterator:e,next:e.next,done:!1}},Ar=function(e,t){var n=R.Iterator,n=n&&n.prototype,e=n&&n[e],r=!1;if(e)try{e.call({next:function(){return{done:!0}},"return":function(){r=!0}},-1)}catch(X){X instanceof t||(r=!1)}if(!r)return e},ei=Ar("forEach",TypeError),ti=(O({target:"Iterator",proto:!0,real:!0,forced:ei},{forEach:function(t){E(this);try{Ce(t)}catch(X){$r(this,"throw",X)}if(ei)return I(ei,this,t);var e=Qr(this),n=0;Xr(e,function(e){t(e,n++)},{IS_RECORD:!0})}}),void 0),ni=function(e){if(e&&e.forEach!==ti)try{ut(e,"forEach",ti)}catch(X){e.forEach=ti}};for(Lr in cr)cr[Lr]&&ni(R[Lr]&&R[Lr].prototype);ni(e);var ri,ii=Ze("species"),oi=Array,ai=function(e,t){return new((n=Z(e=e)&&(n=e.constructor,dn(n)&&(n===oi||Z(n.prototype))||x(n)&&null===(n=n[ii]))?undefined:n)===undefined?oi:n)(0===t?0:t);var n},i=function(d){var h=1===d,p=2===d,g=3===d,m=4===d,v=6===d,y=7===d,w=5===d||v;return function(e,t,n){for(var r,i,o=oe(e),a=je(o),s=ce(a),u=zr(t,n),l=0,c=0,f=h?ai(e,s):p||y?ai(e,0):undefined;l<s;l++)if((w||l in a)&&(i=u(r=a[l],l,o),d))if(h)An(f,l,i);else if(i)switch(d){case 3:return!0;case 5:return r;case 6:return l;case 2:An(f,c++,r)}else switch(d){case 4:return!1;case 7:An(f,c++,r)}return v?-1:g||m?m:f}},si={forEach:i(0),map:i(1),filter:i(2),some:i(3),every:i(4),find:i(5),findIndex:i(6),filterReject:i(7)},ui=(Te("forEach"),O({target:"Array",proto:!0,forced:[].forEach!==ti},{forEach:ti}),R.String),n=!!Object.getOwnPropertySymbols&&!m(function(){var e=Symbol("symbol detection");return!ui(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Tn&&Tn<41}),r={}.propertyIsEnumerable,li=Object.getOwnPropertyDescriptor,ci={f:li&&!r.call({1:2},1)?function(e){e=li(this,e);return!!e&&e.enumerable}:r},fi={f:Ze},di=R,hi=st.f,pi=function(e){var t=di.Symbol||(di.Symbol={});T(t,e)||hi(t,e,{value:fi.f(e)})},gi=void 0,mi=si.forEach,vi=gt("hidden"),yi=bt.set,wi=bt.getterFor("Symbol"),bi=Object.prototype,e=R.Symbol,ki=e&&e.prototype,Si=R.RangeError,_i=R.TypeError,i=R.QObject,Ei=Kn.f,Ci=st.f,Oi=zn.f,xi=ci.f,Ri=y([].push),Ii=lt("symbols"),Ti=lt("op-symbols"),r=lt("wks"),Mi=!i||!i.prototype||!i.prototype.findChild,Ai=function(e,t,n){var r=Ei(bi,t);return r&&delete bi[t],Ci(e,t,n),r&&e!==bi&&Ci(bi,t,r),e},Pi=d&&m(function(){return 7!==rr(Ci({},"a",{get:function(){return Ci(this,"a",{value:7}).a}})).a})?Ai:Ci,Li=function(e,t){var n=Ii[e]=rr(ki);return yi(n,{type:"Symbol",tag:e,description:t}),d||(n.description=t),n},Di=function(e,t,n){e===bi&&Di(Ti,t,n),E(e);t=gi(t);return E(n),(T(Ii,t)?(("enumerable"in n?!n.enumerable:!T(e,t)||T(e,vi)&&e[vi][t])?(T(e,vi)||Ci(e,vi,at(1,rr(null))),e[vi][t]=!0):(T(e,vi)&&e[vi][t]&&(e[vi][t]=!1),n=rr(n,{enumerable:at(0,!1)})),Pi):Ci)(e,t,n)},Ni=function(t,e){E(t);var n=ze(e),e=ir(n).concat(Fi(n));return mi(e,function(e){d&&!I(Ui,n,e)||Di(t,e,n[e])}),t},Ui=function(e){var e=gi(e),t=I(xi,this,e);return!(this===bi&&T(Ii,e)&&!T(Ti,e))&&(!(t||!T(this,e)||!T(Ii,e)||T(this,vi)&&this[vi][e])||t)},gt=function(e,t){var n,e=ze(e),t=gi(t);if(e!==bi||!T(Ii,t)||T(Ti,t))return!(n=Ei(e,t))||!T(Ii,t)||T(e,vi)&&e[vi][t]||(n.enumerable=!0),n},i=function(e){var e=Oi(ze(e)),t=[];return mi(e,function(e){T(Ii,e)||T(mt,e)||Ri(t,e)}),t},Fi=function(e){var t=e===bi,e=Oi(t?Ti:ze(e)),n=[];return mi(e,function(e){!T(Ii,e)||t&&!T(bi,e)||Ri(n,Ii[e])}),n},gt=(n||(ki=(e=function(){if(ke(ki,this))throw new _i("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?C(arguments[0]):undefined,n=ht(e),r=function(e){var t=this===undefined?R:this,e=(t===bi&&I(r,Ti,e),T(t,vi)&&T(t[vi],n)&&(t[vi][n]=!1),at(1,e));try{Pi(t,n,e)}catch(X){if(!(X instanceof Si))throw X;Ai(t,n,e)}};return d&&Mi&&Pi(bi,n,{configurable:!0,set:r}),Li(n,e)}).prototype,xt(ki,"toString",function(){return wi(this).tag}),xt(e,"withoutSetter",function(e){return Li(ht(e),e)}),ci.f=Ui,st.f=Di,Wn.f=Ni,Kn.f=gt,Un.f=zn.f=i,Jn.f=Fi,fi.f=function(e){return Li(Ze(e),e)},d&&(St(ki,"description",{configurable:!0,get:function(){return wi(this).description}}),xt(bi,"propertyIsEnumerable",Ui,{unsafe:!0}))),O({global:!0,constructor:!0,wrap:!0,forced:!n,sham:!n},{Symbol:e}),mi(ir(r),function(e){pi(e)}),O({target:"Symbol",stat:!0,forced:!n},{useSetter:function(){Mi=!0},useSimple:function(){Mi=!1}}),O({target:"Object",stat:!0,forced:!n,sham:!d},{create:function(e,t){return t===undefined?rr(e):Ni(rr(e),t)},defineProperty:Di,defineProperties:Ni,getOwnPropertyDescriptor:gt}),O({target:"Object",stat:!0,forced:!n},{getOwnPropertyNames:i}),Wn=(Wn=be("Symbol"))&&Wn.prototype,ri=Wn&&Wn.valueOf,r=Ze("toPrimitive"),Wn&&!Wn[r]&&xt(Wn,r,function(e){return I(ri,this)},{arity:1}),hr(e,"Symbol"),mt[vi]=!0,n&&!!Symbol["for"]&&!!Symbol.keyFor),ji=lt("string-to-symbol-registry"),zi=lt("symbol-to-string-registry"),Bi=(O({target:"Symbol",stat:!0,forced:!gt},{"for":function(e){var t,e=C(e);return T(ji,e)?ji[e]:(t=be("Symbol")(e),ji[e]=t,zi[t]=e,t)}}),void 0),Wi=lt("symbol-to-string-registry");O({target:"Symbol",stat:!0,forced:!gt},{keyFor:function(e){if(!Bi(e))throw new TypeError(_e(e)+" is not a symbol");if(T(Wi,e))return Wi[e]}});var Hi,qi=bt.get,Vi="\t\n\x0B\f\r                 \u2028\u2029\ufeff",Gi=y("".replace),Ji=RegExp("^["+Vi+"]+"),$i=RegExp("(^|[^"+Vi+"])["+Vi+"]+$"),i=function(t){return function(e){e=C(re(e));return 1&t&&(e=Gi(e,Ji,"")),e=2&t?Gi(e,$i,"$1"):e}},Wn={start:i(1),end:i(2),trim:i(3)},Zi=Fe.PROPER,Ki=Wn.trim,Yi=(O({target:"String",proto:!0,forced:(Hi="trim",m(function(){return!!Vi[Hi]()||"​…᠎"!=="​…᠎"[Hi]()||Zi&&Vi[Hi].name!==Hi}))},{trim:function(){return Ki(this)}}),Wn.trim),Xi=R.parseInt,r=R.Symbol,Qi=r&&r.iterator,eo=/^[+-]?0x/i,to=y(eo.exec),e=8!==Xi(Vi+"08")||22!==Xi(Vi+"0x16")||Qi&&!m(function(){Xi(Object(Qi))})?function(e,t){e=Yi(C(e));return Xi(e,t>>>0||(to(eo,e)?16:10))}:Xi,no=(O({global:!0,forced:parseInt!==e},{parseInt:e}),SyntaxError),ro=parseInt,io=String.fromCharCode,oo=y("".charAt),ao=y("".slice),so=y(/./.exec),uo={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},lo=/^[\da-f]{4}$/i,co=/^[\u0000-\u001F]$/,fo=RangeError,ho=Math.floor,gt=function(e){var t=C(re(this)),n="",r=se(e);if(r<0||r===Infinity)throw new fo("Wrong number of repetitions");for(;0<r;(r=ho(r/2))&&(t+=t))r%2&&(n+=t);return n},po=y(gt),go=y("".slice),mo=Math.ceil,i=function(i){return function(e,t,n){var e=C(re(e)),t=le(t),r=e.length;return t<=r||""===(n=n===undefined?" ":C(n))?e:((r=po(n,mo((t=t-r)/n.length))).length>t&&(r=go(r,0,t)),i?e+r:r+e)}},vo=[i(!1),i(!0)][0],yo=RangeError,wo=isFinite,bo=Math.abs,r=Date.prototype,ko=r.toISOString,So=y(r.getTime),_o=y(r.getUTCDate),Eo=y(r.getUTCFullYear),Co=y(r.getUTCHours),Oo=y(r.getUTCMilliseconds),xo=y(r.getUTCMinutes),Ro=y(r.getUTCMonth),Io=y(r.getUTCSeconds),e=m(function(){return"0385-07-25T07:06:39.999Z"!==ko.call(new Date(-50000000000001))})||!m(function(){ko.call(new Date(NaN))})?function(){var e,t,n;if(wo(So(this)))return e=Eo(this),t=Oo(this),(n=e<0?"-":9999<e?"+":"")+vo(bo(e),n?6:4,0)+"-"+vo(Ro(this)+1,2,0)+"-"+vo(_o(this),2,0)+"T"+vo(Co(this),2,0)+":"+vo(xo(this),2,0)+":"+vo(Io(this),2,0)+"."+vo(t,3,0)+"Z";throw new yo("Invalid time value")}:ko,To=(O({target:"Date",proto:!0,forced:Date.prototype.toISOString!==e},{toISOString:e}),void 0),i=m(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),Mo=(O({target:"Date",proto:!0,arity:1,forced:i},{toJSON:function(e){var t=oe(this),n=To(t,"number");return"number"!=typeof n||isFinite(n)?t.toISOString():null}}),void 0),Ao=Mo.ArrayBuffer,Po=Mo.DataView,r=Po.prototype,Lo=In(Ao.prototype.slice),Do=In(r.getUint8),No=In(r.setUint8),e=m(function(){return!new Ao(2).slice(1,undefined).byteLength}),i=(O({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:e},{slice:function(e,t){if(Lo&&t===undefined)return Lo(E(this),e);for(var n=E(this).byteLength,r=gn(e,n),i=gn(t===undefined?n:t,n),e=new Ao(le(i-r)),o=new Po(this),a=new Po(e),s=0;r<i;)No(a,s++,Do(o,r++));return e}}),void 0),Uo=(O({global:!0,constructor:!0,forced:!0},{DataView:Mo.DataView}),function(e,t,n){for(var r in t)xt(e,r,t[r],n);return e}),Fo=RangeError,jo=function(e){if(e===undefined)return 0;var e=se(e),t=le(e);if(e!==t)throw new Fo("Wrong length or index");return t},zo=(O({target:"Math",stat:!0},{fround:void 0}),O({target:"Math",stat:!0},{sign:void 0}),Math.sign,Array),Bo=Math.abs,Wo=Math.pow,Ho=Math.floor,qo=Math.log,Vo=Math.LN2,Go=function(e){for(var t=oe(this),n=ce(t),r=arguments.length,i=gn(1<r?arguments[1]:undefined,n),r=2<r?arguments[2]:undefined,o=r===undefined?n:gn(r,n);i<o;)t[i++]=e;return t},Jo=function(e,t,n){return kr&&_(t=t.constructor)&&t!==n&&x(t=t.prototype)&&t!==n.prototype&&kr(e,t),e},$o=bt.getterFor("ArrayBuffer"),Zo=bt.getterFor("DataView"),Ko=bt.set,r=R.ArrayBuffer,e=r,Yo=e&&e.prototype,r=R.DataView,Xo=r&&r.prototype,Qo=(Object.prototype,R.Array),ea=R.RangeError,ta=y(Go),na=y([].reverse),ra=function(e,t,n){var r,i,o,a=zo(n),s=8*n-t-1,n=(1<<s)-1,u=n>>1,l=23===t?Wo(2,-24)-Wo(2,-77):0,c=e<0||0===e&&1/e<0?1:0,f=0;for((e=Bo(e))!=e||e===Infinity?(i=e!=e?1:0,r=n):(r=Ho(qo(e)/Vo),e*(o=Wo(2,-r))<1&&(r--,o*=2),2<=(e+=1<=r+u?l/o:l*Wo(2,1-u))*o&&(r++,o/=2),n<=r+u?(i=0,r=n):1<=r+u?(i=(e*o-1)*Wo(2,t),r+=u):(i=e*Wo(2,u-1)*Wo(2,t),r=0));8<=t;)a[f++]=255&i,i/=256,t-=8;for(r=r<<t|i,s+=t;0<s;)a[f++]=255&r,r/=256,s-=8;return a[f-1]|=128*c,a},ia=function(e,t){var n,r=e.length,i=8*r-t-1,o=(1<<i)-1,a=o>>1,s=i-7,u=r-1,i=e[u--],l=127&i;for(i>>=7;0<s;)l=256*l+e[u--],s-=8;for(n=l&(1<<-s)-1,l>>=-s,s+=t;0<s;)n=256*n+e[u--],s-=8;if(0===l)l=1-a;else{if(l===o)return n?NaN:i?-Infinity:Infinity;n+=Wo(2,t),l-=a}return(i?-1:1)*n*Wo(2,l-t)},oa=function(e){return[255&e]},aa=function(e){return[255&e,e>>8&255]},sa=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},ua=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},la=function(e){return ra((void 0)(e),23,4)},ca=function(e){return ra(e,52,8)},fa=function(e,t,n){St(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},da=function(e,t,n,r){e=Zo(e),n=jo(n),r=!!r;if(n+t>e.byteLength)throw new ea("Wrong index");n+=e.byteOffset,e=Pn(e.bytes,n,n+t);return r?e:na(e)},ha=function(e,t,n,r,i,o){var e=Zo(e),n=jo(n),a=r(+i),s=!!o;if(n+t>e.byteLength)throw new ea("Wrong index");for(var u=e.bytes,l=n+e.byteOffset,c=0;c<t;c++)u[l+c]=a[s?c:t-c-1]},Yo=(e=function(e){er(this,Yo);e=jo(e);Ko(this,{type:"ArrayBuffer",bytes:ta(Qo(e),0),byteLength:e}),d||(this.byteLength=e,this.detached=!1)}).prototype,Xo=(r=function(e,t,n){er(this,Xo),er(e,Yo);var r=$o(e),i=r.byteLength,t=se(t);if(t<0||i<t)throw new ea("Wrong offset");if(t+(n=n===undefined?i-t:jo(n))>i)throw new ea("Wrong length");Ko(this,{type:"DataView",buffer:e,byteLength:n,byteOffset:t,bytes:r.bytes}),d||(this.buffer=e,this.byteLength=n,this.byteOffset=t)}).prototype,pa=(d&&(fa(e,"byteLength",$o),fa(r,"buffer",Zo),fa(r,"byteLength",Zo),fa(r,"byteOffset",Zo)),Uo(Xo,{getInt8:function(e){return da(this,1,e)[0]<<24>>24},getUint8:function(e){return da(this,1,e)[0]},getInt16:function(e){e=da(this,2,e,1<arguments.length&&arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(e){e=da(this,2,e,1<arguments.length&&arguments[1]);return e[1]<<8|e[0]},getInt32:function(e){return ua(da(this,4,e,1<arguments.length&&arguments[1]))},getUint32:function(e){return ua(da(this,4,e,1<arguments.length&&arguments[1]))>>>0},getFloat32:function(e){return ia(da(this,4,e,1<arguments.length&&arguments[1]),23)},getFloat64:function(e){return ia(da(this,8,e,1<arguments.length&&arguments[1]),52)},setInt8:function(e,t){ha(this,1,e,oa,t)},setUint8:function(e,t){ha(this,1,e,oa,t)},setInt16:function(e,t){ha(this,2,e,aa,t,2<arguments.length&&arguments[2])},setUint16:function(e,t){ha(this,2,e,aa,t,2<arguments.length&&arguments[2])},setInt32:function(e,t){ha(this,4,e,sa,t,2<arguments.length&&arguments[2])},setUint32:function(e,t){ha(this,4,e,sa,t,2<arguments.length&&arguments[2])},setFloat32:function(e,t){ha(this,4,e,la,t,2<arguments.length&&arguments[2])},setFloat64:function(e,t){ha(this,8,e,ca,t,2<arguments.length&&arguments[2])}}),hr(e,"ArrayBuffer"),hr(r,"DataView"),Ze("species")),ga=function(e){e=be(e);d&&e&&!e[pa]&&St(e,pa,{configurable:!0,get:function(){return this}})},fa=Mo.ArrayBuffer,e=R.ArrayBuffer,ma=(O({global:!0,constructor:!0,forced:e!==fa},{ArrayBuffer:fa}),ga("ArrayBuffer"),m(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e))&&Object.defineProperty(e,"a",{value:8})})),va=Object.isExtensible,ya=m(function(){va(1)})||ma?function(e){return!!x(e)&&(!ma||"ArrayBuffer"!==Q(e))&&(!va||va(e))}:va,wa=(O({target:"Object",stat:!0,forced:Object.isExtensible!==ya},{isExtensible:ya}),TypeError),ba=function(e,t){if(!delete e[t])throw new wa("Cannot delete property "+_e(t)+" of "+_e(e))},r=rn("splice"),ka=Math.max,Sa=Math.min,_a=(O({target:"Array",proto:!0,forced:!r},{splice:function(e,t){var n,r,i,o,a,s,u=oe(this),l=ce(u),c=gn(e,l),e=arguments.length;for(0===e?n=r=0:r=1===e?(n=0,l-c):(n=e-2,Sa(ka(se(t),0),l-c)),de(l+n-r),i=ai(u,r),o=0;o<r;o++)(a=c+o)in u&&An(i,o,u[a]);if(yn(i,r),n<r){for(o=c;o<l-r;o++)s=o+n,(a=o+r)in u?u[s]=u[a]:ba(u,s);for(o=l;l-r+n<o;o--)ba(u,o-1)}else if(r<n)for(o=l-r;c<o;o--)s=o+n-1,(a=o+r-1)in u?u[s]=u[a]:ba(u,s);for(o=0;o<n;o++)u[o+c]=arguments[o+2];return yn(u,l-r+n),i}}),We(function(e){var t=st.f,a=ht("meta"),n=0,r=function(e){t(e,a,{value:{objectID:"O"+n++,weakData:{}}})},s=e.exports={enable:function(){s.enable=function(){},0;var i=Un.f,o=y([].splice),e={};e[a]=1,i(e).length&&(Un.f=function(e){for(var t=i(e),n=0,r=t.length;n<r;n++)if(t[n]===a){o(t,n,1);break}return t},O({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:zn.f}))},fastKey:function(e,t){if(!x(e))return"symbol"==S(e)?e:("string"==typeof e?"S":"P")+e;if(!T(e,a)){if(!ya(e))return"F";if(!t)return"E";r(e)}return e[a].objectID},getWeakData:function(e,t){if(!T(e,a)){if(!ya(e))return!0;if(!t)return!1;r(e)}return e[a].weakData},onFreeze:function(e){return e}};mt[a]=!0})),Ea=_a.onFreeze,Ca=Object.preventExtensions,e=m(function(){Ca(1)}),Oa=(O({target:"Object",stat:!0,forced:e,sham:!0},{preventExtensions:function(e){return Ca&&x(e)?Ca(Ea(e)):e}}),m(function(){return Object.isExtensible(Object.preventExtensions({}))}),_a.onFreeze),xa=Object.freeze,fa=m(function(){xa(1)}),Ra=(O({target:"Object",stat:!0,forced:fa,sham:!0},{freeze:function(e){return xa&&x(e)?xa(Oa(e)):e}}),!m(function(){var e=JSON.rawJSON("9007199254740993");return!JSON.isRawJSON(e)||"9007199254740993"!==JSON.stringify(e)})),Ia=String,Ta=be("JSON","stringify"),Ma=y(/./.exec),Aa=y("".charAt),Pa=y("".charCodeAt),La=y("".replace),Da=y("".slice),Na=y([].push),Ua=y(1.1.toString),Fa=/[\uD800-\uDFFF]/g,ja=/^[\uD800-\uDBFF]$/,za=/^[\uDC00-\uDFFF]$/,Ba=ht(),Wa=Ba.length,r=!n||m(function(){var e=be("Symbol")("stringify detection");return"[null]"!==Ta([e])||"{}"!==Ta({a:e})||"{}"!==Ta(Object(e))}),Ha=m(function(){return'"\\udf06\\ud834"'!==Ta("\udf06\ud834")||'"\\udead"'!==Ta("\udead")}),qa=r?function(e,t){var n=Pn(arguments),r=Ga(t);if(_(r)||e!==undefined&&!Bi(e))return n[1]=function(e,t){if(_(r)&&(t=I(r,this,Ia(e),t)),!Bi(t))return t},Oe(Ta,null,n)}:Ta,Va=function(e,t,n){var r=Aa(n,t-1),n=Aa(n,t+1);return Ma(ja,e)&&!Ma(za,n)||Ma(za,e)&&!Ma(ja,r)?"\\u"+Ua(Pa(e,0),16):e},Ga=function(e){if(_(e))return e;if(Z(e)){for(var t=e.length,r=[],n=0;n<t;n++){var i=e[n];"string"==typeof i?Na(r,i):"number"!=typeof i&&"Number"!==Q(i)&&"String"!==Q(i)||Na(r,C(i))}var o=r.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Z(this))return t;for(var n=0;n<o;n++)if(r[n]===e)return t}}},e=(Ta&&O({target:"JSON",stat:!0,arity:3,forced:r||Ha||!Ra},{stringify:function(e,t,n){var r=Ga(t),i=[],o=qa(e,function(e,t){e=_(r)?I(r,this,Ia(e),t):t;return!Ra&&function(e){if(x(e))return(e=qi(e))&&"RawJSON"===e.type}(e)?Ba+(Na(i,e.rawJSON)-1):e},n);if("string"!=typeof o)return o;if(Ha&&(o=La(o,Fa,Va)),Ra)return o;for(var a="",s=o.length,u=0;u<s;u++){var l,c,f=Aa(o,u);'"'===f?(l=function(e,t){for(var n=!0,r="";t<e.length;){var i=oo(e,t);if("\\"===i){var o=ao(e,t,t+2);if(T(uo,o))r+=uo[o],t+=2;else{if("\\u"!==o)throw new no('Unknown escape sequence: "'+o+'"');o=ao(e,t+=2,t+4);if(!so(lo,o))throw new no("Bad Unicode escape at: "+t);r+=io(ro(o,16)),t+=4}}else{if('"'===i){n=!1,t++;break}if(so(co,i))throw new no("Bad control character in string literal at: "+t);r+=i,t++}}if(n)throw new no("Unterminated string at: "+t);return{value:r,end:t}}(o,++u).end-1,c=Da(o,u,l),a+=Da(c,0,Wa)===Ba?i[Da(c,Wa)]:'"'+c+'"',u=l):a+=f}return a}}),!n||m(function(){Jn.f(1)})),Ja=(O({target:"Object",stat:!0,forced:e},{getOwnPropertySymbols:function(e){var t=Jn.f;return t?t(oe(e)):[]}}),pi("iterator"),_t.charAt),$a=bt.set,Za=bt.getterFor("String Iterator"),fa=(Ir(String,"String",function(e){$a(this,{type:"String Iterator",string:C(e),index:0})},function(){var e=Za(this),t=e.string,n=e.index;return n>=t.length?Rr(undefined,!0):(t=Ja(t,n),e.index+=t.length,Rr(t,!1))}),n&&!Symbol.sham&&"symbol"==S(Symbol.iterator)),r=(Object,TypeError,TypeError,Ze("toPrimitive"),TypeError,Object.defineProperty,st.f),Ka=(O({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!d},{defineProperty:r}),m(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),Ze("isConcatSpreadable")),e=51<=Tn||!m(function(){var e=[];return e[Ka]=!1,e.concat()[0]!==e}),n=!e||!rn("concat"),Ya=(O({target:"Array",proto:!0,arity:1,forced:n},{concat:function(e){for(var t,n,r,i,o,a=oe(this),s=ai(a,0),u=0,l=-1,c=arguments.length;l<c;l++)if(i=r=-1===l?a:arguments[l],o=void 0,!x(i)||((o=i[Ka])!==undefined?!o:!Z(i)))de(u+1),An(s,u++,r);else for(n=ce(r),de(u+n),t=0;t<n;t++,u++)t in r&&An(s,u,r[t]);return yn(s,u),s}}),Function),Xa=y([].concat),Qa=y([].join),es={},ts=ye?Ya.bind:function(t){var n=Ce(this),e=n.prototype,r=Pn(arguments,1),i=function(){var e=Xa(r,Pn(arguments));return this instanceof i?function(e,t,n){if(!T(es,t)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";es[t]=Ya("C,a","return new C("+Qa(r,",")+")")}return es[t](e,n)}(n,e.length,e):n.apply(t,e)};return x(e)&&(i.prototype=e),i},r=(O({target:"Function",proto:!0,forced:Function.bind!==ts},{bind:ts}),Function.prototype),e=r.call,n=(ye&&r.bind.bind(e,e),Date.prototype),ns=y(n.toString),rs=y(n.getTime),e=("Invalid Date"!==String(new Date(NaN))&&xt(n,"toString",function(){var e=rs(this);return e==e?ns(this):"Invalid Date"}),Fe.PROPER),r=RegExp.prototype,is=r.toString,n=m(function(){return"/a/b"!==is.call({source:"a",flags:"b"})}),e=e&&"toString"!==is.name,os=((n||e)&&xt(r,"toString",function(){var e=E(this);return"/"+C(e.source)+"/"+C(Jt(e))},{unsafe:!0}),R.RegExp),n=m(function(){var e=os("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),e=n||m(function(){return!os("a","y").sticky}),r={BROKEN_CARET:n||m(function(){var e=os("^r","gy");return e.lastIndex=2,null!==e.exec("str")}),MISSED_STICKY:e,UNSUPPORTED_Y:n},as=bt.get,ss=RegExp.prototype,us=TypeError,ls=(d&&r.MISSED_STICKY&&St(ss,"sticky",{configurable:!0,get:function(){if(this!==ss){if("RegExp"===Q(this))return!!as(this).sticky;throw new us("Incompatible receiver, RegExp required")}}}),/#|\.prototype\./),e=function(e,t){e=fs[cs(e)];return e===hs||e!==ds&&(_(t)?m(t):!!t)},cs=e.normalize=function(e){return String(e).replace(ls,".").toLowerCase()},fs=e.data={},ds=e.NATIVE="N",hs=e.POLYFILL="P",ps=e,gs=Ze("match"),ms=function(e){var t;return x(e)&&((t=e[gs])!==undefined?!!t:"RegExp"===Q(e))},vs=st.f,ys=R.RegExp,ws=m(function(){var e=ys(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}),bs=R.RegExp,ks=m(function(){var e=bs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),n=Un.f,Ss=bt.enforce,_s=Ze("match"),Es=R.RegExp,Cs=Es.prototype,Os=R.SyntaxError,xs=y(Cs.exec),Rs=y("".charAt),Is=y("".replace),Ts=y("".indexOf),Ms=y("".slice),As=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,Ps=/a/g,Ls=/a/g,e=new Es(Ps)!==Ps,Ds=r.MISSED_STICKY,Ns=r.UNSUPPORTED_Y,e=d&&(!e||Ds||ws||ks||m(function(){return Ls[_s]=!1,Es(Ps)!==Ps||Es(Ls)===Ls||"/a/i"!==String(Es(Ps,"i"))}));if(ps("RegExp",e)){for(var Us=function(e,t){var n,r,i=ke(Cs,this),o=ms(e),a=t===undefined,s=[],u=e;if(!i&&o&&a&&e.constructor===Us)return e;if((o||ke(Cs,e))&&(e=e.source,a)&&(t=Jt(u)),e=e===undefined?"":C(e),t=t===undefined?"":C(t),u=e,o=t=ws&&"dotAll"in Ps&&(n=!!t&&-1<Ts(t,"s"))?Is(t,/s/g,""):t,Ds&&"sticky"in Ps&&(r=!!t&&-1<Ts(t,"y"))&&Ns&&(t=Is(t,/y/g,"")),ks&&(e=(a=function(e){for(var t,n=e.length,r=0,i="",o=[],a=rr(null),s=!1,u=!1,l=0,c="";r<n;r++){if("\\"===(t=Rs(e,r))){if(t+=Rs(e,++r),!u&&"\\"===Rs(t,1)){i+="\\x5c";continue}}else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:i+=t,xs(As,Ms(e,r+1))?(r+=2,u=!0,l++):"?"!==Rs(e,r+1)&&l++;continue;case">"===t&&u:if(""===c||T(a,c))throw new Os("Invalid capture group name");a[c]=!0,u=!(o[o.length]=[c,l]),c="";continue}u?c+=t:i+=t}for(var f=0;f<o.length;f++)for(var d="\\k<"+o[f][0]+">",h="\\"+o[f][1];-1<Ts(i,d);)i=Is(i,d,h);return[i,o]}(e))[0],s=a[1]),a=Jo(Es(e,t),i?this:Cs,Us),(n||r||s.length)&&(t=Ss(a),n&&(t.dotAll=!0,t.raw=Us(function(e){for(var t,n=e.length,r=0,i="",o=!1;r<n;r++)"\\"!==(t=Rs(e,r))?o||"."!==t?("["===t?o=!0:"]"===t&&(o=!1),i+=t):i+="[\\s\\S]":i+=t+Rs(e,++r);return i}(e),o)),r&&(t.sticky=!0),s.length)&&(t.groups=s),e!==u)try{ut(a,"source",""===u?"(?:)":u)}catch(X){}return a},Fs=n(Es),js=0;Fs.length>js;)!function(e,t,n){n in e||vs(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}(Us,Es,Fs[js++]);(Cs.constructor=Us).prototype=Cs,xt(R,"RegExp",Us,{constructor:!0})}ga("RegExp");lt("native-string-replace",String.prototype.replace);var zs=RegExp.prototype.exec,Bs=(y("".charAt),y("".indexOf),y("".replace),y("".slice),e=/b*/g,I(zs,n=/a/,"a"),I(zs,e,"a"),/()??/.exec("")[1],undefined,O({target:"RegExp",proto:!0,forced:/./.exec!==Rt},{exec:Rt}),TypeError),Ws=function(e){if(dn(e))return e;throw new Bs(_e(e)+" is not a constructor")},Hs=Ze("species"),qs=function(e,t){var e=E(e).constructor;return e===undefined||te(e=E(e)[Hs])?t:Ws(e)},Vs=r.UNSUPPORTED_Y,Gs=Math.min,Js=y([].push),$s=y("".slice),Zs=y("".indexOf),n=!m(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),Ks="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length,Ys=(yt("split",function(i,p,g){var m="0".split(undefined,0).length?function(e,t){return e===undefined&&0===t?[]:I(p,this,e,t)}:p;return[function(e,t){var n=re(this),r=x(e)?Nt(e,i):undefined;return r?I(r,e,n,t):I(m,C(n),e,t)},function(e,t){var n=E(this),r=C(e);if(!Ks){e=g(m,n,r,t,m!==p);if(e.done)return e.value}var e=qs(n,RegExp),i=C(Jt(n)),o=!!~Zs(i,"u")||!!~Zs(i,"v"),a=(Vs?~Zs(i,"g")||(i+="g"):~Zs(i,"y")||(i+="y"),new e(Vs?"^(?:"+n.source+")":n,i)),s=t===undefined?4294967295:t>>>0;if(0==s)return[];if(0===r.length)return null===Zt(a,r)?[r]:[];for(var u=0,l=0,c=[];l<r.length;){a.lastIndex=Vs?0:l;var f,d=Zt(a,Vs?$s(r,l):r);if(null===d||(f=Gs(le(a.lastIndex+(Vs?l:0)),r.length))===u)l=Dt(r,l,o);else{if(Js(c,$s(r,u,l)),c.length===s)return c;for(var h=1;h<=d.length-1;h++)if(Js(c,d[h]),c.length===s)return c;l=u=f}}return Js(c,$s(r,u)),c}]},Ks||!n,Vs),Object),Xs=(y("".split),m(function(){return!Ys("z").propertyIsEnumerable(0)}),Kn.f),e=!d||m(function(){Xs(1)}),r=(O({target:"Object",stat:!0,forced:e,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Xs(ze(e),t)}}),Object.getOwnPropertyDescriptor,Kn.f,O({global:!0,forced:R.globalThis!==R},{globalThis:R}),function(e){return e&&e.Math===Math&&e}),n=(r("object"==("undefined"==typeof globalThis?"undefined":S(globalThis))&&globalThis)||r("object"==("undefined"==typeof window?"undefined":S(window))&&window)||r("object"==("undefined"==typeof self?"undefined":S(self))&&self)||r("object"==S(xe)&&xe)||r("object"==S(xe)&&xe)||function(){return this}()||Function("return this")(),R.Symbol),e=(lt("wks"),fa?n["for"]:n&&n.withoutSetter,{}),Qs=(e[Ze("toStringTag")]="z",String(e),xt(Object.prototype,"toString",function(){return"[object "+Qe(this)+"]"},{unsafe:!0}),Ar("find",TypeError)),eu=(O({target:"Iterator",proto:!0,real:!0,forced:Qs},{find:function(n){E(this);try{Ce(n)}catch(X){$r(this,"throw",X)}var e,r;return Qs?I(Qs,this,n):(e=Qr(this),Xr(e,function(e,t){if(n(e,r++))return t(e)},{IS_RECORD:!(r=0),INTERRUPTED:!0}).result)}}),si.find),tu=!0,nu=("find"in[]&&Array(1).find(function(){tu=!1}),O({target:"Array",proto:!0,forced:tu},{find:function(e){return eu(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("find"),Date),ru=y(nu.prototype.getTime),iu=(O({target:"Date",stat:!0},{now:function(){return ru(new nu)}}),function(e,t,n,r){try{return r?t(E(n)[0],n[1]):t(n)}catch(X){$r(e,"throw",X)}}),ou=Array,au=function(e){var t=dn(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&(r=zr(r,2<n?arguments[2]:undefined));var o,a,s,u,l,c,f=oe(e),n=Vr(f),d=0;if(!n||this===ou&&Hr(n))for(o=ce(f),a=t?new this(o):ou(o);d<o;d++)c=i?r(f[d],d):f[d],An(a,d,c);else for(a=t?new this:[],l=(u=Jr(f,n)).next;!(s=I(l,u)).done;d++){c=i?iu(u,r,[s.value,d],!0):s.value;try{An(a,d,c)}catch(X){$r(u,"throw",X)}}return yn(a,d),a},su=void 0,xe=!su(function(e){Array.from(e)}),r=(O({target:"Array",stat:!0,forced:xe},{from:au}),Ze("iterator"));try{var uu=0,lu={next:function(){return{done:!!uu++}},"return":function(){0}};lu[r]=function(){return this},Array.from(lu,function(){throw 2})}catch(X){}var cu,fu,lt=function(e,t,n){var r,i,o,a,s,u=-1!==e.indexOf("Map"),l=-1!==e.indexOf("Weak"),c=u?"set":"add",f=R[e],d=f&&f.prototype,h=f,p={},g=function(e){var n=y(d[e]);xt(d,e,"add"===e?function(e){return n(this,0===e?0:e),this}:"delete"===e?function(e){return!(l&&!x(e))&&n(this,0===e?0:e)}:"get"===e?function(e){return l&&!x(e)?undefined:n(this,0===e?0:e)}:"has"===e?function(e){return!(l&&!x(e))&&n(this,0===e?0:e)}:function(e,t){return n(this,0===e?0:e,t),this})};return ps(e,!_(f)||!(l||d.forEach&&!m(function(){(new f).entries().next()})))?(h=n.getConstructor(t,e,u,c),_a.enable()):ps(e,!0)&&(i=(r=new h)[c](l?{}:-0,1)!==r,o=m(function(){r.has(1)}),a=su(function(e){new f(e)}),s=!l&&m(function(){for(var e=new f,t=5;t--;)e[c](t,t);return!e.has(-0)}),a||(((h=t(function(e,t){er(e,d);e=Jo(new f,e,h);return te(t)||Xr(t,e[c],{that:e,AS_ENTRIES:u}),e})).prototype=d).constructor=h),(o||s)&&(g("delete"),g("has"),u)&&g("get"),(s||i)&&g(c),l)&&d.clear&&delete d.clear,O({global:!0,constructor:!0,forced:(p[e]=h)!==f},p),hr(h,e),l||n.setStrong(h,e,u),h},du=si.findIndex,hu=!0,pu=("findIndex"in[]&&Array(1).findIndex(function(){hu=!1}),O({target:"Array",proto:!0,forced:hu},{findIndex:function(e){return du(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("findIndex"),_a.getWeakData),gu=bt.set,mu=bt.getterFor,vu=si.find,yu=si.findIndex,wu=y([].splice),bu=0,ku=function(e){return e.frozen||(e.frozen=new Su)},Su=function(){this.entries=[]},_u=function(e,t){return vu(e.entries,function(e){return e[0]===t})},fa=(Su.prototype={get:function(e){e=_u(this,e);if(e)return e[1]},has:function(e){return!!_u(this,e)},set:function(e,t){var n=_u(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(t){var e=yu(this.entries,function(e){return e[0]===t});return~e&&wu(this.entries,e,1),!!~e}},{getConstructor:function(e,n,r,i){var e=e(function(e,t){er(e,o),gu(e,{type:n,id:bu++,frozen:null}),te(t)||Xr(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=mu(n),s=function(e,t,n){var r=a(e),i=pu(E(t),!0);return!0===i?ku(r).set(t,n):i[r.id]=n,e};return Uo(o,{"delete":function(e){var t,n=a(this);return!!x(e)&&(!0===(t=pu(e))?ku(n)["delete"](e):t&&T(t,n.id)&&delete t[n.id])},has:function(e){var t,n=a(this);return!!x(e)&&(!0===(t=pu(e))?ku(n).has(e):t&&T(t,n.id))}}),Uo(o,r?{get:function(e){var t,n=a(this);if(x(e))return!0===(t=pu(e))?ku(n).get(e):t?t[n.id]:void 0},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),e}});function Eu(e){this.name="__st"+(1e9*Math.random()>>>0)+cu+"__",null!=e&&e.forEach(this.add,this),cu+=1}lt("WeakSet",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},fa),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{configurable:!0,writable:!0,value:function(e){if(null===this)throw new TypeError('"this" is null or not defined');var t=Object(this),n=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var r=arguments[1],i=0;i<n;){var o=t[i];if(e.call(r,o,i,t))return o;i+=1}return undefined}}),window.WeakSet||(cu=Date.now()%1e9,Eu.prototype.add=function(e){var t=this.name;return e[t]||Object.defineProperty(e,t,{value:!0,writable:!0}),this},Eu.prototype["delete"]=function(e){return!!e[this.name]&&(e[this.name]=undefined,!0)},Eu.prototype.has=function(e){return!!e[this.name]},fu=Eu,Object.defineProperty(window,"WeakSet",{value:function(e){return new fu(e)}}));var Cu=Object.assign,Ou=Object.defineProperty,xu=y([].concat),n=!Cu||m(function(){var e,t,n;return!(!d||1===Cu({b:1},Cu(Ou({},"a",{enumerable:!0,get:function(){Ou(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol("assign detection")]=7,"abcdefghijklmnopqrst".split("").forEach(function(e){t[e]=e}),7!==Cu({},e)[n])||"abcdefghijklmnopqrst"!==ir(Cu({},t)).join("")})?function(e,t){for(var n=oe(e),r=arguments.length,i=1,o=Jn.f,a=ci.f;i<r;)for(var s,u=je(arguments[i++]),l=o?xu(ir(u),o(u)):ir(u),c=l.length,f=0;f<c;)s=l[f++],d&&!I(a,u,s)||(n[s]=u[s]);return n}:Cu,Ru=(O({target:"Object",stat:!0,arity:2,forced:Object.assign!==n},{assign:n}),Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(e){if(e===undefined||null===e)throw new TypeError("Cannot convert first argument to object");for(var t=Object(e),n=1;n<arguments.length;n++)if((r=arguments[n])!==undefined&&null!==r)for(var r=Object(r),i=Object.keys(Object(r)),o=0,a=i.length;o<a;o++){var s=i[o],u=Object.getOwnPropertyDescriptor(r,s);null!=u&&u.enumerable&&(t[s]=r[s])}return t}}),t.IteratorPrototype),e=Ze("toStringTag"),Iu=bt.set,xe=function(u){var l=bt.getterFor(u?"WrapForValidIterator":"IteratorHelper");return Uo(rr(Ru),{next:function(){var e=l(this);if(u)return e.nextHandler();if(e.done)return Rr(undefined,!0);try{var t=e.nextHandler();return e.returnHandlerResult?t:Rr(t,e.done)}catch(X){throw e.done=!0,X}},"return":function(){var e,t=l(this),n=t.iterator,r=t.done;if(t.done=!0,u)return(e=Nt(n,"return"))?I(e,n):Rr(undefined,!0);if(!r){if(t.inner)try{$r(t.inner.iterator,"normal")}catch(X){return $r(n,"throw",X)}if(t.openIters)try{for(var i=t.openIters,o="normal",a=void 0,s=i.length-1;0<=s;s--)if(i[s]!==undefined)try{a=$r(i[s].iterator,o,a)}catch(X){o="throw",a=X}if("throw"===o)throw a}catch(X){if(n)return $r(n,"throw",X);throw X}n&&$r(n,"normal")}return Rr(undefined,!0)}})},Tu=xe(!0),Mu=xe(!1),r=(ut(Mu,e,"Iterator Helper"),function(n,r,i){var e=function(e,t){t?(t.iterator=e.iterator,t.next=e.next):t=e,t.type=r?"WrapForValidIterator":"IteratorHelper",t.returnHandlerResult=!!i,t.nextHandler=n,t.counter=0,t.done=!1,Iu(this,t)};return e.prototype=r?Tu:Mu,e}),lu=function(e,t){e="function"==typeof Iterator&&Iterator.prototype[e];if(e)try{e.call({next:null},t).next()}catch(X){return!0}},t=!lu("filter",function(){}),Au=!t&&Ar("filter",TypeError),xe=t||Au,Pu=r(function(){for(var e,t=this.iterator,n=this.predicate,r=this.next;;){if(e=E(I(r,t)),this.done=!!e.done)return;if(iu(t,n,[e=e.value,this.counter++],!0))return e}}),Lu=(O({target:"Iterator",proto:!0,real:!0,forced:xe},{filter:function(e){E(this);try{Ce(e)}catch(X){$r(this,"throw",X)}return Au?I(Au,this,e):new Pu(Qr(this),{predicate:e})}}),si.filter),e=rn("filter"),t=(O({target:"Array",proto:!0,forced:!e},{filter:function(e){return Lu(this,e,1<arguments.length?arguments[1]:undefined)}}),!lu("map",function(){})),Du=!t&&Ar("map",TypeError),xe=t||Du,Nu=r(function(){var e=this.iterator,t=E(I(this.next,e));if(!(this.done=!!t.done))return iu(e,this.mapper,[t.value,this.counter++],!0)}),Uu=(O({target:"Iterator",proto:!0,real:!0,forced:xe},{map:function(e){E(this);try{Ce(e)}catch(X){$r(this,"throw",X)}return Du?I(Du,this,e):new Nu(Qr(this),{mapper:e})}}),si.map),e=rn("map"),Fu=(O({target:"Array",proto:!0,forced:!e},{map:function(e){return Uu(this,e,1<arguments.length?arguments[1]:undefined)}}),_a.fastKey),ju=bt.set,zu=bt.getterFor,t={getConstructor:function(e,n,r,i){var e=e(function(e,t){er(e,o),ju(e,{type:n,index:rr(null),first:null,last:null,size:0}),d||(e.size=0),te(t)||Xr(t,e[i],{that:e,AS_ENTRIES:r})}),o=e.prototype,a=zu(n),s=function(e,t,n){var r,i=a(e),o=u(e,t);return o?o.value=n:(i.last=o={index:r=Fu(t,!0),key:t,value:n,previous:t=i.last,next:null,removed:!1},i.first||(i.first=o),t&&(t.next=o),d?i.size++:e.size++,"F"!==r&&(i.index[r]=o)),e},u=function(e,t){var n,e=a(e),r=Fu(t);if("F"!==r)return e.index[r];for(n=e.first;n;n=n.next)if(n.key===t)return n};return Uo(o,{clear:function(){for(var e=a(this),t=e.first;t;)t.removed=!0,t.previous&&(t.previous=t.previous.next=null),t=t.next;e.first=e.last=null,e.index=rr(null),d?e.size=0:this.size=0},"delete":function(e){var t,n,r=a(this),e=u(this,e);return e&&(t=e.next,n=e.previous,delete r.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),r.first===e&&(r.first=t),r.last===e&&(r.last=n),d?r.size--:this.size--),!!e},forEach:function(e){for(var t,n=a(this),r=zr(e,1<arguments.length?arguments[1]:undefined);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),Uo(o,r?{get:function(e){e=u(this,e);return e&&e.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),d&&St(o,"size",{configurable:!0,get:function(){return a(this).size}}),e},setStrong:function(e,t,n){var r=t+" Iterator",i=zu(t),o=zu(r);Ir(e,t,function(e,t){ju(this,{type:r,target:e,state:i(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?Rr("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,Rr(undefined,!0))},n?"entries":"values",!n,!0),ga(t)}},Bu=(lt("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},t),function(e,t){return(Bu=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}))(e,t)}),h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Wu(e,a,s,u){return new(s=s||Promise)(function(n,t){function r(e){try{o(u.next(e))}catch(a){t(a)}}function i(e){try{o(u["throw"](e))}catch(a){t(a)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,i)}o((u=u.apply(e,a||[])).next())})}function Hu(r,i){var o,a,s,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,a&&(s=2&t[0]?a["return"]:t[0]?a["throw"]||((s=a["return"])&&s.call(a),0):a.next)&&!(s=s.call(a,t[1])).done)return s;switch(a=0,(t=s?[2&t[0],s.value]:t)[0]){case 0:case 1:s=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,a=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!((s=0<(s=u.trys).length&&s[s.length-1])||6!==t[0]&&2!==t[0])){u=0;continue}if(3===t[0]&&(!s||t[1]>s[0]&&t[1]<s[3]))u.label=t[1];else if(6===t[0]&&u.label<s[1])u.label=s[1],s=t;else{if(!(s&&u.label<s[2])){s[2]&&u.ops.pop(),u.trys.pop();continue}u.label=s[2],u.ops.push(t)}}t=i.call(r,u)}catch(e){t=[6,e],a=0}finally{o=s=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function qu(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}var Vu=/_?t(\d)?(imestamp)?=\d+&?/g,Gu=function(e,t){void 0===t&&(t="https://dem.rumt-zh.com");t=(e.url||"").replace(/\/+$/,"")||("string"==typeof t?t:"https://dem.rumt-zh.com");return e.url=t,e.hostUrl=t,e.offlineUrl=t+"/offline",e.whiteListUrl=t+"/collect/whitelist",e.pvUrl=t+"/collect/pv",e.eventUrl=t+"/collect/events",e.speedUrl=t+"/speed",e.customTimeUrl=t+"/speed/custom",e.performanceUrl=t+"/speed/performance",e.performanceUrlForHippy=t+"/speed/hippyPerformance",e.webVitalsUrl=t+"/speed/webvitals",e.setDataReportUrl=t+"/speed/miniProgramData",e},Ju=["aegis.qq.com","tamaegis.com","/aegis-sdk","rumt-","/flog.core.min.js","pingfore.qq.com","pingfore.tencent.com","zhiyan.tencent-cloud.net","h.trace.qq.com","btrace.qq.com","beacon.qq.com","dmplog.qq.com","qq.com/report","svibeacon.onezapp.com","cube.weixinbridge.com","doubleclick.net","pcmgrmonitor.3g.qq.com","tdm.qq.com","report.qqweb.qq.com","tpstelemetry.tencent.com","galileotelemetry.tencent.com","insight.cloud.tencent.com","facebook.com","facebook.net","google","yahoo.com","twitter.com","ga-audiences","report.idqqimg.com","arms-retcode.aliyuncs.com","px.effirst.com","sentry","baidu.com","hot-update.json","u.c.b.r.o.w.s.e.r","report.url.cn","sockjs-node","m3u8","flv"],$u=["ResizeObserver loop limit exceeded","ResizeObserver loop completed","Failed to execute 'transaction'","window.indexedDB.deleteDatabase is not a function"],Zu=["ext1","ext2","ext3","ext4","ext5","ext6","ext7","ext8","ext9","ext10","level","trace","tag","seq","code"],Ku=["static","fetch"],Yu="unknown",Xu=function(e,t,n,r,i,o,a,s){for(var u,l,c=i,f=0,d=!!a&&zr(a,s);f<r;)f in n&&(u=d?d(n[f],f,t):n[f],0<o&&Z(u)?(l=ce(u),c=Xu(e,t,u,l,c,o-1)-1):(de(c+1),An(e,c,u)),c++),f++;return c},Qu=Xu,el=(O({target:"Array",proto:!0},{flatMap:function(e){var t,n=oe(this),r=ce(n);return Ce(e),t=ai(n,0),Qu(t,n,n,r,0,1,e,1<arguments.length?arguments[1]:undefined),t}}),TypeError),tl=function(e){if(ms(e))throw new el("The method doesn't accept regular expressions");return e},nl=Ze("match"),xe=function(e){var t=/./;try{"/./"[e](t)}catch(A){try{return t[nl]=!1,"/./"[e](t)}catch(v){}}return!1},rl=y("".indexOf),il=(O({target:"String",proto:!0,forced:!xe("includes")},{includes:function(e){return!!~rl(C(re(this)),C(tl(e)),1<arguments.length?arguments[1]:undefined)}}),Bn.includes),rn=m(function(){return!Array(1).includes()}),e=m(function(){return[,1].includes(undefined,1)}),ol=(O({target:"Array",proto:!0,forced:rn||e},{includes:function(e){return il(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("includes"),Ar("some",TypeError)),al=(O({target:"Iterator",proto:!0,real:!0,forced:ol},{some:function(n){E(this);try{Ce(n)}catch(X){$r(this,"throw",X)}var e,r;return ol?I(ol,this,n):(e=Qr(this),Xr(e,function(e,t){if(n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),si.some),rn=Te("some"),e=(O({target:"Array",proto:!0,forced:!rn},{some:function(e){return al(this,e,1<arguments.length?arguments[1]:undefined)}}),nr("flatMap"),lt("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},t),!lu("flatMap",function(){})),sl=!e&&Ar("flatMap",TypeError),rn=e||sl||function(){try{var e=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(e){return e});e.next(),e["return"]()}catch(X){return!0}}(),ul=r(function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=E(I(t.next,t.iterator))).done)return e.value;this.inner=null}catch(X){$r(n,"throw",X)}if(e=E(I(this.next,n)),this.done=!!e.done)return;try{this.inner=function(e,t){t&&"string"==typeof e||E(e);t=Vr(e);return Qr(E(t!==undefined?I(t,e):e))}(r(e.value,this.counter++),!1)}catch(X){$r(n,"throw",X)}}});O({target:"Iterator",proto:!0,real:!0,forced:rn},{flatMap:function(e){E(this);try{Ce(e)}catch(X){$r(this,"throw",X)}return sl?I(sl,this,e):new ul(Qr(this),{mapper:e,inner:null})}});pl.prototype.indexOf=function(e,t){for(var n=0;n<e.length;n++)if(e[n].callback===t)return n;return-1},pl.prototype.on=function(e,t,n){var r;if(void 0===n&&(n=0),this)return(r=this.eventsList[e])||(this.eventsList[e]=[],r=this.eventsList[e]),-1===this.indexOf(r,t)&&r.push({name:e,type:n||0,callback:t}),this},pl.prototype.one=function(e,t){this.on(e,t,1)},pl.prototype.remove=function(e,t){if(this){var n=this.eventsList[e];if(n){if(t)return n.length&&(t=this.indexOf(n,t),n.splice(t,1)),this;try{delete this.eventsList[e]}catch(b){}}return null}},pl.prototype.clear=function(){this.eventsList={}};var ll,cl=pl,fl=function(e){try{return localStorage.getItem(e)}catch(jy){return null}},dl=function(e,t){try{localStorage.setItem(e,t)}catch(jy){}},hl=function(e,t){try{return e?JSON.parse(e):t}catch(jy){return t}};function pl(){var a=this;this.emit=function(e,t){if(a){var n;if(null!=(r=a.eventsList[e])&&r.length)for(var r=r.slice(),i=0;i<r.length;i++){n=r[i];try{var o=n.callback.apply(a,[t]);if(1===n.type&&a.remove(e,n.callback),!1===o)break}catch(k){throw k}}return a}},this.eventsList={}}(t=ll=ll||{})[t.number=-1]="number",t.string="";var gl,ml=function(e,t){return"number"==typeof e||"string"==typeof e?e:t?ll.string:ll.number},vl=function(e,t){return"string"==typeof e?e.split("?")[t?1:0]||"":e},yl=function(e,t){return void 0===t&&(t=2048),String(e).replace(Vu,"").slice(0,t)},wl=function(e){return"string"==typeof e&&/^\//.test(e)?"https:"===(null==location?void 0:location.protocol):/^https/.test(e)},bl=["application/xhtml+xml","application/xml","application/pdf","application/pkcs12","application/javascript","application/x-javascript","application/ecmascript","application/vnd.mspowerpoint","application/vnd.apple.mpegurl","application/ogg","text/css","text/javascript","image","audio","video","video/mp2t"],kl=/\.(json|js|css|jpg|jpeg|png|svg|apng|webp|gif|bmp|mp4|mp3|ts|mpeg|wav|webm|ogg|flv|m3u8|ttf|woff2|otf|eot|woff|html|htm|shtml|shtm|)$/i,Sl=["ret","retcode","code","errcode"],_l=function(e,t,n){var r,i,o;try{if("function"==typeof(null==t?void 0:t.retCodeHandler))return{code:void 0===(o=(i=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code)?Yu:o,isErr:i.isErr};if(!(e="string"==typeof e?JSON.parse(e):e))return{code:Yu,isErr:!1};"function"==typeof(null==(r=null==t?void 0:t.ret)?void 0:r.join)&&(Sl=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var a=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Sl.indexOf(e.toLowerCase())});return a.length?{code:""+(o="未知"!==(o=e[a[0]])&&""!==o?o:Yu),isErr:0!==o&&"0"!==o&&o!==Yu}:{code:Yu,isErr:!1}}catch(Me){return{code:Yu,isErr:!1}}},El=function(e,t,n){try{var r="function"==typeof t?t(e,null==n?void 0:n.url,null==n?void 0:n.ctx)||"":e;return Rl(r).slice(0,10240)}catch(b){return""}},Cl=function(){var n=new WeakSet;return function(e,t){if(t instanceof Error)return"Error.message: "+t.message+" \n Error.stack: "+t.stack;if("object"===S(t)&&null!==t){if(n.has(t))return"[Circular "+(e||"root")+"]";n.add(t)}return t}},Ol=function(e){if("string"==typeof e)return e;try{return e instanceof Error?(JSON.stringify(e,Cl(),2)||"undefined").replace(/"/gim,""):JSON.stringify(e,Cl(),2)||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},xl=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e,Cl())||"undefined"}catch(w){return"error happen when tdem stringify: \n "+w.message+" \n "+w.stack}},Rl=function(n,r){void 0===r&&(r=3);var i,o,a,s="";return Array.isArray(n)?(s+="[",i=n.length,n.forEach(function(e,t){"object"===S(e)&&1<r?s+=Rl(e,r-1):s+=Tl(e),s+=t===i-1?"":","}),s+="]"):n instanceof Object||"object"===S(n)?(s="{",o=Object.keys(n),a=o.length,o.forEach(function(e,t){"object"===S(n[e])&&1<r?s+='"'+e+'":'+Rl(n[e],r-1):s+=Il(e,n[e]),s+=t===a-1||t<a-1&&"undefined"==typeof n[o[t+1]]?"":","}),s+="}"):s+=n,s},Il=function(e,t){var n=S(t),r="";return"string"===n||"object"===n?r+='"'+e+'":"'+t+'"':"function"==typeof t?r+='"'+e+'":"function '+t.name+'"':"symbol"===S(t)?r+='"'+e+'":"symbol"':"number"!=typeof t&&"boolean"!==n||(r+='"'+e+'": '+t),r},Tl=function(e){var t=S(e);return""+("undefined"===t||"symbol"===t||"function"===t?"null":"string"===t||"object"===t?'"'+e+'"':e)},Ml=function(t){var n;return t.payload?(n={},Object.keys(t).forEach(function(e){"payload"!==e&&(n[e]=t[e])}),n):t},Al=function(e,t){var n,r={fetch:[],"static":[],bridge:[]},i=new FormData;return Array.isArray(e)?e.forEach(function(e){var t=Ml(e);r[e.type].push(t)}):(n=Ml(e),r[e.type].push(n)),i.append("payload",xl(h({duration:r},t))),i},Pl=/data:(image|text|application|font)\/.*;base64/,Ll=function(t,e){return"string"!=typeof t||!t||e&&-1<t.indexOf(e)||Pl.test(t)||Ju.some(function(e){return-1<t.indexOf(e)})};(lu=gl=gl||{}).LOG="log",lu.SPEED="speed",lu.PERFORMANCE="performance",lu.OFFLINE="offline",lu.WHITE_LIST="whiteList",lu.VITALS="vitals",lu.PV="pv",lu.CUSTOM_PV="customPV",lu.EVENT="event",lu.CUSTOM="custom",lu.SDK_ERROR="sdkError",lu.SET_DATA="setData",lu.LOAD_PACKAGE="loadPackage",lu.MEMORY="memory";var Dl,p,Nl,Ul={maxAttempts:3,delays:[0,1e3,3e3]};function Fl(){return"evt_"+Date.now()+"_"+Math.random().toString(36).substring(2,8)}function jl(e){var t=[];if(e.stack)for(var n=0,r=0,i=e.stack.split("\n");r<i.length;r++){var o,a,s,u,l,c=i[r],f=c.match(/at\s+(.+?)\s+\((.+?):(\d+):(\d+)\)/);f?(o=f[1],a=f[2],s=f[3],u=f[4],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":o||"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++})):(f=c.match(/at\s+(.+?):(\d+):(\d+)/))&&(a=f[1],s=f[2],u=f[3],l=a.split("/").pop()||a,t.push({abs_path:a,colno:parseInt(u,10),filename:l,"function":"(anonymous)",lineno:parseInt(s,10),in_app:a.includes("node_modules")||a.includes("cdn")?0:1,stack_level:n++}))}return t}(e=Dl=Dl||{}).production="production",e.development="development",e.gray="gray",e.pre="pre",e.daily="daily",e.local="local",e.test="test",e.others="others",(r=p=p||{}).JS_ERROR="js_error",r.PROMISE_ERROR="promise_error",r.RESOURCE_ERROR="resource_error",r.API_ERROR="api_error",r.PAGE_LOAD="page_load",r.RESOURCE_LOAD="resource_load",r.API_CALL="api_call",r["true"]="web_vitals",r.CLICK="click",r.PAGE_VIEW="page_view",r.TAB_HIDDEN="tab_hidden",r.TAB_VISIBLE="tab_visible",r.WINDOW_BLUR="window_blur",r.WINDOW_FOCUS="window_focus",r.FORM_FOCUS="form_focus",r.FORM_BLUR="form_blur",r.FORM_CHANGE="form_change",r.FORM_SUBMIT="form_submit",r.FORM_SUBMIT_RESULT="form_submit_result",r.STRUGGLE="struggle",r.CUSTOM="custom",r.LOG="log",(rn=Nl=Nl||{}).ERROR="error",rn.PERFORMANCE="performance",rn.BEHAVIOR="behavior",rn.NETWORK="network",rn.LOG="log",rn.CUSTOM="custom";var zl=TypeError,Bl="Reduce of empty array with no initial value",t=function(l){return function(e,t,n,r){var i=oe(e),o=je(i),a=ce(i);if(Ce(t),0===a&&n<2)throw new zl(Bl);var s=l?a-1:0,u=l?-1:1;if(n<2)for(;;){if(s in o){r=o[s],s+=u;break}if(s+=u,l?s<0:a<=s)throw new zl(Bl)}for(;l?0<=s:s<a;s+=u)s in o&&(r=t(r,o[s],s,i));return r}},e={left:t(!1),right:t(!0)},r=function(e){return Rn.slice(0,e.length)===e},Wl=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":R.Bun&&"string"==typeof Bun.version?"BUN":R.Deno&&"object"==S(Deno.version)?"DENO":"process"===Q(R.process)?"NODE":R.window&&R.document?"BROWSER":"REST",Hl="NODE"==Wl,ql=e.left,rn=!Hl&&79<Tn&&Tn<83||!Te("reduce"),Vl=(O({target:"Array",proto:!0,forced:rn},{reduce:function(e){var t=arguments.length;return ql(this,e,t,1<t?arguments[1]:undefined)}}),TypeError),t=m(function(){[].keys().reduce(function(){},undefined)}),Gl=!t&&Ar("reduce",Vl),Jl=(O({target:"Iterator",proto:!0,real:!0,forced:t||Gl},{reduce:function(t){E(this);try{Ce(t)}catch(X){$r(this,"throw",X)}var n=arguments.length<2,r=n?undefined:arguments[1];if(Gl)return Oe(Gl,this,n?[t]:[t,r]);var e=Qr(this),i=0;if(Xr(e,function(e){r=n?(n=!1,e):t(r,e,i),i++},{IS_RECORD:!0}),n)throw new Vl("Reduce of empty iterator with no initial value");return r}}),TypeError),$l=function(e,t){if(e<t)throw new Jl("Not enough arguments");return e},Zl=R.Function,Kl=/MSIE .\./.test(Rn)||"BUN"==Wl&&((r=R.Bun.version.split(".")).length<3||"0"===r[0]&&(r[1]<3||"3"===r[1]&&"0"===r[2])),rn=function(o,a){var s=a?2:1;return Kl?function(e,t){var n=$l(arguments.length,1)>s,r=_(e)?e:Zl(e),i=n?Pn(arguments,s):[],e=n?function(){Oe(r,this,i)}:r;return a?o(e,t):o(e)}:o},t=rn(R.setInterval,!0),r=(O({global:!0,bind:!0,forced:R.setInterval!==t},{setInterval:t}),rn(R.setTimeout,!0)),Yl=(O({global:!0,bind:!0,forced:R.setTimeout!==r},{setTimeout:r}),function(e){return e.filter(function(n,r){return"static"!==n.type||!e.find(function(e,t){return n.url===e.url&&200===n.status&&r<t})})}),Xl=(O({target:"String",proto:!0},{repeat:gt}),{}),Ql={},ec=function(e){return Xl[e]||(Xl[e]=setTimeout(function(){Ql[e]={},Xl[e]=null},6e4)),Xl[e]},tc=function(c,f){return function(i,o){var a,s,u,l,e,t,n;null!=i&&i.log&&null!=i&&i.type?(s=function(e,t){var n,r,t=h(h({},c.bean),{from:t}),i=h({},c.bean);return function(){try{return"undefined"!=typeof FormData&&"function"==typeof FormData.prototype.append}catch(a){}}()?Al(e,t):(t=e,e=i,r={fetch:[],"static":[],bridge:[]},i={},Array.isArray(t)?t.forEach(function(e){var t;null!=(t=r[e.type])&&t.push(e)}):null!=(n=r[t.type])&&n.push(t),i.payload=JSON.stringify(h({duration:r},e)),i)},u=function(e,t,n,r){switch(t){case gl.LOG:o=e;var i=(Array.isArray(o)?o:[o]).map(function(n){return Object.getOwnPropertyNames(n).reduce(function(e,t){return"ctx"!==t&&(e[t]=n[t]),e},{level:"2",msg:""})});if(!i||0===i.length)return"{}";i=Array.isArray(i)?i:[i];var o=Array.from(new Set(i.flatMap(function(e){return Object.keys(e)}))),a={};return o.forEach(function(t){a[t]=i.map(function(e){return e[t]||""})}),a.count=i.length,xl(a);case gl.SPEED:return s(e,n);case gl.EVENT:return r;default:return r||{}}var o},1!==(e=Array.isArray(i.log)?i.log:[i.log]).length?(l={},e.forEach(function(e){var t=e.from||"undefined";delete e.from,l[t]||(l[t]=[]),l[t].push(e)}),Object.keys(l).forEach(function(e){var t,n=l[e],r=null!=(r=i.url)&&r.includes("?")?"&":"?";"undefined"===e?(t=""+i.url,o(h(h({},i),{url:t,log:1===n.length?n[0]:n,data:u(n,f,e,i.data)}))):(t=i.url+r+"from="+e,o(h(h({},i),{url:t,log:1===n.length?n[0]:n,beanFilter:qu(i.beanFilter||[],["from"]),data:u(n,f,e,i.data)})))})):(t=(e=e[0]).from,delete e.from,n=null!=(a=i.url)&&a.includes("?")?"&":"?",t?(n=i.url+n+"from="+t,o(h(h({},i),{url:n,log:e,beanFilter:qu(i.beanFilter||[],["from"]),data:u(e,f,t,i.data)}))):(n=""+i.url,o(h(h({},i),{url:n,log:e,data:u(e,f,t,i.data)}))))):o(i)}},nc=function(u,l){return function(e,t){var n,r,i,o=Array.isArray(e),a=o?e:[e],s=(u.lifeCycle.emit("beforeRequest",e),u.config.beforeRequest);(a="function"==typeof s?a.map(function(e){try{var t=s({logs:e,logType:l});return(null==t?void 0:t.logType)===l&&null!=t&&t.logs?t.logs:!1!==t&&e}catch(X){return e}}).filter(function(e){return!1!==e}):a).length&&(n=a,e=Zu,!Array.isArray(n)||n.length<=1||(r=[],i=[],!(i="string"==typeof e?[e]:e))||i.length<=0||(i.forEach(function(t){n.forEach(function(e){null!=e&&e[t]&&r.push(t)})}),0<r.length&&(n=n.map(function(e){var t={};return r.forEach(function(e){t[e]=""}),h(h({},t),e)}))),a=n,t(o?a:a[0]))}},rc=function(i){return function(e,t){i.lifeCycle.emit("modifyRequest",e);var n=i.config.modifyRequest;if("function"==typeof n)try{var r=n(e);"object"===S(r)&&"url"in r&&(e=r)}catch(X){console.error(X)}t(e)}},ic=function(r){return function(e,t){null!=(n=r.lifeCycle)&&n.emit("afterRequest",e);var n=(r.config||{}).afterRequest;"function"==typeof n&&!1===n(e)||t(e)}},oc=y(1.1.valueOf),t=Un.f,ac=Kn.f,sc=st.f,uc=Wn.trim,lc=R.Number,cc=(di.Number,lc.prototype),fc=R.TypeError,dc=y("".slice),hc=y("".charCodeAt),pc=function(e){var t,n,r,i,o,a,s,u=To(e,"number");if(Bi(u))throw new fc("Cannot convert a Symbol value to a number");if("string"==typeof u&&2<u.length)if(u=uc(u),43===(e=hc(u,0))||45===e){if(88===(t=hc(u,2))||120===t)return NaN}else if(48===e){switch(hc(u,1)){case 66:case 98:n=2,r=49;break;case 79:case 111:n=8,r=55;break;default:return+u}for(o=(i=dc(u,2)).length,a=0;a<o;a++)if((s=hc(i,a))<48||r<s)return NaN;return parseInt(i,n)}return+u},rn=ps("Number",!lc(" 0o1")||!lc("0b1")||lc("+0x1")),gc=function(e){var t,e=arguments.length<1?0:lc(function(e){e=To(e,"number");return"bigint"==typeof e?e:pc(e)}(e));return ke(cc,t=this)&&m(function(){oc(t)})?Jo(Object(e),this,gc):e};if(gc.prototype=cc,rn&&(cc.constructor=gc),O({global:!0,constructor:!0,wrap:!0,forced:rn},{Number:gc}),rn)for(var mc=di.Number,vc=lc,yc,wc=d?t(vc):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),bc=0;wc.length>bc;bc++)T(vc,yc=wc[bc])&&!T(mc,yc)&&sc(mc,yc,ac(vc,yc));var kc={generateTraceId:_c(16),generateSpanId:_c(8)},Sc=Array(32);function _c(t){return function(){for(var e=0;e<2*t;e++)Sc[e]=Math.floor(16*Math.random())+48,58<=Sc[e]&&(Sc[e]+=39);return String.fromCharCode.apply(null,Sc.slice(0,2*t))}}function Ec(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}var Cc=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},Oc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",xc=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Rc=function(e){for(var t,n,r,i="",o=0,a=(e=String(e)).length%3;o<e.length;){if(255<(t=e.charCodeAt(o++))||255<(n=e.charCodeAt(o++))||255<(r=e.charCodeAt(o++)))throw new TypeError("Failed to execute 'btoa': The string to be encoded contains characters outside of the Latin1 range.");i+=Oc.charAt((t=t<<16|n<<8|r)>>18&63)+Oc.charAt(t>>12&63)+Oc.charAt(t>>6&63)+Oc.charAt(63&t)}return a?i.slice(0,a-3)+"===".substring(a):i},Ic=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!xc.test(e))throw new TypeError("Failed to execute 'atob': The string to be decoded is not correctly encoded.");var t;e+="==".slice(2-(3&e.length));for(var n,r,i="",o=0;o<e.length;)t=Oc.indexOf(e.charAt(o++))<<18|Oc.indexOf(e.charAt(o++))<<12|(n=Oc.indexOf(e.charAt(o++)))<<6|(r=Oc.indexOf(e.charAt(o++))),i+=64===n?String.fromCharCode(t>>16&255):64===r?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return i},Tc=(Pc.prototype.generate=function(e,t,n){if(void 0===t&&(t={}),this.url=e,!this.isUrlIgnored()&&this.isUrlInTraceUrls()&&this.traceType){switch(this.traceType){case"traceparent":this.traceId=this.createTraceparent();break;case"b3":this.traceId=this.createB3();break;case"sw8":this.traceId=this.createSw8(n);break;case"sentry-trace":this.traceId=this.createSentryTrace();break;default:return console.warn("this trace key "+this.traceType+" is not supported"),void(this.traceId="")}return t[this.traceType]&&(this.traceId=t[this.traceType]),{name:this.traceType,value:this.traceId}}},Pc.prototype.createTraceparent=function(){var e=kc.generateSpanId();return"00-"+kc.generateTraceId()+"-"+e+"-0"+this.traceFlag.toString(16)},Pc.prototype.createB3=function(){var e=kc.generateSpanId();return kc.generateTraceId()+"-"+e+"-"+this.traceFlag},Pc.prototype.createSw8=function(e){var t="function"==typeof btoa?btoa:Rc,e=e||{},n=e.host,n=void 0===n?"":n,e=e.pathname,e=void 0===e?"":e,r=Cc(),i=Cc();return"1-"+String(t(i))+"-"+String(t(r))+"-1-"+String(t("tdem"))+"-"+String(t("1.0.7"))+"-"+String(t(encodeURI(e)))+"-"+String(t(n))},Pc.prototype.createSentryTrace=function(){var e=Ec().substring(16);return Ec()+"-"+e+"-"+this.traceFlag},Pc.prototype.isUrlIgnored=function(){if(Array.isArray(this.ignoreUrls)&&0!==this.ignoreUrls.length)for(var e=0,t=this.ignoreUrls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}return!1},Pc.prototype.isUrlInTraceUrls=function(){if(!this.urls)return!0;if(Array.isArray(this.urls)){if(0===this.urls.length)return!1;for(var e=0,t=this.urls;e<t.length;e++){var n=t[e];if(this.urlMatches(this.url,n))return!0}}return!1},Pc.prototype.urlMatches=function(e,t){return"string"==typeof t?e===t:!!e.match(t)},Pc),Mc={sw8:function(e){var t="function"==typeof atob?atob:Ic,e=e.split("-")[1];return e?t(e):""},traceparent:function(e){return e.split("-")[1]},b3:function(e){return e.split("-")[0]},"sentry-trace":function(e){return e.split("-")[0]}},Ac=function(e){var t,n="";return n="object"===S(e)&&(t=(e=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=e[r]||"function"==typeof e.get&&e.get(r);if(i)return[r,i]}return["",""]}(e,Object.keys(Mc)))[0])?Mc[t](e[1]):n};function Pc(e,t,n,r){void 0===n&&(n=null),this.traceType=e,this.ignoreUrls=t,this.urls=n,this.traceFlag=r===undefined||null===r?1:Number(!!r)}function Lc(u){return function(e){e&&0!==e.length&&u.sendPipeline([function(t,e){var n,r,i,o,a={protocol_version:2,project_key:String(u.config.id||""),sdk:{name:u.sdkName,version:u.sdkVersion},app:{version:String(u.config.version||"1.0.0")},context:(n=u,r=String((null==(a=null==(r=null==(a=n.sessionManager)?void 0:a.getSession)?void 0:r.call(a))?void 0:a.id)||n.bean.sessionId||""),a=String(n.config.userId||n.config.uin||""),r={session_id:r,platform:(r=String(n.runtimePlatform||n.config.platform||"web").trim().toLowerCase(),["web","miniprogram","android","ios","electron","unknown"].includes(r)?r:["wx","my","qq","tt"].includes(r)?"miniprogram":"undefined"!=typeof window?"web":"unknown")},a&&(r.user_id=a),a=n.bean.runtime?String(n.bean.runtime):"",s=n.bean.processType?String(n.bean.processType):"",i=n.bean.windowId!==undefined?String(n.bean.windowId):"",o=n.bean.webContentsId!==undefined?String(n.bean.webContentsId):"",n=n.bean.appVersion?String(n.bean.appVersion):"",a&&(r.runtime=a),s&&(r.process_type=s),i&&(r.window_id=i),o&&(r.web_contents_id=o),n&&(r.app_version=n),"undefined"!=typeof navigator&&(r.user_agent=navigator.userAgent,r.language=navigator.language),"undefined"!=typeof screen&&(r.screen_resolution=screen.width+"x"+screen.height),r),events:t},s=String(u.config.url||"").replace(/\/+$/,"");s&&e({url:s+"/api/v1/collect/events",data:JSON.stringify(a),method:"POST",contentType:"application/json",addBean:!1,type:gl.EVENT,log:t,success:function(){u.lifeCycle.emit("afterReport",{success:!0,events:t})},fail:function(e){u.lifeCycle.emit("afterReport",{success:!1,error:e,events:t})}})}],gl.EVENT)(e)}}var Dc=function(){},Nc=function(n){if(n&&n.reduce&&n.length)return 1===n.length?function(e,t){n[0](e,t||Dc)}:n.reduce(function(n,r){return function(e,t){return void 0===t&&(t=Dc),n(e,function(e){return null==r?void 0:r(e,t)})}});throw new TypeError("createPipeline need at least one function param")},Uc=(O({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,n,r=ze(e),i=Kn.f,o=Zn(r),a={},s=0;o.length>s;)(n=i(r,t=o[s++]))!==undefined&&An(a,t,n);return a}}),function(t,n){Object.getOwnPropertyNames(t).forEach(function(e){"function"==typeof t[e]&&"constructor"!==e&&(n?n[e]="sendPipeline"===e?function(){return function(){}}:function(){}:t[e]=function(){})})}),Fc={rage_click:3,dead_click:4,error_click:4,form_validation_error:3,slow_page:3,back_forward:2,long_focus_time:2,form_zigzag:2,uncompleted_form:3,custom_struggle:3},jc={rage_click:4,dead_click:5,error_click:5,form_validation_error:4,slow_page:4,back_forward:3,long_focus_time:3,form_zigzag:3,uncompleted_form:3,custom_struggle:3},zc=(c.use=function(e){-1===c.installedPlugins.indexOf(e)&&e.tdemPlugin&&c.installedPlugins.push(e)},c.unuse=function(e){e=c.installedPlugins.indexOf(e);-1!==e&&c.installedPlugins.splice(e,1)},c.prototype.getInternalTransport=function(){return this.internalTransport},c.prototype.setInternalTransport=function(e){this.internalTransport=e},c.prototype.getInternalRetrySchedule=function(){return this.internalRetrySchedule},c.prototype.transportRequest=function(t,n){return Wu(this,void 0,void 0,function(){return Hu(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,this.internalTransport.request(t,n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t}]}})})},c.prototype.transportHandoff=function(t,n){return Wu(this,void 0,void 0,function(){return Hu(this,function(e){switch(e.label){case 0:if(this.internalTransport)return[4,(this.internalTransport.handoff||this.internalTransport.request).call(this.internalTransport,h(h({},t),{handoff:!0}),n)];throw new Error("Internal Transport is not configured");case 1:return[2,e.sent()||{ok:!0,request:t,handoffAccepted:!0}]}})})},c.prototype.init=function(e){this.setConfig(e),this.config=Gu(this.config,e.hostUrl);for(var t=0;t<c.installedPlugins.length;t++)try{c.installedPlugins[t].patch(this)}catch(v){this.sendSDKError(v)}this.lifeCycle.emit("onInited")},c.prototype.destroy=function(e){void 0===e&&(e=!1);var t,n,r=c.instances.indexOf(this);-1!==r&&c.instances.splice(r,1);for(var i=c.installedPlugins.length-1;0<=i;i--)try{c.installedPlugins[i].unpatch(this)}catch(L){this.sendSDKError(L)}if(this.lifeCycle.emit("destroy"),this.lifeCycle.clear(),e)t=this,n=Object.getOwnPropertyDescriptors(t),Object.keys(n).forEach(function(e){n[e].writable&&(t[e]=null)}),Object.setPrototypeOf(this,null);else{for(var o=this;o.constructor!==Object&&Uc(o,this),o=Object.getPrototypeOf(o););0===c.instances.length&&(r=Object.getPrototypeOf(this).constructor,Uc(r),Uc(c))}},c.prototype.setConfig=function(e){Object.assign(this.config,e);var e=this.config,t=e.id,n=e.uin,r=e.version,i=e.aid,o=e.env,a=void 0===o?"production":o,o=e.pageUrl,e=e.userId||(n!==undefined&&null!==n?String(n):""),n=this.bean.id!==t||this.bean.uin!==e||this.bean.aid!==i;return this.bean.id=t||"",this.bean.uin=e,this.bean.version=r||"1.0.7",this.bean.aid=i||"",this.bean.env=function(){switch(a){case Dl.production:case Dl.development:case Dl.gray:case Dl.pre:case Dl.daily:case Dl.local:case Dl.test:case Dl.others:return 1;default:return}}()?a:Dl.others,o&&this.extendBean("from",encodeURIComponent(o.slice(0,2048))),n&&this.lifeCycle.emit("onConfigChange",this.config),this.config},c.prototype.extendBean=function(e,t){this.bean[e]=t},c.prototype.send=function(e,i,o){var t=this;return Nc([rc(this),tc(this,null==e?void 0:e.type),function(n,r){t.request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!1,result:e,logType:n.type,logs:n.log}),null!=i&&i.apply(void 0,e)},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r({isErr:!0,result:e,logType:n.type,logs:n.log}),null!=o&&o.apply(void 0,e)})},ic(this)])(e)},c.prototype.sendSDKError=function(e){var n=this;this.sendPipeline([function(e,t){t({url:n.config.url+"?id=1085&msg[0]="+encodeURIComponent(Ol(e))+"&level[0]=2&from="+n.config.id+"&count=1&version="+n.config.id+"(1.0.7)",addBean:!1,method:"get",type:gl.SDK_ERROR,log:e})}],gl.SDK_ERROR)(e)},c.prototype.sendPipeline=function(e,t){var n,o=this;return Nc(qu([function(e,t){if(e&&e.type===gl.EVENT)return t(e);if("number"!=typeof n.config.random&&(console.warn("random must in [0, 1], default is 1."),n.config.random=1),!n.isHidden||!n.isGetSample)if(n.isGetSample)n.isHidden||t(e);else{if(n.isGetSample=!0,Math.random()<n.config.random)return n.isHidden=!1,t(e);n.isHidden=!0}},nc(n=this,t)],e,[tc(this,t),rc(this),function(r,i){o.request(r,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;-1<(""+e[o.failRequestCount=0]).indexOf("403 forbidden")&&(n=!0,o.destroy()),i({isErr:n,result:e,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(n=null==r?void 0:r.success)&&n.call.apply(n,qu([r],e))},function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];60<=++o.failRequestCount&&o.destroy(),-1<(""+t[0]).indexOf("403 forbidden")&&o.destroy(),i({isErr:!0,result:t,logType:null==r?void 0:r.type,logs:null==r?void 0:r.log}),null!=(e=null==r?void 0:r.fail)&&e.call.apply(e,qu([r],t))})},ic(this)]))},c.prototype.track=function(e,t){void 0===t&&(t={}),e&&"string"==typeof e?(e={event_id:Fl(),event_type:p.CUSTOM,event_category:Nl.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{event_name:e,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),payload:this.sanitizeEventPayload(t.payload),event_properties:this.sanitizeEventProperties(t.properties)}},this.reportTDEMEvent(e)):console.warn("track: name must be a non-empty string")},c.prototype.reportTDEMEvent=function(e){var n=this,e=Array.isArray(e)?e:[e];e.length&&(e=e.map(function(e){var t;return h(h({},e),{page_url:e.page_url||n.getCurrentEventPageUrl(),data:h(h({},e.data),n.mergeEventTags(null==(t=e.data)?void 0:t.tags)?{tags:n.mergeEventTags(null==(t=e.data)?void 0:t.tags)}:{})})}),this.lifeCycle.emit("tdemEventCreated",e),this.tdemEventPipeline(e))},c.prototype.measure=function(e,t,n){void 0===n&&(n={}),e&&"string"==typeof e?"number"==typeof t?t<0||2147483646<t?console.warn("measure: duration must between 0 and 2147483646"):this.submitMeasure(e,t,n):console.warn("measure: duration must be a number"):console.warn("measure: name must be a non-empty string")},c.prototype.startMeasure=function(e){"string"==typeof e&&e?this.timeMap[e]?console.warn("Measure "+e+" already exists"):this.timeMap[e]=Date.now():console.warn("startMeasure: name must be a non-empty string")},c.prototype.endMeasure=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n=this.getTimeEventDuration(e))!==undefined?(this.submitMeasure(e,n,t),delete this.timeMap[e]):console.warn("Measure "+e+" does not exist"):console.warn("endMeasure: name must be a non-empty string")},c.prototype.captureMessage=function(e,t){var n;void 0===t&&(t={}),"string"==typeof e&&e?(n="error"===t.level?"error":"warn"===t.level?"warn":"info",n={event_id:Fl(),event_type:p.LOG,event_category:Nl.LOG,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{log_level:n,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h({message:e},t.properties||{}))}},this.reportTDEMEvent(n)):console.warn("captureMessage: message must be a non-empty string")},c.prototype.captureException=function(e,t){void 0===t&&(t={});var e="string"==typeof e?new Error(e):e;e instanceof Error?(e={event_id:Fl(),event_type:p.JS_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(t.pageUrl),data:{exception_stacks:[{type:e.name||"Error",value:e.message,mechanism_type:"manual",mechanism_handled:1}],exception_frames:jl(e),replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h(h({},t.properties||{}),t.level?{capture_level:t.level}:{}))}},this.reportTDEMEvent(e)):console.warn("captureException: error must be an Error or string")},c.prototype.setTags=function(e){e=this.sanitizeEventTags(e);this.setConfig({defaultTags:h(h({},this.config.defaultTags||{}),e||{})})},c.prototype.removeTags=function(e){var t,e=Array.isArray(e)?e:[e];e.length&&(t=h({},this.config.defaultTags||{}),e.forEach(function(e){delete t[e]}),this.setConfig({defaultTags:t}))},c.prototype.clearTags=function(){this.setConfig({defaultTags:{}})},c.prototype.setUser=function(e){"string"==typeof e&&e?this.setConfig({userId:e}):console.warn("setUser: userId must be a non-empty string")},c.prototype.clearUser=function(){this.setConfig({userId:"",uin:""})},c.prototype.reportStruggle=function(e){var t,n,r;e&&e.type&&e.ownerType&&e.ownerKey?(r=e.type,t="number"==typeof e.severity?e.severity:Fc[r],n="number"==typeof e.weight?e.weight:jc[r],r={event_id:Fl(),event_type:p.STRUGGLE,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:r,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:!1,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),struggle_weight:n,struggle_severity:t,struggle_value:"number"==typeof e.value?e.value:n*t,event_properties:{form_id:e.formId||"",field_id:e.fieldId||"",trigger_event_id:e.triggerEventId||"",struggle_status:e.status||"detected",struggle_owner_type:e.ownerType,struggle_owner_key:e.ownerKey,detection_source:e.detectionSource||"sdk_auto",rule_version:e.ruleVersion||this.getDefaultRuleVersion()}}},this.reportTDEMEvent(r)):console.warn("reportStruggle params error")},c.prototype.reportFormSubmitResult=function(e){e&&e.status?(e={event_id:Fl(),event_type:p.FORM_SUBMIT_RESULT,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(e.pageUrl),data:{event_name:e.eventName||"form_submit_"+e.status,replay_id:this.getEventReplayId(),tags:this.sanitizeEventTags(e.tags),is_effective_action:"boolean"!=typeof e.isEffectiveAction||e.isEffectiveAction,trigger_event_id:e.triggerEventId,related_event_ids:this.normalizeRelatedEventIds(e.relatedEventIds),payload:this.sanitizeEventPayload(e.payload,e.payloadAllowlist),validation_message:e.validationMessage?e.validationMessage.slice(0,256):undefined,event_properties:{status:e.status,validation_code:e.validationCode||"",form_id:e.formId||"",field_id:e.fieldId||""}}},this.reportTDEMEvent(e)):console.warn("reportFormSubmitResult params error")},c.prototype.reportPageView=function(e,t){void 0===t&&(t={});e=this.getCurrentEventPageUrl(e||t.pageUrl),e={event_id:Fl(),event_type:p.PAGE_VIEW,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:e,data:{page_title:t.pageTitle||"",referrer:t.referrer,replay_id:this.getEventReplayId(t.replayId),tags:this.sanitizeEventTags(t.tags),event_properties:this.sanitizeEventProperties(h(h(h(h(h(h(h({},t.properties||{}),t.navigationType?{navigation_type:t.navigationType}:{}),t.fromPage?{from_page:t.fromPage}:{}),t.toPage?{to_page:t.toPage}:{}),"boolean"==typeof t.isFirstVisit?{is_first_visit:t.isFirstVisit?"1":"0"}:{}),"boolean"==typeof t.isFirstLoad?{is_first_load:t.isFirstLoad?"1":"0"}:{}),t.deviceType?{device_type:t.deviceType}:{}))}};this.reportTDEMEvent(e)},c.prototype.setPage=function(e,t){var n;e&&"string"==typeof e?(n=this._customPageUrl||this.getCurrentEventPageUrl(),this._customPageUrl=e,this.reportPageView(e,{pageTitle:null==t?void 0:t.pageTitle,navigationType:"push",fromPage:(n||"").slice(0,512),toPage:e.slice(0,512),isFirstVisit:!1,tags:h({source:"manual",environment:this.config.env||"production",version:String(this.config.version||"")},null!=t&&t.pageGroup?{page_group:t.pageGroup}:{})}),this.lifeCycle.emit("pageChanged",{pageUrl:e,previousUrl:n,source:"manual"})):console.warn("setPage: pageUrl must be a non-empty string")},c.prototype.leavePage=function(){var e;this._customPageUrl&&(e=this._customPageUrl,this._customPageUrl=null,this.lifeCycle.emit("pageChanged",{pageUrl:this.getCurrentEventPageUrl(),previousUrl:e,source:"auto"}))},c.prototype.getCurrentEventPageUrl=function(e){if(e)return e;if(this._customPageUrl)return this._customPageUrl;try{return this.getOriginFrom()}catch(Le){return this.config.pageUrl||"undefined"!=typeof window&&(null==(e=window.location)?void 0:e.href)||""}},c.prototype.getCurrentReplayId=function(){var e,t;return String((null==(t=null==(e=null==(t=this.sessionManager)?void 0:t.getSession)?void 0:e.call(t))?void 0:t.replayId)||"")},c.prototype.getDefaultRuleVersion=function(){var e;return(null==(e=null==(e=this.config)?void 0:e.struggleMonitor)?void 0:e.ruleVersion)||"1.0.0"},c.prototype.getEventReplayId=function(e){return e||this.getCurrentReplayId()||undefined},c.prototype.mergeEventTags=function(e){return this.sanitizeEventTags(h(h({},this.config.defaultTags||{}),e||{}))},c.prototype.sanitizeStringMap=function(n,r){var i;return void 0===r&&(r=1024),n&&"object"===S(n)&&(i={},Object.keys(n).forEach(function(e){var t=n[e];e&&t!==undefined&&null!==t&&(i[String(e)]=String(t).slice(0,r))}),Object.keys(i).length)?i:undefined},c.prototype.sanitizeEventTags=function(e){return this.sanitizeStringMap(e,1024)},c.prototype.sanitizeEventProperties=function(e){return this.sanitizeStringMap(e,1024)},c.prototype.sanitizeEventPayload=function(n,e){var r;return n&&"object"===S(n)&&(e=(e=this.getPayloadAllowlist(e)).length?e:Object.keys(n),r={},e.forEach(function(e){var t;Object.prototype.hasOwnProperty.call(n,e)&&(t=n[e])!==undefined&&null!==t&&("string"==typeof t?r[e]=t.slice(0,256):"number"==typeof t||"boolean"==typeof t?r[e]=t:Array.isArray(t)?r[e]=t.slice(0,10).map(function(e){return"string"==typeof e?e.slice(0,256):"number"==typeof e||"boolean"==typeof e?e:String(e).slice(0,256)}):r[e]=String(t).slice(0,256))}),Object.keys(r).length)?r:undefined},c.prototype.getPayloadAllowlist=function(e){var t=null==(t=null==(t=this.config)?void 0:t.struggleMonitor)?void 0:t.payloadAllowlist;return Array.from(new Set(qu(Array.isArray(t)?t:[],Array.isArray(e)?e:[]).filter(function(e){return!!e})))},c.prototype.normalizeRelatedEventIds=function(e){return Array.isArray(e)&&e.length&&(e=Array.from(new Set(e.filter(function(e){return"string"==typeof e&&e})))).length?e:undefined},c.prototype.ready=function(e,t,n){throw new Error('You need to override "ready" method')},c.prototype.request=function(e,t,n){throw new Error('You need to override "request" method')},c.prototype.speedLogPipeline=function(e){throw new Error('You need to override "speedLogPipeline" method')},c.prototype.getOriginFrom=function(){throw new Error('You need to override "getOriginFrom" method')},Object.defineProperty(c.prototype,"__version__",{get:function(){return"1.0.7"},enumerable:!1,configurable:!0}),c.prototype.submitMeasure=function(e,t,n){void 0===n&&(n={});e={event_id:Fl(),event_type:p.CUSTOM,event_category:Nl.CUSTOM,timestamp:Date.now(),page_url:this.getCurrentEventPageUrl(n.pageUrl),data:{event_name:e,measurements:{duration:t},replay_id:this.getEventReplayId(n.replayId),tags:this.sanitizeEventTags(n.tags),payload:this.sanitizeEventPayload(n.payload),event_properties:this.sanitizeEventProperties(n.properties)}};this.reportTDEMEvent(e)},c.prototype.getTimeEventDuration=function(e){return e!==undefined&&this.timeMap[e]?Date.now()-this.timeMap[e]:undefined},c.version="1.0.7",c.instances=[],c.environment=Dl,c.installedPlugins=[],c),r=(Yc.prototype.patch=function(e){this.canUse(e)&&this.exist(e)&&(this.instances.push(e),this.triggerInit(e),this.triggerOnNewTdem(e))},Yc.prototype.unpatch=function(e){var t=this.instances.indexOf(e);-1!==t&&(this.instances.splice(t,1),0===this.instances.length)&&this.uninstall(e)},Yc.prototype.countInstance=function(){return this.instances.length},Yc.prototype.uninstall=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.destroy)&&t.apply(this,[e])},Yc.prototype.walk=function(n){var r=this;this.instances.forEach(function(e){var t=r.canUse(e);t&&n(e,t)})},Yc.prototype.canUse=function(e){e=this.getConfig(e);return!(!e||"object"!==S(e))||!!e},Yc.prototype.getConfig=function(e){return null==(e=e.config)?void 0:e[this.name]},Yc.prototype.exist=function(e){return-1===this.instances.indexOf(e)},Yc.prototype.triggerInit=function(e){var t;this.inited||(this.inited=!0,null==(t=null==(t=this.option)?void 0:t.init))||t.call(this.option,this.getConfig(e))},Yc.prototype.triggerOnNewTdem=function(e){var t;null!=(t=null==(t=this.option)?void 0:t.onNewTdem)&&t.call(this.option,e,this.getConfig(e))},Yc),rn=new r({name:"aid",aid:"",init:function(e){try{var t=!0!==e&&e||window.localStorage.getItem("TDEM_ID");t||(t=Cc(),window.localStorage.setItem("TDEM_ID",t)),this.aid=t}catch(A){}},onNewTdem:function(e){e.bean.aid=this.aid,e.config.aid=this.aid}}),Bc=RangeError,Wc=String,Hc=Math.floor,qc=y(gt),Vc=y("".slice),Gc=y(1.1.toFixed),Jc=function(e,t,n){return 0===t?n:t%2==1?Jc(e,t-1,n*e):Jc(e*e,t/2,n)},$c=function(e,t,n){for(var r=-1,i=n;++r<6;)i+=t*e[r],e[r]=i%1e7,i=Hc(i/1e7)},Zc=function(e,t){for(var n=6,r=0;0<=--n;)r+=e[n],e[n]=Hc(r/t),r=r%t*1e7},Kc=function(e){for(var t,n=6,r="";0<=--n;)""===r&&0!==n&&0===e[n]||(t=Wc(e[n]),r=""===r?t:r+qc("0",7-t.length)+t);return r},t=m(function(){return"0.000"!==Gc(8e-5,3)||"1"!==Gc(.9,0)||"1.25"!==Gc(1.255,2)||"1000000000000000128"!==Gc(0xde0b6b3a7640080,0)})||!m(function(){Gc({})});function Yc(e){this.tdemPlugin=!0,this.name="",this.instances=[],this.inited=!1,e.$walk=this.walk.bind(this),e.$getConfig=this.getConfig.bind(this),this.option=e,this.name=e.name}function c(e,t){var n,r,i,o,a,s,u,l;void 0===t&&(t={}),this.sdkName="tdem-web-sdk",this.sdkVersion=c.version,this.isGetSample=!1,this.isHidden=!1,this.config={version:0,delay:1e3,onError:!0,repeat:60,random:1,aid:!0,device:!0,pagePerformance:!0,webVitals:!0,speedSample:!0,onClose:!0,reportLoadPackageSpeed:!0,env:"production",url:"",reportImmediately:!0,tdemConfig:!0,hostUrl:"https://dem.rumt-zh.com",offlineUrl:"",whiteListUrl:"",pvUrl:"",speedUrl:"",customTimeUrl:"",performanceUrl:"",performanceUrlForHippy:"",webVitalsUrl:"",eventUrl:"",setDataReportUrl:""},this.isWhiteList=!1,this.lifeCycle=new cl,this.bean={},this.internalRetrySchedule=Ul,this._customPageUrl=null,this.tdemEventPipeline=Nc([(r=n=!1,i=[],this._tdemSampleGate={decide:function(e){n=!0,(r=e)&&i.forEach(function(e){var t=e.event;return(0,e.resolve)(t)}),i=[]},reDecide:function(e){return r=!(e<=0)&&(100<=e||100*Math.random()<e)},get isDecided(){return n},get isSampled(){return r}},function(e,t){n?r&&t(e):i.length<1e3&&i.push({event:e,resolve:t})}),(a=100,u=Math.max(Number(a)||1,1),l=[],function(e,t){var e=Array.isArray(e)?e:[e],n=(l.push.apply(l,e),function(){for(;0<l.length;)t(l.splice(0,u))});clearTimeout(s),u<=l.length?n():s=setTimeout(function(){0<l.length&&n()},5e3)}),function(e,t){try{var n,r=JSON.parse(JSON.stringify(e)),i=(o.lifeCycle.emit("beforeReport",r),o.config.beforeReport);"function"==typeof i?0<(n=e.filter(function(e){return!1!==i(e)})).length&&t(n):t(e)}catch(P){t(e)}},Lc(o=this)]),this.timeMap={},this.failRequestCount=0,this.internalTransport=t.transport,this.internalRetrySchedule=t.retrySchedule||Ul,c.instances.push(this)}O({target:"Number",proto:!0,forced:t},{toFixed:function(e){var t,n,r,i=oc(this),e=se(e),o=[0,0,0,0,0,0],a="",s="0";if(e<0||20<e)throw new Bc("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||1e21<=i)return Wc(i);if(i<0&&(a="-",i=-i),1e-21<i)if(r=(t=function(){for(var e=0,t=i*Jc(2,69,1);4096<=t;)e+=12,t/=4096;for(;2<=t;)e+=1,t/=2;return e}()-69)<0?i*Jc(2,-t,1):i/Jc(2,t,1),r*=4503599627370496,0<(t=52-t)){for($c(o,0,r),n=e;7<=n;)$c(o,1e7,0),n-=7;for($c(o,Jc(10,n,1),0),n=t-1;23<=n;)Zc(o,1<<23),n-=23;Zc(o,1<<n),$c(o,1,1),Zc(o,2),s=Kc(o)}else $c(o,0,r),$c(o,1<<-t,0),s=Kc(o)+qc("0",e);return 0<e?a+((r=s.length)<=e?"0."+qc("0",e-r)+s:Vc(s,0,r-e)+"."+Vc(s,r-e)):a+s}});var Xc=function(t){return"string"!=typeof t||!t||$u.some(function(e){return-1<t.indexOf(e)})||Ju.some(function(e){return-1<t.indexOf(e)})},Qc=function(){return"undefined"!=typeof window.performance&&"function"==typeof performance.getEntriesByType&&"function"==typeof performance.now};function ef(e){return e=e.sessionManager,[(null==(e=null==(t=null==e?void 0:e.getSession)?void 0:t.call(e))?void 0:e.replayId)||"",null==e||e.id,!e||e.sampled,null==e||e.sampled][0];var t}var tf,nf,rf=new r({name:"assets"}),gt=rf=new r({name:"assets",collectCur:0,collectEntryType:"resource",ASSETS_INITIATOR_TYPE:["img","css","script","link","audio","video"],getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},onNewTdem:function(e){var t=this;Qc()&&(setTimeout(function(){t.collectSuccessLog(e),t.collectFailLog(e)},5e3),performance.onresourcetimingbufferfull=function(){"function"==typeof performance.clearResourceTimings&&(t.collectCur=0,performance.clearResourceTimings())})},processLog:function(e,t){var n=t.duration||0,r=t.transferSize||0,n={event_id:Fl(),event_type:p.RESOURCE_LOAD,event_category:Nl.NETWORK,timestamp:Date.now(),page_url:t.from||window.location.href,data:{url:t.url,resource_type:t.type||"static",measurements:{duration:n,dns_time:t.domainLookup,tcp_time:t.connectTime,transfer_size:0<r?r:undefined},replay_id:ef(e),tags:{environment:e.config.env||"production",is_https:t.isHttps?"true":"false"},event_properties:{is_cached:String(0===r),protocol:t.nextHopProtocol||"",http_status:String(t.status||0)}}};null!=(r=e.reportTDEMEvent)&&r.call(e,n)},publish:function(t,n){var r=this;this.$walk(function(e){e===n&&(Array.isArray(t)?t.forEach(r.processLog):r.processLog(n,t))})},publishMany:function(e,t){for(var n=t.config,r=this.getFromParam(t),i=0,o=e.length;i<o;i++){var a=e[i];-1===this.ASSETS_INITIATOR_TYPE.indexOf(a.initiatorType)||Ll(a.name,n.hostUrl)||this.publish(this.generateLog(a,n,r),t)}},collectSuccessLog:function(n){var e,t,r=this;"function"==typeof window.PerformanceObserver?(this.publishMany(performance.getEntriesByType(this.collectEntryType),n),(e=new window.PerformanceObserver(function(e){r.publishMany(e.getEntries(),n)})).observe({entryTypes:[this.collectEntryType]}),n.lifeCycle.on("destroy",function(){0===rf.countInstance()&&e.disconnect()})):(t=setInterval(function(){var e=performance.getEntriesByType(r.collectEntryType),t=e.slice(r.collectCur);r.collectCur=e.length,r.publishMany(t,n)},3e3),n.lifeCycle.on("destroy",function(){0===rf.countInstance()&&clearInterval(t)}))},collectFailLog:function(i){var o=this,a=i.config,e=function(e){var t,n,r;e&&(e=e.target||e.srcElement,!(t=(null==e?void 0:e.src)||(null==e?void 0:e.href))||"string"!=typeof t||-1<window.location.href.indexOf(t)||(e="function"==typeof(null==(e=a.api)?void 0:e.resourceTypeHandler)?null==e?void 0:e.resourceTypeHandler(t):"",r=performance.getEntriesByType(o.collectEntryType).find(function(e){return e.name===t}),Ll(t,a.hostUrl))||(n=o.getFromParam(i),r={url:yl(t),status:400,duration:Number(((null==r?void 0:r.duration)||0).toFixed(2)),method:"get",type:e||"static",isHttps:wl(t),urlQuery:vl(t,!0),nextHopProtocol:"",domainLookup:0,connectTime:0,from:n},o.publish(r,i)))};window.document.addEventListener("error",e,!0),i.lifeCycle.on("destroy",function(){0===rf.countInstance()&&window.document.removeEventListener("error",e,!0)})},generateLog:function(e,t,n){var t="function"==typeof(null==(r=t.api)?void 0:r.resourceTypeHandler)?null==(r=t.api)?void 0:r.resourceTypeHandler(e.name):"",r=e.transferSize;return{url:yl(e.name),method:"get",duration:Number(e.duration.toFixed(2)),status:200,type:t||"static",isHttps:wl(e.name),nextHopProtocol:e.nextHopProtocol||"",urlQuery:vl(e.name,!0),domainLookup:ml(e.domainLookupEnd-e.domainLookupStart),connectTime:ml(e.connectEnd-e.connectStart),transferSize:0<r?r:-1,from:n}},collectNotReportedLog:function(e){var t,n;Qc()&&(t=(n=performance.getEntriesByType(this.collectEntryType)).length,"function"!=typeof window.PerformanceObserver)&&this.collectCur!==t&&(n=n.slice(this.collectCur),this.collectCur=t,this.publishMany(n,e))},destroy:function(){this.option.publish=function(){}}}),t=/ipad|iphone|ipod/i.test(Rn)&&/applewebkit/i.test(Rn),of=R.setImmediate,af=R.clearImmediate,sf=R.process,uf=R.Dispatch,lf=R.Function,o=R.MessageChannel,cf=R.String,ff=0,df={},hf=(m(function(){tf=R.location}),function(e){var t;T(df,e)&&(t=df[e],delete df[e],t())}),pf=function(e){return function(){hf(e)}},gf=function(e){hf(e.data)},mf=function(e){R.postMessage(cf(e),tf.protocol+"//"+tf.host)},o=(of&&af||(of=function(e){$l(arguments.length,1);var t=_(e)?e:lf(e),n=Pn(arguments,1);return df[++ff]=function(){Oe(t,undefined,n)},nf(ff),ff},af=function(e){delete df[e]},Hl?nf=function(e){sf.nextTick(pf(e))}:uf&&uf.now?nf=function(e){uf.now(pf(e))}:o&&!t?(yf=(o=new o).port2,o.port1.onmessage=gf,nf=zr(yf.postMessage,yf)):R.addEventListener&&_(R.postMessage)&&!R.importScripts&&tf&&"file:"!==tf.protocol&&!m(mf)?(nf=mf,R.addEventListener("message",gf,!1)):nf="onreadystatechange"in ge("script")?function(e){ar.appendChild(ge("script")).onreadystatechange=function(){ar.removeChild(this),hf(e)}}:function(e){setTimeout(pf(e),0)}),{set:of,clear:af}),vf=Object.getOwnPropertyDescriptor,yf=function(e){var t;return d?(t=vf(R,e))&&t.value:R[e]},mf=function(){this.head=null,this.tail=null};mf.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var wf,bf,kf,Sf,_f,Ef,Cf=mf,gf=/ipad|iphone|ipod/i.test(Rn)&&"undefined"!=typeof Pebble,of=/web0s(?!.*chrome)/i.test(Rn),Of=o.set,af=R.MutationObserver||R.WebKitMutationObserver,mf=R.document,xf=R.process,Rf=R.Promise,a=yf("queueMicrotask"),If=(a||(Sf=new Cf,_f=function(){var e,t;for(Hl&&(e=xf.domain)&&e.exit();t=Sf.get();)try{t()}catch(X){throw Sf.head&&Ef(),X}e&&e.enter()},Ef=t||Hl||of||!af||!mf?!gf&&Rf&&Rf.resolve?((t=Rf.resolve(undefined)).constructor=Rf,kf=zr(t.then,t),function(){kf(_f)}):Hl?function(){xf.nextTick(_f)}:(Of=zr(Of,R),function(){Of(_f)}):(wf=!0,bf=mf.createTextNode(""),new af(_f).observe(bf,{characterData:!0}),function(){bf.data=wf=!wf}),a=function(e){Sf.head||Ef(),Sf.add(e)}),a),Tf=function(e){try{return{error:!1,value:e()}}catch(X){return{error:!0,value:X}}},Mf=R.Promise,Af=TypeError,Pf=function(e){var n,r;this.promise=new e(function(e,t){if(n!==undefined||r!==undefined)throw new Af("Bad Promise constructor");n=e,r=t}),this.resolve=Ce(n),this.reject=Ce(r)},Lf={f:function(e){return new Pf(e)}},Df=function(e,t){return E(e),x(t)&&t.constructor===e?t:((0,(e=Lf.f(e)).resolve)(t),e.promise)},Nf=Mf&&Mf.prototype,of=!!Mf&&m(function(){Nf["finally"].call({then:function(){}},function(){})});O({target:"Promise",proto:!0,real:!0,forced:of},{"finally":function(t){var n=qs(this,be("Promise")),e=_(t);return this.then(e?function(e){return Df(n,t()).then(function(){return e})}:t,e?function(e){return Df(n,t()).then(function(){throw e})}:t)}}),_(Mf)&&(gf=be("Promise").prototype["finally"],Nf["finally"]!==gf)&&xt(Nf,"finally",gf,{unsafe:!0}),Mf&&Mf.prototype;var Uf,Ff,jf,zf,Bf=Ze("species"),Wf=!1,Hf=_(R.PromiseRejectionEvent),Rf={CONSTRUCTOR:ps("Promise",function(){var e=$e(Mf),t=e!==String(Mf);if(!t&&66===Tn)return!0;if(!Tn||Tn<51||!/native code/.test(e)){var e=new Mf(function(e){e(1)}),n=function(e){e(function(){},function(){})};if((e.constructor={})[Bf]=n,!(Wf=e.then(function(){})instanceof n))return!0}return!(t||"BROWSER"!=Wl&&"DENO"!=Wl||Hf)}),REJECTION_EVENT:Hf,SUBCLASSING:Wf},qf=o.set,t=Rf.CONSTRUCTOR,Vf=Rf.REJECTION_EVENT,mf=Rf.SUBCLASSING,Gf=bt.getterFor("Promise"),Jf=bt.set,af=Mf&&Mf.prototype,$f=Mf,Zf=af,Kf=R.TypeError,Yf=R.document,Xf=R.process,Qf=Lf.f,ed=Qf,td=!!(Yf&&Yf.createEvent&&R.dispatchEvent),nd=function(e){var t;return!(!x(e)||!_(t=e.then))&&t},rd=function(e,t){var n,r,i,o=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,l=e.reject,c=e.domain;try{s?(a||(2===t.rejection&&ud(t),t.rejection=1),!0===s?n=o:(c&&c.enter(),n=s(o),c&&(c.exit(),i=!0)),n===e.promise?l(new Kf("Promise-chain cycle")):(r=nd(n))?I(r,n,u,l):u(n)):l(o)}catch(X){c&&!i&&c.exit(),l(X)}},id=function(n,r){n.notified||(n.notified=!0,If(function(){for(var e,t=n.reactions;e=t.get();)rd(e,n);n.notified=!1,r&&!n.rejection&&ad(n)}))},od=function(e,t,n){var r;td?((r=Yf.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),R.dispatchEvent(r)):r={promise:t,reason:n},!Vf&&(t=R["on"+e])?t(r):"unhandledrejection"===e&&function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(X){}}("Unhandled promise rejection",n)},ad=function(r){I(qf,R,function(){var e,t=r.facade,n=r.value;if(sd(r)&&(e=Tf(function(){Hl?Xf.emit("unhandledRejection",n,t):od("unhandledrejection",t,n)}),r.rejection=Hl||sd(r)?2:1,e.error))throw e.value})},sd=function(e){return 1!==e.rejection&&!e.parent},ud=function(t){I(qf,R,function(){var e=t.facade;Hl?Xf.emit("rejectionHandled",e):od("rejectionhandled",e,t.value)})},ld=function(t,n,r){return function(e){t(n,e,r)}},cd=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=2,id(e,!0))},fd=function(t,n,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===n)throw new Kf("Promise can't be resolved itself");var r=nd(n);r?If(function(){var e={done:!1};try{I(r,n,ld(fd,e,t),ld(cd,e,t))}catch(X){cd(e,X,t)}}):(t.value=n,t.state=1,id(t,!1))}catch(X){cd({done:!1},X,t)}}};if(t&&(Zf=($f=function(e){er(this,Zf),Ce(e),I(Uf,this);var t=Gf(this);try{e(ld(fd,t),ld(cd,t))}catch(X){cd(t,X)}}).prototype,(Uf=function(e){Jf(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Cf,rejection:!1,state:0,value:null})}).prototype=xt(Zf,"then",function(e,t){var n=Gf(this),r=Qf(qs(this,$f));return n.parent=!0,r.ok=!_(e)||e,r.fail=_(t)&&t,r.domain=Hl?Xf.domain:undefined,0===n.state?n.reactions.add(r):If(function(){rd(r,n)}),r.promise}),Ff=function(){var e=new Uf,t=Gf(e);this.promise=e,this.resolve=ld(fd,t),this.reject=ld(cd,t)},Lf.f=Qf=function(e){return e===$f||e===jf?new Ff:ed(e)},_(Mf))&&af!==Object.prototype){zf=af.then,mf||xt(af,"then",function(e,t){var n=this;return new $f(function(e,t){I(zf,n,e,t)}).then(e,t)},{unsafe:!0});try{delete af.constructor}catch(X){}kr&&kr(af,Zf)}O({global:!0,constructor:!0,wrap:!0,forced:t},{Promise:$f}),jf=di.Promise,hr($f,"Promise",!1),ga("Promise");var dd,hd,pd,a=Rf.CONSTRUCTOR||!su(function(e){Mf.all(e).then(undefined,function(){})}),of=(O({target:"Promise",stat:!0,forced:a},{all:function(e){var s=this,t=Lf.f(s),u=t.resolve,l=t.reject,n=Tf(function(){var r=Ce(s.resolve),i=[],o=0,a=1;Xr(e,function(e){var t=o++,n=!1;a++,I(r,s,e).then(function(e){n||(n=!0,i[t]=e,--a)||u(i)},l)}),--a||u(i)});return n.error&&l(n.value),t.promise}}),Rf.CONSTRUCTOR),gf=Mf&&Mf.prototype,mf=(O({target:"Promise",proto:!0,forced:of,real:!0},{"catch":function(e){return this.then(undefined,e)}}),_(Mf)&&(o=be("Promise").prototype["catch"],gf["catch"]!==o)&&xt(gf,"catch",o,{unsafe:!0}),O({target:"Promise",stat:!0,forced:a},{race:function(e){var n=this,r=Lf.f(n),i=r.reject,t=Tf(function(){var t=Ce(n.resolve);Xr(e,function(e){I(t,n,e).then(r.resolve,i)})});return t.error&&i(t.value),r.promise}}),O({target:"Promise",stat:!0,forced:Rf.CONSTRUCTOR},{reject:function(e){var t=Lf.f(this);return(0,t.reject)(e),t.promise}}),Rf.CONSTRUCTOR),gd=(be("Promise"),O({target:"Promise",stat:!0,forced:mf},{resolve:function(e){return Df(this,e)}}),window.navigator.userAgent.toLowerCase()),l={},md=function(e){return-1!==gd.indexOf(e)},vd=(l.macos=function(){return md("mac")},l.ios=function(){return l.iphone()||l.ipod()||l.ipad()},l.iphone=function(){return!l.windows()&&md("iphone")},l.ipod=function(){return md("ipod")},l.ipad=function(){var e="MacIntel"===navigator.platform&&1<navigator.maxTouchPoints;return md("ipad")||e},l.android=function(){return!l.windows()&&md("android")},l.androidPhone=function(){return l.android()&&md("mobile")},l.androidTablet=function(){return l.android()&&!md("mobile")},l.blackberry=function(){return md("blackberry")||md("bb10")},l.blackberryPhone=function(){return l.blackberry()&&!md("tablet")},l.blackberryTablet=function(){return l.blackberry()&&md("tablet")},l.windows=function(){return md("windows")},l.windowsPhone=function(){return l.windows()&&md("phone")},l.windowsTablet=function(){return l.windows()&&md("touch")&&!l.windowsPhone()},l.fxos=function(){return(md("(mobile")||md("(tablet"))&&md(" rv:")},l.fxosPhone=function(){return l.fxos()&&md("mobile")},l.fxosTablet=function(){return l.fxos()&&md("tablet")},l.meego=function(){return md("meego")},l.cordova=function(){return window.cordova&&"file:"===location.protocol},l.nodeWebkit=function(){return"object"===S(window.process)},l.mobile=function(){return l.androidPhone()||l.iphone()||l.ipod()||l.windowsPhone()||l.blackberryPhone()||l.fxosPhone()||l.meego()},l.tablet=function(){return l.ipad()||l.androidTablet()||l.blackberryTablet()||l.windowsTablet()||l.fxosTablet()},l.desktop=function(){return!l.tablet()&&!l.mobile()},l.isIE=function(){return"ActiveXObject"in window},void 0),yd=(O({target:"Object",stat:!0},{is:vd}),Object.is,yt("search",function(r,i,o){return[function(e){var t=re(this),n=x(e)?Nt(e,r):undefined;return n?I(n,e,t):new RegExp(e)[r](C(t))},function(e){var t=E(this),e=C(e),n=o(i,t,e);return n.done?n.value:(n=t.lastIndex,vd(n,0)||(t.lastIndex=0),e=Zt(t,e),vd(t.lastIndex,n)||(t.lastIndex=n),null===e?-1:e.index)}]}),Math.floor),wd=function(e,t){var n=e.length;if(n<8)for(var r,i,o=1;o<n;){for(r=e[i=o];i&&0<t(e[i-1],r);)e[i]=e[--i];i!==o++&&(e[i]=r)}else for(var a=yd(n/2),s=wd(Pn(e,0,a),t),u=wd(Pn(e,a),t),l=s.length,c=u.length,f=0,d=0;f<l||d<c;)e[f+d]=f<l&&d<c?t(s[f],u[d])<=0?s[f++]:u[d++]:f<l?s[f++]:u[d++];return e},bd=wd,af=Rn.match(/firefox\/(\d+)/i),kd=!!af&&+af[1],Sd=/MSIE|Trident/.test(Rn),t=Rn.match(/AppleWebKit\/(\d+)\./),_d=!!t&&+t[1],Ed=[],Cd=y(Ed.sort),Od=y(Ed.push),of=m(function(){Ed.sort(undefined)}),gf=m(function(){Ed.sort(null)}),o=Te("sort"),xd=!m(function(){if(Tn)return Tn<70;if(!(kd&&3<kd)){if(Sd)return!0;if(_d)return _d<603;for(var e,t,n,r="",i=65;i<76;i++){switch(e=String.fromCharCode(i),i){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Ed.push({k:e+n,v:t})}for(Ed.sort(function(e,t){return t.v-e.v}),n=0;n<Ed.length;n++)e=Ed[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),Rd=(O({target:"Array",proto:!0,forced:of||!gf||!o||!xd},{sort:function(e){e!==undefined&&Ce(e);var t=oe(this);if(xd)return e===undefined?Cd(t):Cd(t,e);for(var n,r,i=[],o=ce(t),a=0;a<o;a++)a in t&&Od(i,t[a]);for(bd(i,(r=e,function(e,t){return t===undefined?-1:e===undefined?1:r!==undefined?+r(e,t)||0:(e=C(e))===(t=C(t))?0:t<e?1:-1})),n=ce(i),a=0;a<n;)t[a]=i[a++];for(;a<o;)ba(t,a++);return t}}),RangeError),Id=String.fromCharCode,a=String.fromCodePoint,Td=y([].join),Rf=!!a&&1!==a.length,mf=(O({target:"String",stat:!0,arity:1,forced:Rf},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,i=0;i<r;){if(gn(t=+arguments[i],1114111)!==t)throw new Rd(t+" is not a valid code point");n[i++]=t<65536?Id(t):Id(55296+((t-=65536)>>10),t%1024+56320)}return Td(n,"")}}),Ze("iterator")),Md=bt.set,Ad=bt.getterFor("URLSearchParams"),Pd=bt.getterFor("URLSearchParamsIterator"),Ld=yf("fetch"),Dd=yf("Request"),Nd=yf("Headers"),Ud=Dd&&Dd.prototype,yt=Nd&&Nd.prototype,Fd=R.TypeError,jd=R.encodeURIComponent,zd=String.fromCharCode,Bd=be("String","fromCodePoint"),Wd=parseInt,Hd=y("".charAt),qd=y([].join),Vd=y([].push),Gd=y("".replace),Jd=y([].shift),$d=y([].splice),Zd=y("".split),Kd=y("".slice),Yd=y(/./.exec),Xd=/\+/g,Qd=/^[0-9a-f]+$/i,eh=function(e,t){e=Kd(e,t,t+2);return Yd(Qd,e)?Wd(e,16):NaN},th=function(e){for(var t=(e=Gd(e,Xd," ")).length,n="",r=0;r<t;){var i=Hd(e,r);if("%"===i){if("%"===Hd(e,r+1)||t<r+3){n+="%",r++;continue}var o=eh(e,r+1);if(o!=o){n+=i,r++;continue}r+=2;var a=function(e){for(var t=0,n=128;0<n&&0!=(e&n);n>>=1)t++;return t}(o);if(0===a)i=zd(o);else{if(1===a||4<a){n+="�",r++;continue}for(var s=[o],u=1;u<a&&!(++r+3>t||"%"!==Hd(e,r));){var l=eh(e,r+1);if(l!=l||191<l||l<128)break;if(1===u){if(224===o&&l<160)break;if(237===o&&159<l)break;if(240===o&&l<144)break;if(244===o&&143<l)break}Vd(s,l),r+=2,u++}if(s.length!==a){n+="�";continue}var c=function(e){var t=null,n=e.length;switch(n){case 1:t=e[0];break;case 2:t=(31&e[0])<<6|63&e[1];break;case 3:t=(15&e[0])<<12|(63&e[1])<<6|63&e[2];break;case 4:t=(7&e[0])<<18|(63&e[1])<<12|(63&e[2])<<6|63&e[3]}return null===t||1114111<t||55296<=t&&t<=57343||t<(3<n?65536:2<n?2048:1<n?128:0)?null:t}(s);if(null===c){for(var f=0;f<a;f++)n+="�";r++;continue}i=Bd(c)}}n+=i,r++}return n},nh=/[!'()~]|%20/g,rh={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ih=function(e){return rh[e]},oh=function(e){return Gd(jd(e),nh,ih)},ah=br(function(e,t){Md(this,{type:"URLSearchParamsIterator",target:Ad(e).entries,index:0,kind:t})},"URLSearchParams",function(){var e=Pd(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Rr(undefined,!0);var r=t[n];switch(e.kind){case"keys":return Rr(r.key,!1);case"values":return Rr(r.value,!1)}return Rr([r.key,r.value],!1)},!0),sh=function(e){this.entries=[],this.url=null,e!==undefined&&(x(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Hd(e,0)?Kd(e,1):e:C(e)))},af=(sh.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,i,o,a,s=this.entries,u=Vr(e);if(u)for(n=(t=Jr(e,u)).next;!(r=I(n,t)).done;){if(i=(r=Jr(E(r.value))).next,(o=I(i,r)).done||(a=I(i,r)).done||!I(i,r).done)throw new Fd("Expected sequence with length 2");Vd(s,{key:C(o.value),value:C(a.value)})}else for(var l in e)T(e,l)&&Vd(s,{key:l,value:C(e[l])})},parseQuery:function(e){if(e)for(var t,n=this.entries,r=Zd(e,"&"),i=0;i<r.length;)(t=r[i++]).length&&(t=Zd(t,"="),Vd(n,{key:th(Jd(t)),value:th(qd(t,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Vd(n,oh(e.key)+"="+oh(e.value));return qd(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}},function(){er(this,uh);var e=0<arguments.length?arguments[0]:undefined,e=Md(this,new sh(e));d||(this.size=e.entries.length)}),uh=af.prototype,of=(Uo(uh,{append:function(e,t){var n=Ad(this);$l(arguments.length,2),Vd(n.entries,{key:C(e),value:C(t)}),d||this.size++,n.updateURL()},"delete":function(e){for(var t=Ad(this),n=$l(arguments.length,1),r=t.entries,i=C(e),e=n<2?undefined:arguments[1],o=e===undefined?e:C(e),a=0;a<r.length;){var s=r[a];s.key!==i||o!==undefined&&s.value!==o?a++:$d(r,a,1)}d||(this.size=r.length),t.updateURL()},get:function(e){var t=Ad(this).entries;$l(arguments.length,1);for(var n=C(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){var t=Ad(this).entries;$l(arguments.length,1);for(var n=C(e),r=[],i=0;i<t.length;i++)t[i].key===n&&Vd(r,t[i].value);return r},has:function(e){for(var t=Ad(this).entries,n=$l(arguments.length,1),r=C(e),e=n<2?undefined:arguments[1],i=e===undefined?e:C(e),o=0;o<t.length;){var a=t[o++];if(a.key===r&&(i===undefined||a.value===i))return!0}return!1},set:function(e,t){var n=Ad(this);$l(arguments.length,2);for(var r,i=n.entries,o=!1,a=C(e),s=C(t),u=0;u<i.length;u++)(r=i[u]).key===a&&(o?$d(i,u--,1):(o=!0,r.value=s));o||Vd(i,{key:a,value:s}),d||(this.size=i.length),n.updateURL()},sort:function(){var e=Ad(this);bd(e.entries,function(e,t){return e.key>t.key?1:-1}),e.updateURL()},forEach:function(e){for(var t,n=Ad(this).entries,r=zr(e,1<arguments.length?arguments[1]:undefined),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new ah(this,"keys")},values:function(){return new ah(this,"values")},entries:function(){return new ah(this,"entries")}},{enumerable:!0}),xt(uh,mf,uh.entries,{name:"entries"}),xt(uh,"toString",function(){return Ad(this).serialize()},{enumerable:!0}),d&&St(uh,"size",{get:function(){return Ad(this).entries.length},configurable:!0,enumerable:!0}),hr(af,"URLSearchParams"),O({global:!0,constructor:!0,forced:!0},{URLSearchParams:af}),_(Nd)&&(dd=y(yt.has),hd=y(yt.set),pd=function(e){if(x(e)){var t,n=e.body;if("URLSearchParams"===Qe(n))return t=e.headers?new Nd(e.headers):new Nd,dd(t,"content-type")||hd(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),rr(e,{body:at(0,C(n)),headers:at(0,t)})}return e},_(Ld)&&O({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ld(e,1<arguments.length?pd(arguments[1]):{})}}),_(Dd))&&((Ud.constructor=t=function(e){return er(this,Ud),new Dd(e,1<arguments.length?pd(arguments[1]):{})}).prototype=Ud,O({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:t})),{URLSearchParams:af,getState:Ad});O({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return I(URL.prototype.toString,this)}});var lh,ch=Ze("iterator"),fh=(m(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),n=e.searchParams,t=new URLSearchParams("a=1&a=2&b=3"),r="";return e.pathname="c%20d",n.forEach(function(e,t){n["delete"]("b"),r+=t+e}),t["delete"]("a",2),t["delete"]("b",undefined),!n.size&&!d||!n.sort||"https://a/c%20d?a=1&c=3"!==e.href||"3"!==n.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!n[ch]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==r||"x"!==new URL("https://x",undefined).host}),/[^\0-\u007E]/),dh=/[.\u3002\uFF0E\uFF61]/g,hh="Overflow: input needs wider integers to process",ph=RangeError,gh=y(dh.exec),mh=Math.floor,vh=String.fromCharCode,yh=y("".charCodeAt),wh=y([].join),bh=y([].push),kh=y("".replace),Sh=y("".split),_h=y("".toLowerCase),Eh=function(e){return e+22+75*(e<26)},Ch=function(e){var t,n=[],r=(e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i,o=yh(e,n++);55296<=o&&o<=56319&&n<r?56320==(64512&(i=yh(e,n++)))?bh(t,((1023&o)<<10)+(1023&i)+65536):(bh(t,o),n--):bh(t,o)}return t}(e)).length,i=128,o=0,a=72;for(c=0;c<e.length;c++)(t=e[c])<128&&bh(n,vh(t));var s=n.length,u=s;for(s&&bh(n,"-");u<r;){for(var l=2147483647,c=0;c<e.length;c++)(t=e[c])>=i&&t<l&&(l=t);var f=u+1;if(l-i>mh((2147483647-o)/f))throw new ph(hh);for(o+=(l-i)*f,i=l,c=0;c<e.length;c++){if((t=e[c])<i&&2147483647<++o)throw new ph(hh);if(t===i){for(var d=o,h=36;;){var p=h<=a?1:a+26<=h?26:h-a;if(d<p)break;var g=d-p,m=36-p;bh(n,vh(Eh(p+g%m))),d=mh(g/m),h+=36}bh(n,vh(Eh(d))),a=function(e,t,n){var r=0;for(e=n?mh(e/700):e>>1,e+=mh(e/t);455<e;)e=mh(e/35),r+=36;return mh(r+36*e/(e+38))}(o,f,u===s),o=0,u++}}o++,i++}return wh(n,"")},Oh=_t.codeAt,xh=bt.set,Rh=bt.getterFor("URL"),Ih=of.URLSearchParams,Th=of.getState,gf=R.URL,Mh=R.TypeError,Ah=R.encodeURIComponent,Ph=R.parseInt,Lh=Math.floor,Dh=Math.pow,Nh=y("".charAt),Uh=y(/./.exec),Fh=y([].join),jh=y(1.1.toString),zh=y([].pop),Bh=y([].push),Wh=y("".replace),Hh=y([].shift),qh=y("".split),Vh=y("".slice),Gh=y("".toLowerCase),Jh=y([].unshift),$h=/[a-z]/i,Zh=/[\d+\-.a-z]/i,Kh=/\d/,Yh=/^0x/i,Xh=/^[0-7]+$/,Qh=/^\d+$/,ep=/^[\da-f]+$/i,tp=/[\0\t\n\r #%/:<>?@[\\\]^|]/,np=/[\0\t\n\r #/:<>?@[\\\]^|]/,rp=/^[\u0000-\u0020]+/,ip=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,op=/[\t\n\r]/g,ap=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)Jh(t,e%256),e=Lh(e/256);return Fh(t,".")}if("object"!=S(e))return e;for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(n<i&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return n<i?r:t}(e),n=0;n<8;n++)i&&0===e[n]||(i=i&&!1,r===n?(t+=n?":":"::",i=!0):(t+=jh(e[n],16),n<7&&(t+=":")));return"["+t+"]"},sp={},up=n({},sp,{" ":1,'"':1,"#":1,"<":1,">":1}),lp=n({},up,{"'":1}),cp=n({},sp,{" ":1,'"':1,"<":1,">":1,"`":1}),fp=n({},cp,{"#":1,"?":1,"{":1,"}":1,"^":1}),dp=n({},fp,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),hp=function(e,t){var n=Oh(e,0);return 32<=n&&n<127&&!T(t,e)?e:"'"===e&&T(t,e)?"%27":Ah(e)},pp={ftp:21,file:null,http:80,https:443,ws:80,wss:443},gp=function(e,t){return 2===e.length&&Uh($h,Nh(e,0))&&(":"===(e=Nh(e,1))||!t&&"|"===e)},mp=function(e){return 1<e.length&&gp(Vh(e,0,2))&&(2===e.length||"/"===(e=Nh(e,2))||"\\"===e||"?"===e||"#"===e)},vp={},yp={},wp={},bp={},kp={},Sp={},_p={},Ep={},Cp={},Op={},xp={},Rp={},Ip={},Tp={},Mp={},Ap={},Pp={},Lp={},Dp={},Np={},Up={},Fp=function(e,t,n){var r,i,e=C(e);if(t){if(i=this.parse(e))throw new Mh(i);this.searchParams=null}else{if(n!==undefined&&(r=new Fp(n,!0)),i=this.parse(e,null,r))throw new Mh(i);(t=Th(new Ih)).bindURL(this),this.searchParams=t}},jp=(Fp.prototype={type:"URL",parse:function(e,t,n){var r,i,o,a,s=this,u=t||vp,l=0,c="",f=!1,d=!1,h=!1;for(e=C(e),t||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,e=Wh(e,rp,""),e=Wh(e,ip,"$1")),e=Wh(e,op,""),r=au(e);l<=r.length;){switch(i=r[l],u){case vp:if(!i||!Uh($h,i)){if(t)return"Invalid scheme";u=wp;continue}c+=Gh(i),u=yp;break;case yp:if(i&&Uh(Zh,i))c+=Gh(i);else{if(":"!==i){if(t)return"Invalid scheme";c="",u=wp,l=0;continue}if(t&&(s.isSpecial()!==T(pp,c)||"file"===c&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&""===s.host))return;if(s.scheme=c,t)return void(s.isSpecial()&&pp[s.scheme]===s.port&&(s.port=null));c="","file"===s.scheme?u=Tp:s.isSpecial()&&n&&n.scheme===s.scheme?u=bp:s.isSpecial()?u=Ep:"/"===r[l+1]?(u=kp,l++):(s.cannotBeABaseURL=!0,Bh(s.path,""),u=Dp)}break;case wp:if(!n||n.cannotBeABaseURL&&"#"!==i)return"Invalid scheme";if(n.cannotBeABaseURL&&"#"===i){s.scheme=n.scheme,s.path=Pn(n.path),s.query=n.query,s.fragment="",s.cannotBeABaseURL=!0,u=Up;break}u="file"===n.scheme?Tp:Sp;continue;case bp:if("/"!==i||"/"!==r[l+1]){u=Sp;continue}u=Cp,l++;break;case kp:if("/"===i){u=Op;break}u=Lp;continue;case Sp:if(s.scheme=n.scheme,i===lh)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Pn(n.path),s.query=n.query;else if("/"===i||"\\"===i&&s.isSpecial())u=_p;else if("?"===i)s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Pn(n.path),s.query="",u=Np;else{if("#"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Pn(n.path),s.path.length&&s.path.length--,u=Lp;continue}s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,s.path=Pn(n.path),s.query=n.query,s.fragment="",u=Up}break;case _p:if(!s.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){s.username=n.username,s.password=n.password,s.host=n.host,s.port=n.port,u=Lp;continue}u=Op}else u=Cp;break;case Ep:if(u=Cp,"/"!==i||"/"!==r[l+1])continue;l++;break;case Cp:if("/"===i||"\\"===i)break;u=Op;continue;case Op:if("@"===i){f&&(c="%40"+c);for(var f=!0,p=au(c),g=0;g<p.length;g++){var m=p[g];":"!==m||h?(m=hp(m,dp),h?s.password+=m:s.username+=m):h=!0}c=""}else if(i===lh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(f&&""===c)return"Invalid authority";l-=au(c).length+1,c="",u=xp}else c+=i;break;case xp:case Rp:if(t&&"file"===s.scheme){u=Ap;continue}if(":"!==i||d){if(i===lh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()){if(s.isSpecial()&&""===c)return"Invalid host";if(t&&""===c&&(s.includesCredentials()||null!==s.port))return;if(o=s.parseHost(c))return o;if(c="",u=Pp,t)return;continue}"["===i?d=!0:"]"===i&&(d=!1),c+=i}else{if(""===c)return"Invalid host";if(t===Rp)return;if(o=s.parseHost(c))return o;c="",u=Ip}break;case Ip:if(!Uh(Kh,i)){if(i===lh||"/"===i||"?"===i||"#"===i||"\\"===i&&s.isSpecial()||t){if(""!==c){var v=Ph(c,10);if(65535<v)return"Invalid port";s.port=s.isSpecial()&&v===pp[s.scheme]?null:v,c=""}if(t)return;u=Pp;continue}return"Invalid port"}c+=i;break;case Tp:if(s.scheme="file",s.host="","/"===i||"\\"===i)u=Mp;else{if(!n||"file"!==n.scheme){u=Lp;continue}switch(i){case lh:s.host=n.host,s.path=Pn(n.path),s.query=n.query;break;case"?":s.host=n.host,s.path=Pn(n.path),s.query="",u=Np;break;case"#":s.host=n.host,s.path=Pn(n.path),s.query=n.query,s.fragment="",u=Up;break;default:s.host=n.host,mp(Fh(Pn(r,l),""))||(s.path=Pn(n.path),s.shortenPath()),u=Lp;continue}}break;case Mp:if("/"===i||"\\"===i){u=Ap;break}n&&"file"===n.scheme&&(s.host=n.host,!mp(Fh(Pn(r,l),"")))&&gp(n.path[0],!0)&&Bh(s.path,n.path[0]),u=Lp;continue;case Ap:if(i===lh||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&gp(c))u=Lp;else{if(""===c){if(s.host="",t)return}else{if(o=s.parseHost(c))return o;if("localhost"===s.host&&(s.host=""),t)return;c=""}u=Pp}continue}c+=i;break;case Pp:if(s.isSpecial()){if(u=Lp,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==lh&&(u=Lp,"/"!==i))continue}else s.fragment="",u=Up;else s.query="",u=Np;break;case Lp:if(i===lh||"/"===i||"\\"===i&&s.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(v=Gh(c))||"%2e."===v||".%2e"===v||"%2e%2e"===v?(s.shortenPath(),"/"===i||"\\"===i&&s.isSpecial()||Bh(s.path,"")):"."===(a=c)||"%2e"===Gh(a)?"/"===i||"\\"===i&&s.isSpecial()||Bh(s.path,""):("file"===s.scheme&&!s.path.length&&gp(c)&&(null!==s.host&&""!==s.host&&(s.host=""),c=Nh(c,0)+":"),Bh(s.path,c)),c="","file"===s.scheme&&(i===lh||"?"===i||"#"===i))for(;1<s.path.length&&""===s.path[0];)Hh(s.path);"?"===i?(s.query="",u=Np):"#"===i&&(s.fragment="",u=Up)}else c+=hp(i,fp);break;case Dp:"?"===i?(s.query="",u=Np):"#"===i?(s.fragment="",u=Up):i!==lh&&(s.path[0]+=hp(i,sp));break;case Np:t||"#"!==i?i!==lh&&(s.query+=hp(i,s.isSpecial()?lp:up)):(s.fragment="",u=Up);break;case Up:i!==lh&&(s.fragment+=hp(i,cp))}l++}},parseHost:function(u){var e,t,n;if("["===Nh(u,0))return"]"===Nh(u,u.length-1)&&(e=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,f=0,d=function(){return Nh(e,f)};if(":"===d()){if(":"!==Nh(e,1))return;f+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=n=0;n<4&&Uh(ep,d());)t=16*t+Ph(d(),16),f++,n++;if("."===d()){if(0===n)return;if(f-=n,6<l)return;for(r=0;d();){if(i=null,0<r){if(!("."===d()&&r<4))return;f++}if(!Uh(Kh,d()))return;for(;Uh(Kh,d());){if(o=Ph(d(),10),null===i)i=o;else{if(0===i)return;i=10*i+o}if(255<i)return;f++}u[l]=256*u[l]+i,2!=++r&&4!==r||l++}if(4!==r)return;break}if(":"===d()){if(f++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;f++,c=++l}}if(null!==c)for(a=l-c,l=7;0!==l&&0<a;)s=u[l],u[l--]=u[c+a-1],u[c+--a]=s;else if(8!==l)return;return u}(Vh(u,1,-1)))?void(this.host=e):"Invalid host";if(this.isSpecial()){if(u=function(){for(var e,t=[],n=Sh(kh(_h(u),dh,"."),"."),r=0;r<n.length;r++)e=n[r],bh(t,gh(fh,e)?"xn--"+Ch(e):e);return wh(t,".")}(),Uh(tp,u))return"Invalid host";if(function(){var e=qh(u,".");if(""===e[e.length-1]){if(1===e.length)return;e.length--}return Uh(Qh,e=e[e.length-1])||Uh(Yh,e)&&(""===(e=Vh(e,2))||Uh(ep,e))}()){if(null===(e=function(){var e,t,n,r,i,o,a,s=qh(u,".");if(s.length&&""===s[s.length-1]&&s.length--,4<(e=s.length))return null;for(t=[],n=0;n<e;n++){if(""===(r=s[n]))return null;if(i=10,1<r.length&&"0"===Nh(r,0)&&(i=Uh(Yh,r)?16:8,r=Vh(r,8===i?1:2)),""===r)o=0;else{if(!Uh(10===i?Qh:8===i?Xh:ep,r))return null;o=Ph(r,i)}Bh(t,o)}for(n=0;n<e;n++)if(o=t[n],n===e-1){if(o>=Dh(256,5-e))return null}else if(255<o)return null;for(a=zh(t),n=0;n<t.length;n++)a+=t[n]*Dh(256,3-n);return a}()))return"Invalid host";this.host=e}else this.host=u}else{if(Uh(np,u))return"Invalid host";for(e="",t=au(u),n=0;n<t.length;n++)e+=hp(t[n],sp);this.host=e}},cannotHaveUsernamePasswordPort:function(){return null===this.host||""===this.host||this.cannotBeABaseURL||"file"===this.scheme},includesCredentials:function(){return""!==this.username||""!==this.password},isSpecial:function(){return T(pp,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"===this.scheme&&1===t&&gp(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,l=t+":";return null!==i?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=ap(i),null!==o&&(l+=":"+o)):"file"===t&&(l+="//"),null===i&&!e.cannotBeABaseURL&&1<a.length&&""===a[0]&&(l+="/."),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Fh(a,"/"):"",null!==s&&(l+="?"+s),null!==u&&(l+="#"+u),l},setHref:function(e){e=this.parse(e);if(e)throw new Mh(e);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"===e)try{return new jp(this.path[0]).origin}catch(X){return"null"}return"file"!==e&&this.isSpecial()?e+"://"+ap(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(C(e)+":",vp)},getUsername:function(){return this.username},setUsername:function(e){var t=au(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=hp(t[n],dp)}},getPassword:function(){return this.password},setPassword:function(e){var t=au(C(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=hp(t[n],dp)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ap(e):ap(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,xp)},getHostname:function(){var e=this.host;return null===e?"":ap(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Rp)},getPort:function(){var e=this.port;return null===e?"":C(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""===(e=C(e))?this.port=null:this.parse(e,Ip))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Fh(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Pp))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""===(e=C(e))?this.query=null:("?"===Nh(e,0)&&(e=Vh(e,1)),this.query="",this.parse(e,Np)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!==(e=C(e))?("#"===Nh(e,0)&&(e=Vh(e,1)),this.fragment="",this.parse(e,Up)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}},function(e){var t=er(this,zp),n=1<$l(arguments.length,1)?arguments[1]:undefined,e=xh(t,new Fp(e,!1,n));d||(t.href=e.serialize(),t.origin=e.getOrigin(),t.protocol=e.getProtocol(),t.username=e.getUsername(),t.password=e.getPassword(),t.host=e.getHost(),t.hostname=e.getHostname(),t.port=e.getPort(),t.pathname=e.getPathname(),t.search=e.getSearch(),t.searchParams=e.getSearchParams(),t.hash=e.getHash())}),zp=jp.prototype,o=function(e,t){return{get:function(){return Rh(this)[e]()},set:t&&function(e){return Rh(this)[t](e)},configurable:!0,enumerable:!0}};d&&(St(zp,"href",o("serialize","setHref")),St(zp,"origin",o("getOrigin")),St(zp,"protocol",o("getProtocol","setProtocol")),St(zp,"username",o("getUsername","setUsername")),St(zp,"password",o("getPassword","setPassword")),St(zp,"host",o("getHost","setHost")),St(zp,"hostname",o("getHostname","setHostname")),St(zp,"port",o("getPort","setPort")),St(zp,"pathname",o("getPathname","setPathname")),St(zp,"search",o("getSearch","setSearch")),St(zp,"searchParams",o("getSearchParams")),St(zp,"hash",o("getHash","setHash"))),xt(zp,"toJSON",function(){return Rh(this).serialize()},{enumerable:!0}),xt(zp,"toString",function(){return Rh(this).serialize()},{enumerable:!0}),gf&&(a=gf.createObjectURL,Rf=gf.revokeObjectURL,a&&xt(jp,"createObjectURL",zr(a,gf)),Rf)&&xt(jp,"revokeObjectURL",zr(Rf,gf)),hr(jp,"URL"),O({global:!0,constructor:!0,forced:!0,sham:!d},{URL:jp});var Bp,Wp,Hp,qp,Vp,Gp,Jp,$p=function(){return{host:new URL(location.href).host,pathname:location.pathname}},Zp=!1,Kp=[],Yp=/^\/[^/]/,Xp=!1,Qp=[],eg=function(r,e,i){return null!=e&&e.length&&"object"===S(r)?e.reduce(function(e,t){var n=window.Headers&&r instanceof Headers?r.get(t):r[t];return n?e+(""===e?"":"\n\n")+i+" header "+t+": "+n:e},""):""},tg={maxRetryCount:10,retryInterval:function(e){return 1e3*(2<<e)},whenRetryEndStillFail:"discard"},ng={API_RESPONSE:"api_response",AJAX_ERROR:"ajax_error",RET_ERROR:"ret_error",SLOW_NET_REQUEST:"slow_net_request"},rg=function(e,t){return e&&-1===["null","undefined"].indexOf(e)?t+": "+e:""},ig=function(e,t,n){void 0===t&&(t="");var r,i,e="function"==typeof(null==(i=e.api)?void 0:i.resourceTypeHandler)?null==(i=e.api)?void 0:i.resourceTypeHandler(n):"";return-1===Ku.indexOf(e)&&(r=void 0===t?"":t,i=(void 0===n?"":n).split("?")[0],e=kl.test(i)||bl.some(function(e){return-1!==String(r).indexOf(e)})?"static":"fetch"),e},og=function(e,t){return e?ng.AJAX_ERROR:t?ng.RET_ERROR:ng.API_RESPONSE},ag=function(e,t,n){if(!e)return!1;t=null==t?void 0:t.api;if(null!=t&&t.isSlowApi&&"function"==typeof(null==t?void 0:t.isSlowApi))try{return t.isSlowApi(n||{duration:e})}catch(X){return console.warn("[TDEM] isSlowApi function happen error:",X,", this data will not be reported."),!1}n=null!=(n=null==t?void 0:t.slowThreshold)?n:null==t?void 0:t.apiSlowThreshold;return n&&"number"==typeof n?n<e:1e3<e},sg=function(e,t){var e=e.api;if(null!=e&&e.usePerformanceTiming&&"string"==typeof t.url){e=null==(e=performance.getEntriesByName(t.url))?void 0:e.pop();if(e)return{url:t.url,isHttps:wl(t.url),method:t.method,type:t.type,status:t.status,duration:Number(e.duration.toFixed(2)),nextHopProtocol:e.nextHopProtocol||"",domainLookup:ml(e.domainLookupEnd-e.domainLookupStart),connectTime:ml(e.connectEnd-e.connectStart)}}return{url:t.url,isHttps:wl(t.url),method:t.method,type:t.type,status:t.status,duration:Number(t.duration.toFixed(2)),nextHopProtocol:"",domainLookup:ll.number,connectTime:ll.number}},yf=(new r({name:"api"}),new r({name:"api",override:!1,onNewTdem:function(e){var t,n;this.override||(this.override=!0,null!=(n=e.config.api)&&n.injectTraceHeader&&(this.traceRequestHeader=new Tc(n.injectTraceHeader,null!=(t=null==n?void 0:n.injectTraceIgnoreUrls)?t:[],null==n?void 0:n.injectTraceUrls,null==n?void 0:n.traceFlag)),this.overrideFetch(e.config,e),this.overrideXhr(e.config,e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},overrideFetch:function(b,k){var S=this,e=b.api,e={name:this.name,traceRequestHeader:null!=e&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},then:function(d,h,p,g,m,v,y){var e,w;Ll(p,b.hostUrl)||(e=d.headers?d.headers.get("content-type"):"","fetch"===(w=ig(b,e||"",p))?d.clone().text().then(function(r){var e,i=d.status<=0||400<=d.status,t=(null==(t=b.api)?void 0:t.reqHeaders)||[],o=eg(null==g?void 0:g.headers,t,"req"),t=(null==(t=b.api)?void 0:t.resHeaders)||[],a=eg(d.headers,t,"res"),s=Ac(null==g?void 0:g.headers),t=_l(r,b.api,{url:p,ctx:d,payload:null==g?void 0:g.body}),u=t.code,l=t.isErr,t=null==(t=b.api)?void 0:t.apiDetail,c=t?El(null==g?void 0:g.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:p}):"",f=t?El(r,null==(e=b.api)?void 0:e.resBodyHandler,{url:p,ctx:d}):"";setTimeout(function(){var e=sg(b,{url:p,duration:h,type:w,status:d.status||0,method:(null==g?void 0:g.method)||"get"}),t=[i?"FETCH_ERROR: "+r:"","fetch req url: "+p,"res status: "+(e.status||0),"res duration: "+e.duration+"ms","res startTime: "+m,o,a,"req method: "+(e.method||"GET"),"res retcode: "+u,rg(c,"req param"),rg(f,"res data")].filter(function(e){return e}).join("\n\n"),t=(e.payload=null==g?void 0:g.body,e.ret=u,e.isErr=+l,e.from=v||S.getFromParam(k),{msg:t,code:u,trace:s,errorMsg:"",from:v||S.getFromParam(k),originFrom:y,level:ng.API_RESPONSE}),n=ag(null==e?void 0:e.duration,b,e);t.level=n?ng.SLOW_NET_REQUEST:og(i,l),(n||t.level!==ng.API_RESPONSE||k.isWhiteList||null!=(n=null==(n=k.config)?void 0:n.api)&&n.reportRequest)&&S.publishNormalLog(t,k),S.publishSpeed(e,k)},0)})["catch"](function(e){console.info("ignore something error when process resp "+e)}):setTimeout(function(){var e=sg(b,{url:p,duration:h,type:w,status:d.status||0,method:(null==g?void 0:g.method)||"get"});e.type="static",e.urlQuery=vl(p,!0),e.from=v||S.getFromParam(k),S.publishSpeed(e,k)},0))},"catch":function(t,n,r,i,o,a,s){var u,e,l,c,f;throw Ll(r,b.hostUrl)||(u=ig(b,"",r),e=(null==(e=b.api)?void 0:e.reqHeaders)||[],l=eg(null==i?void 0:i.headers,e,"req"),c=Ac(null==i?void 0:i.headers),f=null!=(e=b.api)&&e.apiDetail?El(null==i?void 0:i.body,null==(e=b.api)?void 0:e.reqParamHandler,{url:r}):"",setTimeout(function(){var e=sg(b,{url:r,duration:n,type:u,status:0,method:(null==i?void 0:i.method)||"get"}),e=(e.from=a||S.getFromParam(k),S.publishSpeed(e,k),"AJAX_ERROR: "+t+"\n \nreq url: "+r+"\n \nres status: 0\n \nres duration: "+e.duration+"ms\n \nreq method: "+((null==i?void 0:i.method)||"get")+"\n \nreq param: "+f+"\n \nres startTime: "+o+"\n \n"+l);S.publishNormalLog({msg:e,level:ng.AJAX_ERROR,code:-400,trace:c,errorMsg:"",from:a||S.getFromParam(k),originFrom:s},k)},0)),t}},d=(this.hackFetchOptions=e,this.hackFetchOptions),h=null==(e=b.api)?void 0:e.ignoreHackReg;if(void 0===h&&(h=/\.flv(\?|$)/i),Qp.find(function(e){return e.name===d.name}))throw new Error("name '"+d.name+"' is already in hackFetch option list");Qp.push(d),!Xp&&window.fetch&&(Xp=!0,qp=window.fetch,window.fetch=function(e,i){void 0===i&&(i={});var o="string"==typeof e?e:null==e?void 0:e.url;if(null!=(a=null==h?void 0:h.test)&&a.call(h,o))return qp(o,i);Yp.test(o)&&(o=""+location.origin+o);var t,n,r,a=(d||{}).traceRequestHeader;a&&(t=void 0===(t=(i||{}).headers)?{}:t,n=(r=$p()).host,r=(n=a.generate(o,t,{host:n,pathname:r.pathname})||{}).name,a=n.value)&&r&&(i.headers=Object.assign(t,((n={})[r]=a,n)));for(var s=new Map,u=window.location.href,l=0;l<Qp.length;l++){var c=Qp[l];try{"function"==typeof c.beforeFetch&&c.beforeFetch(o,i),"function"==typeof c.getCurrentFrom&&s.set(c.name,c.getCurrentFrom())}catch(Ne){}}var f=Date.now();return qp(e,i).then(function(e){for(var t=e.clone(),n=0;n<Qp.length;n++){var r=Qp[n];try{"function"==typeof r.then&&r.then(t,Date.now()-f,o,i,f,s.get(r.name),u)}catch(Ne){}}return e})["catch"](function(e){for(var t=0;t<Qp.length;t++){var n=Qp[t];try{"function"==typeof n["catch"]&&n["catch"](e,Date.now()-f,o,i,f,s.get(n.name),u)}catch(Ne){}}throw e})})},overrideXhr:function(b,k){var e,i,S=this,o={name:this.name,ignoreHackReg:null==(e=b.api)?void 0:e.ignoreHackReg,traceRequestHeader:null!=(e=b.api)&&e.injectTraceHeader?this.traceRequestHeader:null,getCurrentFrom:function(){return S.getFromParam(k)},send:function(d,h,p,g){var e,t,m=Date.now(),v=(((null==b?void 0:b.api)||{}).injectTraceHeader&&(t=(e=$p()).host,e=(t=S.traceRequestHeader.generate(d.tdemUrl,{},{host:t,pathname:e.pathname})||{}).name,t=t.value,e)&&t&&d.setRequestHeader(e,t),d.addEventListener("loadend",function(){var l,n,e,c,f=d.tdemUrl||"";Ll(f,b.hostUrl)||"abort"===d.failType||(l="",(d.failType||!d.status||400<=d.status)&&(l=d.failType||"failed"),n=Date.now()-m,e=d.getResponseHeader("content-type")||"",c=ig(b,e,f),setTimeout(function(){var r=sg(b,{url:f,duration:n,type:c,status:d.status,method:d.tdemMethod||"get"});if(r.from=p||S.getFromParam(k),"fetch"===c){var e=(null==(e=b.api)?void 0:e.reqHeaders)||[],i=eg(d.tdemXhrReqHeader,e,"req"),e=(null==(e=b.api)?void 0:e.resHeaders)||[],t=d.getAllResponseHeaders().split("\r\n").reduce(function(e,t){t=t.split(": ");return t[0]&&t[1]&&(e[t[0]]=t[1]),e},{}),o=eg(t,e,"res"),a=Ac(d.tdemXhrReqHeader),e=null==(t=b.api)?void 0:t.apiDetail,s=e?El(h,null==(t=b.api)?void 0:t.reqParamHandler,{url:f}):"",u=e?El(d.response,null==(t=b.api)?void 0:t.resBodyHandler,{url:f}):"";try{!function(e,t,n,r){var i,o,a;try{if("function"==typeof(null==t?void 0:t.retCodeHandlerAsync))return t.retCodeHandlerAsync(e,null==n?void 0:n.url,null==n?void 0:n.ctx,function(e){var t=e.code;null!=r&&r({code:void 0===t?Yu:t,isErr:e.isErr})});if("function"==typeof(null==t?void 0:t.retCodeHandler))return a=(o=t.retCodeHandler(e,null==n?void 0:n.url,null==n?void 0:n.ctx,null==n?void 0:n.payload)||{}).code,null!=r&&r({code:void 0===a?Yu:a,isErr:o.isErr});if(!(e="string"==typeof e?JSON.parse(e):e))return null!=r&&r({code:Yu,isErr:!1});"function"==typeof(null==(i=null==t?void 0:t.ret)?void 0:i.join)&&(Sl=[].concat(t.ret.map(function(e){return e.toLowerCase()})));var s=Object.getOwnPropertyNames(e).filter(function(e){return-1!==Sl.indexOf(e.toLowerCase())});if(s.length)return"未知"!==(a=e[s[0]])&&""!==a||(a=Yu),null!=r&&r({code:""+a,isErr:0!==a&&"0"!==a&&a!==Yu});null!=r&&r({code:Yu,isErr:!1})}catch(l){null!=r&&r({code:Yu,isErr:!1})}}(d.response,b.api,{url:f,ctx:d,payload:h},function(e){var t=e.code,e=e.isErr,n=[l?"AJAX_ERROR: request "+l:"","fetch req url: "+f,"res status: "+(r.status||0),"res duration: "+r.duration+"ms","res startTime: "+m,i,o,"req method: "+(r.method||"GET"),"res retcode: "+t,rg(s,"req param"),rg(u,"res data")].filter(function(e){return e}).join("\n\n");r.ret=t,r.isErr=+e,r.payload=h,ag(null==r?void 0:r.duration,b,r)?S.publishNormalLog({msg:n,level:ng.SLOW_NET_REQUEST,code:t,trace:a,errorMsg:"",from:p||S.getFromParam(k),originFrom:g},k):S.publishNormalLog({msg:n,level:og(!!l,e),code:t,trace:a,errorMsg:"",from:p||S.getFromParam(k),originFrom:g},k),S.publishSpeed(r,k)})}catch(O){r.ret=Yu,S.publishSpeed(r,k)}}else r.type="static",r.urlQuery=vl(f,!0),S.publishSpeed(r,k);d.removeEventListener("abort",v),d.removeEventListener("error",y),d.removeEventListener("timeout",w)},0))}),function(){d.failType="abort"}),y=function(){d.failType="error"},w=function(){d.failType="timeout"};d.addEventListener("abort",v),d.addEventListener("error",y),d.addEventListener("timeout",w)}};this.hackXHROptions=o,i=this.hackXHROptions,Kp.find(function(e){return e.name===i.name})||(Kp.push(i),!Zp&&window.XMLHttpRequest&&(Bp=window.XMLHttpRequest.prototype.send,Wp=window.XMLHttpRequest.prototype.open,Hp=window.XMLHttpRequest.prototype.setRequestHeader,Zp=!0,window.XMLHttpRequest.prototype.open=function(){this.tdemMethod=arguments[0];var e,t=arguments[1];if(Yp.test(t)&&(t=""+location.origin+t),this.tdemUrl=t,null==(e=null==(t=i.ignoreHackReg)?void 0:t.test)||!e.call(t,this.tdemUrl))if(this.tdemXhrStartTime=Date.now(),this.sendByTdem)l.isIE()||(this.timeout=5e3);else for(var n=0;n<Kp.length;n++){var r=Kp[n];try{"function"==typeof r.open&&r.open(this)}catch(o){}}return Wp.apply(this,arguments)},window.XMLHttpRequest.prototype.setRequestHeader=function(){var e,t,n;return null!=(n=null==(t=i.ignoreHackReg)?void 0:t.test)&&n.call(t,this.tdemUrl)?Hp.apply(this,arguments):(t=arguments[0],n=arguments[1],this.tdemXhrReqHeader=null!=(e=this.tdemXhrReqHeader)?e:{},null!=i&&i.traceRequestHeader&&-1<["traceparent","b3","sw8","sentry-trace"].indexOf(t)&&(this.tdemXhrReqHeader[t]||(arguments[1]=n),this.tdemXhrReqHeader[t])?void 0:(this.tdemXhrReqHeader[t]=arguments[1],Hp.apply(this,arguments)))},window.XMLHttpRequest.prototype.send=function(){var e,t;if(!(null!=(t=null==(e=i.ignoreHackReg)?void 0:e.test)&&t.call(e,this.tdemUrl)||this.sendByTdem))for(var n=0;n<Kp.length;n++){var r=Kp[n];try{"function"==typeof r.send&&r.send(this,arguments[0],"function"==typeof r.getCurrentFrom?r.getCurrentFrom():undefined,window.location.href)}catch(S){}}return Bp.apply(this,arguments)}))},publishSpeed:function(e){},publishNormalLog:function(e,t){var n,r,i,o,a,s,u;[ng.API_RESPONSE,ng.AJAX_ERROR,ng.RET_ERROR,ng.SLOW_NET_REQUEST].includes(e.level)&&(n=(n=null==(n=e.msg)?void 0:n.match(/(?:fetch req url|req url):\s*(.+?)(?:\n|$)/))?n[1].trim():"",r=(r=null==(r=e.msg)?void 0:r.match(/req method:\s*(.+?)(?:\n|$)/i))?r[1].trim().toUpperCase():"GET",i=(i=null==(i=e.msg)?void 0:i.match(/res status:\s*(\d+)/))?parseInt(i[1],10):0,o=(o=null==(o=e.msg)?void 0:o.match(/res duration:\s*([\d.]+)ms/))?parseFloat(o[1]):0,u=(u=null==(u=e.msg)?void 0:u.match(/=+\s*res data\s*=+\s*\n([\s\S]*?)(?:\n=+|$)/))?u[1].trim().slice(0,1e3):undefined,a={},e.trace&&(a.trace_id=e.trace),[ng.AJAX_ERROR,ng.RET_ERROR].includes(e.level)||400<=i||0===i?(s={event_id:Fl(),event_type:p.API_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},response_body:u,replay_id:ef(t),tags:0<Object.keys(a).length?a:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(u=t.reportTDEMEvent)&&u.call(t,s)):(u={event_id:Fl(),event_type:p.API_CALL,event_category:Nl.NETWORK,timestamp:Date.now(),page_url:e.from||(null==(s=t.getOriginFrom)?void 0:s.call(t))||window.location.href,data:{url:n,measurements:{duration:o},business_code:String(e.code||""),replay_id:ef(t),tags:0<Object.keys(a).length?a:undefined,event_properties:{http_method:r,http_status:String(i)}}},null!=(s=t.reportTDEMEvent)&&s.call(t,u)))},destroy:function(){var t,n,e;this.option.publishSpeed=function(){},this.option.publishNormalLog=function(){},this.option.hackXHROptions&&(n=this.option.hackXHROptions,-1!==(e=Kp.findIndex(function(e){return e.name===n.name})))&&Kp.splice(e,1),this.option.hackFetchOptions&&(t=this.option.hackFetchOptions,-1!==(e=Qp.findIndex(function(e){return e.name===t.name})))&&Qp.splice(e,1),this.option.override=!1}})),ug={},mf=new r({name:"bridge",override:!1,onNewTdem:function(e){this.override||(this.override=!0,this.overrideBridge(e))},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},publishSpeed:function(t,n){this.$walk(function(e){e===n&&e.speedLogPipeline(t)})},overrideBridge:function(l){var c=this,f=l.config,e="object"===S(f.bridge)?f.bridge:undefined,t=null==e?void 0:e.target,e=null==e?void 0:e.methods;t&&null!=e&&e.length&&e.forEach(function(e){var u=t[e];ug[e]=u,t[e]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e[0],i=e[1],n=e[2],o=e[3],a=Date.now(),s=c.getFromParam(l);u(r,i,n,function(e){var t=_l(e,f.api),n=t.code,t=t.isErr,n={url:r+"-"+i,name:r+"-"+i,duration:Date.now()-a,type:"bridge",ret:n,isErr:+t,from:s};c.publishSpeed(n,l),o(e)})}})},unHackBridge:function(e){var e="object"===S(e.config.bridge)?e.config.bridge:undefined,t=null==e?void 0:e.target;ug=(t&&Object.keys(ug).forEach(function(e){ug[e]&&(t[e]=ug[e])}),{})},destroy:function(e){this.option.publishSpeed=function(){},this.option.unHackBridge(e),this.option.override=!1}}),_t=((yt=Vp=Vp||{})[yt.unknown=100]="unknown",yt[yt.wifi=1]="wifi",yt[yt.net2g=2]="net2g",yt[yt.net3g=3]="net3g",yt[yt.net4g=4]="net4g",yt[yt.net5g=5]="net5g",yt[yt.net6g=6]="net6g",(t=Gp=Gp||{})[t.android=1]="android",t[t.ios=2]="ios",t[t.windows=3]="windows",t[t.macos=4]="macos",t[t.linux=5]="linux",t[t.other=100]="other",(af=Jp=Jp||{})[af.unknown=100]="unknown",af[af.normal=0]="normal",af[af.weak=1]="weak",af[af.disconnected=2]="disconnected",new r({name:"device",onNewTdem:function(e){e.extendBean("platform",this.getPlatform()),e.extendBean("netType",Vp.unknown),this.getDpi(e),this.refreshNetworkTypeToBean(e),this.refreshNetworkStatusToBean(e)},getDpi:function(e){e.extendBean("vp",Math.round(window.innerWidth)+" * "+Math.round(window.innerHeight)),window.screen&&e.extendBean("sr",Math.round(window.screen.width)+" * "+Math.round(window.screen.height))},getPlatform:function(){var t={android:/\bAndroid\s*([^;]+)/,ios:/\b(iPad|iPhone|iPod)\b.*? OS ([\d_]+)/,windows:/\b(Windows NT)/,macos:/\b(Mac OS)/,linux:/\b(Linux)/i},e=Object.keys(t).find(function(e){return t[e].test(navigator.userAgent)});return e?Gp[e]:Gp.other},refreshNetworkTypeToBean:function(t){var n=this,e=t.config;e&&("function"==typeof e.getNetworkType?e.getNetworkType:lg)(function(e){Vp[e]||(e=Vp.unknown),t.extendBean("netType",e),n.NetworkRefreshTimer=setTimeout(function(){n.refreshNetworkTypeToBean(t),clearTimeout(n.NetworkRefreshTimer)},1e4)})},refreshNetworkStatusToBean:function(t){var e,n=this,r=t.config;r&&null!=(e="function"==typeof r.getNetworkStatus?r.getNetworkStatus:e)&&e(function(e){Jp[e]===undefined&&(e=Jp.unknown),t.extendBean("netStatus",e),n.NetworkStatusRefreshTimer=setTimeout(function(){n.refreshNetworkStatusToBean(t),clearTimeout(n.NetworkStatusRefreshTimer)},1e4)})}})),lg=function(e){var t="",n=navigator.userAgent.match(/NetType\/(\w+)/);n?t=n[1]:navigator.connection&&(t=navigator.connection.effectiveType||navigator.connection.type),e((n=t=t||Yu,0<=(n=String(n).toLowerCase()).indexOf("4g")?Vp.net4g:0<=n.indexOf("wifi")?Vp.wifi:0<=n.indexOf("5g")?Vp.net5g:0<=n.indexOf("6g")?Vp.net6g:0<=n.indexOf("3g")?Vp.net3g:0<=n.indexOf("2g")?Vp.net2g:Vp.unknown))},cg=window.WebSocket,fg=[],dg={construct:function(e,t){var r=new e(t[0],t[1]);return r.originSend=r.send,r.addEventListener("error",function(e){var e=(null==e?void 0:e.currentTarget)||{},t=e.url,n=e.readyState;null!=fg&&fg.forEach(function(e){e=e.onErr;null!=e&&e({msg:"无法获知具体错误信息,需在浏览器控制台查看!",readyState:n,connectUrl:t})})}),Object.defineProperty(r,"send",{get:function(){return function(e){null!=(t=r.originSend)&&t.call(r,e);var t,e=r.readyState;if(e!==WebSocket.OPEN){var n={readyState:e,connectUrl:r.url};switch(e){case WebSocket.CLOSED:fg.forEach(function(e){e=e.sendErr;null!=e&&e(h({msg:"消息发送失败,连接已关闭!"},n))});break;case WebSocket.CONNECTING:fg.forEach(function(e){(0,e.sendErr)(h({msg:"消息发送失败,正在连接中!"},n))});break;case WebSocket.CLOSING:fg.forEach(function(e){(0,e.sendErr)(h({msg:"消息发送失败,连接正在关闭!"},n))})}}}}}),r}},hg=new r({name:"onError"}),of=hg=new r({name:"onError",onNewTdem:function(e){this.startListen(e)},getFromParam:function(e){var t;return(null==(t=e.getOriginFrom)?void 0:t.call(e))||window.location.href},startListen:function(s){var e,t,n,u=this,l=window.onerror,r=(window.onerror=function(e,t,n,r,i){var o,a=Ol(e);Xc(a)||(a=[{type:(null==i?void 0:i.name)||"Error",value:String(e),mechanism_type:"onerror",mechanism_handled:0}],o=i?jl(i):[{abs_path:t||"",colno:r||0,filename:(null==t?void 0:t.split("/").pop())||"","function":"(anonymous)",lineno:n||0,in_app:1,stack_level:0}],a={event_id:Fl(),event_type:p.JS_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:a,exception_frames:o,replay_id:ef(s),tags:{environment:s.config.env||"production",version:String(s.config.version||"")}}},null!=(o=s.reportTDEMEvent)&&o.call(s,a)),null!=l&&l.call(window,e,t,n,r,i)},function(e){var t,n=e&&Ol(e.reason);n&&(t=[{type:(null==(t=e.reason)?void 0:t.name)||"PromiseRejection",value:(null==(t=e.reason)?void 0:t.message)||String(n),mechanism_type:"unhandledrejection",mechanism_handled:0}],n=e.reason instanceof Error?jl(e.reason):[],e={event_id:Fl(),event_type:p.PROMISE_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{exception_stacks:t,exception_frames:n,replay_id:ef(s),tags:{environment:s.config.env||"production"}}},null!=(t=s.reportTDEMEvent))&&t.call(s,e)}),i=(window.addEventListener("unhandledrejection",r),function(e){e=(null==e?void 0:e.target)||(null==e?void 0:e.srcElement);if(e){var t=e.src||e.href||"",n=e.tagName,n=(void 0===n?"script":n).toLowerCase(),r=["audio","video"].includes(n);if(!r||null!=e&&e.error){if(!(Ll(i=t,s.config.hostUrl)||-1<window.location.href.indexOf(i))){var i="other";if(/\.js$/.test(t)||"script"===n)i="script";else if(/\.css$/.test(t)||"link"===n)i="stylesheet";else if("img"===n)i="image";else{if(!r)return;i="media"}t={event_id:Fl(),event_type:p.RESOURCE_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:u.getFromParam(s),data:{url:t,resource_type:i,replay_id:ef(s),tags:h({environment:s.config.env||"production"},r&&null!=e&&e.error?{error_code:String(e.error.code),error_message:e.error.message||""}:{}),event_properties:{element_tag:n}}};null!=(i=s.reportTDEMEvent)&&i.call(s,t)}}else console.log("may be media load success because error is undefine")}}),o=(window.document.addEventListener("error",i,!0),s.lifeCycle.on("destroy",function(){0===hg.countInstance()&&(window.removeEventListener("unhandledrejection",r),window.document.removeEventListener("error",i,!0))}),s.config.websocket);(("object"===S(o)?!1!==o.enabled:o)||s.config.websocketHack)&&(o={key:s.config.id+"-"+this.name,onErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)},sendErr:function(e){var t;null!=(t=u.publishWsErrorLog)&&t.call(u,e,s)}},this.hackWebsocketConfig=o,o=this.hackWebsocketConfig,window.Proxy)&&window.WebSocket&&(e=window.WebSocket,window&&!e.isHack&&(t=new Proxy(WebSocket,dg),e.isHack=!0,window.WebSocket=t),n=o,fg.find(function(e){return e.key===n.key})||n&&fg.push(n))},publishWsErrorLog:function(e,n){var t=e.connectUrl,r=e.msg,e=e.readyState,i={event_id:Fl(),event_type:p.JS_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:this.getFromParam(n),data:{exception_stacks:[{type:"WebSocketError",value:"WEBSOCKET_ERROR: connect: "+t+" readyState: "+e+" msg: "+r,mechanism_type:"websocket",mechanism_handled:0}],exception_frames:[],replay_id:ef(n),tags:{environment:n.config.env||"production",websocket_url:t||"",websocket_ready_state:String(null!=e?e:"")}}};this.$walk(function(e){var t;e===n&&null!=(t=e.reportTDEMEvent)&&t.call(e,i)})},destroy:function(){var t,e;this.option.hackWebsocketConfig&&(t=this.option.hackWebsocketConfig,window.WebSocket=cg,-1!==(e=fg.findIndex(function(e){return e.key===t.key})))&&fg.splice(e,1)}}),n=ci.f,pg=y(n),gg=y([].push),mg=d&&m(function(){var e=Object.create(null);return e[2]=2,!pg(e,2)}),o=function(u){return function(e){for(var t,n=ze(e),r=ir(n),i=mg&&null===tr(n),o=r.length,a=0,s=[];a<o;)t=r[a++],d&&!(i?t in n:pg(n,t))||gg(s,u?[t,n[t]]:n[t]);return s}},a={entries:o(!0),values:o(!1)},vg=a.entries,yg=(O({target:"Object",stat:!0},{entries:function(e){return vg(e)}}),new r({name:"click"}),function(e){if(""!==e.id&&e.id)return'id("'+e.id+'")';if(e===document.body)return e.tagName;if(e instanceof Document)return"document";var t=0;if(e.parentNode)for(var n=e.parentNode.childNodes,r=0;r<n.length;r+=1){var i=n[r];if(i===e)return yg(e.parentNode)+"/"+e.tagName+"["+(t+1)+"]";1===i.nodeType&&i.tagName===e.tagName&&(t+=1)}return 0}),wg=function(e){return e instanceof Array?new Map(e.map(function(e){return[e,!0]})):new Map},bg=function(e,t){return"string"==typeof e?e.split(t):[]},kg=function(e){if(3===e.nodeType||4===e.nodeType)return e.nodeValue||"";if(1!==e.nodeType)return"";if("string"==typeof e.textContent)return e.textContent;for(var t="",n=e.firstChild;n;n=n.nextSibling)t+=kg(n);return t},Rf=new r({name:"click",listeners:[],onNewTdem:function(e){this.startListen(e)},startListen:function(a){for(var e=function(o){var e,t,n,r,i;s.listeners.push((e=document,t=o,n=function(e,t){var n,r,i;t&&!function(e,t){e="object"===S((e=e).click)?e.click:undefined,n=wg((null==e?void 0:e.ignoreClasses)||[])||new Map;for(var n,e={ignoreIds:wg((null==e?void 0:e.ignoreIds)||[])||new Map,ignoreClasses:n},r=e.ignoreClasses,i=e.ignoreIds,o=!(0===i.size&&0===r.size),a=t,s=(bg(t.getAttribute("id")||""," "),bg(t.getAttribute("class")||"",""),0),u=!1;a&&o&&a.getAttribute;){if(u)return!0;if(10<=s)break;for(var l=bg(a.getAttribute("id")||""," "),c=bg(a.getAttribute("class")||"",""),f=0,d=l;f<d.length;f++){var h=d[f];if(i.has(h)){u=!0;break}}for(var p=0,g=c;p<g.length;p++){var m=g[p];if(r.has(m)){u=!0;break}}s+=1,a=a.parentNode||a.parentElement}return!1}(a.config,t)&&(i=yg(t),n=function(e){e=function(e){var t="",n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(var r=e.firstChild;r;r=r.nextSibling)t+=kg(e)}else if(3===n||4===n)return e.nodeValue;return t}(e);return e?e.replace(/^\s+|\s+$/g,""):""}(t),r=t.getBoundingClientRect&&t.getBoundingClientRect(),i={event_id:Fl(),event_type:p.CLICK,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:window.location.href,data:{target_element:String(i),target_text:n.slice(0,127),click_position:r?{x:parseInt(String(r.left+window.scrollX),10)||0,y:parseInt(String(r.top+window.scrollY),10)||0}:undefined,replay_id:ef(a),tags:{environment:a.config.env||"production",event_op:o,node_name:(null==t?void 0:t.nodeName)||""},event_properties:{target_id:t.id||"",target_class:"string"==typeof t.className?t.className.slice(0,128):""}}},null!=(n=a.reportTDEMEvent))&&n.call(a,i)},void 0===(r=!0)&&(r=!0),i=function(e){var t=document.documentElement;t&&n.call(t,e,e.target)},e.addEventListener(t,i,r),{destroy:function(){e.removeEventListener(t,i,r)}}))},s=this,t=0,n=Object.entries({click:1,longpress:2});t<n.length;t++)e(n[t][0])},destroy:function(){this.listeners.forEach(function(e){return e.destroy()}),this.listeners=[]}}),Sg=(new r({name:"console"}),["log","error","warn","info","debug","trace"]),_g={log:console.log,error:console.error,warn:console.warn,info:console.info,debug:console.debug,trace:console.trace};var Eg,Cg,Og,xg,Rg,Ig,Tg,Mg,Ag,Pg,Lg,gf=new r({name:"console",onNewTdem:function(e){this.startListen(e)},startListen:function(e){var d,h;h="object"===S((d=e).config.console)?d.config.console:undefined,Sg.forEach(function(c){var f=_g[c];console[c]=function(){for(var e,t,n,r,i,o,a,s,u=[],l=0;l<arguments.length;l++)u[l]=arguments[l];try{f.apply(console,u),o=c,a=d.isWhiteList,("all"===(s=(null==(s=h)?void 0:s.level)||"error")||a||("error"===s?"error"===o:"warn"===s?"error"===o||"warn"===o:"info"===s?["error","warn","info"].includes(o):"log"===s?["error","warn","info","log"].includes(o):"error"===o))&&(r=u.map(function(e){if("object"===S(e)&&null!==e)try{return JSON.stringify(e)}catch(h){}return String(e)}).join(" "),i={event_id:Fl(),event_type:p.LOG,event_category:Nl.LOG,timestamp:Date.now(),page_url:(null==(e=d.getOriginFrom)?void 0:e.call(d))||("undefined"!=typeof window?null==(t=window.location)?void 0:t.href:""),data:{log_level:"error"===c?"error":"warn"===c?"warn":"info",replay_id:ef(d),tags:{console_method:c},event_properties:{message:("console."+c+": "+r).slice(0,2048)}}},null!=(n=d.reportTDEMEvent)&&n.call(d,i))}catch(N){_g.error("Console hook error:",N)}}})},destroy:function(){Object.keys(_g).forEach(function(e){console[e]=_g[e]})}}),Dg=(Rg={passive:!0,capture:!0},Ig=new Date,yt=function(){xg=[],Cg=-1,Eg=null,Pg(addEventListener)},Tg=function(e,t){Eg||(Eg=t,Cg=e,Og=new Date,Pg(removeEventListener),Mg())},Mg=function(){var t;0<=Cg&&Cg<Og-Ig&&(t={entryType:"first-input",name:Eg.type,target:Eg.target,cancelable:Eg.cancelable,startTime:Eg.timeStamp,processingStart:Eg.timeStamp+Cg},xg.forEach(function(e){e(t)}),xg=[])},Ag=function(e){var t,n,r,i,o,a;e.cancelable&&(t=(1e12<e.timeStamp?new Date:performance.now())-e.timeStamp,"pointerdown"==e.type?(n=t,r=e,i=function(){Tg(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Rg),removeEventListener("pointercancel",o,Rg)},addEventListener("pointerup",i,Rg),addEventListener("pointercancel",o,Rg)):Tg(t,e))},Pg=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,Ag,Rg)})},Lg="hidden"===document.visibilityState?0:1/0,addEventListener("visibilitychange",function U(e){"hidden"===document.visibilityState&&(Lg=e.timeStamp,removeEventListener("visibilitychange",U,!0))},!0),yt(),self.webVitals={firstInputPolyfill:function(e){xg.push(e),Mg()},resetFirstInputPolyfill:yt,get firstHiddenTime(){return Lg}},function(e,t){var n,r=function(t,n,r,i){var o=function(e){"visibilitychange"===t&&"hidden"!==document.visibilityState||(i?setTimeout(function(){return n(e)},i):n(e),r&&removeEventListener(t,o,!0))};addEventListener(t,o,!0)};r("visibilitychange",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.visibilitychange),r("pagehide",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.pagehide),r("beforeunload",e,null==t?void 0:t.once,null==(n=null==t?void 0:t.delay)?void 0:n.beforeunload)});new r({name:"webVitals"});var Ng,Ug={FCP:-1,LCP:-1,FID:-1,CLS:-1,INP:-1,TTI:-1,from:undefined},Fg=(new r({name:"pagePerformance"}),function(e,t,n,r){return void 0===n&&(n=15e3),void 0===r&&(r=0),(t=void 0===t?0:t)<=e&&e<=n?e:r}),jg=new Map,t=new r({name:"pagePerformance",performanceMap:{},onNewTdem:function(t){var e;Qc()&&(jg.set(t,{isPagePerformanceReported:!1}),Ng?this.publish(Ng,t):this.startCalcPerformance(t),e=this.publishWhenObHidden.bind(this,t),Dg(e,{once:!0}),t.lifeCycle.on("destroy",function(){var e=jg.get(t);e&&(e.isPagePerformanceReported=!1)}))},publishWhenObHidden:function(e){var t,n=jg.get(e);if(null==n||!n.isPagePerformanceReported){n=0;if(null!=(t=e.firstScreenInfo)&&t.timing)n=e.firstScreenInfo.timing;else if(-1<(null==(t=null==(t=window.PerformanceObserver)?void 0:t.supportedEntryTypes)?void 0:t.indexOf("paint")))try{var r,i=performance.getEntriesByName("first-contentful-paint");i&&0<i.length&&(r=i[0])&&0<r.startTime&&(n=r.startTime)}catch(P){}(Ng=this.buildPerformanceLog(e,n,this.getPageUrl(e),window.location.href))&&this.publish(Ng,e,!0)}},buildPerformanceLog:function(e,t,n,r){var i=performance.timing;return i?(n={from:n,originFrom:r,dnsLookup:Fg(i.domainLookupEnd-i.domainLookupStart),tcp:Fg(i.connectEnd-i.connectStart),ssl:Fg(0===i.secureConnectionStart?0:i.requestStart-i.secureConnectionStart),ttfb:Fg(i.responseStart-i.requestStart),contentDownload:Fg(i.responseEnd-i.responseStart),domParse:Fg(i.domInteractive-i.domLoading,0,15e3,1070),resourceDownload:Fg(i.loadEventStart-i.domInteractive,0,15e3,1070),firstScreenTiming:Fg(Math.floor(t),0,15e3,15e3)},(r=e.config).extraPerformanceData&&"{}"!==JSON.stringify(r.extraPerformanceData)&&(t=(i=r.extraPerformanceData).engineInit,e=i.bundleLoad,n=h(h({},n),{engineInit:Fg(t,0,1e4),bundleLoad:Fg(e,0,1e4)})),n):undefined},publish:function(r,i){var o=this;this.$walk(function(e){var t,n;e===i&&(t=(n=performance.timing).navigationStart,n={event_id:Fl(),event_type:p.PAGE_LOAD,event_category:Nl.PERFORMANCE,timestamp:Date.now(),page_url:r.originFrom||window.location.href,data:{measurements:{lcp:Ug.lcp,fcp:Ug.fcp,fid:Ug.fid,cls:Ug.cls,ttfb:Ug.ttfb||r.ttfb,dns_time:r.dnsLookup,tcp_time:r.tcp,ssl_time:r.ssl,request_time:r.ttfb,response_time:r.contentDownload,dom_parse_time:r.domParse,dom_ready:n.domContentLoadedEventEnd-t,load_complete:n.loadEventEnd-t,first_screen_time:r.firstScreenTiming},replay_id:ef(e),device_type:o.getDeviceType(),tags:{environment:e.config.env||"production",version:String(e.config.version||"")}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),n=jg.get(e))&&(n.isPagePerformanceReported=!0)})},getPageUrl:function(e){var t=this.$getConfig(e);if(null!=t&&t.urlHandler&&"function"==typeof(null==t?void 0:t.urlHandler)){t=null==t?void 0:t.urlHandler();if(t)return encodeURIComponent(t)}return e.getCurrentPageUrl()},getDeviceType:function(){var e=navigator.userAgent;return/mobile/i.test(e)?"Mobile":/tablet|ipad/i.test(e)?"Tablet":"Desktop"},startCalcPerformance:function(t){var n=this;try{var r=this.getPageUrl(t),i=t.getOriginFrom();this.getFirstScreenTiming(t,function(e){Ng=n.buildPerformanceLog(t,e,r,i);e=jg.get(t);!Ng||null!=e&&e.isPagePerformanceReported||n.publish(Ng,t)})}catch(b){}},getFirstScreenTiming:function(e,t){null!=t&&t(0)},setFirstScreenInfo:function(e,t,n,r){var i;e.config.id&&this.performanceMap[e.config.id]||(e.config.id&&(this.performanceMap[e.config.id]=!0),("object"!==S(null==(i=e.config)?void 0:i.pagePerformance)||null!=(i=e.config.pagePerformance)&&i.firstScreenInfo)&&(e.firstScreenInfo={element:n,timing:t,markDoms:r}))},isEleInArray:function(e,t){return!(!e||e===document.documentElement)&&(-1!==t.indexOf(e)||this.isEleInArray(e.parentElement,t))},isInFirstScreen:function(e){var t;return!(!e||"function"!=typeof e.getBoundingClientRect)&&(e=e.getBoundingClientRect(),t=window.innerHeight,0<=e.left)&&e.left<window.innerWidth&&0<=e.top&&e.top<t&&0<e.width&&0<e.height},walkAndCount:function(e){var t=0;if(e&&1===e.nodeType){t+=1;var n=e.children;if(null!=n&&n.length)for(var r=0;r<n.length;r++)1===n[r].nodeType&&(n[r].hasAttribute("TDEM-IGNORE-FIRST-SCREEN-TIMING")||n[r].hasAttribute("AEGIS-IGNORE-FIRST-SCREEN-TIMING"))||(t+=this.walkAndCount(n[r]))}return t},hasAncestorOrSelfWithAttribute:function(e,t){for(var n=t.replace(/^TDEM-/,"AEGIS-"),r=e;r&&r!==document.body;){if(r.hasAttribute(t)||n!==t&&r.hasAttribute(n))return!0;r=r.parentElement}return!1}}),zg=Math.min,Bg=[].lastIndexOf,Wg=!!Bg&&1/[1].lastIndexOf(1,-0)<0,af=Te("lastIndexOf"),Hg=Wg||!af?function(e){if(Wg)return Oe(Bg,this,arguments)||0;var t=ze(this),n=ce(t);if(0!==n){var r=n-1;for((r=1<arguments.length?zg(r,se(arguments[1])):r)<0&&(r=n+r);0<=r;r--)if(r in t&&t[r]===e)return r||0}return-1}:Bg,qg=(O({target:"Array",proto:!0,forced:Hg!==[].lastIndexOf},{lastIndexOf:Hg}),new r({name:"spa"}),["replaceState","pushState","popstate","hashchange"]),n=new r({name:"spa",originFireUrl:"",lastPageUrl:"",navigationStack:[],navigationIndex:-1,onNewTdem:function(n){var r=this,e=(history.pushState=this.wr("pushState")||history.pushState,history.replaceState=this.wr("replaceState")||history.replaceState,this.sendPv=this.sendPv.bind(this),location.href);this.navigationStack.length||(this.navigationStack=[e],this.navigationIndex=0),n.config.spa&&this.sendPv(n,"reload"),qg.forEach(function(e){var t=e;window.addEventListener(e,function(){return r.sendPv.call(r,n,t)})})},wr:function(n){var r=history[n],e="__"+n+"__hasWrittenByTamSpa";return"function"==typeof r&&!history[e]&&(Object.defineProperty(history,e,{value:!0,enumerable:!1}),function(){var e=r.apply(this,arguments),t=null;return"function"==typeof Event?t=new Event(n):(t=document.createEvent("HTMLEvents")).initEvent(n,!1,!0),window.dispatchEvent(t),e})},resolveNavigationType:function(e,t){var n;return"pushState"===e?(this.navigationIndex<this.navigationStack.length-1&&(this.navigationStack=this.navigationStack.slice(0,this.navigationIndex+1)),this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"push"):"replaceState"===e?(this.navigationIndex<0?(this.navigationStack=[t],this.navigationIndex=0):this.navigationStack[this.navigationIndex]=t,"replace"):"hashchange"===e?"hashchange":"popstate"===e?0<=(e=this.navigationStack.lastIndexOf(t))?(n=e<this.navigationIndex?"back":"forward",this.navigationIndex=e,n):(this.navigationStack.push(t),this.navigationIndex=this.navigationStack.length-1,"forward"):"reload"},sendPv:function(s,e){var u=this;void 0===e&&(e="reload"),setTimeout(function(){s._customPageUrl=null;var r=location.pathname+location.hash+s.config.id,i=s.getOriginFrom(),o=u.lastPageUrl||undefined,a=u.resolveNavigationType(e,location.href);u.$walk(function(e){var t,n;e===s&&r&&r!==u.originFireUrl&&(n={event_id:Fl(),event_type:p.PAGE_VIEW,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:i,data:{page_title:document.title||"",referrer:document.referrer||undefined,is_effective_action:!0,replay_id:ef(e),tags:{environment:e.config.env||"production",version:String(e.config.version||""),is_spa:"true"},event_properties:{navigation_type:a,from_page:(o||"").slice(0,512),to_page:(i||"").slice(0,512)}}},null!=(t=e.reportTDEMEvent)&&t.call(e,n),u.originFireUrl=r,u.lastPageUrl=i)})},0)},destroy:function(){this.option.sendPv=function(){}}}),Vg="__MONITOR_SESSION_V1__";function Gg(e,t){"undefined"!=typeof document&&(e=[e+"="+encodeURIComponent(t),"path=/","SameSite=Lax"],"undefined"!=typeof location&&"https:"===location.protocol&&e.push("Secure"),document.cookie=e.join("; "))}function Jg(e,t,n){void 0===n&&(n=1);var r=Date.now();return{sessionId:e,createdAt:r,lastActivity:r,source:t,version:n}}function $g(e){try{sessionStorage.setItem("__MONITOR_SESSION_V1__",JSON.stringify(e))}catch(jy){}}function Zg(e,t){var n,r,i;return"undefined"==typeof window?Jg(t(),e):(r="undefined"!=typeof document&&(r="_tdem_s".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)")))?decodeURIComponent(r[1]):null,n=window[Vg],r?(null==n?void 0:n.sessionId)===r?(n.lastActivity=Date.now(),$g(n),n):(i=Jg(r,(null==n?void 0:n.source)||e,(null==n?void 0:n.version)||1),$g(window[Vg]=i),i):null!=n&&n.sessionId?(n.lastActivity=Date.now(),Gg("_tdem_s",n.sessionId),$g(n),n):(i=Jg(t(),e),Gg("_tdem_s",(window[Vg]=i).sessionId),$g(i),i))}im.prototype.request=function(o,a){var s=this;return void 0===a&&(a={}),o.sendBeacon||o.handoff?this.handoff(o,a):new Promise(function(n){var e,r,t,i=new XMLHttpRequest;i.sendByTdem=!0,i.addEventListener("readystatechange",function(){var e,t;4===i.readyState&&((e={ok:0<i.status&&i.status<400,status:i.status,statusText:i.statusText,body:i.response,request:o}).ok?(null!=(t=a.success)&&t.call(a,i.response),null!=(t=a["final"])&&t.call(a,e),n(e)):(t=h(h({},e),{error:i.response}),null!=(e=a.fail)&&e.call(a,i.response),null!=(e=a["final"])&&e.call(a,t),n(t)))}),"get"===(o.method||"GET").toLowerCase()?(i.open("get",(e=o.url,r=o.data,"string"!=typeof e?"":"object"===S(r)&&r?(t=Object.getOwnPropertyNames(r).map(function(e){var t=r[e];return e+"="+("string"==typeof t?encodeURIComponent(t):encodeURIComponent(JSON.stringify(t)))}).join("&").replace(/eval/gi,"evaI"),e+(-1===e.indexOf("?")?"?":"&")+t):e)),s.applyHeaders(i,o.headers),i.send()):(i.open("post",o.url),s.applyHeaders(i,o.headers),o.contentType&&i.setRequestHeader("Content-Type",o.contentType),"string"==typeof(t=o.body!==undefined?o.body:o.data)&&(t=t.replace(/eval/gi,"evaI")),i.send(t))})},im.prototype.handoff=function(e,t){void 0===t&&(t={});var n,r="undefined"!=typeof navigator?navigator:undefined;return r&&"function"==typeof r.sendBeacon?(n=e.body!==undefined?e.body:e.data,r={ok:n=r.sendBeacon(e.url,n),request:e,handoffAccepted:n,error:n?undefined:new Error("navigator.sendBeacon rejected the payload")},n?null!=(n=t.success)&&n.call(t,{accepted:!0}):null!=(n=t.fail)&&n.call(t,r.error),null!=(n=t["final"])&&n.call(t,r),Promise.resolve(r)):(n={ok:!1,request:e,error:new Error("navigator.sendBeacon is unavailable")},null!=(r=t.fail)&&r.call(t,n.error),null!=(e=t["final"])&&e.call(t,n),Promise.resolve(n))},im.prototype.applyHeaders=function(t,n){n&&Object.keys(n).forEach(function(e){t.setRequestHeader(e,n[e])})};var Kg,Yg,Xg=im,Qg=new Map,em=(Bu(Yg=nm,o=Kg=zc),Yg.prototype=null===o?Object.create(o):(rm.prototype=o.prototype,new rm),nm.prototype._bootstrapInit=function(e){this.setConfig(e),this.config=Gu(this.config,e.hostUrl),this._prefetchConfigAndInit(e)},nm.prototype._initImmediately=function(e){this.init(e),this._afterInit(e)},nm.prototype._prefetchConfigAndInit=function(a){return Wu(this,void 0,void 0,function(){var t,n,r,i,o;return Hu(this,function(e){switch(e.label){case 0:if(t=this.config.id,n=this._buildPrefetchConfigUrl(),r=!1,i=null,!t||!n)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.transportRequest({kind:"config",url:n,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:t})})];case 2:return(o=e.sent()).ok&&0===(o="string"==typeof o.body?JSON.parse(o.body):o.body).code&&o.data&&(r=!!o.data.enabled,i=o.data),[3,4];case 3:return e.sent(),r=this._loadEnabledFromCache(t),[3,4];case 4:if(r){i&&(this._prefetchedConfigData=i);try{this._initAfterPreparedConfig(a)}catch(Me){console.warn(Me),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),this.sendSDKError(Me)}}else console.info("[TDEM] SDK disabled by remote config, skip initialization");return[2]}})})},nm.prototype._buildPrefetchConfigUrl=function(){var e=(this.config.url||"").replace(/\/+$/,"");return e?e+"/api/v1/config":""},nm.prototype._loadEnabledFromCache=function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5&&0<t.sampleRate:!1}catch(jy){return!1}},nm.prototype._initAfterPreparedConfig=function(e){for(var t=0;t<zc.installedPlugins.length;t++)try{zc.installedPlugins[t].patch(this)}catch(A){this.sendSDKError(A)}this.lifeCycle.emit("onInited"),this._afterInit(e)},nm.prototype._afterInit=function(e){var t,o,n=this;this._sdkInitialized=!0,this.extendBean("sessionId",nm.sessionID),this.extendBean("from",this.getCurrentPageUrl()),"undefined"!=typeof document&&this.extendBean("referer",encodeURIComponent(document.referrer||"")),t=hl(fl("tdem-web-retry-report-requests"),[]),(o=function(){var i;t.length&&(i=t.splice(0,1)[0],dl("tdem-web-retry-report-requests",JSON.stringify(t)),n.$request(i,function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Qg.get(null==(e=i.extraRetryOptions)?void 0:e.success))?void 0:t.apply(i,n)}finally{o()}},function(){for(var e,t,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return null==(t=Qg.get(null==(e=i.extraRetryOptions)?void 0:e.fail))?void 0:t.apply(i,n)}finally{o()}}))})()},nm.prototype.getBean=function(t){var n=this;return void 0===t&&(t=[]),""+Object.getOwnPropertyNames(this.bean).filter(function(e){return-1===t.indexOf(e)}).map(function(e){return"from"===e?"from="+n.getCurrentPageUrl():e+"="+n.bean[e]}).join("&")},nm.prototype.getCurrentPageUrl=function(){var e;return this._customPageUrl?encodeURIComponent(this._customPageUrl.slice(0,2048)):(e=this.config.pageUrl||location.href,e=(e="function"==typeof this.config.urlHandler?this.config.urlHandler()||location.href:e).slice(0,2048),encodeURIComponent(e))},nm.prototype.getOriginFrom=function(){if(this._customPageUrl)return this._customPageUrl.slice(0,2048);try{return("undefined"!=typeof window&&window.location?window.location.href:"").slice(0,2048)}catch(Le){return""}},nm.prototype.ready=function(){var t=this,o=function(){var e,n,r,i;t.reportRequestQueue.length&&(e=t.reportRequestQueue.splice(0,1)[0],n=e.options,r=e.success,i=e.fail,t.$request(n,function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==r?void 0:r.apply(n,e)}finally{o()}},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return null==i?void 0:i.apply(n,e)}finally{o()}}))};o(),this.isReportReady=!0},nm.prototype.request=function(u,n,l){var c,f,d=this;this.config.reportImmediately||this.isReportReady?this.$request(u,c=function(e){var t=hl(fl("tdem-web-retry-report-requests"),[]);null!=t&&t.length&&u.extraRetryOptions&&(t.splice(t.findIndex(function(e){return e.extraRetryOptions.requestId===u.extraRetryOptions.requestId}),1),dl("tdem-web-retry-report-requests",JSON.stringify(t)),Qg["delete"](u.extraRetryOptions.success),Qg["delete"](u.extraRetryOptions.fail)),null!=n&&n(e)},f=function(e){if(!d.config.reportRetry)return null==l?void 0:l(e);var t,n="boolean"==typeof d.config.reportRetry?tg:h(h({},tg),d.config.reportRetry),r=n.maxRetryCount,i=void 0===r?tg.maxRetryCount:r,r=n.retryInterval,r=void 0===r?tg.retryInterval:r,n=n.whenRetryEndStillFail,o=void 0===n?tg.whenRetryEndStillFail:n,a=(u.extraRetryOptions||(u.extraRetryOptions={requestId:"",retriedCount:0,success:"",fail:""}),u.extraRetryOptions),s=(a.requestId=a.requestId||u.url+"-"+Date.now()+"-"+Math.random(),a.requestId),n=(a.retriedCount=a.retriedCount||0,a.success=a.success||s+"_successCallback",a.fail=a.fail||s+"_failCallback",hl(fl("tdem-web-retry-report-requests"),[]));n.find(function(e){return e.extraRetryOptions.requestId===s})?(t=n.findIndex(function(e){return e.extraRetryOptions.requestId===s}),n[t]=u):n.push(u),dl("tdem-web-retry-report-requests",JSON.stringify(n)),setTimeout(function(){var e;a.retriedCount<i?(u.extraRetryOptions.retriedCount+=1,d.$request(u,c,f)):("discard"===o&&((e=hl(fl("tdem-web-retry-report-requests"),[]).filter(function(e){return(null==(e=e.extraRetryOptions)?void 0:e.requestId)!==s})).length?dl("tdem-web-retry-report-requests",JSON.stringify(e)):function(e){try{localStorage.removeItem(e)}catch(jy){}}("tdem-web-retry-report-requests")),Qg["delete"](a.success),Qg["delete"](a.fail))},"function"==typeof r?r(u.extraRetryOptions.retriedCount):r),null!=l&&l(e),Qg.has(a.success)||Qg.set(a.success,c),Qg.has(a.fail)||Qg.set(a.fail,f)}):this.reportRequestQueue.push({options:u,success:n,fail:l})},nm.prototype.$request=function(s,e,t){var n,r;if(s&&"string"==typeof s.url&&""!==s.url&&this.bean.id)return n=s.url,!1!==s.addBean&&(n=function(e,t){var n,r,i,o=e,a=s.beanFilter||[];for(n in t)-1===a.indexOf(n)&&((i=(r=new RegExp("([?&])"+n+"(=([^&]*))?(?=&|$)")).exec(o))?i[2]&&""!==i[3]&&"undefined"!==i[3]||(o=o.replace(r,"$1"+n+"="+t[n])):(i=-1<o.indexOf("?")?"&":"?",o+=i+n+"="+t[n]));return o}(n,h(h({},this.bean),{from:this.getCurrentPageUrl()}))),s.url=n,n=s.method||"get",r=this.config.onBeforeRequest,(s=r?r(s,this):s)?s.url?(r={success:e,fail:t},void((e={kind:s.type===gl.WHITE_LIST?"config":"events",url:s.url,method:n.toUpperCase(),contentType:s.contentType,data:s.data,body:s.data,sendBeacon:!!(null!=s&&s.sendBeacon||this.sendNow),source:s}).sendBeacon?this.transportHandoff(e,r):this.transportRequest(e,r))):console.warn("Please handle the parameters reasonably, options.url is necessary"):console.warn("Sending request blocked")},nm.prototype.publishPluginsLogs=function(){var e=nm.installedPlugins.find(function(e){return"assets"===e.name});null!=e&&e.option.collectNotReportedLog(this)},nm.prototype.uploadLogs=function(e,t){var n;void 0===e&&(e={}),void 0===t&&(t={}),null!=(n=this.lifeCycle)&&n.emit("uploadLogs",e,t)},nm.prototype.reportWebVitals=function(e){try{var t=nm.installedPlugins.find(function(e){return"webVitals"===e.name});t&&this.config.webVitals&&this.config.webVitals.manualReport&&t.option.publish(this,e)}catch(Le){}},nm.sessionID=Zg("tdem",Ec).sessionId,nm),yt=(new r({name:"ie"}),new r({name:"ie",init:function(){this.overrideTdemSend()},onNewTdem:function(e){this.startListen(e)},startListen:function(o){var a=this,s=window.onerror;window.onerror=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r,i=Ol(t[0]);Xc(i)||(r={event_id:Fl(),event_type:p.JS_ERROR,event_category:Nl.ERROR,timestamp:Date.now(),page_url:("undefined"!=typeof window?null==(e=window.location)?void 0:e.href:"")||"",data:{exception_stacks:[{type:"Error",value:String(i||""),mechanism_type:"onerror",mechanism_handled:0}],exception_frames:[{abs_path:String(t[1]||""),colno:Number(t[3])||0,filename:String(t[1]||"").split("/").pop()||"","function":"(anonymous)",lineno:Number(t[2])||0,in_app:1,stack_level:0}]}},a.$walk(function(e){var t;e===o&&null!=(t=e.reportTDEMEvent)&&t.call(e,r)})),null!=s&&s.call.apply(s,qu([window],t))}},overrideTdemSend:function(){em.prototype.request=function(e,t,n){var r,i,o=this;e&&"string"==typeof e.url&&""!==e.url&&this.bean.id&&(r=e.url,!1!==e.addBean&&(r=r+(-1===r.indexOf("?")?"?":"&")+this.getBean(e.beanFilter)),(i=new Image).onload=function(){o.request(e,t,n),null!=t&&t(null)},i.onerror=function(){o.request(e,t,n),null!=n&&n(null)},e.data?i.src=r+"&"+e.data:i.src=r)}},destroy:function(){}})),af=(new r({name:"onClose"}),new r({name:"onClose",onNewTdem:function(n){var r,i=this;l.desktop()?(r=window.onunload,window.onunload=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];i.publishNotReportedLog(n),null!=r&&r.call.apply(r,qu([window],e))}):Dg(this.publishNotReportedLog.bind(this,n),{once:!0})},publishNotReportedLog:function(t){var n=this;this.$walk(function(e){e===t&&(e.sendNow=!0,e.publishPluginsLogs(),n.publishThrottlePipeLogs(e))})},publishThrottlePipeLogs:function(e){null!=e&&e.speedLogPipeline([]),null!=e&&e.tdemEventPipeline([])}})),tm=void 0;function nm(e,t){var n,r,i,a,o,s,u,l,c,f,d=Kg.call(this,e,t=void 0===t?{}:t)||this;d.sendNow=!1,d.isReportReady=!1,d.reportRequestQueue=[],d._sdkInitialized=!1,d.speedLogPipeline=Nc([(l=[],c=(o=d).config,o.lifeCycle.on("destroy",function(){l.length=0}),function(e,t){Array.isArray(e)?l=l.concat(e):l.push(e),s&&l.length>=s||o.sendNow&&0<l.length?(l=Yl(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length)),u&&clearTimeout(u)):(u&&clearTimeout(u),u=setTimeout(function(){u=null,l=Yl(l),0<(l=Array.isArray(l)?l:[]).length&&t(l.splice(0,l.length))},c.delay))}),(a=d.config,function(e,t){var n,r,i,o="number"==typeof a.repeat?a.repeat:60;!a.speedSample||o<=0?t(e):(n=(null==a?void 0:a.id)||"0",r=Ql[n]||{},Array.isArray(e)?(i=e.filter(function(e){var t=!r[e.url]||r[e.url]<o;return t?(r[e.url]=1+~~r[e.url],Ql[n]=r):Xl[n]||ec(n),t})).length&&t(i):!r[e.url]||r[e.url]<o?(r[e.url]=1+~~r[e.url],Ql[n]=r,t(e)):Xl[n]||ec(n))}),(i=d,function(t,n){lg(function(e){i.extendBean("netType",e),n(t)})}),function(e,t){null!=(n=d.lifeCycle)&&n.emit("beforeReportSpeed",e);var n,r=d.config.beforeReportSpeed;if((e="function"==typeof r?e.filter(function(e){return!1!==r(e)}):e).length)return t(e)},function(e,t){t(e.map(function(e){return"undefined"!=typeof e.payload&&delete e.payload,e}))},function(e){return d.sendPipeline([function(e,t){t({type:gl.SPEED,url:""+d.config.speedUrl,method:"post",data:Al(e,h(h({},d.bean),{from:d.getCurrentPageUrl()})),log:e})}],gl.SPEED)(e)}]),d.getInternalTransport()||d.setInternalTransport(new Xg),e.asyncPlugin=!0;try{"undefined"!=typeof document&&(f=String(e.userId||e.uin||(null!=(n=document.cookie.match(/\buin=\D+(\d*)/))?n:[])[1]||(null!=(r=document.cookie.match(/\bilive_uin=\D*(\d+)/))?r:[])[1]||""),e.userId=f,e.uin=e.uin||f),d._bootstrapInit(e)}catch(Me){console.warn(Me),console.log("%cThe above error occurred in the process of initializing TDEM, which will affect your normal use of TDEM.\nIt is recommended that you contact us for feedback and thank you for your support.","color: red"),d.sendSDKError(Me)}return d}function rm(){this.constructor=Yg}function im(){}O({target:"Math",stat:!0},{log1p:tm});Math.log;var o=Math.acosh,om=Math.log,am=Math.sqrt,sm=Math.LN2,o=!o||710!==Math.floor(o(Number.MAX_VALUE))||o(Infinity)!==Infinity,o=(O({target:"Math",stat:!0,forced:o},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156<e?om(e)+sm:tm(e-1+am(e-1)*am(1+e))}}),Math.asinh),um=Math.log,lm=Math.sqrt,cm=Math.LN2,o=!(o&&0<1/o(0)),o=(O({target:"Math",stat:!0,forced:o},{asinh:function vO(e){e=+e;return isFinite(e)&&0!=e?e<0?-vO(-e):94906265.62425156<e?um(e)+cm:um(e+lm(e*e+1)):e}}),Math.atanh),o=!(o&&1/o(-0)<0),fm=(O({target:"Math",stat:!0,forced:o},{atanh:function(e){e=+e;return 0==e?e:tm(2*e/(1-e))/2}}),void 0),o=(O({target:"Math",stat:!0,forced:fm!==Math.expm1},{expm1:fm}),Math.expm1),o=(!o||22025.465794806718<o(10)||o(10)<22025.465794806718||o(-2e-17),Math.cosh),dm=Math.abs,hm=Math.E,o=!o||o(710)===Infinity,pm=(O({target:"Math",stat:!0,forced:o},{cosh:function(e){e=fm(dm(e)-1)+1;return(e+1/(e*hm*hm))*(hm/2)}}),Math.abs),gm=Math.exp,mm=Math.E,o=m(function(){return-2e-17!==Math.sinh(-2e-17)}),vm=(O({target:"Math",stat:!0,forced:o},{sinh:function(e){e=+e;return pm(e)<1?(fm(e)-fm(-e))/2:(gm(e-1)-gm(-e-1))*(mm/2)}}),Math.exp),ym=(O({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=fm(e),n=fm(-e);return t===Infinity?1:n===Infinity?-1:(t-n)/(vm(e)+vm(-e))}}),a.values);O({target:"Object",stat:!0},{values:function(e){return ym(e)}});var wm,bm,km,Sm=bt.enforce,_m=bt.get,o=R.Int8Array,Em=o&&o.prototype,a=R.Uint8ClampedArray,a=a&&a.prototype,Cm=o&&tr(o),Om=Em&&tr(Em),o=Object.prototype,xm=R.TypeError,Rm=Ze("toStringTag"),Im=ht("TYPED_ARRAY_TAG"),Tm=i,i=!1,Mm={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Am={BigInt64Array:8,BigUint64Array:8},Pm=function(e){var t,e=tr(e);if(x(e))return(t=_m(e))&&T(t,"TypedArrayConstructor")?t.TypedArrayConstructor:Pm(e)},Lm=function(e){return!!x(e)&&(e=Qe(e),T(Mm,e)||T(Am,e))};for(wm in Mm)(km=(bm=R[wm])&&bm.prototype)?Sm(km).TypedArrayConstructor=bm:Tm=!1;for(wm in Am)(km=(bm=R[wm])&&bm.prototype)&&(Sm(km).TypedArrayConstructor=bm);if((!Tm||!_(Cm)||Cm===Function.prototype)&&(Cm=function(){throw new xm("Incorrect invocation")},Tm))for(wm in Mm)R[wm]&&kr(R[wm],Cm);if((!Tm||!Om||Om===o)&&(Om=Cm.prototype,Tm))for(wm in Mm)R[wm]&&kr(R[wm].prototype,Om);if(Tm&&tr(a)!==Om&&kr(a,Om),d&&!T(Om,Rm))for(wm in St(Om,Rm,{configurable:i=!0,get:function(){return x(this)?this[Im]:undefined}}),Mm)R[wm]&&ut(R[wm].prototype,Im,wm);var f={NATIVE_ARRAY_BUFFER_VIEWS:Tm,TYPED_ARRAY_TAG:i&&Im,aTypedArray:function(e){if(Lm(e))return e;throw new xm("Target is not a typed array")},aTypedArrayConstructor:function(e){if(!_(e)||kr&&!ke(Cm,e))throw new xm(_e(e)+" is not a typed array constructor");return e},exportTypedArrayMethod:function(e,t,n,r){if(d){if(n)for(var i in Mm){i=R[i];if(i&&T(i.prototype,e))try{delete i.prototype[e]}catch(X){try{i.prototype[e]=t}catch(P){}}}Om[e]&&!n||xt(Om,e,!n&&Tm&&Em[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,i;if(d){if(kr){if(n)for(r in Mm)if((i=R[r])&&T(i,e))try{delete i[e]}catch(X){}if(Cm[e]&&!n)return;try{return xt(Cm,e,!n&&Tm&&Cm[e]||t)}catch(X){}}for(r in Mm)!(i=R[r])||i[e]&&!n||xt(i,e,t)}},getTypedArrayConstructor:Pm,isView:function(e){return!!x(e)&&("DataView"===(e=Qe(e))||T(Mm,e)||T(Am,e))},isTypedArray:Lm,TypedArray:Cm,TypedArrayPrototype:Om},Dm=R.ArrayBuffer,Nm=R.Int8Array,Um=!f.NATIVE_ARRAY_BUFFER_VIEWS||!m(function(){Nm(1)})||!m(function(){new Nm(-1)})||!su(function(e){new Nm,new Nm(null),new Nm(1.5),new Nm(e)},!0)||m(function(){return 1!==new Nm(new Dm(2),1,undefined).length}),Fm=(O({target:"Number",stat:!0},{isInteger:void 0}),Math.floor,Number.isInteger,RangeError),jm=RangeError,zm=function(t,e){var n=function(){var e=se(t);if(e<0)throw new Fm("The argument can't be less than 0");return e}();if(n%e)throw new jm("Wrong offset");return n},Bm=Math.floor,Wm=TypeError,Hm=function(e){e=To(e,"number");if("number"==typeof e)throw new Wm("Can't convert number to bigint");return BigInt(e)},qm=f.aTypedArrayConstructor,Vm=function(e){var t=Ws(this),n=arguments.length,r=1<n?arguments[1]:undefined,i=r!==undefined;i&&Ce(r);var o,a,s,u,l,c,f,d,h=oe(e),e=Vr(h);if(e&&!Hr(e))for(d=(f=Jr(h,e)).next,h=[];!(c=I(d,f)).done;)h.push(c.value);for(i&&2<n&&(r=zr(r,arguments[2])),a=ce(h),u=function(e){e=Qe(e);return"BigInt64Array"===e||"BigUint64Array"===e}(s=new(qm(t))(a)),o=0;o<a;o++)l=i?r(h[o],o):h[o],s[o]=u?Hm(l):+l;return s},Gm=function(e,t,n){for(var r=0,i=2<arguments.length?n:ce(t),o=new e(i);r<i;)o[r]=t[r++];return o},o=We(function(e){var r=Un.f,u=si.forEach,h=bt.get,p=bt.set,g=bt.enforce,m=st.f,n=Kn.f,v=R.RangeError,y=Mo.ArrayBuffer,t=y.prototype,w=Mo.DataView,b=f.NATIVE_ARRAY_BUFFER_VIEWS,k=f.TYPED_ARRAY_TAG,S=f.TypedArray,_=f.TypedArrayPrototype,E=f.isTypedArray,i=function(e,t){St(e,t,{configurable:!0,get:function(){return h(this)[t]}})},C=function(e){return ke(t,e)||"ArrayBuffer"===(e=Qe(e))||"SharedArrayBuffer"===e},o=function(e,t){return E(e)&&!Bi(t)&&t in e&&(void 0)(+t)&&0<=t},a=function(e,t){return t=gi(t),o(e,t)?at(2,e[t]):n(e,t)},s=function(e,t,n){return t=gi(t),!(o(e,t)&&x(n)&&T(n,"value"))||T(n,"get")||T(n,"set")||n.configurable||T(n,"writable")&&!n.writable||T(n,"enumerable")&&!n.enumerable?m(e,t,n):(e[t]=n.value,e)};d?(b||(Kn.f=a,st.f=s,i(_,"buffer"),i(_,"byteOffset"),i(_,"byteLength"),i(_,"length")),O({target:"Object",stat:!0,forced:!b},{getOwnPropertyDescriptor:a,defineProperty:s}),e.exports=function(e,t,i){var l=e.match(/\d+/)[0]/8,n=e+(i?"Clamped":"")+"Array",o="get"+e,a="set"+e,s=R[n],c=s,f=c&&c.prototype,e={},d=function(e,r){m(e,r,{get:function(){var e=this,t=r;return(e=h(e)).view[o](t*l+e.byteOffset,!0)},set:function(e){var t,n;t=r,e=e,(n=h(n=this)).view[a](t*l+n.byteOffset,i?(t=+e)!=t||t<=0?0:255<=t?255:!((n=Bm(t))+.5<t)&&(t<n+.5||n%2==0)?n:n+1:e,!0)},enumerable:!0})},t=(b?Um&&(c=t(function(e,t,n,r){return er(e,f),Jo(x(t)?C(t)?r!==undefined?new s(t,zm(n,l),r):n!==undefined?new s(t,zm(n,l)):new s(t):E(t)?Gm(c,t):I(Vm,c,t):new s(jo(t)),e,c)}),kr&&kr(c,S),u(r(s),function(e){e in c||ut(c,e,s[e])}),c.prototype=f):(c=t(function(e,t,n,r){er(e,f);var i,o,a=0,s=0;if(x(t)){if(!C(t))return E(t)?Gm(c,t):I(Vm,c,t);var u=t,s=zm(n,l),n=t.byteLength;if(r===undefined){if(n%l)throw new v("Wrong length");if((i=n-s)<0)throw new v("Wrong length")}else if((i=jo(r)*l)+s>n)throw new v("Wrong length");o=i/l}else o=jo(t),u=new y(i=o*l);for(p(e,{buffer:u,byteOffset:s,byteLength:i,length:o,view:new w(u)});a<o;)d(e,a++)}),kr&&kr(c,S),f=c.prototype=rr(_)),f.constructor!==c&&ut(f,"constructor",c),g(f).TypedArrayConstructor=c,k&&ut(f,k,n),c!==s);e[n]=c,O({global:!0,constructor:!0,forced:t,sham:!b},e),"BYTES_PER_ELEMENT"in c||ut(c,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in f||ut(f,"BYTES_PER_ELEMENT",l),ga(n)}):e.exports=function(){}}),Jm=(o("Float32",function(r){return function(e,t,n){return r(this,e,t,n)}}),o("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}}),O({target:"Array",proto:!0},{copyWithin:void 0}),nr("copyWithin"),Math.min,y(void 0)),$m=f.aTypedArray,Zm=((0,f.exportTypedArrayMethod)("copyWithin",function(e,t){return Jm($m(this),e,t,2<arguments.length?arguments[2]:undefined)}),Ar("every",TypeError)),Km=(O({target:"Iterator",proto:!0,real:!0,forced:Zm},{every:function(n){E(this);try{Ce(n)}catch(X){$r(this,"throw",X)}var e,r;return Zm?I(Zm,this,n):(e=Qr(this),!Xr(e,function(e,t){if(!n(e,r++))return t()},{IS_RECORD:!(r=0),INTERRUPTED:!0}).stopped)}}),si.every),a=Te("every"),Ym=(O({target:"Array",proto:!0,forced:!a},{every:function(e){return Km(this,e,1<arguments.length?arguments[1]:undefined)}}),si.every),Xm=f.aTypedArray,Qm=((0,f.exportTypedArrayMethod)("every",function(e){return Ym(Xm(this),e,1<arguments.length?arguments[1]:undefined)}),o("Int8",function(r){return function(e,t,n){return r(this,e,t,n)}}),f.getTypedArrayConstructor),ev=function(e,t){return Gm(Qm(e),t)},tv=si.filter,nv=f.aTypedArray,rv=((0,f.exportTypedArrayMethod)("filter",function(e){e=tv(nv(this),e,1<arguments.length?arguments[1]:undefined);return ev(this,e)}),si.find),iv=f.aTypedArray,ov=((0,f.exportTypedArrayMethod)("find",function(e){return rv(iv(this),e,1<arguments.length?arguments[1]:undefined)}),si.findIndex),av=f.aTypedArray,sv=((0,f.exportTypedArrayMethod)("findIndex",function(e){return ov(av(this),e,1<arguments.length?arguments[1]:undefined)}),si.forEach),uv=f.aTypedArray,lv=((0,f.exportTypedArrayMethod)("forEach",function(e){sv(uv(this),e,1<arguments.length?arguments[1]:undefined)}),Bn.includes),cv=f.aTypedArray,fv=((0,f.exportTypedArrayMethod)("includes",function(e){return lv(cv(this),e,1<arguments.length?arguments[1]:undefined)}),Bn.indexOf),dv=f.aTypedArray,hv=((0,f.exportTypedArrayMethod)("indexOf",function(e){return fv(dv(this),e,1<arguments.length?arguments[1]:undefined)}),Ze("iterator")),Rm=R.Uint8Array,pv=y(pr.values),gv=y(pr.keys),mv=y(pr.entries),vv=f.aTypedArray,i=f.exportTypedArrayMethod,yv=Rm&&Rm.prototype,nr=!m(function(){yv[hv].call([1])}),Ar=!!yv&&yv.values&&yv[hv]===yv.values&&"values"===yv.values.name,Te=function(){return pv(vv(this))},wv=(i("entries",function(){return mv(vv(this))},nr),i("keys",function(){return gv(vv(this))},nr),i("values",Te,nr||!Ar,{name:"values"}),i(hv,Te,nr||!Ar,{name:"values"}),f.aTypedArray),a=f.exportTypedArrayMethod,bv=y([].join),kv=(a("join",function(e){return bv(wv(this),e)}),f.aTypedArray),Sv=((0,f.exportTypedArrayMethod)("lastIndexOf",function(e){var t=arguments.length;return Oe(Hg,kv(this),1<t?[e,arguments[1]]:[e])}),si.map),_v=f.aTypedArray,Ev=((0,f.exportTypedArrayMethod)("map",function(e){e=Sv(_v(this),e,1<arguments.length?arguments[1]:undefined);return ev(this,e)}),e.left),Cv=f.aTypedArray,Ov=((0,f.exportTypedArrayMethod)("reduce",function(e){var t=arguments.length;return Ev(Cv(this),e,t,1<t?arguments[1]:undefined)}),e.right),xv=f.aTypedArray,Rv=((0,f.exportTypedArrayMethod)("reduceRight",function(e){var t=arguments.length;return Ov(xv(this),e,t,1<t?arguments[1]:undefined)}),f.aTypedArray),Bn=f.exportTypedArrayMethod,Iv=Math.floor,Tv=(Bn("reverse",function(){for(var e,t=Rv(this).length,n=Iv(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this}),o("Uint8",function(r){return function(e,t,n){return r(this,e,t,n)}},!0),si.some),Mv=f.aTypedArray,Av=((0,f.exportTypedArrayMethod)("some",function(e){return Tv(Mv(this),e,1<arguments.length?arguments[1]:undefined)}),f.aTypedArray),Rm=f.exportTypedArrayMethod,Pv=R.Uint16Array,Lv=Pv&&In(Pv.prototype.sort),Te=!(!Lv||m(function(){Lv(new Pv(2),null)})&&m(function(){Lv(new Pv(2),{})})),Dv=!!Lv&&!m(function(){if(Tn)return Tn<74;if(kd)return kd<67;if(Sd)return!0;if(_d)return _d<602;for(var e,t=new Pv(516),n=Array(516),r=0;r<516;r++)e=r%4,t[r]=515-r,n[r]=r-2*e+3;for(Lv(t,function(e,t){return(e/4|0)-(t/4|0)}),r=0;r<516;r++)if(t[r]!==n[r])return!0}),Nv=(Rm("sort",function(e){return e!==undefined&&Ce(e),Dv?Lv(this,e):bd(Av(this),(n=e,function(e,t){return n!==undefined?+n(e,t)||0:t!=t?e!=e?0:-1:e!=e?1:0===e&&0===t?0<1/e?0<1/t?0:1:0<1/t?-1:0:t<e?1:e<t?-1:0}));var n},!Dv||Te),f.aTypedArray),Uv=f.getTypedArrayConstructor,Fv=((0,f.exportTypedArrayMethod)("subarray",function(e,t){var n=Nv(this),r=n.length,e=gn(e,r);return new(Uv(n))(n.buffer,n.byteOffset+e*n.BYTES_PER_ELEMENT,le((t===undefined?r:gn(t,r))-e))}),R.Int8Array),jv=f.aTypedArray,nr=f.exportTypedArrayMethod,zv=[].toLocaleString,Bv=!!Fv&&m(function(){zv.call(new Fv(1))}),Ar=(nr("toLocaleString",function(){return Oe(zv,Bv?Pn(jv(this)):jv(this),Pn(arguments))},m(function(){return[1,2].toLocaleString()!==new Fv([1,2]).toLocaleString()})||!m(function(){Fv.prototype.toLocaleString.call([1,2])})),f.exportTypedArrayMethod),i=R.Uint8Array,a=i&&i.prototype||{},Wv=[].toString,Hv=y([].join),e=(m(function(){Wv.call({})})&&(Wv=function(){return Hv(this)}),a.toString!==Wv),qv=(Ar("toString",Wv,e),f.aTypedArray),Vv=f.getTypedArrayConstructor,Gv=((0,f.exportTypedArrayMethod)("slice",function(e,t){for(var n=Pn(qv(this),e,t),e=Vv(this),r=0,i=n.length,o=new e(i);r<i;)o[r]=n[r++];return o},m(function(){new Int8Array(1).slice()})),R.RangeError),Jv=R.Int8Array,Bn=Jv&&Jv.prototype,$v=Bn&&Bn.set,Zv=f.aTypedArray,Te=f.exportTypedArrayMethod,Kv=!m(function(){var e=new Uint8ClampedArray(2);return I($v,e,{length:1,0:3},1),3!==e[1]}),Rm=Kv&&f.NATIVE_ARRAY_BUFFER_VIEWS&&m(function(){var e=new Jv(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}),Yv=(Te("set",function(e){Zv(this);var t=zm(1<arguments.length?arguments[1]:undefined,1),n=oe(e);if(Kv)return I($v,this,n,t);var e=this.length,r=ce(n),i=0;if(e<r+t)throw new Gv("Wrong length");for(;i<r;)this[t+i]=n[i++]},!Kv||Rm),f.aTypedArray),nr=f.exportTypedArrayMethod,Xv=y("".slice);nr("fill",function(e){var t=arguments.length,e=(Yv(this),"Big"===Xv(Qe(this),0,3)?Hm(e):+e);return I(Go,this,e,1<t?arguments[1]:undefined,2<t?arguments[2]:undefined)},m(function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})),new r({name:"aid"});var i=Kn.f,Qv=In("".slice),ey=Math.min,a=xe("startsWith"),Ar=!(a||!(e=i(String.prototype,"startsWith"))||e.writable);function ty(){return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,function(e){return(e^(16*Math.random()&15)>>e/4).toString(16)})}O({target:"String",proto:!0,forced:!Ar&&!a},{startsWith:function(e){var t=C(re(this)),e=(tl(e),C(e)),n=le(ey(1<arguments.length?arguments[1]:undefined,t.length));return Qv(t,n,n+e.length)===e}});oy.generate=function(){return"rep_"+this.uuid32()},oy.uuid32=function(){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".replace(/x/g,function(){return Math.floor(16*Math.random()).toString(16)})};var ny=oy,ry="[SessionReplay]",iy=!1;function oy(){}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];iy&&console.log.apply(console,qu([ry+"["+e+"]"],t))}function ay(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];iy&&console.debug.apply(console,qu([ry+"["+e+"]"],t))}function sy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];iy&&console.log.apply(console,qu([ry+"["+e+"] WARN:"],t))}function uy(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];iy&&console.log.apply(console,qu([ry+"["+e+"] ERROR:"],t))}hy.prototype.setTdemInstance=function(e){this.tdemInstance=e},hy.prototype.createSession=function(e){void 0===e&&(e="session");var t=null==(t=this.session)?void 0:t.replayId,n=Zg("tdem",ty),n=h({id:n.sessionId,replayId:ny.generate(),started:Date.now(),lastActivity:Date.now(),segmentId:0,sampled:e},t?{previousReplayId:t}:{});return this.session=n,this.syncSharedSession(n.id),g("SessionManager","Document replay session created:",n.id,n.replayId),n},hy.prototype.restoreSession=function(){return this.session},hy.prototype.saveSession=function(){},hy.prototype.refreshSession=function(){var e=null!=(e=null==(e=this.session)?void 0:e.sampled)?e:"session";return this.createSession(e)},hy.prototype.updateActivity=function(){this.session&&(this.session.lastActivity=Date.now())},hy.prototype.incrementSegmentId=function(){var e;return this.session?(e=this.session.segmentId,this.session.segmentId+=1,e):0},hy.prototype.shouldRefreshSession=function(){return!1},hy.prototype.getSession=function(){return this.session},hy.prototype.getSessionId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.id)?e:""},hy.prototype.getReplayId=function(){var e;return null!=(e=null==(e=this.session)?void 0:e.replayId)?e:""},hy.prototype.clearSession=function(){var e;this.session=null;try{null!=(e=window.sessionStorage)&&e.removeItem("tdem_session")}catch(w){}},hy.prototype.syncSharedSession=function(e){var t,n,r;this.tdemInstance&&this.tdemInstance.extendBean("sessionId",e),e=e,"undefined"!=typeof window&&(t=Date.now(),(n=window[Vg])?(r=n.sessionId!==e,n.sessionId=e,n.version=r?n.version+1:n.version,n.source="tdem",r&&(n.createdAt=t),n.lastActivity=t):window[Vg]=Jg(e,"tdem"),Gg("_tdem_s",e),$g(window[Vg]),window.dispatchEvent(new CustomEvent("monitor-session-update",{detail:{sessionId:e,source:"tdem"}})))};var ly=hy,cy=((Bn={})[Bn.DomContentLoaded=0]="DomContentLoaded",Bn[Bn.Load=1]="Load",Bn[Bn.FullSnapshot=2]="FullSnapshot",Bn[Bn.IncrementalSnapshot=3]="IncrementalSnapshot",Bn[Bn.Meta=4]="Meta",Bn[Bn.Custom=5]="Custom",Bn[Bn.Plugin=6]="Plugin",Bn[Bn.Asset=7]="Asset",Bn),fy=(dy.prototype.ensureReady=function(){return Wu(this,void 0,void 0,function(){return Hu(this,function(e){return[2,this.ready]})})},dy.prototype.postMessage=function(n,r){var i=this,o=this.nextId++;return new Promise(function(e,t){i.pendingRequests.set(o,{resolve:e,reject:t}),i.worker.postMessage({id:o,method:n,arg:r})})},dy.prototype.destroy=function(){this.pendingRequests.forEach(function(e){return(0,e.reject)(new Error("Worker destroyed"))}),this.pendingRequests.clear(),this.worker.terminate()},dy);function dy(e){var o=this;this.nextId=0,this.pendingRequests=new Map,this.worker=e,this.worker.addEventListener("message",function(e){var e=e.data,t=e.id,n=e.success,r=e.response;"init"!==e.method&&(e=o.pendingRequests.get(t))&&(o.pendingRequests["delete"](t),n?e.resolve(r):e.reject(new Error(r||"Worker request failed")))}),this.ready=new Promise(function(t,n){var r=function(e){e=e.data;"init"===e.method&&e.success&&(o.worker.removeEventListener("message",r),clearTimeout(i),t())},i=(o.worker.addEventListener("message",r),o.worker.addEventListener("error",function(e){o.worker.removeEventListener("message",r),clearTimeout(i),n(new Error("Worker error: "+(e.message||"unknown")))}),setTimeout(function(){o.worker.removeEventListener("message",r),n(new Error("Worker init timeout (5s)"))},5e3))})}function hy(e){this.session=null,this.tdemInstance=null}gy.prototype.initWorker=function(){var t=this,e=function(){try{var e,t,n;return"undefined"==typeof Worker||"undefined"==typeof Blob||"undefined"==typeof URL?null:(e=new Blob(["\n(function() {\n var events = [];\n var totalSize = 0;\n\n function handleMessage(data) {\n var method = data.method;\n var id = data.id;\n\n switch (method) {\n case 'addEvent':\n events.push(data.arg);\n totalSize += data.arg.length;\n return { id: id, method: method, success: true, response: totalSize };\n\n case 'finish':\n var json = '[' + events.join(',') + ']';\n events = [];\n totalSize = 0;\n // 返回原始 JSON 字符串,压缩在主线程做(pako 不好内联到 worker)\n return { id: id, method: method, success: true, response: json };\n\n case 'clear':\n events = [];\n totalSize = 0;\n return { id: id, method: method, success: true, response: void 0 };\n\n default:\n return { id: id, method: method, success: false, response: 'Unknown method' };\n }\n }\n\n self.addEventListener('message', function(e) {\n try {\n var result = handleMessage(e.data);\n self.postMessage(result);\n } catch (err) {\n self.postMessage({\n id: e.data.id,\n method: e.data.method,\n success: false,\n response: err.message || 'Worker error'\n });\n }\n });\n\n // 就绪信号\n self.postMessage({ method: 'init', success: true });\n})();\n"],{type:"application/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{name:"tdem-replay-compressor"}),URL.revokeObjectURL(t),g("CompressionWorker","Worker created successfully"),new fy(n))}catch(v){return sy("CompressionWorker","Failed to create worker, will fallback to sync buffer:",v),null}}();e?(this.workerHandler=e,this.useWorker=!0,e.ensureReady().then(function(){t.workerReady=!0,g("EventBuffer","Worker ready, migrating buffered events"),t.migrateEventsToWorker()})["catch"](function(e){sy("EventBuffer","Worker init failed, falling back to sync buffer:",e),t.useWorker=!1,t.workerHandler=null})):g("EventBuffer","Worker not available, using sync buffer")},gy.prototype.migrateEventsToWorker=function(){if(this.workerHandler&&this.workerReady){var e=this.events;this.events=[];for(var t=0,n=e;t<n.length;t++){var r=n[t];this.addEventToWorker(r)}this.currentSize=0}},gy.prototype.addEventToWorker=function(e){if(this.workerHandler)try{var t=JSON.stringify(e);this.workerHandler.postMessage("addEvent",t),this.workerEventCount++,this.workerSize+=t.length}catch(A){sy("EventBuffer","Failed to send event to worker:",A)}},gy.prototype.addEvent=function(e){var t;this.useWorker&&this.workerReady&&this.workerHandler?(t=this.estimateEventSize(e),this.workerSize+t>this.config.maxSize&&(sy("EventBuffer","Worker buffer size limit exceeded, dropping old events"),this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0),this.addEventToWorker(e)):(t=this.estimateEventSize(e),this.currentSize+t>this.config.maxSize&&(sy("EventBuffer","Size limit exceeded, removing old events"),this.trimOldEvents(t)),this.events.push(e),this.currentSize+=t)},gy.prototype.getEvents=function(){return qu(this.events)},gy.prototype.getEventCount=function(){return this.useWorker&&this.workerReady?this.workerEventCount+this.events.length:this.events.length},gy.prototype.getSize=function(){return this.useWorker&&this.workerReady?this.workerSize+this.currentSize:this.currentSize},gy.prototype.isEmpty=function(){return!(this.useWorker&&this.workerReady&&0!==this.workerEventCount||0!==this.events.length)},gy.prototype.finishAsync=function(){return Wu(this,void 0,void 0,function(){var t,n,r;return Hu(this,function(e){switch(e.label){case 0:if(!(this.useWorker&&this.workerReady&&this.workerHandler&&0<this.workerEventCount))return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.workerHandler.postMessage("finish")];case 2:return t=e.sent(),r=this.workerEventCount,n=this.workerSize,this.workerEventCount=0,this.workerSize=0,[2,{events:[],eventCount:r,uncompressedSize:n,eventsJson:t}];case 3:return sy("EventBuffer","Worker finish failed, falling back to sync:",e.sent()),[3,4];case 4:return[2,{events:r=this.getEvents(),eventCount:r.length,uncompressedSize:this.currentSize}]}})})},gy.prototype.finish=function(){var e=this.getEvents();return{events:e,eventCount:e.length,uncompressedSize:this.currentSize}},gy.prototype.clear=function(){this.events=[],this.currentSize=0,this.useWorker&&this.workerHandler&&(this.workerHandler.postMessage("clear"),this.workerEventCount=0,this.workerSize=0)},gy.prototype.destroy=function(){this.clear(),this.workerHandler&&(this.workerHandler.destroy(),this.workerHandler=null),this.useWorker=!1,this.workerReady=!1},gy.prototype.estimateEventSize=function(e){try{return JSON.stringify(e).length}catch(jy){return 1024}},gy.prototype.trimOldEvents=function(e){for(var t=-1,n=this.events.length-1;0<=n;n--)if(this.events[n].type===cy.FullSnapshot){t=n;break}var r=t;if(0<r)for(n=r-1;0<=n;n--)if(this.events[n].type===cy.Meta){r=n;break}for(var i,o=0,a=Math.max(e,.2*this.config.maxSize),s=0;s<r&&o<a;)s++,(i=this.events.shift())&&(o+=this.estimateEventSize(i));if(r<0)for(;0<this.events.length&&o<a;)(i=this.events.shift())&&(o+=this.estimateEventSize(i));this.currentSize=Math.max(0,this.currentSize-o)},gy.prototype.hasCheckout=function(){return this.events.some(function(e){return e.type===cy.Meta||e.type===cy.FullSnapshot})},gy.prototype.getLastCheckoutTime=function(){for(var e=this.events.length-1;0<=e;e--){var t=this.events[e];if(t.type===cy.FullSnapshot)return t.timestamp}return null},gy.prototype.isUsingWorker=function(){return this.useWorker&&this.workerReady};var py=gy;function gy(e,t){void 0===e&&(e={}),void 0===t&&(t=!1),this.events=[],this.currentSize=0,this.workerHandler=null,this.useWorker=!1,this.workerReady=!1,this.workerEventCount=0,this.workerSize=0,this.config={maxSize:null!=(e=e.maxSize)?e:5242880},t&&this.initWorker()}pi("toStringTag"),hr(be("Symbol"),"Symbol"),hr(R.JSON,"JSON",!0),hr(Math,"Math",!0),O({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var my=Wn.trim,vy=y("".charAt),yy=R.parseFloat,Rm=R.Symbol,wy=Rm&&Rm.iterator,Te=1/yy(Vi+"-0")!=-Infinity||wy&&!m(function(){yy(Object(wy))})?function(e){var e=my(C(e)),t=yy(e);return 0===t&&"-"===vy(e,0)?-0:t}:yy,by=(O({target:"Number",stat:!0,forced:Number.parseFloat!==Te},{parseFloat:Te}),be("Reflect","construct")),ky=Object.prototype,Sy=[].push,_y=m(function(){function e(){}return!(by(function(){},[],e)instanceof e)}),Ey=!m(function(){by(function(){})}),nr=_y||Ey,Cy=(O({target:"Reflect",stat:!0,forced:nr,sham:nr},{construct:function(e,t){Ws(e);var n=arguments.length<3?e:Ws(arguments[2]);if(E(t),Ey&&!_y)return by(e,t,n);if(e===n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return Oe(Sy,r,t),new(Oe(ts,e,r))}r=n.prototype,n=rr(x(r)?r:ky),r=Oe(e,n,t);return x(r)?r:n}}),function(e,t,n){var r,i;return E(e)===n?e[t]:(r=Kn.f(e,t))?(i=r)!==undefined&&(T(i,"value")||T(i,"writable"))?r.value:r.get===undefined?undefined:I(r.get,n):(i=tr(e),x(i)?Cy(i,t,n):void 0)}),i=(O({target:"Reflect",stat:!0},{get:function(e,t){return Cy(E(e),gi(t),arguments.length<3?e:arguments[2])}}),Kn.f),Oy=In("".slice),xy=Math.min,e=xe("endsWith"),a=!(e||!(Ar=i(String.prototype,"endsWith"))||Ar.writable),Ry=(O({target:"String",proto:!0,forced:!a&&!e},{endsWith:function(e){var t=C(re(this)),e=(tl(e),C(e)),n=1<arguments.length?arguments[1]:undefined,r=t.length,n=n===undefined?r:xy(le(n),r);return Oy(t,n-e.length,n)===e}}),y("".replace),O({target:"String",proto:!0,forced:m(function(){var e="".bold('"');return e!==e.toLowerCase()||3<e.split('"').length})},{bold:function(){return 0,"<b"+">"+C(re(this))+"</b>"}}),o("Float64",function(r){return function(e,t,n){return r(this,e,t,n)}}),o("Int16",function(r){return function(e,t,n){return r(this,e,t,n)}}),o("Int32",function(r){return function(e,t,n){return r(this,e,t,n)}}),o("Uint16",function(r){return function(e,t,n){return r(this,e,t,n)}}),o("Uint32",function(r){return function(e,t,n){return r(this,e,t,n)}}),Object.isFrozen),Wn=ma||m(function(){Ry(1)}),Iy=(O({target:"Object",stat:!0,forced:Wn},{isFrozen:function(e){return!x(e)||!(!ma||"ArrayBuffer"!==Q(e))||!!Ry&&Ry(e)}}),Object.isSealed),Rm=ma||m(function(){Iy(1)}),Ty=(O({target:"Object",stat:!0,forced:Rm},{isSealed:function(e){return!x(e)||!(!ma||"ArrayBuffer"!==Q(e))||!!Iy&&Iy(e)}}),_a.onFreeze),My=Object.seal,Te=m(function(){My(1)});O({target:"Object",stat:!0,forced:Te,sham:!0},{seal:function(e){return My&&x(e)?My(Ty(e)):e}});var Ay,Py,Ly,Dy,Ny=bt.enforce,nr=Object,Uy=(Array.isArray,nr.isExtensible),In=!R.ActiveXObject&&"ActiveXObject"in R,xe=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},i=lt("WeakMap",xe,fa),Ar=i.prototype,Fy=y(Ar.set);Re&&In&&(Ay=fa.getConstructor(xe,"WeakMap",!0),_a.enable(),Py=y(Ar["delete"]),Ly=y(Ar.has),Dy=y(Ar.get),Uo(Ar,{"delete":function(e){var t;return x(e)&&!Uy(e)?((t=Ny(this)).frozen||(t.frozen=new Ay),Py(this,e)||t.frozen["delete"](e)):Py(this,e)},has:function(e){var t;return x(e)&&!Uy(e)?((t=Ny(this)).frozen||(t.frozen=new Ay),Ly(this,e)||t.frozen.has(e)):Ly(this,e)},get:function(e){var t;return!x(e)||Uy(e)||((t=Ny(this)).frozen||(t.frozen=new Ay),Ly(this,e))?Dy(this,e):t.frozen.get(e)},set:function(e,t){var n;return!x(e)||Uy(e)||((n=Ny(this)).frozen||(n.frozen=new Ay),Ly(this,e))?Fy(this,e,t):n.frozen.set(e,t),this}}));var jy,zy=["inputs"],By=["inputId"],Wy=["inputs"],Hy=["inputId"],qy=["type"],Vy=Object.defineProperty,M=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?Vy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Gy=Object.defineProperty,Jy=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?Gy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},$y=((a=$y||{})[a.Document=0]="Document",a[a.DocumentType=1]="DocumentType",a[a.Element=2]="Element",a[a.Text=3]="Text",a[a.CDATA=4]="CDATA",a[a.Comment=5]="Comment",a),Zy={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ky={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Yy={},Xy={};function Qy(e){if(Yy[e])return Yy[e];var t=globalThis[e],n=t.prototype,r=e in Zy?Zy[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in Ky?Ky[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return Yy[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),Xy[e]=function(){return s.remove()}):s.remove(),Yy[e]=o):(s.remove(),n):t.prototype}catch(N){return n}}var e0={};function t0(e,t,n){var r="".concat(e,".").concat(String(n));return e0[r]?e0[r].call(t):(e=Qy(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(e0[r]=e).call(t):t[n])}var n0={};function r0(e,t,n){var r="".concat(e,".").concat(String(n));return n0[r]?n0[r].bind(t):"function"!=typeof(e=Qy(e)[n])?t[n]:(n0[r]=e).bind(t)}var e=Date.now,i0={ownerDocument:function(e){return t0("Node",e,"ownerDocument")},childNodes:function(e){return t0("Node",e,"childNodes")},parentNode:function(e){return t0("Node",e,"parentNode")},parentElement:function(e){return t0("Node",e,"parentElement")},textContent:function(e){return t0("Node",e,"textContent")},contains:function(e,t){return r0("Node",e,"contains")(t)},getRootNode:function(e){return r0("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?t0("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?t0("Element",e,"shadowRoot"):null},querySelector:function(e,t){return t0("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return t0("Element",e,"querySelectorAll")(t)},nowTimestamp:e=/[1-9][0-9]{12}/.test(Date.now().toString())?e:function(){return(new Date).getTime()},mutationObserverCtor:function(){var e;return[Qy("MutationObserver").constructor,null!=(e=Xy.MutationObserver)?e:function(){}]},patch:function(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(De){return function(){}}}};function o0(e){return e.nodeType===e.ELEMENT_NODE}function a0(e){var t=e&&"host"in e&&"mode"in e&&i0.host(e)||null;return Boolean(t&&"shadowRoot"in t&&i0.shadowRoot(t)===e)}function s0(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function u0(e){try{var t,n=e.rules||e.cssRules;return n?(!(t=e.href)&&e.ownerNode&&(t=e.ownerNode.baseURI),r=(r=Array.from(n,function(e){return l0(e,t)}).join("")).includes(" background-clip: text;")&&!r.includes(" -webkit-background-clip: text;")?r.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;"):r):null}catch(X){return null}var r}function l0(e,t){if("styleSheet"in e){var n;try{n=u0(e.styleSheet)||((r=(i=e).cssText).split('"').length<3?r:(r=["@import","url(".concat(JSON.stringify(i.href),")")],""===i.layerName?r.push("layer"):i.layerName&&r.push("layer(".concat(i.layerName,")")),i.supportsText&&r.push("supports(".concat(i.supportsText,")")),i.media.length&&r.push(i.media.mediaText),r.join(" ")+";"))}catch(X){n=e.cssText}return e.styleSheet.href?w0(n,e.styleSheet.href):n}var r,i=e.cssText;return"selectorText"in e&&e.selectorText.includes(":")&&(i=i.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t?w0(i,t):i}var c0=k(function u(){b(this,u),Jy(this,"idNodeMap",new Map),Jy(this,"nodeMetaMap",new WeakMap)},[{key:"getId",value:function(e){return e&&null!=(e=null==(e=this.getMeta(e))?void 0:e.id)?e:-1}},{key:"getNode",value:function(e){return this.idNodeMap.get(e)||null}},{key:"getIds",value:function(){return Array.from(this.idNodeMap.keys())}},{key:"getMeta",value:function(e){return this.nodeMetaMap.get(e)||null}},{key:"removeNodeFromMap",value:function(e){var t=this,n=this.getId(e);this.idNodeMap["delete"](n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})}},{key:"has",value:function(e){return this.idNodeMap.has(e)}},{key:"hasNode",value:function(e){return this.nodeMetaMap.has(e)}},{key:"add",value:function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}},{key:"replace",value:function(e,t){var n=this.getNode(e);n&&(n=this.nodeMetaMap.get(n))&&this.nodeMetaMap.set(t,n),this.idNodeMap.set(e,t)}},{key:"reset",value:function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}]);function f0(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.maskInputFn,e=e.value||"",i=i&&d0(i);return e=n[r.toLowerCase()]||i&&n[i]?o?o(e,t):"*".repeat(e.length):e}function d0(e){return e.toLowerCase()}function h0(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?d0(t):null}function p0(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(Le){return null}e=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(t=null==e?void 0:e[1])?t:null}var g0=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,m0=/^(?:[a-z+]+:)?\/\//i,v0=/^www\..*/i,y0=/^(data:)([^,]*),(.*)/i;function w0(e,c){return(e||"").replace(g0,function(e,t,n,r,i,o){n=n||i||o,i=t||r||"";if(!n)return e;if(m0.test(n)||v0.test(n))return"url(".concat(i).concat(n).concat(i,")");if(y0.test(n))return"url(".concat(i).concat(n).concat(i,")");if("/"===n[0])return"url(".concat(i).concat((-1<(o=c).indexOf("//")?o.split("/").slice(0,3).join("/"):o.split("/")[0]).split("?")[0]+n).concat(i,")");var t=n.split("#")[0],r=n.substring(t.length),a=c.split("#")[0].split("/"),e=t.split("/");a.pop();var s,u=Me(e);try{for(u.s();!(s=u.n()).done;){var l=s.value;"."!==l&&(".."===l?a.pop():a.push(l))}}catch(Le){u.e(Le)}finally{u.f()}return"url(".concat(i).concat(a.join("/")).concat(r).concat(i,")")})}function b0(e,t){return 1<arguments.length&&t!==undefined&&t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}var k0,S0,_0=1,E0=new RegExp("[^a-z0-9-_:]");function C0(){return _0++}var O0=/^[^ \t\n\r\u000c]+/,x0=/^[, \t\n\r\u000c]+/,R0=new WeakMap;function I0(e,t){return t&&""!==t.trim()?T0(e,t):t}function T0(e,t){var n=R0.get(e);if(n||(n=e.createElement("a"),R0.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function M0(e,t,n,r){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&["table","td","th"].includes(t)?I0(e,r):"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var e=e.exec(t.substring(n));return e?(e=e[0],n+=e.length,e):""}for(var i=[];r(x0),!(n>=t.length);)if(","===(a=r(O0)).slice(-1))a=I0(e,a.substring(0,a.length-1)),i.push(a);else for(var o="",a=I0(e,a),s=!1;;){var u=t.charAt(n);if(""===u){i.push((a+o).trim());break}if(s)")"===u&&(s=!1);else{if(","===u){n+=1,i.push((a+o).trim());break}"("===u&&(s=!0)}o+=u,n+=1}return i.join(", ")}(e,r):"style"===n?w0(r,T0(e)):"object"===t&&"data"===n?I0(e,r):r)}function A0(e,t){return["video","audio"].includes(e)&&"autoplay"===t}function P0(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE)for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&P0(i0.parentNode(e),t,n)}function L0(e,t,n,r){var i;if(o0(e)){if(!i0.childNodes(i=e).length)return!1}else{if(null===i0.parentElement(e))return!1;i=i0.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest(".".concat(t)))return!0}else if(i.classList.contains(t))return!0}else if(P0(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(De){}return!1}function D0(e,t){var n=t.doc,r=t.blockClass,i=t.blockSelector,o=t.needsMask,a=t.inlineStylesheet,s=t.maskInputOptions,u=void 0===s?{}:s,l=t.maskTextFn,c=t.maskInputFn,s=t.dataURLOptions,f=void 0===s?{}:s,d=t.inlineImages,N=t.recordCanvas,U=t.keepIframeSrcFn,s=t.newlyAddedElement,F=void 0!==s&&s,s=t.cssCaptured,j=void 0!==s&&s,h=(s=n,!(t=t.mirror).hasNode(s)||1===(s=t.getId(s))?void 0:s);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:$y.Document,childNodes:[],compatMode:e.compatMode}:{type:$y.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$y.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:h};case e.ELEMENT_NODE:for(var p,g,m,v,y,w,b=e,k=(M={doc:n,blockClass:r,blockSelector:i,inlineStylesheet:a,maskInputOptions:u,maskInputFn:c,dataURLOptions:f,inlineImages:d,recordCanvas:N,keepIframeSrcFn:U,newlyAddedElement:F,rootId:h}).doc,S=M.blockSelector,_=M.inlineStylesheet,E=void 0===(E=M.maskInputOptions)?{}:E,C=M.maskInputFn,O=void 0===(x=M.dataURLOptions)?{}:x,x=M.inlineImages,R=M.recordCanvas,I=M.keepIframeSrcFn,T=void 0!==(T=M.newlyAddedElement)&&T,z=M.rootId,M=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(S){}return!1}(b,M.blockClass,S),A=(g=b)instanceof HTMLFormElement?"form":(g=d0(g.tagName),E0.test(g)?"div":g),P={},B=b.attributes.length,L=0;L<B;L++){var D=b.attributes[L];A0(A,D.name)||(P[D.name]=M0(k,A,d0(D.name),D.value))}"link"===A&&_&&(g=null,g=(_=Array.from(k.styleSheets).find(function(e){return e.href===b.href}))?u0(_):g)&&(delete P.rel,delete P.href,P._cssText=g),"style"===A&&b.sheet&&(_=u0(b.sheet))&&(1<b.childNodes.length&&(_=function(e,t,n){var r=2<arguments.length&&n!==undefined&&n,i=Array.from(t.childNodes),o=[],a=0;if(1<i.length&&e&&"string"==typeof e)for(var s=b0(e,r),u=s.length/e.length,l=1;l<i.length;l++)if(i[l].textContent&&"string"==typeof i[l].textContent){for(var c=b0(i[l].textContent,r),f=3;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,f),1));f++);for(;f<c.length;f++){var d,h=c.substring(0,f),p=s.split(h),g=-1;if(2===p.length)g=p[0].length;else if(2<p.length&&""===p[0]&&""!==i[l-1].textContent)g=s.indexOf(h,1);else if(1===p.length){if(h=h.substring(0,h.length-1),(p=s.split(h)).length<=1)return o.push(e),o;f=101}else f===c.length-1&&(g=s.indexOf(h));if(-1!==(g=2<=p.length&&100<f&&((d=i[l-1].textContent)&&"string"==typeof d&&(d=b0(d).length,g=s.indexOf(h,d)),-1===g)?p[0].length:g)){for(var m=Math.floor(g/u);0<m&&m<e.length;){if((a+=1)>50*i.length)return o.push(e),o;var v=b0(e.substring(0,m),r);if(v.length===g){o.push(e.substring(0,m)),e=e.substring(m),s=s.substring(g);break}v.length<g?m+=Math.max(1,Math.floor((g-v.length)/u)):m-=Math.max(1,Math.floor((v.length-g)*u))}break}}}return o.push(e),o}(_,b).join("/* rr_split */")),P._cssText=_),["input","textarea","select"].includes(A)&&(g=b.value,_=b.checked,"radio"!==P.type&&"checkbox"!==P.type&&"submit"!==P.type&&"button"!==P.type&&g?P.value=f0({element:b,type:h0(b),tagName:A,value:g,maskInputOptions:E,maskInputFn:C}):_&&(P.checked=_)),"option"===A&&(b.selected&&!E.select?P.selected=!0:delete P.selected),"dialog"===A&&b.open&&(P.rr_open_mode=b.matches("dialog:modal")?"modal":"non-modal"),"canvas"===A&&R&&("2d"===b.__context?function(e){var t=e.getContext("2d");if(t)for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,i="__rrweb_original__"in i?i.__rrweb_original__:i;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return}return 1}(b)||(P.rr_dataURL=b.toDataURL(O.type,O.quality)):"__context"in b||(g=b.toDataURL(O.type,O.quality),(C=k.createElement("canvas")).width=b.width,C.height=b.height,g!==C.toDataURL(O.type,O.quality)&&(P.rr_dataURL=g))),"img"===A&&x&&(k0||(k0=k.createElement("canvas"),S0=k0.getContext("2d")),v=(m=b).currentSrc||m.getAttribute("src")||"<unknown-src>",y=m.crossOrigin,w=function(){m.removeEventListener("load",w);try{k0.width=m.naturalWidth,k0.height=m.naturalHeight,S0.drawImage(m,0,0),P.rr_dataURL=k0.toDataURL(O.type,O.quality)}catch(Le){if("anonymous"!==m.crossOrigin)return m.crossOrigin="anonymous",void(m.complete&&0!==m.naturalWidth?w():m.addEventListener("load",w));console.warn("Cannot inline img src=".concat(v,"! Error: ").concat(Le))}"anonymous"===m.crossOrigin&&(y?P.crossOrigin=y:m.removeAttribute("crossorigin"))},m.complete&&0!==m.naturalWidth?w():m.addEventListener("load",w)),["audio","video"].includes(A)&&((_=P).rr_mediaState=b.paused?"paused":"played",_.rr_mediaCurrentTime=b.currentTime,_.rr_mediaPlaybackRate=b.playbackRate,_.rr_mediaMuted=b.muted,_.rr_mediaLoop=b.loop,_.rr_mediaVolume=b.volume),T||(b.scrollLeft&&(P.rr_scrollLeft=b.scrollLeft),b.scrollTop&&(P.rr_scrollTop=b.scrollTop)),M&&(R=(E=b.getBoundingClientRect()).width,C=E.height,P={"class":P["class"],rr_width:"".concat(R,"px"),rr_height:"".concat(C,"px")}),"iframe"!==A||I(P.src)||(b.contentDocument||(P.rr_src=P.src),delete P.src);try{customElements.get(A)&&(p=!0)}catch(ne){}return{type:$y.Element,tagName:A,attributes:P,childNodes:[],isSVG:Boolean("svg"===b.tagName||b.ownerSVGElement)||void 0,needBlock:M,rootId:z,isCustom:p};case e.TEXT_NODE:return g=e,_=(x={doc:n,needsMask:o,maskTextFn:l,rootId:h,cssCaptured:j}).needsMask,T=x.maskTextFn,E=x.rootId,R=x.cssCaptured,C=(C=i0.parentNode(g))&&C.tagName,I="",M="STYLE"===C||void 0,(C="SCRIPT"===C||void 0)?I="SCRIPT_PLACEHOLDER":R||(I=i0.textContent(g),M&&(I=I&&w0(I,T0(x.doc)))),!M&&!C&&I&&_&&(I=T?T(I,i0.parentElement(g)):I.replace(/[\S]/g,"*")),{type:$y.Text,textContent:I||"",rootId:E};case e.CDATA_SECTION_NODE:return{type:$y.CDATA,textContent:"",rootId:h};case e.COMMENT_NODE:return{type:$y.Comment,textContent:i0.textContent(e)||"",rootId:h};default:return!1}}function N0(e){return null==e?"":e.toLowerCase()}function U0(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function F0(t,e){var n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,u=e.skipChild,u=void 0!==u&&u,l=e.inlineStylesheet,c=void 0===l||l,l=e.maskInputOptions,f=void 0===l?{}:l,d=e.maskTextFn,h=e.maskInputFn,p=e.slimDOMOptions,l=e.dataURLOptions,g=void 0===l?{}:l,l=e.inlineImages,m=void 0!==l&&l,l=e.recordCanvas,v=void 0!==l&&l,y=e.onSerialize,w=e.onIframeLoad,l=e.iframeLoadTimeout,b=void 0===l?5e3:l,k=e.onStylesheetLoad,l=e.stylesheetLoadTimeout,S=void 0===l?5e3:l,l=e.keepIframeSrcFn,_=void 0===l?function(){return!1}:l,l=e.newlyAddedElement,l=void 0!==l&&l,E=e.cssCaptured,E=void 0!==E&&E,C=e.needsMask,e=e.preserveWhiteSpace,O=void 0===e||e,C=C||L0(t,a,s,void 0===C),e=D0(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,dataURLOptions:g,inlineImages:m,recordCanvas:v,keepIframeSrcFn:_,newlyAddedElement:l,cssCaptured:E});if(!e)return console.warn(t,"not serialized"),null;var l=r.hasNode(t)?r.getId(t):function(e,t){if(t.comment&&e.type===$y.Comment)return 1;if(e.type===$y.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===p0(e.attributes.href)))return 1;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(N0(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===N0(e.attributes.name)||"icon"===N0(e.attributes.rel)||"apple-touch-icon"===N0(e.attributes.rel)||"shortcut icon"===N0(e.attributes.rel))))return 1;if("meta"===e.tagName){if(t.headMetaDescKeywords&&N0(e.attributes.name).match(/^description|keywords$/))return 1;if(t.headMetaSocial&&(N0(e.attributes.property).match(/^(og|twitter|fb):/)||N0(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===N0(e.attributes.name)))return 1;if(t.headMetaRobots&&("robots"===N0(e.attributes.name)||"googlebot"===N0(e.attributes.name)||"bingbot"===N0(e.attributes.name)))return 1;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return 1;if(t.headMetaAuthorship&&("author"===N0(e.attributes.name)||"generator"===N0(e.attributes.name)||"framework"===N0(e.attributes.name)||"publisher"===N0(e.attributes.name)||"progid"===N0(e.attributes.name)||N0(e.attributes.property).match(/^article:/)||N0(e.attributes.property).match(/^product:/)))return 1;if(t.headMetaVerification&&("google-site-verification"===N0(e.attributes.name)||"yandex-verification"===N0(e.attributes.name)||"csrf-token"===N0(e.attributes.name)||"p:domain_verify"===N0(e.attributes.name)||"verify-v1"===N0(e.attributes.name)||"verification"===N0(e.attributes.name)||"shopify-checkout-api-token"===N0(e.attributes.name)))return 1}}}(e,p)||!O&&e.type===$y.Text&&!e.textContent.replace(/^\s+|\s+$/gm,"").length?-2:_0++,x=Object.assign(e,{id:l});if(r.add(t,x),-2===l)return null;y&&y(t);E=!u;if(x.type===$y.Element&&(E=E&&!x.needBlock,delete x.needBlock,e=i0.shadowRoot(t))&&s0(e)&&(x.isShadowHost=!0),(x.type===$y.Document||x.type===$y.Element)&&E){p.headWhitespace&&x.type===$y.Element&&"head"===x.tagName&&(O=!1);var R={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:u,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_,cssCaptured:!1};if(x.type!==$y.Element||"textarea"!==x.tagName||void 0===x.attributes.value){x.type===$y.Element&&void 0!==x.attributes._cssText&&"string"==typeof x.attributes._cssText&&(R.cssCaptured=!0);for(var I=0,T=Array.from(i0.childNodes(t));I<T.length;I++){var M=F0(T[I],R);M&&x.childNodes.push(M)}}var A=null;if(o0(t)&&(A=i0.shadowRoot(t)))for(var P=0,L=Array.from(i0.childNodes(A));P<L.length;P++){var D=F0(L[P],R);D&&(s0(A)&&(D.isShadow=!0),x.childNodes.push(D))}}l=i0.parentNode(t);return l&&a0(l)&&s0(l)&&(x.isShadow=!0),x.type===$y.Element&&"iframe"===x.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(X){return}if("complete"===i){if("about:blank"!==r.location.href||"about:blank"===e.src||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()})}}}(t,function(){var e=t.contentDocument;e&&w&&(e=F0(e,{doc:e,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&w(t,e)},b),x.type===$y.Element&&"link"===x.tagName&&"string"==typeof x.attributes.rel&&("stylesheet"===x.attributes.rel||"preload"===x.attributes.rel&&"string"==typeof x.attributes.href&&"css"===p0(x.attributes.href))&&function(e,t,n){var r,i,o=!1;try{r=e.sheet}catch(X){return}r||(i=setTimeout(function(){o||(t(),o=!0)},n),e.addEventListener("load",function(){clearTimeout(i),o=!0,t()}))}(t,function(){var e;k&&(e=F0(t,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:C,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:c,maskInputOptions:f,maskTextFn:d,maskInputFn:h,slimDOMOptions:p,dataURLOptions:g,inlineImages:m,recordCanvas:v,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:k,stylesheetLoadTimeout:S,keepIframeSrcFn:_}))&&k(t,e)},S),x}var j0,z0={exports:{}};var B0,W0,H0,q0,V0,G0=(H0=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?H0:("function"==typeof(q0=H0["default"])?(V0=function H0(){return this instanceof H0?Reflect.construct(q0,arguments,this.constructor):q0.apply(this,arguments)}).prototype=q0.prototype:V0={},Object.defineProperty(V0,"__esModule",{value:!0}),Object.keys(H0).forEach(function(e){var t=Object.getOwnPropertyDescriptor(H0,e);Object.defineProperty(V0,e,t.get?t:{enumerable:!0,get:function(){return H0[e]}})}),V0);function J0(){var f,d,e,t,n;return W0||(W0=1,j0||(j0=1,t=String,z0.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),z0.exports.createColors=n),f=z0.exports,d=G0,n=$(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=f.isColorSupported);var n,i,o,a,s,t=(t=d&&e?d(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=f.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(B0=e)["default"]=e),B0;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var $0,Z0,K0,Y0,X0,Q0,ew,tw,nw,rw,iw,ow,aw,sw,uw,lw,cw,fw,dw,hw,pw,gw,mw,vw,yw,ww,bw,kw,Sw,_w,Ew,Cw,Ow,xw,Rw,Iw,Tw,Mw,Aw,Pw,Lw,Dw,Nw,Uw,Fw,jw,zw,Bw,Ww,Hw,qw,Vw={};function Gw(){return $0||($0=1,Vw.isClean=Symbol("isClean"),Vw.my=Symbol("my")),Vw}function Jw(){var a,t;return K0||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(K0=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(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)}}]),(Z0=t)["default"]=t),Z0}function $w(){var n;return X0||(X0=1,n=Jw(),(Y0=e)["default"]=e),Y0;function e(e,t){new n(t).stringify(e)}}function Zw(){var o,a,s,i,n,r,e;return ew||(ew=1,a=(o=Gw()).isClean,s=o.my,i=J0(),n=Jw(),r=$w(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Le){r.e(Le)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=S(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===S(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===S(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ue(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Q0=e)["default"]=e),Q0}function Kw(){var e;return nw||(nw=1,e=Zw(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),(tw=e)["default"]=e),tw;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function Yw(){var r,i,t,n,o,a,s;return aw||(aw=1,r=G0.SourceMapConsumer,i=G0.SourceMapGenerator,t=G0.existsSync,n=G0.readFileSync,o=G0.dirname,a=G0.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===S(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(ow=s)["default"]=s),ow}function Xw(){var n,a,u,s,r,i,e,l,o,c,f,d,t;return uw||(uw=1,n=G0.SourceMapConsumer,t=G0.SourceMapGenerator,a=G0.fileURLToPath,u=G0.pathToFileURL,s=G0.isAbsolute,r=G0.resolve,i=(iw?rw:(iw=1,rw={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=G0,l=J0(),o=Yw(),c=Symbol("fromOffsetCache"),f=Boolean(n&&t),d=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===S(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),d&&f&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===S(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(sw=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),sw}function Qw(){if(cw)return lw;cw=1;var a=G0.SourceMapConsumer,t=G0.SourceMapGenerator,s=G0.dirname,n=G0.relative,r=G0.resolve,i=G0.sep,o=G0.pathToFileURL,u=Xw(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return lw=k(function F(e,t,n,r){b(this,F),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Le){t.e(Le)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(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))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function eb(){var e;return dw||(dw=1,e=Zw(),U(t,e),e=k(t),(fw=e)["default"]=e),fw;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function tb(){var l,c,f,t,d,h,p,g,n,e;return pw||(pw=1,e=Gw(),d=e.isClean,h=e.my,p=Kw(),g=eb(),e=Zw(),U(m,e),(n=k(m,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Le){s.e(Le)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(V(m,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Le){n.e(Le)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ue(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Le){s.e(Le)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Le){s.e(Le)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function W(e){return e.map(function(e){return e.nodes&&(e.nodes=W(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Le){i.e(Le)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Le){s.e(Le)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new f(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new g(e)]}return e.map(function(e){return e[h]||m.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&function c(e){if(e[d]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Le){n.e(Le)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Le){l.e(Le)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Le){i.e(Le)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Le){t.e(Le)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){f=e},n.registerRoot=function(e){t=e},((hw=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,f.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,g.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),hw;function m(){return b(this,m),v(this,m,arguments)}}function nb(){var t,n,e;return mw||(mw=1,e=tb(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(gw=e)["default"]=e),gw;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function rb(){if(yw)return vw;yw=1;var t={};return vw=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function ib(){var r;return bw||(bw=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){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}}]),(ww=r)["default"]=r),ww}function ob(){var n,r;return Sw||(Sw=1,n=ib(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(kw=r)["default"]=r),kw}function ab(){var e,t;return Ow||(Ow=1,e=tb(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V(r,"prepend",this,3)(t)}}]),(Cw=t)["default"]=t,e.registerAtRule(t)),Cw;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function sb(){var t,n,e,r;return Rw||(Rw=1,e=tb(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=V(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Le){i.e(Le)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),V(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},xw=r,e.registerRoot(r["default"]=r)),xw;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function ub(){var t;return Tw||(Tw=1,(Iw=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,f=Me(e);try{for(f.s();!(r=f.n()).done;){var d=r.value;c?c=!1:"\\"===d?c=!0:u?d===l&&(u=!1):'"'===d||"'"===d?(u=!0,l=d):"("===d?s+=1:")"===d?0<s&&--s:0===s&&t.includes(d)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=d}}catch(Le){f.e(Le)}finally{f.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),Iw}function lb(){var e,t,n;return Aw||(Aw=1,e=tb(),t=ub(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(Mw=n)["default"]=n,e.registerRule(n)),Mw;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function cb(){if(Lw)return Pw;Lw=1;var p=Kw(),e=function(){if(Ew)return _w;Ew=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),O="\t".charCodeAt(0),x="\r".charCodeAt(0),R="[".charCodeAt(0),I="]".charCodeAt(0),T="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),U="@".charCodeAt(0),F=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return _w=function(t){var r,i,o,a,s,u,l,c,f,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},d=t.css.valueOf(),h=e.ignoreErrors,p=d.length,g=0,m=[],v=[];function y(e){throw t.error("Unclosed "+e,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=g},nextToken:function(e){if(v.length)return v.pop();if(!(p<=g)){var t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(g)){case _:case E:case O:case x:case C:for(i=g;i+=1,(r=d.charCodeAt(i))===E||r===_||r===O||r===x||r===C;);f=["space",d.slice(g,i)],g=i-1;break;case R:case I:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);f=[n,n,g];break;case T:if(l=m.length?m.pop()[1]:"",c=d.charCodeAt(g+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==O&&c!==C&&c!==x){i=g;do{if(s=!1,-1===(i=d.indexOf(")",i+1))){if(h||t){i=g;break}y("bracket")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["brackets",d.slice(g,i+1),g,i],g=i}else i=d.indexOf(")",g+1),l=d.slice(g,i+1),-1===i||z.test(l)?f=["(","(",g]:(f=["brackets",l,g,i],g=i);break;case w:case b:o=r===w?"'":'"',i=g;do{if(s=!1,-1===(i=d.indexOf(o,i+1))){if(h||t){i=g+1;break}y("string")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["string",d.slice(g,i+1),g,i],g=i;break;case U:F.lastIndex=g+1,F.test(d),i=0===F.lastIndex?d.length-1:F.lastIndex-2,f=["at-word",d.slice(g,i+1),g,i],g=i;break;case k:for(i=g,a=!0;d.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=d.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==O&&r!==x&&r!==C&&(i+=1,B.test(d.charAt(i)))){for(;B.test(d.charAt(i+1));)i+=1;d.charCodeAt(i+1)===E&&(i+=1)}f=["word",d.slice(g,i+1),g,i],g=i;break;default:g=(r===S&&d.charCodeAt(g+1)===D?(0===(i=d.indexOf("*/",g+2)+1)&&(h||t?i=d.length:y("comment")),f=["comment",d.slice(g,i+1),g,i]):(j.lastIndex=g+1,j.test(d),i=0===j.lastIndex?d.length-1:j.lastIndex-2,f=["word",d.slice(g,i+1),g,i],m.push(f)),i)}return g++,f}},position:function(){return g}}}}(),n=eb(),l=ab(),t=sb(),r=lb(),d={empty:!0,space:!0};return Pw=k(function D(e){b(this,D),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=Ne(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Le){a.e(Le)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),f="",d=u;0<d;d--){var h=c[d][0];if(0===f.trim().indexOf("!")&&"space"!==h)break;f=c.pop()[1]+f}0===f.trim().indexOf("!")&&(n.important=!0,n.raws.important=f,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(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)}},{key:"endFile",value:function(){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())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[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)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,f=0;f<u;f+=1)"space"===(a=(i=n[f])[0])&&f===u-1&&!r||"comment"===a&&(a=n[f-1]?n[f-1][0]:"empty",o=n[f+1]?n[f+1][0]:"empty",d[a]||d[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function fb(){var e,n,r;return Nw||(Nw=1,e=tb(),n=cb(),r=Xw(),Dw=t,e.registerParse(t["default"]=t)),Dw;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(P){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===P.name&&t&&t.from&&(/\.scss$/i.test(t.from)?P.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?P.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(P.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),P}return e.root}}function db(){var f,a,n,r,u,s,i,c,l,e,o,d,h,p,t,g;return Fw||(Fw=1,t=Gw(),f=t.isClean,a=t.my,n=Qw(),r=$w(),u=tb(),s=nb(),i=rb(),c=ob(),l=fb(),e=sb(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==S(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===S(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Le){console&&console.error&&console.error(Le)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===S(i))for(var o in i){if(!d[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===S(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Le){n.e(Le)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(g=A(B().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return B().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],m(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[f]){e.n=14;break}i[f]=!0,n=[y(i)];case 8:if(0<n.length){if(m(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=B().m(function d(){var t,n,r;return B().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Ne(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},d,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(H(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return g.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===S(t)&&t.Once?"document"===this.result.root.type?m((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(m(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Le){t.e(Le)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[f];)r[f]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Le){o.e(Le)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=Ne(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(s))throw this.getAsyncError()}}catch(Le){r.e(Le)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=Ne(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[f])return a[f]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[f]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[f]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[f]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Le){r.e(Le)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},Uw=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),Uw;function m(e){return"object"===S(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[f]=!1,e.nodes&&e.nodes.forEach(w),e}}function hb(){var n,r,t,e,i,o,a,s,u,l,c;return Ww||(Ww=1,zw||(zw=1,o=Qw(),a=$w(),s=rb(),u=fb(),l=ob(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=Ne(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(jw=c)["default"]=c),n=jw,r=db(),t=nb(),e=sb(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===S(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===S(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==S(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Le){r.e(Le)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(Bw=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),Bw}s||(s=1,o=J0(),pb=Kw(),Wn=db(),Rm=tb(),gb=hb(),Te=$w(),V_||(V_=1,kb=Kw(),Sb=Yw(),_b=eb(),Eb=ab(),Cb=Xw(),Ob=sb(),xb=lb(),(Hw=Rb)["default"]=Rb),nr=Hw,mb=nb(),lt=ib(),vb=eb(),yb=ab(),i=ob(),Re=Xw(),In=fb(),xe=ub(),wb=lb(),bb=sb(),fa=Zw(),Ib.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new gb).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return Ib([i(n)]).process(e,t)},i},Ib.stringify=Te,Ib.parse=In,Ib.fromJSON=nr,Ib.list=xe,Ib.comment=function(e){return new vb(e)},Ib.atRule=function(e){return new yb(e)},Ib.decl=function(e){return new pb(e)},Ib.rule=function(e){return new wb(e)},Ib.root=function(e){return new bb(e)},Ib.document=function(e){return new mb(e)},Ib.CssSyntaxError=o,Ib.Declaration=pb,Ib.Container=Rm,Ib.Processor=gb,Ib.Document=mb,Ib.Comment=vb,Ib.Warning=lt,Ib.AtRule=yb,Ib.Result=i,Ib.Input=Re,Ib.Rule=wb,Ib.Root=bb,Ib.Node=fa,Wn.registerPostcss(Ib),(qw=Ib)["default"]=Ib);var pb,gb,mb,vb,yb,wb,bb,kb,Sb,_b,Eb,Cb,Ob,xb,a=(Ar=qw)&&Ar.__esModule&&Object.prototype.hasOwnProperty.call(Ar,"default")?Ar["default"]:Ar;function Rb(e,t){if(Array.isArray(e))return e.map(function(e){return Rb(e)});var n,r=e.inputs,i=z(e,zy);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:Cb.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:Sb.prototype})),t.push(s)}}catch(Le){a.e(Le)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return Rb(e,t)})),i.source&&(n=(r=i.source).inputId,r=z(r,By),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new Ob(i);if("decl"===i.type)return new kb(i);if("rule"===i.type)return new xb(i);if("comment"===i.type)return new _b(i);if("atrule"===i.type)return new Eb(i);throw new Error("Unknown node type: "+e.type)}function Ib(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new gb(t)}a.stringify;var Tb=Object.defineProperty,Mb=function(e,t,n){return e=e,t="symbol"!==S(t)?t+"":t,n=n,t in e?Tb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};Date.now().toString();var Ab,Pb={exports:{}};var Lb,Db,Nb,Ub,Fb,jb=(Nb=Object.freeze(Object.defineProperty({__proto__:null,"default":{}},Symbol.toStringTag,{value:"Module"}))).__esModule?Nb:("function"==typeof(Ub=Nb["default"])?(Fb=function Nb(){return this instanceof Nb?Reflect.construct(Ub,arguments,this.constructor):Ub.apply(this,arguments)}).prototype=Ub.prototype:Fb={},Object.defineProperty(Fb,"__esModule",{value:!0}),Object.keys(Nb).forEach(function(e){var t=Object.getOwnPropertyDescriptor(Nb,e);Object.defineProperty(Fb,e,t.get?t:{enumerable:!0,get:function(){return Nb[e]}})}),Fb);function zb(){var f,d,e,t,n;return Db||(Db=1,Ab||(Ab=1,t=String,Pb.exports=(n=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}})(),Pb.exports.createColors=n),f=Pb.exports,d=jb,n=$(Error),U(s,n),e=k(s,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file||"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var r=this;if(!this.source)return"";var t=this.source;null==e&&(e=f.isColorSupported);var n,i,o,a,s,t=(t=d&&e?d(t):t).split(/\r?\n/),u=Math.max(this.line-3,0),l=Math.min(this.line+2,t.length),c=String(l).length;return e?(e=f.createColors(!0),n=e.bold,i=e.gray,o=e.red,a=function(e){return n(o(e))},s=function(e){return i(e)}):a=s=function(e){return e},t.slice(u,l).map(function(e,t){var t=u+1+t,n=" "+(" "+t).slice(-c)+" | ";return t===r.line?(t=s(n.replace(/\d/g," "))+e.slice(0,r.column-1).replace(/[^\t]/g," "),a(">")+s(n)+e+"\n "+t+a("^")):" "+s(n)+e}).join("\n")}},{key:"toString",value:function(){var e=(e=this.showSourceCode())&&"\n\n"+e+"\n";return this.name+": "+this.message+e}}]),(Lb=e)["default"]=e),Lb;function s(e,t,n,r,i,o){var a;return b(this,s),(a=v(this,s,[e])).name="CssSyntaxError",a.reason=e,i&&(a.file=i),r&&(a.source=r),o&&(a.plugin=o),void 0!==t&&void 0!==n&&("number"==typeof t?(a.line=t,a.column=n):(a.line=t.line,a.column=t.column,a.endLine=n.line,a.endColumn=n.column)),a.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(a,s),a}}var Bb,Wb,Hb,qb,Vb,Gb,Jb,$b,Zb,Kb,Yb,Xb,Qb,e1,t1,n1,r1,i1,o1,a1,s1,u1,l1,c1,f1,d1,h1,p1,g1,m1,v1,y1,w1,b1,k1,S1,_1,E1,C1,O1,x1,R1,I1,T1,M1,A1,P1,L1,D1,N1,U1,F1={};function j1(){return Bb||(Bb=1,F1.isClean=Symbol("isClean"),F1.my=Symbol("my")),F1}function z1(){var a,t;return Hb||(a={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!(Hb=1)},t=k(function t(e){b(this,t),this.builder=e},[{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";"undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes?this.block(e,n+r):(t=(e.raws.between||"")+(t?";":""),this.builder(n+r+t,e))}},{key:"beforeAfter",value:function(e,t){for(var n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose"),r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),(t=e.nodes&&e.nodes.length?(this.body(e),this.raw(e,"after")):this.raw(e,"after","emptyBody"))&&this.builder(t),this.builder("}",e,"end")}},{key:"body",value:function(e){for(var t=e.nodes.length-1;0<t&&"comment"===e.nodes[t].type;)--t;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),n=e.prop+n+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}},{key:"document",value:function(e){this.body(e)}},{key:"raw",value:function(e,t,n){var r;if(t&&void 0!==(r=e.raws[t]))return r;var i,o=e.parent;if("before"===(n=n||t)){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}return o?((o=e.root()).rawCache||(o.rawCache={}),"undefined"!=typeof o.rawCache[n]?o.rawCache[n]:"before"===n||"after"===n?this.beforeAfter(e,n):(this[i="raw"+((i=n)[0].toUpperCase()+i.slice(1))]?r=this[i](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=a[n]),o.rawCache[n]=r)):a[n]}},{key:"rawBeforeClose",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0<e.nodes.length&&"undefined"!=typeof e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t=t&&t.replace(/\S/g,"")}},{key:"rawBeforeComment",value:function(e,t){var n;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeDecl"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeDecl",value:function(e,t){var n;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=void 0===n?this.raw(t,null,"beforeRule"):n&&n.replace(/\S/g,"")}},{key:"rawBeforeOpen",value:function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}},{key:"rawBeforeRule",value:function(t){var n;return t.walk(function(e){if(e.nodes&&(e.parent!==t||t.first!==e)&&"undefined"!=typeof e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),n=n&&n.replace(/\S/g,"")}},{key:"rawColon",value:function(e){var t;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"rawEmptyBody",value:function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}},{key:"rawIndent",value:function(n){return n.raws.indent||(n.walk(function(e){var t=e.parent;if(t&&t!==n&&t.parent&&t.parent===n&&"undefined"!=typeof e.raws.before)return t=e.raws.before.split("\n"),r=(r=t[t.length-1]).replace(/\S/g,""),!1}),r);var r}},{key:"rawSemicolon",value:function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}},{key:"rawValue",value:function(e,t){var n=e[t],t=e.raws[t];return t&&t.value===n?t.raw:n}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}},{key:"stringify",value:function(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)}}]),(Wb=t)["default"]=t),Wb}function B1(){var n;return Vb||(Vb=1,n=z1(),(qb=e)["default"]=e),qb;function e(e,t){new n(t).stringify(e)}}function W1(){var o,a,s,i,n,r,e;return Jb||(Jb=1,a=(o=j1()).isClean,s=o.my,i=zb(),n=z1(),r=B1(),e=k(function o(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in b(this,o),this.raws={},this[a]=!1,this[s]=!0,t)if("nodes"===e){this.nodes=[];var n,r=Me(t[e]);try{for(r.s();!(n=r.n()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}catch(Le){r.e(Le)}finally{r.f()}}else this[e]=t[e]},[{key:"addToError",value:function(e){var t;return e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)&&(t=this.source,e.stack=e.stack.replace(/\n\s{4}at /,"$&".concat(t.input.from,":").concat(t.start.line,":").concat(t.start.column,"$&"))),e}},{key:"after",value:function(e){return this.parent.insertAfter(this,e),this}},{key:"assign",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};for(e in t)this[e]=t[e];return this}},{key:"before",value:function(e){return this.parent.insertBefore(this,e),this}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"clone",value:function(){var e,t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},n=function a(e,t){var n,r,i,o=new e.constructor;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&"proxyCache"!==n&&(i=S(r=e[n]),"parent"===n&&"object"===i?t&&(o[n]=t):"source"===n?o[n]=r:Array.isArray(r)?o[n]=r.map(function(e){return a(e,o)}):("object"===i&&null!==r&&(r=a(r)),o[n]=r));return o}(this);for(e in t)n[e]=t[e];return n}},{key:"cloneAfter",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertAfter(this,e),e}},{key:"cloneBefore",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},e=this.clone(e);return this.parent.insertBefore(this,e),e}},{key:"error",value:function(e){var t,n,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return this.source?(t=(n=this.rangeBy(r)).end,this.source.input.error(e,{column:(n=n.start).column,line:n.line},{column:t.column,line:t.line},r)):new i(e)}},{key:"getProxyProcessor",value:function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0}}}},{key:"markDirty",value:function(){if(this[a]){this[a]=!1;for(var e=this;e=e.parent;)e[a]=!1}}},{key:"next",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e+1]}},{key:"positionBy",value:function(e,t){var n=this.source.start;return e.index?n=this.positionInside(e.index,t):e.word&&-1!==(e=(t=this.toString()).indexOf(e.word))&&(n=this.positionInside(e,t)),n}},{key:"positionInside",value:function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?i+=r=1:r+=1;return{column:r,line:i}}},{key:"prev",value:function(){var e;if(this.parent)return e=this.parent.index(this),this.parent.nodes[e-1]}},{key:"rangeBy",value:function(e){var t,n,r={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:r.column+1,line:r.line};return e.word?-1!==(n=(t=this.toString()).indexOf(e.word))&&(r=this.positionInside(n,t),i=this.positionInside(n+e.word.length,t)):(e.start?r={column:e.start.column,line:e.start.line}:e.index&&(r=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1))),{end:i=i.line<r.line||i.line===r.line&&i.column<=r.column?{column:r.column+1,line:r.line}:i,start:r}}},{key:"raw",value:function(e,t){return(new n).raw(this,e,t)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"replaceWith",value:function(){if(this.parent){for(var e=this,t=!1,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];for(var o=0,a=r;o<a.length;o++){var s=a[o];s===this?t=!0:t?(this.parent.insertAfter(e,s),e=s):this.parent.insertBefore(e,s)}t||this.remove()}return this}},{key:"root",value:function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}},{key:"toJSON",value:function(e,t){var n,r,i,o={},a=null==t,s=(t=t||new Map,0);for(n in this)Object.prototype.hasOwnProperty.call(this,n)&&"parent"!==n&&"proxyCache"!==n&&(r=this[n],Array.isArray(r)?o[n]=r.map(function(e){return"object"===S(e)&&e.toJSON?e.toJSON(null,t):e}):"object"===S(r)&&r.toJSON?o[n]=r.toJSON(null,t):"source"===n?(null==(i=t.get(r.input))&&(i=s,t.set(r.input,s),s++),o[n]={end:r.end,inputId:i,start:r.start}):o[n]=r);return a&&(o.inputs=Ue(t.keys()).map(function(e){return e.toJSON()})),o}},{key:"toProxy",value:function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}},{key:"toString",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r,t=(e.stringify&&(e=e.stringify),"");return e(this,function(e){t+=e}),t}},{key:"warn",value:function(e,t,n){var r,i={node:this};for(r in n)i[r]=n[r];return e.warn(t,i)}},{key:"proxyOf",get:function(){return this}}]),(Gb=e)["default"]=e),Gb}function H1(){var e;return Zb||(Zb=1,e=W1(),U(t,e),e=k(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),($b=e)["default"]=e),$b;function t(e){return b(this,t),e&&"undefined"!=typeof e.value&&"string"!=typeof e.value&&(e=Ae(Ae({},e),{},{value:String(e.value)})),(e=v(this,t,[e])).type="decl",e}}function q1(){var r,i,t,n,o,a,s;return Qb||(Qb=1,r=jb.SourceMapConsumer,i=jb.SourceMapGenerator,t=jb.existsSync,n=jb.readFileSync,o=jb.dirname,a=jb.join,s=k(function s(e,t){b(this,s),!1!==t.map&&(this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:"),e=t.map?t.map.prev:void 0,e=this.loadMap(t.from,e),!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=o(this.mapFile)),e)&&(this.text=e)},[{key:"consumer",value:function(){return this.consumerCache||(this.consumerCache=new r(this.text)),this.consumerCache}},{key:"decodeInline",value:function(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+t)}},{key:"getAnnotationURL",value:function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}},{key:"isMap",value:function(e){return"object"===S(e)&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}},{key:"loadAnnotation",value:function(e){var t,n=e.match(/\/\*\s*# sourceMappingURL=/gm);n&&(n=e.lastIndexOf(n.pop()),t=e.indexOf("*/",n),-1<n)&&-1<t&&(this.annotation=this.getAnnotationURL(e.substring(n,t)))}},{key:"loadFile",value:function(e){if(this.root=o(e),t(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}},{key:"loadMap",value:function(e,t){if(!1===t)return!1;if(!t)return this.inline?this.decodeInline(this.annotation):this.annotation?(n=this.annotation,e&&(n=a(o(e),n)),this.loadFile(n)):void 0;if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof r)return i.fromSourceMap(t).toString();if(t instanceof i)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){e=this.loadFile(n);if(e)return e;throw new Error("Unable to load previous source map: "+n.toString())}}},{key:"startWith",value:function(e,t){return!!e&&e.substr(0,t.length)===t}},{key:"withContent",value:function(){return!!(this.consumer().sourcesContent&&0<this.consumer().sourcesContent.length)}}]),(Xb=s)["default"]=s),Xb}function V1(){var n,a,u,s,r,i,e,l,o,c,f,d,t;return t1||(t1=1,n=jb.SourceMapConsumer,t=jb.SourceMapGenerator,a=jb.fileURLToPath,u=jb.pathToFileURL,s=jb.isAbsolute,r=jb.resolve,i=(Yb?Kb:(Yb=1,Kb={nanoid:function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:21;t--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:function(n){var r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:21;return function(){for(var e="",t=0<arguments.length&&arguments[0]!==undefined?arguments[0]:r;t--;)e+=n[Math.random()*n.length|0];return e}}})).nanoid,e=jb,l=zb(),o=q1(),c=Symbol("fromOffsetCache"),f=Boolean(n&&t),d=Boolean(r&&s),t=k(function n(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};if(b(this,n),null==e||"object"===S(e)&&!e.toString)throw new Error("PostCSS received ".concat(e," instead of CSS string"));this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=r(t.from)),d&&f&&(e=new o(this.css,t)).text&&(t=(this.map=e).consumer().file,!this.file)&&t&&(this.file=this.mapResolve(t)),this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)},[{key:"error",value:function(e,t,n){var r,i,o,a=3<arguments.length&&arguments[3]!==undefined?arguments[3]:{},s=(t&&"object"===S(t)?(s=n,n="number"==typeof(i=t).offset?(t=(o=this.fromOffset(i.offset)).line,o.col):(t=i.line,i.column),i="number"==typeof s.offset?(r=(o=this.fromOffset(s.offset)).line,o.col):(r=s.line,s.column)):n||(t=(o=this.fromOffset(t)).line,n=o.col),this.origin(t,n,r,i));return(o=s?new l(e,void 0===s.endLine?s.line:{column:s.column,line:s.line},void 0===s.endLine?s.column:{column:s.endColumn,line:s.endLine},s.source,s.file,a.plugin):new l(e,void 0===r?t:{column:n,line:t},void 0===r?n:{column:i,line:r},this.css,this.file,a.plugin)).input={column:n,endColumn:i,endLine:r,line:t,source:this.css},this.file&&(u&&(o.input.url=u(this.file).toString()),o.input.file=this.file),o}},{key:"fromOffset",value:function(e){if(this[c])n=this[c];else{for(var t=this.css.split("\n"),n=new Array(t.length),r=0,i=0,o=t.length;i<o;i++)n[i]=r,r+=t[i].length+1;this[c]=n}var a=0;if(e>=n[n.length-1])a=n.length-1;else for(var s,u=n.length-2;a<u;)if(e<n[s=a+(u-a>>1)])u=s-1;else{if(!(e>=n[s+1])){a=s;break}a=s+1}return{col:e-n[a]+1,line:a+1}}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:r(this.map.consumer().sourceRoot||this.map.root||".",e)}},{key:"origin",value:function(e,t,n,r){if(!this.map)return!1;var i,o=this.map.consumer(),t=o.originalPositionFor({column:t,line:e});if(!t.source)return!1;"number"==typeof n&&(i=o.originalPositionFor({column:r,line:n}));e=s(t.source)?u(t.source):new URL(t.source,this.map.consumer().sourceRoot||u(this.map.mapFile)),r={column:t.column,endColumn:i&&i.column,endLine:i&&i.line,line:t.line,url:e.toString()};if("file:"===e.protocol){if(!a)throw new Error("file: protocol is not available in this PostCSS build");r.file=a(e)}n=o.sourceContentFor(t.source);return n&&(r.source=n),r}},{key:"toJSON",value:function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Ae({},this.map),e.map.consumerCache)&&(e.map.consumerCache=void 0),e}},{key:"from",get:function(){return this.file||this.id}}]),(e1=t)["default"]=t,e&&e.registerInput&&e.registerInput(t)),e1}function G1(){if(r1)return n1;r1=1;var a=jb.SourceMapConsumer,t=jb.SourceMapGenerator,s=jb.dirname,n=jb.relative,r=jb.resolve,i=jb.sep,o=jb.pathToFileURL,u=V1(),e=Boolean(a&&t),l=Boolean(s&&r&&n&&i);return n1=k(function F(e,t,n,r){b(this,F),this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map},[{key:"addAnnotation",value:function(){var e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map",t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}},{key:"applyPrevMaps",value:function(){var e,t=Me(this.previous());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||s(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new a(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}}catch(Le){t.e(Le)}finally{t.f()}}},{key:"clearAnnotation",value:function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;0<=t;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}},{key:"generate",value:function(){var t;return this.clearAnnotation(),l&&e&&this.isMap()?this.generateMap():(t="",this.stringify(this.root,function(e){t+=e}),[t])}},{key:"generateMap",value:function(){var e;return this.root?this.generateString():1===this.previous().length?((e=this.previous()[0].consumer()).file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})):(this.map=new t({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>"})),this.isSourcesContent()&&this.setSourcesContent(),this.root&&0<this.previous().length&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}},{key:"generateString",value:function(){var r=this;this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});var i,o=1,a=1,s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(e,t,n){r.css+=e,t&&"end"!==n&&(s.generated.line=o,s.generated.column=a-1,t.source&&t.source.start?(s.source=r.sourcePath(t),s.original.line=t.source.start.line,s.original.column=t.source.start.column-1):(s.source="<no source>",s.original.line=1,s.original.column=0),r.map.addMapping(s)),(i=e.match(/\n/g))?(o+=i.length,i=e.lastIndexOf("\n"),a=e.length-i):a+=e.length,t&&"start"!==n&&(e=t.parent||{raws:{}},"decl"!==t.type&&("atrule"!==t.type||t.nodes)||t!==e.last||e.raws.semicolon)&&(t.source&&t.source.end?(s.source=r.sourcePath(t),s.original.line=t.source.end.line,s.original.column=t.source.end.column-1,s.generated.line=o,s.generated.column=a-2):(s.source="<no source>",s.original.line=1,s.original.column=0,s.generated.line=o,s.generated.column=a-1),r.map.addMapping(s))})}},{key:"isAnnotation",value:function(){return!!this.isInline()||("undefined"!=typeof this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))}},{key:"isInline",value:function(){var e;return"undefined"!=typeof this.mapOpts.inline?this.mapOpts.inline:(void 0===(e=this.mapOpts.annotation)||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))}},{key:"isMap",value:function(){return"undefined"!=typeof this.opts.map?!!this.opts.map:0<this.previous().length}},{key:"isSourcesContent",value:function(){return"undefined"!=typeof this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})}},{key:"outputFile",value:function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}},{key:"path",value:function(e){var t;return this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e)?e:this.memoizedPaths.get(e)||(t=this.opts.to?s(this.opts.to):".","string"==typeof this.mapOpts.annotation&&(t=s(r(t,this.mapOpts.annotation))),t=n(t,e),this.memoizedPaths.set(e,t),t)}},{key:"previous",value:function(){var e,t=this;return this.previousMaps||(this.previousMaps=[],this.root?this.root.walk(function(e){e.source&&e.source.input.map&&(e=e.source.input.map,t.previousMaps.includes(e)||t.previousMaps.push(e))}):(e=new u(this.originalCSS,this.opts)).map&&this.previousMaps.push(e.map)),this.previousMaps}},{key:"setSourcesContent",value:function(){var e,n=this,r={};this.root?this.root.walk(function(e){var t;e.source&&(t=e.source.input.from)&&!r[t]&&(r[t]=!0,t=n.usesFileUrls?n.toFileUrl(t):n.toUrl(n.path(t)),n.map.setSourceContent(t,e.source.input.css))}):this.css&&(e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>",this.map.setSourceContent(e,this.css))}},{key:"sourcePath",value:function(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))}},{key:"toBase64",value:function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}},{key:"toFileUrl",value:function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(o)return t=o(e).toString(),this.memoizedFileURLs.set(e,t),t;throw new Error("`map.absolute` option is not available in this PostCSS build")}},{key:"toUrl",value:function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===i&&(e=e.replace(/\\/g,"/"));t=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,t),t}}])}function J1(){var e;return o1||(o1=1,e=W1(),U(t,e),e=k(t),(i1=e)["default"]=e),i1;function t(e){return b(this,t),(e=v(this,t,[e])).type="comment",e}}function $1(){var l,c,f,t,d,h,p,g,n,e;return s1||(s1=1,e=j1(),d=e.isClean,h=e.my,p=H1(),g=J1(),e=W1(),U(m,e),(n=k(m,[{key:"append",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0,i=t;r<i.length;r++){var o,a=i[r],a=this.normalize(a,this.last),s=Me(a);try{for(s.s();!(o=s.n()).done;){var u=o.value;this.proxyOf.nodes.push(u)}}catch(Le){s.e(Le)}finally{s.f()}}return this.markDirty(),this}},{key:"cleanRaws",value:function(e){if(V(m,"cleanRaws",this,3)([e]),this.nodes){var t,n=Me(this.nodes);try{for(n.s();!(t=n.n()).done;)t.value.cleanRaws(e)}catch(Le){n.e(Le)}finally{n.f()}}}},{key:"each",value:function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"getIterator",value:function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e}},{key:"getProxyProcessor",value:function(){return{get:function(r,o){return"proxyOf"===o?r:r[o]&&("each"===o||"string"==typeof o&&o.startsWith("walk")?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r[o].apply(r,Ue(t.map(function(n){return"function"==typeof n?function(e,t){return n(e.toProxy(),t)}:n})))}:"every"===o||"some"===o?function(i){return r[o](function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return i.apply(void 0,[e.toProxy()].concat(n))})}:"root"===o?function(){return r.root().toProxy()}:"nodes"===o?r.nodes.map(function(e){return e.toProxy()}):"first"===o||"last"===o?r[o].toProxy():r[o])},set:function(e,t,n){return e[t]!==n&&(e[t]=n,"name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0}}}},{key:"index",value:function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}},{key:"insertAfter",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o]).reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o+1,0,u)}}catch(Le){s.e(Le)}finally{s.f()}for(i in this.indexes)o<(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"insertBefore",value:function(e,t){var n,r,i,o=this.index(e),a=this.normalize(t,this.proxyOf.nodes[o],0===o&&"prepend").reverse(),o=this.index(e),s=Me(a);try{for(s.s();!(n=s.n()).done;){var u=n.value;this.proxyOf.nodes.splice(o,0,u)}}catch(Le){s.e(Le)}finally{s.f()}for(i in this.indexes)o<=(r=this.indexes[i])&&(this.indexes[i]=r+a.length);return this.markDirty(),this}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=function W(e){return e.map(function(e){return e.nodes&&(e.nodes=W(e.nodes)),delete e.source,e})}(l(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e)){var r,i=Me(e=e.slice(0));try{for(i.s();!(r=i.n()).done;){var o=r.value;o.parent&&o.parent.removeChild(o,"ignore")}}catch(Le){i.e(Le)}finally{i.f()}}else if("root"===e.type&&"document"!==this.type){var a,s=Me(e=e.nodes.slice(0));try{for(s.s();!(a=s.n()).done;){var u=a.value;u.parent&&u.parent.removeChild(u,"ignore")}}catch(Le){s.e(Le)}finally{s.f()}}else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new p(e)]}else if(e.selector)e=[new c(e)];else if(e.name)e=[new f(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new g(e)]}return e.map(function(e){return e[h]||m.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[d]&&function c(e){if(e[d]=!1,e.proxyOf.nodes){var t,n=Me(e.proxyOf.nodes);try{for(n.s();!(t=n.n()).done;)c(t.value)}catch(Le){n.e(Le)}finally{n.f()}}}(e),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=n.proxyOf,e})}},{key:"prepend",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=Me(t=t.reverse());try{for(i.s();!(r=i.n()).done;){var o,a,s=r.value,u=this.normalize(s,this.first,"prepend").reverse(),l=Me(u);try{for(l.s();!(o=l.n()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}}catch(Le){l.e(Le)}finally{l.f()}for(a in this.indexes)this.indexes[a]=this.indexes[a]+u.length}}catch(Le){i.e(Le)}finally{i.f()}return this.markDirty(),this}},{key:"push",value:function(e){return(e.parent=this).proxyOf.nodes.push(e),this}},{key:"removeAll",value:function(){var e,t=Me(this.proxyOf.nodes);try{for(t.s();!(e=t.n()).done;)e.value.parent=void 0}catch(Le){t.e(Le)}finally{t.f()}return this.proxyOf.nodes=[],this.markDirty(),this}},{key:"removeChild",value:function(e){var t,n;for(n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}},{key:"replaceValues",value:function(t,n,r){return r||(r=n,n={}),this.walkDecls(function(e){n.props&&!n.props.includes(e.prop)||n.fast&&!e.value.includes(n.fast)||(e.value=e.value.replace(t,r))}),this.markDirty(),this}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"walk",value:function(r){return this.each(function(e,t){var n;try{n=r(e,t)}catch(b){throw e.addToError(b)}return n=!1!==n&&e.walk?e.walk(r):n})}},{key:"walkAtRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("atrule"===e.type&&n.test(e.name))return r(e,t)}):this.walk(function(e,t){if("atrule"===e.type&&e.name===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("atrule"===e.type)return r(e,t)}))}},{key:"walkComments",value:function(n){return this.walk(function(e,t){if("comment"===e.type)return n(e,t)})}},{key:"walkDecls",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("decl"===e.type&&n.test(e.prop))return r(e,t)}):this.walk(function(e,t){if("decl"===e.type&&e.prop===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("decl"===e.type)return r(e,t)}))}},{key:"walkRules",value:function(n,r){return r?n instanceof RegExp?this.walk(function(e,t){if("rule"===e.type&&n.test(e.selector))return r(e,t)}):this.walk(function(e,t){if("rule"===e.type&&e.selector===n)return r(e,t)}):(r=n,this.walk(function(e,t){if("rule"===e.type)return r(e,t)}))}},{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}])).registerParse=function(e){l=e},n.registerRule=function(e){c=e},n.registerAtRule=function(e){f=e},n.registerRoot=function(e){t=e},((a1=n)["default"]=n).rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,f.prototype):"rule"===e.type?Object.setPrototypeOf(e,c.prototype):"decl"===e.type?Object.setPrototypeOf(e,p.prototype):"comment"===e.type?Object.setPrototypeOf(e,g.prototype):"root"===e.type&&Object.setPrototypeOf(e,t.prototype),e[h]=!0,e.nodes&&e.nodes.forEach(function(e){n.rebuild(e)})}),a1;function m(){return b(this,m),v(this,m,arguments)}}function Z1(){var t,n,e;return l1||(l1=1,e=$1(),U(r,e),(e=k(r,[{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},e.registerProcessor=function(e){n=e},(u1=e)["default"]=e),u1;function r(e){return b(this,r),(e=v(this,r,[Ae({type:"document"},e)])).nodes||(e.nodes=[]),e}}function K1(){if(f1)return c1;f1=1;var t={};return c1=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}}function Y1(){var r;return h1||(h1=1,r=k(function r(e){var t,n=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};for(t in b(this,r),this.type="warning",this.text=e,n.node&&n.node.source&&(e=n.node.rangeBy(n),this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column),n)this[t]=n[t]},[{key:"toString",value:function(){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}}]),(d1=r)["default"]=r),d1}function X1(){var n,r;return g1||(g1=1,n=Y1(),r=k(function r(e,t,n){b(this,r),this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0},[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},e=(t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin),new n(e,t));return this.messages.push(e),e}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),(p1=r)["default"]=r),p1}function Q1(){var e,t;return w1||(w1=1,e=$1(),U(r,e),t=k(r,[{key:"append",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V(r,"append",this,3)(t)}},{key:"prepend",value:function(){this.proxyOf.nodes||(this.nodes=[]);for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return V(r,"prepend",this,3)(t)}}]),(y1=t)["default"]=t,e.registerAtRule(t)),y1;function r(e){return b(this,r),(e=v(this,r,[e])).type="atrule",e}}function ek(){var t,n,e,r;return k1||(k1=1,e=$1(),U(o,e),(r=k(o,[{key:"normalize",value:function(e,t,n){e=V(o,"normalize",this,3)([e]);if(t)if("prepend"===n)1<this.nodes.length?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t){var r,i=Me(e);try{for(i.s();!(r=i.n()).done;)r.value.raws.before=t.raws.before}catch(Le){i.e(Le)}finally{i.f()}}return e}},{key:"removeChild",value:function(e,t){var n=this.index(e);return!t&&0===n&&1<this.nodes.length&&(this.nodes[1].raws.before=this.nodes[n].raws.before),V(o,"removeChild",this,3)([e])}},{key:"toResult",value:function(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{};return new t(new n,this,e).stringify()}}])).registerLazyResult=function(e){t=e},r.registerProcessor=function(e){n=e},b1=r,e.registerRoot(r["default"]=r)),b1;function o(e){return b(this,o),(e=v(this,o,[e])).type="root",e.nodes||(e.nodes=[]),e}}function tk(){var t;return _1||(_1=1,(S1=t={comma:function(e){return t.split(e,[","],!0)},space:function(e){return t.split(e,[" ","\n","\t"])},split:function(e,t,n){var r,i=[],o="",a=!1,s=0,u=!1,l="",c=!1,f=Me(e);try{for(f.s();!(r=f.n()).done;){var d=r.value;c?c=!1:"\\"===d?c=!0:u?d===l&&(u=!1):'"'===d||"'"===d?(u=!0,l=d):"("===d?s+=1:")"===d?0<s&&--s:0===s&&t.includes(d)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=d}}catch(Le){f.e(Le)}finally{f.f()}return!n&&""===o||i.push(o.trim()),i}})["default"]=t),S1}function nk(){var e,t,n;return C1||(C1=1,e=$1(),t=tk(),U(r,e),n=k(r,[{key:"selectors",get:function(){return t.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,t=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(t)}}]),(E1=n)["default"]=n,e.registerRule(n)),E1;function r(e){return b(this,r),(e=v(this,r,[e])).type="rule",e.nodes||(e.nodes=[]),e}}function rk(){if(x1)return O1;x1=1;var p=H1(),e=function(){if(v1)return m1;v1=1;var w="'".charCodeAt(0),b='"'.charCodeAt(0),k="\\".charCodeAt(0),S="/".charCodeAt(0),_="\n".charCodeAt(0),E=" ".charCodeAt(0),C="\f".charCodeAt(0),O="\t".charCodeAt(0),x="\r".charCodeAt(0),R="[".charCodeAt(0),I="]".charCodeAt(0),T="(".charCodeAt(0),M=")".charCodeAt(0),A="{".charCodeAt(0),P="}".charCodeAt(0),L=";".charCodeAt(0),D="*".charCodeAt(0),N=":".charCodeAt(0),U="@".charCodeAt(0),F=/[\t\n\f\r "#'()/;[\\\]{}]/g,j=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,z=/.[\r\n"'(/\\]/,B=/[\da-f]/i;return m1=function(t){var r,i,o,a,s,u,l,c,f,e=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},d=t.css.valueOf(),h=e.ignoreErrors,p=d.length,g=0,m=[],v=[];function y(e){throw t.error("Unclosed "+e,g)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&p<=g},nextToken:function(e){if(v.length)return v.pop();if(!(p<=g)){var t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(g)){case _:case E:case O:case x:case C:for(i=g;i+=1,(r=d.charCodeAt(i))===E||r===_||r===O||r===x||r===C;);f=["space",d.slice(g,i)],g=i-1;break;case R:case I:case A:case P:case N:case L:case M:var n=String.fromCharCode(r);f=[n,n,g];break;case T:if(l=m.length?m.pop()[1]:"",c=d.charCodeAt(g+1),"url"===l&&c!==w&&c!==b&&c!==E&&c!==_&&c!==O&&c!==C&&c!==x){i=g;do{if(s=!1,-1===(i=d.indexOf(")",i+1))){if(h||t){i=g;break}y("bracket")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["brackets",d.slice(g,i+1),g,i],g=i}else i=d.indexOf(")",g+1),l=d.slice(g,i+1),-1===i||z.test(l)?f=["(","(",g]:(f=["brackets",l,g,i],g=i);break;case w:case b:o=r===w?"'":'"',i=g;do{if(s=!1,-1===(i=d.indexOf(o,i+1))){if(h||t){i=g+1;break}y("string")}for(u=i;d.charCodeAt(u-1)===k;)--u,s=!s}while(s);f=["string",d.slice(g,i+1),g,i],g=i;break;case U:F.lastIndex=g+1,F.test(d),i=0===F.lastIndex?d.length-1:F.lastIndex-2,f=["at-word",d.slice(g,i+1),g,i],g=i;break;case k:for(i=g,a=!0;d.charCodeAt(i+1)===k;)i+=1,a=!a;if(r=d.charCodeAt(i+1),a&&r!==S&&r!==E&&r!==_&&r!==O&&r!==x&&r!==C&&(i+=1,B.test(d.charAt(i)))){for(;B.test(d.charAt(i+1));)i+=1;d.charCodeAt(i+1)===E&&(i+=1)}f=["word",d.slice(g,i+1),g,i],g=i;break;default:g=(r===S&&d.charCodeAt(g+1)===D?(0===(i=d.indexOf("*/",g+2)+1)&&(h||t?i=d.length:y("comment")),f=["comment",d.slice(g,i+1),g,i]):(j.lastIndex=g+1,j.test(d),i=0===j.lastIndex?d.length-1:j.lastIndex-2,f=["word",d.slice(g,i+1),g,i],m.push(f)),i)}return g++,f}},position:function(){return g}}}}(),n=J1(),l=Q1(),t=ek(),r=nk(),d={empty:!0,space:!0};return O1=k(function D(e){b(this,D),this.input=e,this.root=new t,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}},[{key:"atrule",value:function(e){var t,n,r,i=new l;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],u=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?u.push("("===t?")":"]"):"{"===t&&0<u.length?u.push("}"):t===u[u.length-1]&&u.pop(),0===u.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(0<s.length){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}}if(s.push(e),this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;0<=i&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}}},{key:"colon",value:function(e){var t,n,r,i,o=0,a=Me(e.entries());try{for(a.s();!(i=a.n()).done;){var s=Ne(i.value,2),u=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&--o,0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return u}this.doubleColon(t)}r=t}}catch(Le){a.e(Le)}finally{a.f()}return!1}},{key:"comment",value:function(e){var t=new n,e=(this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,e[1].slice(2,-2));/^\s*$/.test(e)?(t.text="",t.raws.left=e,t.raws.right=""):(e=e.match(/^(\s*)([^]*\S)(\s*)$/),t.text=e[2],t.raws.left=e[1],t.raws.right=e[3])}},{key:"createTokenizer",value:function(){this.tokenizer=e(this.input)}},{key:"decl",value:function(e,t){var n=new p;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;0<=t;t--){var n=e[t],n=n[3]||n[2];if(n)return n}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var u=e.length-1;0<=u;u--){if("!important"===(r=e[u])[1].toLowerCase()){n.important=!0;var l=this.stringFrom(e,u);" !important"!==(l=this.spacesFromEnd(e)+l)&&(n.raws.important=l);break}if("important"===r[1].toLowerCase()){for(var c=e.slice(0),f="",d=u;0<d;d--){var h=c[d][0];if(0===f.trim().indexOf("!")&&"space"!==h)break;f=c.pop()[1]+f}0===f.trim().indexOf("!")&&(n.important=!0,n.raws.important=f,e=c)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}},{key:"emptyRule",value:function(e){var t=new r;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}},{key:"end",value:function(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)}},{key:"endFile",value:function(){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())}},{key:"freeSemicolon",value:function(e){this.spaces+=e[1],this.current.nodes&&(e=this.current.nodes[this.current.nodes.length-1])&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},{key:"getPosition",value:function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}},{key:"init",value:function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"other",value:function(e){for(var t,n=!1,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],u=e;u;){if(t=u[0],s.push(u),"("===t||"["===t)i=i||u,o.push("("===t?")":"]");else if(a&&r&&"{"===t)i=i||u,o.push("}");else if(0===o.length){if(";"===t){if(r)return void this.decl(s,a);break}if("{"===t)return void this.rule(s);if("}"===t){this.tokenizer.back(s.pop()),n=!0;break}":"===t&&(r=!0)}else t===o[o.length-1]&&(o.pop(),0===o.length)&&(i=null);u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(n=!0),0<o.length&&this.unclosedBracket(i),n&&r){if(!a)for(;s.length&&("space"===(u=s[s.length-1][0])||"comment"===u);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}},{key:"parse",value:function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[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)}this.endFile()}},{key:"precheckMissedSemicolon",value:function(){}},{key:"raw",value:function(e,t,n,r){for(var i,o,a,s,u=n.length,l="",c=!0,f=0;f<u;f+=1)"space"===(a=(i=n[f])[0])&&f===u-1&&!r||"comment"===a&&(a=n[f-1]?n[f-1][0]:"empty",o=n[f+1]?n[f+1][0]:"empty",d[a]||d[o]||","===l.slice(-1))?c=!1:l+=i[1];c||(s=n.reduce(function(e,t){return e+t[1]},""),e.raws[t]={raw:s,value:l}),e[t]=l}},{key:"rule",value:function(e){e.pop();var t=new r;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"spacesAndCommentsFromEnd",value:function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesAndCommentsFromStart",value:function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n}},{key:"spacesFromEnd",value:function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}},{key:"unknownWord",value:function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}])}function ik(){var e,n,r;return I1||(I1=1,e=$1(),n=rk(),r=V1(),R1=t,e.registerParse(t["default"]=t)),R1;function t(e,t){e=new r(e,t),e=new n(e);try{e.parse()}catch(P){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===P.name&&t&&t.from&&(/\.scss$/i.test(t.from)?P.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?P.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(P.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),P}return e.root}}function ok(){var f,a,n,r,u,s,i,c,l,e,o,d,h,p,t,g;return M1||(M1=1,t=j1(),f=t.isClean,a=t.my,n=G1(),r=B1(),u=$1(),s=Z1(),i=K1(),c=X1(),l=ik(),e=ek(),o={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},d={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},h={Once:!0,postcssPlugin:!0,prepare:!0},p={},(t=k(function s(e,t,n){var r,i=this;if(b(this,s),this.stringified=!1,this.processed=!1,"object"!==S(t)||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof s||t instanceof c)r=w(t.root),t.map&&("undefined"==typeof n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=t.map);else{var o=l;n.syntax&&(o=n.syntax.parse),(o=n.parser?n.parser:o).parse&&(o=o.parse);try{r=o(t,n)}catch(X){this.processed=!0,this.error=X}r&&!r[a]&&u.rebuild(r)}else r=w(t);this.result=new c(e,r,n),this.helpers=Ae(Ae({},p),{},{postcss:p,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===S(e)&&e.prepare?Ae(Ae({},e),e.prepare(i.result)):e})},[{key:"async",value:function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"getAsyncError",value:function(){throw new Error("Use process(css).then(cb) to work with async plugins")}},{key:"handleError",value:function(e,t){var n,r,i,o,a,s=this.result.lastPlugin;try{t&&t.addToError(e),"CssSyntaxError"!==(this.error=e).name||e.plugin?s.postcssVersion&&"production"!==process.env.NODE_ENV&&(n=s.postcssPlugin,r=s.postcssVersion,i=this.result.processor.version,o=r.split("."),a=i.split("."),o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+i+", but "+n+" uses "+r+". Perhaps this is the source of the error below."):(e.plugin=s.postcssPlugin,e.setMessage())}catch(Le){console&&console.error&&console.error(Le)}return e}},{key:"prepareVisitors",value:function(){var r=this;this.listeners={};var e,t=function(e,t,n){r.listeners[t]||(r.listeners[t]=[]),r.listeners[t].push([e,n])},n=Me(this.plugins);try{for(n.s();!(e=n.n()).done;){var i=e.value;if("object"===S(i))for(var o in i){if(!d[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event ".concat(o," in ").concat(i.postcssPlugin,". Try to update PostCSS (").concat(this.processor.version," now)."));if(!h[o])if("object"===S(i[o]))for(var a in i[o])t(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&t(i,o,i[o])}}}catch(Le){n.e(Le)}finally{n.f()}this.hasListener=0<Object.keys(this.listeners).length}},{key:"runAsync",value:(g=A(B().m(function e(){var t,i,n,r,o,a,s,u,l,c=this;return B().w(function(e){for(;;)switch(e.p=e.n){case 0:this.plugin=0,t=0;case 1:if(t<this.plugins.length){if(s=this.plugins[t],m(s=this.runOnRoot(s)))return e.p=2,e.n=3,s;e.n=5}else e.n=6;break;case 3:e.n=5;break;case 4:throw e.p=4,s=e.v,this.handleError(s);case 5:t++,e.n=1;break;case 6:if(this.prepareVisitors(),!this.hasListener){e.n=21;break}i=this.result.root;case 7:if(i[f]){e.n=14;break}i[f]=!0,n=[y(i)];case 8:if(0<n.length){if(m(u=this.visitTick(n)))return e.p=9,e.n=10,u;e.n=12}else e.n=13;break;case 10:e.n=12;break;case 11:throw e.p=11,u=e.v,l=n[n.length-1].node,this.handleError(u,l);case 12:e.n=8;break;case 13:e.n=7;break;case 14:if(!this.listeners.OnceExit){e.n=21;break}r=Me(this.listeners.OnceExit),e.p=15,a=B().m(function d(){var t,n,r;return B().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=Ne(o.value,2),r=n[0],t=n[1],c.result.lastPlugin=r,e.p=1,"document"===i.type)return n=i.nodes.map(function(e){return t(e,c.helpers)}),e.n=2,Promise.all(n);e.n=3;break;case 2:e.n=4;break;case 3:return e.n=4,t(i,c.helpers);case 4:e.n=6;break;case 5:throw e.p=5,r=e.v,c.handleError(r);case 6:return e.a(2)}},d,null,[[1,5]])}),r.s();case 16:if((o=r.n()).done){e.n=18;break}return e.d(H(a()),17);case 17:e.n=16;break;case 18:e.n=20;break;case 19:e.p=19,l=e.v,r.e(l);case 20:return e.p=20,r.f(),e.f(20);case 21:return this.processed=!0,e.a(2,this.stringify())}},e,this,[[15,19,20,21],[9,11],[2,4]])})),function(){return g.apply(this,arguments)})},{key:"runOnRoot",value:function(t){var e,n=this;this.result.lastPlugin=t;try{return"object"===S(t)&&t.Once?"document"===this.result.root.type?m((e=this.result.root.nodes.map(function(e){return t.Once(e,n.helpers)}))[0])?Promise.all(e):e:t.Once(this.result.root,this.helpers):"function"==typeof t?t(this.result.root,this.result):void 0}catch(X){throw this.handleError(X)}}},{key:"stringify",value:function(){if(this.error)throw this.error;var e,t;return this.stringified||(this.stringified=!0,this.sync(),t=this.result.opts,e=r,t.syntax&&(e=t.syntax.stringify),(e=t.stringifier?t.stringifier:e).stringify&&(e=e.stringify),t=new n(e,this.result.root,this.result.opts).generate(),this.result.css=t[0],this.result.map=t[1]),this.result}},{key:"sync",value:function(){if(this.error)throw this.error;if(!this.processed){if(this.processed=!0,this.processing)throw this.getAsyncError();var e,t=Me(this.plugins);try{for(t.s();!(e=t.n()).done;){var n=e.value;if(m(this.runOnRoot(n)))throw this.getAsyncError()}}catch(Le){t.e(Le)}finally{t.f()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[f];)r[f]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type){var i,o=Me(r.nodes);try{for(o.s();!(i=o.n()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}}catch(Le){o.e(Le)}finally{o.f()}}else this.visitSync(this.listeners.OnceExit,r)}}return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this.css}},{key:"visitSync",value:function(e,t){var n,r=Me(e);try{for(r.s();!(n=r.n()).done;){var i=Ne(n.value,2),o=i[0],a=i[1],s=(this.result.lastPlugin=o,void 0);try{s=a(t,this.helpers)}catch(u){throw this.handleError(u,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(m(s))throw this.getAsyncError()}}catch(Le){r.e(Le)}finally{r.f()}}},{key:"visitTick",value:function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(0<r.length&&t.visitorIndex<r.length){var i=Ne(r[t.visitorIndex],2),o=i[0],i=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return i(n.toProxy(),this.helpers)}catch(c){throw this.handleError(c,n)}}if(0!==t.iterator){for(var a,s=t.iterator;a=n.nodes[n.indexes[s]];)if(n.indexes[s]+=1,!a[f])return a[f]=!0,void e.push(y(a));t.iterator=0,delete n.indexes[s]}for(var u=t.events;t.eventIndex<u.length;){var l=u[t.eventIndex];if(t.eventIndex+=1,0===l)return void(n.nodes&&n.nodes.length&&(n[f]=!0,t.iterator=n.getIterator()));if(this.listeners[l])return void(t.visitors=this.listeners[l])}}e.pop()}},{key:"walkSync",value:function(e){var t=this;e[f]=!0;var n,r=Me(v(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[f]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}}catch(Le){r.e(Le)}finally{r.f()}}},{key:"warnings",value:function(){return this.sync().warnings()}},{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}])).registerPostcss=function(e){p=e},T1=t,e.registerLazyResult(t["default"]=t),s.registerLazyResult(t)),T1;function m(e){return"object"===S(e)&&"function"==typeof e.then}function v(e){var t=!1,n=o[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function y(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:v(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function w(e){return e[f]=!1,e.nodes&&e.nodes.forEach(w),e}}function ak(){var n,r,t,e,i,o,a,s,u,l,c;return D1||(D1=1,P1||(P1=1,o=G1(),a=B1(),s=K1(),u=ik(),l=X1(),c=k(function c(e,t,n){b(this,c),t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var e=a,r=(this.result=new l(this._processor,void 0,this._opts),this.result.css=t,this),n=(Object.defineProperty(this.result,"root",{get:function(){return r.root}}),new o(e,void 0,this._opts,t));n.isMap()?(t=(e=Ne(n.generate(),2))[0],e=e[1],t&&(this.result.css=t),e&&(this.result.map=e)):(n.clearAnnotation(),this.result.css=n.css)},[{key:"async",value:function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}},{key:"catch",value:function(e){return this["async"]()["catch"](e)}},{key:"finally",value:function(e){return this["async"]().then(e,e)}},{key:"sync",value:function(){if(this.error)throw this.error;return this.result}},{key:"then",value:function(e,t){return"production"===process.env.NODE_ENV||"from"in this._opts||s("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning."),this["async"]().then(e,t)}},{key:"toString",value:function(){return this._css}},{key:"warnings",value:function(){return[]}},{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=u;try{e=t(this._css,this._opts)}catch(X){this.error=X}if(this.error)throw this.error;return this._root=e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),(A1=c)["default"]=c),n=A1,r=ok(),t=Z1(),e=ek(),i=k(function t(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:[];b(this,t),this.version="8.4.38",this.plugins=this.normalize(e)},[{key:"normalize",value:function(e){var t,n=[],r=Me(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===S(i)&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===S(i)&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else{if("object"!==S(i)||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}}catch(Le){r.e(Le)}finally{r.f()}return n}},{key:"process",value:function(e){var t=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{};return new(this.plugins.length||t.parser||t.stringifier||t.syntax?r:n)(this,e,t)}},{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}]),(L1=i)["default"]=i,e.registerProcessor(i),t.registerProcessor(i)),L1}MC||(MC=1,e=zb(),sk=H1(),s=ok(),V_=$1(),uk=ak(),Te=B1(),eO||(eO=1,pk=H1(),gk=q1(),mk=J1(),vk=Q1(),yk=V1(),wk=ek(),bk=nk(),(N1=kk)["default"]=kk),In=N1,lk=Z1(),xe=Y1(),ck=J1(),fk=Q1(),o=X1(),Rm=V1(),lt=ik(),i=tk(),dk=nk(),hk=ek(),Re=W1(),Sk.plugin=function(t,n){var e,r=!1;function i(){console&&console.warn&&!r&&(r=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG)&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226");var e=n.apply(void 0,arguments);return e.postcssPlugin=t,e.postcssVersion=(new uk).version,e}return Object.defineProperty(i,"postcss",{get:function(){return e=e||i()}}),i.process=function(e,t,n){return Sk([i(n)]).process(e,t)},i},Sk.stringify=Te,Sk.parse=lt,Sk.fromJSON=In,Sk.list=i,Sk.comment=function(e){return new ck(e)},Sk.atRule=function(e){return new fk(e)},Sk.decl=function(e){return new sk(e)},Sk.rule=function(e){return new dk(e)},Sk.root=function(e){return new hk(e)},Sk.document=function(e){return new lk(e)},Sk.CssSyntaxError=e,Sk.Declaration=sk,Sk.Container=V_,Sk.Processor=uk,Sk.Document=lk,Sk.Comment=ck,Sk.Warning=xe,Sk.AtRule=fk,Sk.Result=o,Sk.Input=Rm,Sk.Rule=dk,Sk.Root=hk,Sk.Node=Re,s.registerPostcss(Sk),(U1=Sk)["default"]=Sk);var sk,uk,lk,ck,fk,dk,hk,pk,gk,mk,vk,yk,wk,bk,Wn=(fa=U1)&&fa.__esModule&&Object.prototype.hasOwnProperty.call(fa,"default")?fa["default"]:fa;function kk(e,t){if(Array.isArray(e))return e.map(function(e){return kk(e)});var n,r=e.inputs,i=z(e,Wy);if(r){t=[];var o,a=Me(r);try{for(a.s();!(o=a.n()).done;){var s=Ae(Ae({},o.value),{},{__proto__:yk.prototype});s.map&&(s.map=Ae(Ae({},s.map),{},{__proto__:gk.prototype})),t.push(s)}}catch(Le){a.e(Le)}finally{a.f()}}if(i.nodes&&(i.nodes=e.nodes.map(function(e){return kk(e,t)})),i.source&&(n=(r=i.source).inputId,r=z(r,Hy),i.source=r,null!=n)&&(i.source.input=t[n]),"root"===i.type)return new wk(i);if("decl"===i.type)return new pk(i);if("rule"===i.type)return new bk(i);if("comment"===i.type)return new mk(i);if("atrule"===i.type)return new vk(i);throw new Error("Unknown node type: "+e.type)}function Sk(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new uk(t)}Wn.stringify;var _k=k(Rk,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}},{key:"contains",value:function(e){if(e instanceof Rk&&e.ownerDocument===this.ownerDocument){if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}}return!1}},{key:"appendChild",value:function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"insertBefore",value:function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}},{key:"removeChild",value:function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}},{key:"toString",value:function(){return"RRNode"}}]),Ek={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ck={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Ok={},xk={};function Rk(){b(this,Rk),Mb(this,"parentElement",null),Mb(this,"parentNode",null),Mb(this,"ownerDocument"),Mb(this,"firstChild",null),Mb(this,"lastChild",null),Mb(this,"previousSibling",null),Mb(this,"nextSibling",null),Mb(this,"ELEMENT_NODE",1),Mb(this,"TEXT_NODE",3),Mb(this,"nodeType"),Mb(this,"nodeName"),Mb(this,"RRNodeType")}function Ik(e){if(Ok[e])return Ok[e];var t=globalThis[e],n=t.prototype,r=e in Ek?Ek[e]:void 0,r=Boolean(r&&r.every(function(e){return Boolean(null==(e=null==(e=Object.getOwnPropertyDescriptor(n,e))?void 0:e.get)?void 0:e.toString().includes("[native code]"))})),i=e in Ck?Ck[e]:void 0,i=Boolean(i&&i.every(function(e){return"function"==typeof n[e]&&(null==(e=n[e])?void 0:e.toString().includes("[native code]"))}));if(r&&i&&!globalThis.Zone)return Ok[e]=t.prototype,t.prototype;try{var o,a,s=document.createElement("iframe"),u=(s.style.display="none",document.body.appendChild(s),s.contentWindow);return u?(o=u[e].prototype)?((a=navigator.userAgent).includes("Safari")&&!a.includes("Chrome")?(s.classList.add("rr-block"),s.setAttribute("__rrwebUntaintedMutationObserver",""),xk[e]=function(){return s.remove()}):s.remove(),Ok[e]=o):(s.remove(),n):t.prototype}catch(N){return n}}var Tk={};function Mk(e,t,n){var r="".concat(e,".").concat(String(n));return Tk[r]?Tk[r].call(t):(e=Ik(e),(e=null==(e=Object.getOwnPropertyDescriptor(e,n))?void 0:e.get)?(Tk[r]=e).call(t):t[n])}var Ak={};function Pk(e,t,n){var r="".concat(e,".").concat(String(n));return Ak[r]?Ak[r].bind(t):"function"!=typeof(e=Ik(e)[n])?t[n]:(Ak[r]=e).bind(t)}function Lk(){var e;return[Ik("MutationObserver").constructor,null!=(e=xk.MutationObserver)?e:function(){}]}var Dk=Date.now;function Nk(e,t,n){try{var r,i;return t in e?("function"==typeof(i=n(r=e[t]))&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}):function(){}}catch(De){return function(){}}}var Pe={ownerDocument:function(e){return Mk("Node",e,"ownerDocument")},childNodes:function(e){return Mk("Node",e,"childNodes")},parentNode:function(e){return Mk("Node",e,"parentNode")},parentElement:function(e){return Mk("Node",e,"parentElement")},textContent:function(e){return Mk("Node",e,"textContent")},contains:function(e,t){return Pk("Node",e,"contains")(t)},getRootNode:function(e){return Pk("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Mk("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Mk("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Mk("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Mk("Element",e,"querySelectorAll")(t)},nowTimestamp:Dk=/[1-9][0-9]{12}/.test(Date.now().toString())?Dk:function(){return(new Date).getTime()},mutationObserverCtor:Lk,patch:Nk};function Uk(e,t,n){var r=2<arguments.length&&n!==undefined?n:document,i={capture:!0,passive:!0};return r.addEventListener(e,t,i),function(){return r.removeEventListener(e,t,i)}}var Fk="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",Ar={map:{},getId:function(){return console.error(Fk),-1},getNode:function(){return console.error(Fk),null},removeNodeFromMap:function(){console.error(Fk)},has:function(){return console.error(Fk),!1},reset:function(){console.error(Fk)}};function jk(a,s,e){var u=2<arguments.length&&e!==undefined?e:{},l=null,c=0;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Date.now(),i=(c||!1!==u.leading||(c=r),s-(r-c)),o=this;i<=0||s<i?(l&&(clearTimeout(l),l=null),c=r,a.apply(o,t)):l||!1===u.trailing||(l=setTimeout(function(){c=!1===u.leading?0:Date.now(),l=null,a.apply(o,t)},i))}}function zk(e,t,n,r,i){var i=4<arguments.length&&i!==undefined?i:window,o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return zk(e,t,o||{},!0)}}function Bk(e){var t,n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=Pe.parentElement(n.body))?void 0:t.scrollLeft)||(null==(t=null==n?void 0:n.body)?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(t=Pe.parentElement(n.body))?void 0:t.scrollTop)||(null==(e=null==n?void 0:n.body)?void 0:e.scrollTop)||0}}function Wk(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Hk(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function qk(e){return e?e.nodeType===e.ELEMENT_NODE?e:Pe.parentElement(e):null}function Vk(e,t,n,r){if(e){e=qk(e);if(e){try{if("string"==typeof t){if(e.classList.contains(t))return 1;if(r&&null!==e.closest("."+t))return 1}else if(P0(e,t,r))return 1}catch(De){}if(n){if(e.matches(n))return 1;if(r&&null!==e.closest(n))return 1}}}}function Gk(e,t,n){return"TITLE"===e.tagName&&n.headTitleMutations||-2===t.getId(e)}function Jk(e){return Boolean(e.changedTouches)}function $k(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Zk(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Kk(e){return e&&(e instanceof _k&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Pe.shadowRoot(e)))}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&new Proxy(Ar,{get:function(e,t,n){return"map"===t&&console.error(Fk),Reflect.get(e,t,n)}});var Yk=k(function u(){b(this,u),M(this,"id",1),M(this,"styleIDMap",new WeakMap),M(this,"idStyleMap",new Map)},[{key:"getId",value:function(e){return null!=(e=this.styleIDMap.get(e))?e:-1}},{key:"has",value:function(e){return this.styleIDMap.has(e)}},{key:"add",value:function(e,t){return this.has(e)?this.getId(e):(t=void 0===t?this.id++:t,this.styleIDMap.set(e,t),this.idStyleMap.set(t,e),t)}},{key:"getStyle",value:function(e){return this.idStyleMap.get(e)||null}},{key:"reset",value:function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}},{key:"generateId",value:function(){return this.id++}}]);function Xk(e){var t,n=null;return n="getRootNode"in e&&(null==(t=Pe.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Pe.host(Pe.getRootNode(e))?Pe.host(Pe.getRootNode(e)):n}function Qk(e){var n,t=Pe.ownerDocument(e);return t&&(Pe.contains(t,e)||(n=e,!!(t=Pe.ownerDocument(n))&&(e=function(){for(var e,t=n;e=Xk(t);)t=e;return t}(),Pe.contains(t,e))))}(a={})[a.DomContentLoaded=0]="DomContentLoaded",a[a.Load=1]="Load",a[a.FullSnapshot=2]="FullSnapshot",a[a.IncrementalSnapshot=3]="IncrementalSnapshot",a[a.Meta=4]="Meta",a[a.Custom=5]="Custom",a[a.Plugin=6]="Plugin",a[a.Asset=7]="Asset";var eS=a,tS=((MC=tS||{})[MC.Mutation=0]="Mutation",MC[MC.MouseMove=1]="MouseMove",MC[MC.MouseInteraction=2]="MouseInteraction",MC[MC.Scroll=3]="Scroll",MC[MC.ViewportResize=4]="ViewportResize",MC[MC.Input=5]="Input",MC[MC.TouchMove=6]="TouchMove",MC[MC.MediaInteraction=7]="MediaInteraction",MC[MC.StyleSheetRule=8]="StyleSheetRule",MC[MC.CanvasMutation=9]="CanvasMutation",MC[MC.Font=10]="Font",MC[MC.Log=11]="Log",MC[MC.Drag=12]="Drag",MC[MC.StyleDeclaration=13]="StyleDeclaration",MC[MC.Selection=14]="Selection",MC[MC.AdoptedStyleSheet=15]="AdoptedStyleSheet",MC[MC.CustomElement=16]="CustomElement",MC),nS=((eO=nS||{})[eO.MouseUp=0]="MouseUp",eO[eO.MouseDown=1]="MouseDown",eO[eO.Click=2]="Click",eO[eO.ContextMenu=3]="ContextMenu",eO[eO.DblClick=4]="DblClick",eO[eO.Focus=5]="Focus",eO[eO.Blur=6]="Blur",eO[eO.TouchStart=7]="TouchStart",eO[eO.TouchMove_Departed=8]="TouchMove_Departed",eO[eO.TouchEnd=9]="TouchEnd",eO[eO.TouchCancel=10]="TouchCancel",eO),rS=((Te=rS||{})[Te.Mouse=0]="Mouse",Te[Te.Pen=1]="Pen",Te[Te.Touch=2]="Touch",Te),iS=((lt={})[lt["2D"]=0]="2D",lt[lt.WebGL=1]="WebGL",lt[lt.WebGL2=2]="WebGL2",lt),oS=((In=oS||{})[In.Play=0]="Play",In[In.Pause=1]="Pause",In[In.Seeked=2]="Seeked",In[In.VolumeChange=3]="VolumeChange",In[In.RateChange=4]="RateChange",In),aS=((i={})[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i);function sS(e){return"__ln"in e}var uS,lS=k(function u(){b(this,u),M(this,"length",0),M(this,"head",null),M(this,"tail",null)},[{key:"get",value:function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t}},{key:"addNode",value:function(e){var t,n={value:e,previous:null,next:null};e.__ln=n,e.previousSibling&&sS(e.previousSibling)?(t=e.previousSibling.__ln.next,n.next=t,n.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=n,t&&(t.previous=n)):e.nextSibling&&sS(e.nextSibling)&&e.nextSibling.__ln.previous?(t=e.nextSibling.__ln.previous,n.previous=t,n.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=n,t&&(t.next=n)):(this.head&&(this.head.previous=n),n.next=this.head,this.head=n),null===n.next&&(this.tail=n),this.length++}},{key:"removeNode",value:function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}]),cS=function(e,t){return"".concat(e,"@").concat(t)},fS=k(function u(){var w=this;b(this,u),M(this,"frozen",!1),M(this,"locked",!1),M(this,"texts",[]),M(this,"attributes",[]),M(this,"attributeMap",new WeakMap),M(this,"removes",[]),M(this,"mapRemoves",[]),M(this,"movedMap",{}),M(this,"addedSet",new Set),M(this,"movedSet",new Set),M(this,"droppedSet",new Set),M(this,"removesSubTreeCache",new Set),M(this,"mutationCb"),M(this,"blockClass"),M(this,"blockSelector"),M(this,"maskTextClass"),M(this,"maskTextSelector"),M(this,"inlineStylesheet"),M(this,"maskInputOptions"),M(this,"maskTextFn"),M(this,"maskInputFn"),M(this,"keepIframeSrcFn"),M(this,"recordCanvas"),M(this,"inlineImages"),M(this,"slimDOMOptions"),M(this,"dataURLOptions"),M(this,"doc"),M(this,"mirror"),M(this,"iframeManager"),M(this,"stylesheetManager"),M(this,"shadowDomManager"),M(this,"canvasManager"),M(this,"processedNodeManager"),M(this,"unattachedDoc"),M(this,"processMutations",function(e){e.forEach(w.processMutation),w.emit()}),M(this,"emit",function(){if(!w.frozen&&!w.locked){for(var i=[],o=new Set,a=new lS,s=function(e){for(var t=e,n=-2;-2===n;)n=(t=t&&t.nextSibling)&&w.mirror.getId(t);return n},e=function(t){var e=Pe.parentNode(t);if(e&&Qk(t)){var n=!1;if(t.nodeType===Node.TEXT_NODE){var r=e.tagName;if("TEXTAREA"===r)return;"STYLE"===r&&w.addedSet.has(e)&&(n=!0)}r=a0(e)?w.mirror.getId(Xk(t)):w.mirror.getId(e),e=s(t);if(-1===r||-1===e)return a.addNode(t);n=F0(t,{doc:w.doc,mirror:w.mirror,blockClass:w.blockClass,blockSelector:w.blockSelector,maskTextClass:w.maskTextClass,maskTextSelector:w.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:w.inlineStylesheet,maskInputOptions:w.maskInputOptions,maskTextFn:w.maskTextFn,maskInputFn:w.maskInputFn,slimDOMOptions:w.slimDOMOptions,dataURLOptions:w.dataURLOptions,recordCanvas:w.recordCanvas,inlineImages:w.inlineImages,onSerialize:function(e){$k(e,w.mirror)&&w.iframeManager.addIframe(e),Zk(e,w.mirror)&&w.stylesheetManager.trackLinkElement(e),Kk(t)&&w.shadowDomManager.addShadowRoot(Pe.shadowRoot(t),w.doc)},onIframeLoad:function(e,t){w.iframeManager.attachIframe(e,t),w.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:function(e,t){w.stylesheetManager.attachLinkElement(e,t)},cssCaptured:n});n&&(i.push({parentId:r,nextId:e,node:n}),o.add(n.id))}};w.mapRemoves.length;)w.mirror.removeNodeFromMap(w.mapRemoves.shift());var t,n=Me(w.movedSet);try{for(n.s();!(t=n.n()).done;){var r=t.value;hS(w.removesSubTreeCache,r,w.mirror)&&!w.movedSet.has(Pe.parentNode(r))||e(r)}}catch(Le){n.e(Le)}finally{n.f()}var u,l=Me(w.addedSet);try{for(l.s();!(u=l.n()).done;){var c=u.value;!pS(w.droppedSet,c)&&!hS(w.removesSubTreeCache,c,w.mirror)||pS(w.movedSet,c)?e(c):w.droppedSet.add(c)}}catch(Le){l.e(Le)}finally{l.f()}for(var f=null;a.length;){var d,h,p=null;if(!(p=f&&(d=w.mirror.getId(Pe.parentNode(f.value)),h=s(f.value),-1!==d)&&-1!==h?f:p))for(var g=a.tail;g;){var m=g,g=g.previous;if(m){var v=w.mirror.getId(Pe.parentNode(m.value));if(-1!==s(m.value)){if(-1!==v){p=m;break}v=m.value,v=Pe.parentNode(v);if(v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE){v=Pe.host(v);if(-1!==w.mirror.getId(v)){p=m;break}}}}}if(!p){for(;a.head;)a.removeNode(a.head.value);break}f=p.previous,a.removeNode(p.value),e(p.value)}var y={texts:w.texts.map(function(e){var t=e.node,n=Pe.parentNode(t);return n&&"TEXTAREA"===n.tagName&&w.genTextAreaValueMutation(n),{id:w.mirror.getId(t),value:e.value}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),attributes:w.attributes.map(function(e){var t,n,r=e.attributes;return"string"==typeof r.style&&(t=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles),t.length<r.style.length)&&(t+n).split("var(").length===r.style.split("var(").length&&(r.style=e.styleDiff),{id:w.mirror.getId(e.node),attributes:r}}).filter(function(e){return!o.has(e.id)}).filter(function(e){return w.mirror.has(e.id)}),removes:w.removes,adds:i};(y.texts.length||y.attributes.length||y.removes.length||y.adds.length)&&(w.texts=[],w.attributes=[],w.attributeMap=new WeakMap,w.removes=[],w.addedSet=new Set,w.movedSet=new Set,w.droppedSet=new Set,w.removesSubTreeCache=new Set,w.movedMap={},w.mutationCb(y))}}),M(this,"genTextAreaValueMutation",function(e){var t=w.attributeMap.get(e),n=(t||(w.attributes.push(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}}),w.attributeMap.set(e,t)),Array.from(Pe.childNodes(e),function(e){return Pe.textContent(e)||""}).join(""));t.attributes.value=f0({element:e,maskInputOptions:w.maskInputOptions,tagName:e.tagName,type:h0(e),value:n,maskInputFn:w.maskInputFn})}),M(this,"processMutation",function(a){if(!Gk(a.target,w.mirror,w.slimDOMOptions))switch(a.type){case"characterData":var e=Pe.textContent(a.target);Vk(a.target,w.blockClass,w.blockSelector,!1)||e===a.oldValue||w.texts.push({value:L0(a.target,w.maskTextClass,w.maskTextSelector,!0)&&e?w.maskTextFn?w.maskTextFn(e,qk(a.target)):e.replace(/[\S]/g,"*"):e,node:a.target});break;case"attributes":var t,n=a.target,e=a.attributeName,s=a.target.getAttribute(e);if("value"===e&&(t=h0(n),s=f0({element:n,maskInputOptions:w.maskInputOptions,tagName:n.tagName,type:t,value:s,maskInputFn:w.maskInputFn})),!Vk(a.target,w.blockClass,w.blockSelector,!1)&&s!==a.oldValue){var r=w.attributeMap.get(a.target);if("IFRAME"===n.tagName&&"src"===e&&!w.keepIframeSrcFn(s)){if(n.contentDocument)return;e="rr_src"}if(r||(r={node:a.target,attributes:{},styleDiff:{},_unchangedStyles:{}},w.attributes.push(r),w.attributeMap.set(a.target,r)),"type"===e&&"INPUT"===n.tagName&&"password"===(a.oldValue||"").toLowerCase()&&n.setAttribute("data-rr-is-password","true"),!A0(n.tagName,e))if(r.attributes[e]=M0(w.doc,d0(n.tagName),d0(e),s),"style"===e){if(!w.unattachedDoc)try{w.unattachedDoc=document.implementation.createHTMLDocument()}catch(B){w.unattachedDoc=w.doc}var i=w.unattachedDoc.createElement("span");a.oldValue&&i.setAttribute("style",a.oldValue);for(var o=0,u=Array.from(n.style);o<u.length;o++){var l=u[o],c=n.style.getPropertyValue(l),f=n.style.getPropertyPriority(l);c!==i.style.getPropertyValue(l)||f!==i.style.getPropertyPriority(l)?r.styleDiff[l]=""===f?c:[c,f]:r._unchangedStyles[l]=[c,f]}for(var d=0,h=Array.from(i.style);d<h.length;d++){var p=h[d];""===n.style.getPropertyValue(p)&&(r.styleDiff[p]=!1)}}else"open"===e&&"DIALOG"===n.tagName&&(n.matches("dialog:modal")?r.attributes.rr_open_mode="modal":r.attributes.rr_open_mode="non-modal")}break;case"childList":return Vk(a.target,w.blockClass,w.blockSelector,!0)?void 0:"TEXTAREA"===a.target.tagName?void w.genTextAreaValueMutation(a.target):(a.addedNodes.forEach(function(e){return w.genAdds(e,a.target)}),void a.removedNodes.forEach(function(e){var t=w.mirror.getId(e),n=a0(a.target)?w.mirror.getId(Pe.host(a.target)):w.mirror.getId(a.target);if(!Vk(a.target,w.blockClass,w.blockSelector,!1)&&!Gk(e,w.mirror,w.slimDOMOptions)&&-1!==w.mirror.getId(e)){if(w.addedSet.has(e))dS(w.addedSet,e),w.droppedSet.add(e);else if(!(w.addedSet.has(a.target)&&-1===t||function s(e,t){var n;return!a0(e)&&(n=t.getId(e),!t.has(n)||(!(n=Pe.parentNode(e))||n.nodeType!==e.DOCUMENT_NODE)&&(!n||s(n,t)))}(a.target,w.mirror)))if(w.movedSet.has(e)&&w.movedMap[cS(t,n)])dS(w.movedSet,e);else{w.removes.push({parentId:n,id:t,isShadow:!(!a0(a.target)||!s0(a.target))||void 0});for(var r=w.removesSubTreeCache,i=[e];i.length;){var o=i.pop();r.has(o)||(r.add(o),Pe.childNodes(o).forEach(function(e){return i.push(e)}))}}w.mapRemoves.push(e)}}))}}),M(this,"genAdds",function(t,e){if(!w.processedNodeManager.inOtherBuffer(t,w)&&!w.addedSet.has(t)&&!w.movedSet.has(t)){if(w.mirror.hasNode(t)){if(Gk(t,w.mirror,w.slimDOMOptions))return;w.movedSet.add(t);var n=null;(n=e&&w.mirror.hasNode(e)?w.mirror.getId(e):n)&&-1!==n&&(w.movedMap[cS(w.mirror.getId(t),n)]=!0)}else w.addedSet.add(t),w.droppedSet["delete"](t);Vk(t,w.blockClass,w.blockSelector,!1)||(Pe.childNodes(t).forEach(function(e){return w.genAdds(e)}),Kk(t)&&Pe.childNodes(Pe.shadowRoot(t)).forEach(function(e){w.processedNodeManager.add(e,w),w.genAdds(e,t)}))}})},[{key:"init",value:function(t){var n=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(e){n[e]=t[e]})}},{key:"freeze",value:function(){this.frozen=!0,this.canvasManager.freeze()}},{key:"unfreeze",value:function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}},{key:"isFrozen",value:function(){return this.frozen}},{key:"lock",value:function(){this.locked=!0,this.canvasManager.lock()}},{key:"unlock",value:function(){this.locked=!1,this.canvasManager.unlock(),this.emit()}},{key:"reset",value:function(){this.shadowDomManager.reset(),this.canvasManager.reset()}}]);function dS(t,e){t["delete"](e),Pe.childNodes(e).forEach(function(e){return dS(t,e)})}function hS(e,t){return 0!==e.size&&(e=e,t=Pe.parentNode(t))&&e.has(t)}function pS(e,t){return 0!==e.size&&function A(e,t){t=Pe.parentNode(t);return!!t&&(!!e.has(t)||A(e,t))}(e,t)}var gS=function(e){return uS?function(){try{return e.apply(void 0,arguments)}catch(X){if(!uS||!0!==uS(X))throw X}}:e},mS=[];function vS(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(A){}return e&&e.target}function yS(e,t){var n=new fS,e=(mS.push(n),n.init(e),Ne(Lk(),2)),r=e[0],e=e[1],n=new r(gS(n.processMutations.bind(n)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),[n,e]}function wS(e){var t,r,a,s=e.mouseInteractionCb,i=e.doc,u=e.mirror,l=e.blockClass,c=e.blockSelector,e=e.sampling;return!1===e.mouseInteraction?function(){}:(t=!0===e.mouseInteraction||void 0===e.mouseInteraction?{}:e.mouseInteraction,r=[],a=null,Object.keys(nS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==t[e]}).forEach(function(e){var o,t=d0(e),n=(o=e,function(e){var t=vS(e);if(!Vk(t,l,c,!0)){var n=null,r=o;if("pointerType"in e){switch(e.pointerType){case"mouse":n=rS.Mouse;break;case"touch":n=rS.Touch;break;case"pen":n=rS.Pen}n===rS.Touch?nS[o]===nS.MouseDown?r="TouchStart":nS[o]===nS.MouseUp&&(r="TouchEnd"):rS.Pen}else Jk(e)&&(n=rS.Touch);null!==n?(a=n,(r.startsWith("Touch")&&n===rS.Touch||r.startsWith("Mouse")&&n===rS.Mouse)&&(n=null)):nS[o]===nS.Click&&(n=a,a=null);var i,e=Jk(e)?e.changedTouches[0]:e;e&&(t=u.getId(t),i=e.clientX,e=e.clientY,gS(s)(Ae({type:nS[r],id:t,x:i,y:e},null!==n&&{pointerType:n})))}});if(window.PointerEvent)switch(nS[e]){case nS.MouseDown:case nS.MouseUp:t=t.replace("mouse","pointer");break;case nS.TouchStart:case nS.TouchEnd:return}r.push(Uk(t,n,i))}),gS(function(){r.forEach(function(e){return e()})}))}function bS(e){var r=e.scrollCb,i=e.doc,o=e.mirror,a=e.blockClass,s=e.blockSelector,e=e.sampling;return Uk("scroll",gS(jk(gS(function(e){var t,n,e=vS(e);e&&!Vk(e,a,s,!0)&&(t=o.getId(e),e===i&&i.defaultView?(n=Bk(i.defaultView),r({id:t,x:n.left,y:n.top})):r({id:t,x:e.scrollLeft,y:e.scrollTop}))}),e.scroll||100)),i)}var kS=["INPUT","TEXTAREA","SELECT"],SS=new WeakMap;function _S(e){return function w(e,t){var n;return xS("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||xS("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||xS("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||xS("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule?(n=Array.from(e.parentRule.cssRules).indexOf(e),t.unshift(n),w(e.parentRule,t)):(e.parentStyleSheet&&(n=Array.from(e.parentStyleSheet.cssRules).indexOf(e),t.unshift(n)),t)}(e,[])}function ES(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function CS(e,t){var n,r=e.mirror,i=e.stylesheetManager,o="#document"===t.nodeName?r.getId(t):r.getId(Pe.host(t)),e="#document"===t.nodeName?null==(e=t.defaultView)?void 0:e.Document:null==(r=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:r.ShadowRoot,a=null!=e&&e.prototype?Object.getOwnPropertyDescriptor(null==e?void 0:e.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&e&&a?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:function(){var e;return null==(e=a.get)?void 0:e.call(this)},set:function(e){var t=null==(t=a.set)?void 0:t.call(this,e);if(null!==o&&-1!==o)try{i.adoptStyleSheets(e,o)}catch(n){}return t}}),gS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):function(){}}function OS(e){var t,n,D,N,U,F,j,z,B,W,H,q,V,G,r=1<arguments.length&&arguments[1]!==undefined?arguments[1]:{},i=e.doc.defaultView;if(!i)return function(){};t=r,n=(r=e).mutationCb,D=r.mousemoveCb,N=r.mouseInteractionCb,U=r.scrollCb,F=r.viewportResizeCb,j=r.inputCb,z=r.mediaInteractionCb,B=r.styleSheetRuleCb,W=r.styleDeclarationCb,H=r.canvasMutationCb,q=r.fontCb,V=r.selectionCb,G=r.customElementCb,r.mutationCb=function(){t.mutation&&t.mutation.apply(t,arguments),n.apply(void 0,arguments)},r.mousemoveCb=function(){t.mousemove&&t.mousemove.apply(t,arguments),D.apply(void 0,arguments)},r.mouseInteractionCb=function(){t.mouseInteraction&&t.mouseInteraction.apply(t,arguments),N.apply(void 0,arguments)},r.scrollCb=function(){t.scroll&&t.scroll.apply(t,arguments),U.apply(void 0,arguments)},r.viewportResizeCb=function(){t.viewportResize&&t.viewportResize.apply(t,arguments),F.apply(void 0,arguments)},r.inputCb=function(){t.input&&t.input.apply(t,arguments),j.apply(void 0,arguments)},r.mediaInteractionCb=function(){t.mediaInteaction&&t.mediaInteaction.apply(t,arguments),z.apply(void 0,arguments)},r.styleSheetRuleCb=function(){t.styleSheetRule&&t.styleSheetRule.apply(t,arguments),B.apply(void 0,arguments)},r.styleDeclarationCb=function(){t.styleDeclaration&&t.styleDeclaration.apply(t,arguments),W.apply(void 0,arguments)},r.canvasMutationCb=function(){t.canvasMutation&&t.canvasMutation.apply(t,arguments),H.apply(void 0,arguments)},r.fontCb=function(){t.font&&t.font.apply(t,arguments),q.apply(void 0,arguments)},r.selectionCb=function(){t.selection&&t.selection.apply(t,arguments),V.apply(void 0,arguments)},r.customElementCb=function(){t.customElement&&t.customElement.apply(t,arguments),G.apply(void 0,arguments)};var o,J,$,Z,K,Y,X,Q,a,ee,te,ne,re,s,u,ie,l,c,f,oe,d,h,p,g,ae,se,ue,le,m,v,y,ce,w,b,k,S,_,E,C,O,fe=function(){},de=(e.recordDOM&&(r=yS(e,e.doc),r=Ne(r,2),o=r[0],fe=r[1]),ue=(r=e).mousemoveCb,R=r.doc,le=r.mirror,!1===(x=r.sampling).mousemove?function(){}:(r="number"==typeof x.mousemove?x.mousemove:50,x="number"==typeof x.mousemoveCallback?x.mousemoveCallback:500,g=[],ae=jk(gS(function(e){var t=Date.now()-p;ue(g.map(function(e){return e.timeOffset-=t,e}),e),g=[],p=null}),x),x=gS(jk(gS(function(e){var t=vS(e),n=Jk(e)?e.changedTouches[0]:e,r=n.clientX,n=n.clientY;p=p||Dk(),g.push({x:r,y:n,id:le.getId(t),timeOffset:Dk()-p}),ae("undefined"!=typeof DragEvent&&e instanceof DragEvent?tS.Drag:e instanceof MouseEvent?tS.MouseMove:tS.TouchMove)}),r,{trailing:!1})),se=[Uk("mousemove",x,R),Uk("touchmove",x,R),Uk("drag",x,R)],gS(function(){se.forEach(function(e){return e()})}))),he=wS(e),pe=bS(e),ge=(r={win:i},oe=(x=e).viewportResizeCb,x=r.win,h=d=-1,Uk("resize",gS(jk(gS(function(){var e=Wk(),t=Hk();d===e&&h===t||(oe({width:Number(t),height:Number(e)}),d=e,h=t)}),200)),x)),me=(Q=(R=e).inputCb,a=R.doc,ee=R.mirror,te=R.blockClass,ne=R.blockSelector,re=R.ignoreClass,s=R.ignoreSelector,u=R.maskInputOptions,ie=R.maskInputFn,l=R.userTriggeredOnInput,c=("last"===R.sampling.input?["change"]:["input","change"]).map(function(e){return Uk(e,gS(Se),a)}),(f=a.defaultView)?(R=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),r=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]],R&&R.set&&c.push.apply(c,Ue(r.map(function(e){return zk(e[0],e[1],{set:function(){gS(Se)({target:this,isTrusted:!1})}},!1,f)}))),gS(function(){c.forEach(function(e){return e()})})):function(){c.forEach(function(e){return e()})}),ve=(J=(x=e).mediaInteractionCb,$=x.blockClass,Z=x.blockSelector,K=x.mirror,Y=x.sampling,x=x.doc,R=gS(function(a){return jk(gS(function(e){var t,n,r,i,o,e=vS(e);e&&!Vk(e,$,Z,!0)&&(t=e.currentTime,n=e.volume,r=e.muted,i=e.playbackRate,o=e.loop,J({type:a,id:K.getId(e),currentTime:t,volume:n,muted:r,playbackRate:i,loop:o}))}),Y.media||500)}),X=[Uk("play",R(oS.Play),x),Uk("pause",R(oS.Pause),x),Uk("seeked",R(oS.Seeked),x),Uk("volumechange",R(oS.VolumeChange),x),Uk("ratechange",R(oS.RateChange),x)],gS(function(){X.forEach(function(e){return e()})})),ye=function(){},we=function(){},be=function(){},ke=function(){};function Se(e){var t,n,r,i=vS(e),e=e.isTrusted,o=i&&i.tagName;!(i=i&&"OPTION"===o?Pe.parentElement(i):i)||!o||kS.indexOf(o)<0||Vk(i,te,ne,!0)||i.classList.contains(re)||s&&i.matches(s)||(t=i.value,n=!1,"radio"===(r=h0(i)||"")||"checkbox"===r?n=i.checked:(u[o.toLowerCase()]||u[r])&&(t=f0({element:i,maskInputOptions:u,tagName:o,type:r,value:t,maskInputFn:ie})),_e(i,l?{text:t,isChecked:n,userTriggered:e}:{text:t,isChecked:n}),o=i.name,"radio"===r&&o&&n&&a.querySelectorAll('input[type="radio"][name="'.concat(o,'"]')).forEach(function(e){var t;e!==i&&(t=e.value,_e(e,l?{text:t,isChecked:!n,userTriggered:!1}:{text:t,isChecked:!n}))}))}function _e(e,t){var n=SS.get(e);n&&n.text===t.text&&n.isChecked===t.isChecked||(SS.set(e,t),n=ee.getId(e),gS(Q)(Ae(Ae({},t),{},{id:n})))}e.recordDOM&&(ye=function(e,t){var s=e.styleSheetRuleCb,u=e.mirror,l=e.stylesheetManager,r=t.win;if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return function(){};var n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:gS(function(e,t,n){var r=Ne(n,2),i=r[0],r=r[1],o=ES(t,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.addRule=function(e,t){var n=2<arguments.length&&arguments[2]!==undefined?arguments[2]:this.cssRules.length,e="".concat(e," { ").concat(t," }");return r.CSSStyleSheet.prototype.insertRule.apply(this,[e,n])};var i,o,a=r.CSSStyleSheet.prototype.deleteRule,c=(r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:gS(function(e,t,n){var r=Ne(n,1)[0],i=ES(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:r}]}),e.apply(t,n)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:gS(function(e,t,n){var r=Ne(n,1)[0],i=ES(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replace:r}),e.apply(t,n)})})),r.CSSStyleSheet.prototype.replaceSync&&(o=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(o,{apply:gS(function(e,t,n){var r=Ne(n,1)[0],i=ES(t,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,replaceSync:r}),e.apply(t,n)})})),{}),f=(RS("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(RS("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),RS("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),RS("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule)),{});return Object.entries(c).forEach(function(e){var e=Ne(e,2),t=e[0],e=e[1];f[t]={insertRule:e.prototype.insertRule,deleteRule:e.prototype.deleteRule},e.prototype.insertRule=new Proxy(f[t].insertRule,{apply:gS(function(e,t,n){var r=Ne(n,2),i=r[0],r=r[1],o=ES(t.parentStyleSheet,u,l.styleMirror),a=o.id,o=o.styleId;return(a&&-1!==a||o&&-1!==o)&&s({id:a,styleId:o,adds:[{rule:i,index:[].concat(Ue(_S(t)),[r||0])}]}),e.apply(t,n)})}),e.prototype.deleteRule=new Proxy(f[t].deleteRule,{apply:gS(function(e,t,n){var r=Ne(n,1)[0],i=ES(t.parentStyleSheet,u,l.styleMirror),o=i.id,i=i.styleId;return(o&&-1!==o||i&&-1!==i)&&s({id:o,styleId:i,removes:[{index:[].concat(Ue(_S(t)),[r])}]}),e.apply(t,n)})})}),gS(function(){r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=a,i&&(r.CSSStyleSheet.prototype.replace=i),o&&(r.CSSStyleSheet.prototype.replaceSync=o),Object.entries(c).forEach(function(e){var e=Ne(e,2),t=e[0],e=e[1];e.prototype.insertRule=f[t].insertRule,e.prototype.deleteRule=f[t].deleteRule})})}(e,{win:i}),we=CS(e,e.doc),r={win:i},b=(R=e).styleDeclarationCb,k=R.mirror,S=R.ignoreCSSAttributes,_=R.stylesheetManager,E=r.win,C=E.CSSStyleDeclaration.prototype.setProperty,E.CSSStyleDeclaration.prototype.setProperty=new Proxy(C,{apply:gS(function(e,t,n){var r,i,o=Ne(n,3),a=o[0],s=o[1],o=o[2];return S.has(a)?C.apply(t,[a,s,o]):(r=(i=ES(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,set:{property:a,value:s,priority:o},index:_S(t.parentRule)}),e.apply(t,n))})}),O=E.CSSStyleDeclaration.prototype.removeProperty,E.CSSStyleDeclaration.prototype.removeProperty=new Proxy(O,{apply:gS(function(e,t,n){var r,i,o=Ne(n,1)[0];return S.has(o)?O.apply(t,[o]):(r=(i=ES(null==(i=t.parentRule)?void 0:i.parentStyleSheet,k,_.styleMirror)).id,i=i.styleId,(r&&-1!==r||i&&-1!==i)&&b({id:r,styleId:i,remove:{property:o},index:_S(t.parentRule)}),e.apply(t,n))})}),be=gS(function(){E.CSSStyleDeclaration.prototype.setProperty=C,E.CSSStyleDeclaration.prototype.removeProperty=O}),e.collectFonts)&&(ce=(x=e).fontCb,w=(x=x.doc).defaultView,ke=w?(m=[],v=new WeakMap,y=w.FontFace,w.FontFace=function(e,t,n){var r=new y(e,t,n);return v.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r},x=Nk(x.fonts,"add",function(e){return function(t){return setTimeout(gS(function(){var e=v.get(t);e&&(ce(e),v["delete"](t))}),0),e.apply(this,[t])}}),m.push(function(){w.FontFace=y}),m.push(x),gS(function(){m.forEach(function(e){return e()})})):function(){});Oe=(R=e).doc,I=R.mirror,T=R.blockClass,M=R.blockSelector,xe=R.selectionCb,A=!0,(R=gS(function(){var e=Oe.getSelection();if(!(!e||A&&null!=e&&e.isCollapsed)){A=e.isCollapsed||!1;for(var t=[],n=e.rangeCount||0,r=0;r<n;r++){var i=e.getRangeAt(r),o=i.startContainer,a=i.startOffset,s=i.endContainer,i=i.endOffset;Vk(o,T,M,!0)||Vk(s,T,M,!0)||t.push({start:I.getId(o),startOffset:a,end:I.getId(s),endOffset:i})}xe({ranges:t})}}))();var Ee,x,Ce,R,Oe,I,T,M,xe,A,Re=Uk("selectionchange",R),Ie=(x=(r=e).doc,Ce=r.customElementCb,(r=x.defaultView)&&r.customElements?Nk(r.customElements,"define",function(r){return function(e,t,n){try{Ce({define:{name:e}})}catch(De){console.warn("Custom element callback failed for ".concat(e))}return r.apply(this,[e,t,n])}}):function(){}),Te=[],P=Me(e.plugins);try{for(P.s();!(Ee=P.n()).done;){var L=Ee.value;Te.push(L.observer(L.callback,i,L.options))}}catch(Le){P.e(Le)}finally{P.f()}return gS(function(){mS.forEach(function(e){return e.reset()}),null!=o&&o.disconnect(),fe(),de(),he(),pe(),ge(),me(),ve(),ye(),we(),be(),ke(),Re(),Ie(),Te.forEach(function(e){return e()})})}function xS(e){return"undefined"!=typeof window[e]}function RS(e){return Boolean("undefined"!=typeof window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var IS=k(function u(e){b(this,u),M(this,"iframeIdToRemoteIdMap",new WeakMap),M(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e},[{key:"getId",value:function(e,t,n,r){n=n||this.getIdToRemoteIdMap(e),r=r||this.getRemoteIdToIdMap(e),e=n.get(t);return e||(e=this.generateIdFn(),n.set(t,e),r.set(e,t)),e}},{key:"getIds",value:function(t,e){var n=this,r=this.getIdToRemoteIdMap(t),i=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getId(t,e,r,i)})}},{key:"getRemoteId",value:function(e,t,n){n=n||this.getRemoteIdToIdMap(e);return"number"!=typeof t?t:n.get(t)||-1}},{key:"getRemoteIds",value:function(t,e){var n=this,r=this.getRemoteIdToIdMap(t);return e.map(function(e){return n.getRemoteId(t,e,r)})}},{key:"reset",value:function(e){e?(this.iframeIdToRemoteIdMap["delete"](e),this.iframeRemoteIdToIdMap["delete"](e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}},{key:"getIdToRemoteIdMap",value:function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}},{key:"getRemoteIdToIdMap",value:function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}]),TS=k(function u(e){b(this,u),M(this,"iframes",new WeakMap),M(this,"crossOriginIframeMap",new WeakMap),M(this,"crossOriginIframeMirror",new IS(C0)),M(this,"crossOriginIframeStyleMirror"),M(this,"crossOriginIframeRootIdMap",new WeakMap),M(this,"mirror"),M(this,"mutationCb"),M(this,"wrappedEmit"),M(this,"loadListener"),M(this,"stylesheetManager"),M(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new IS(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))},[{key:"addIframe",value:function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}},{key:"addLoadListener",value:function(e){this.loadListener=e}},{key:"attachIframe",value:function(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&null!=(t=e.contentWindow)&&t.addEventListener("message",this.handleMessage.bind(this)),null!=(t=this.loadListener)&&t.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&0<e.contentDocument.adoptedStyleSheets.length&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}},{key:"handleMessage",value:function(e){var t=e;"rrweb"===t.data.type&&t.origin===t.data.origin&&e.source&&(e=this.crossOriginIframeMap.get(e.source))&&(e=this.transformCrossOriginEvent(e,t.data.event))&&this.wrappedEmit(e,t.data.isCheckout)}},{key:"transformCrossOriginEvent",value:function(n,e){var t,r=this;switch(e.type){case eS.FullSnapshot:this.crossOriginIframeMirror.reset(n),this.crossOriginIframeStyleMirror.reset(n),this.replaceIdOnNode(e.data.node,n);var i=e.data.node.id;return this.crossOriginIframeRootIdMap.set(n,i),this.patchRootIdOnNode(e.data.node,i),{timestamp:e.timestamp,type:eS.IncrementalSnapshot,data:{source:tS.Mutation,adds:[{parentId:this.mirror.getId(n),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case eS.Meta:case eS.Load:case eS.DomContentLoaded:return!1;case eS.Plugin:return e;case eS.Custom:return this.replaceIds(e.data.payload,n,["id","parentId","previousId","nextId"]),e;case eS.IncrementalSnapshot:switch(e.data.source){case tS.Mutation:return e.data.adds.forEach(function(e){r.replaceIds(e,n,["parentId","nextId","previousId"]),r.replaceIdOnNode(e.node,n);var t=r.crossOriginIframeRootIdMap.get(n);t&&r.patchRootIdOnNode(e.node,t)}),e.data.removes.forEach(function(e){r.replaceIds(e,n,["parentId","id"])}),e.data.attributes.forEach(function(e){r.replaceIds(e,n,["id"])}),e.data.texts.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case tS.Drag:case tS.TouchMove:case tS.MouseMove:return e.data.positions.forEach(function(e){r.replaceIds(e,n,["id"])}),e;case tS.ViewportResize:return!1;case tS.MediaInteraction:case tS.MouseInteraction:case tS.Scroll:case tS.CanvasMutation:case tS.Input:return this.replaceIds(e.data,n,["id"]),e;case tS.StyleSheetRule:case tS.StyleDeclaration:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleId"]),e;case tS.Font:return e;case tS.Selection:return e.data.ranges.forEach(function(e){r.replaceIds(e,n,["start","end"])}),e;case tS.AdoptedStyleSheet:return this.replaceIds(e.data,n,["id"]),this.replaceStyleIds(e.data,n,["styleIds"]),null!=(t=e.data.styles)&&t.forEach(function(e){r.replaceStyleIds(e,n,["styleId"])}),e}}return!1}},{key:"replace",value:function(e,t,n,r){var i,o=Me(r);try{for(o.s();!(i=o.n()).done;){var a=i.value;!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}}catch(Le){o.e(Le)}finally{o.f()}return t}},{key:"replaceIds",value:function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}},{key:"replaceStyleIds",value:function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}},{key:"replaceIdOnNode",value:function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})}},{key:"patchRootIdOnNode",value:function(e,t){var n=this;e.type===aS.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})}}]),MS=k(function u(e){b(this,u),M(this,"shadowDoms",new WeakSet),M(this,"mutationCb"),M(this,"scrollCb"),M(this,"bypassOptions"),M(this,"mirror"),M(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()},[{key:"init",value:function(){this.reset(),this.patchAttachShadow(Element,document)}},{key:"addShadowRoot",value:function(e,t){var n,r=this;s0(e)&&!this.shadowDoms.has(e)&&(this.shadowDoms.add(e),n=Ne(yS(Ae(Ae({},this.bypassOptions),{},{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),1)[0],this.restoreHandlers.push(function(){return n.disconnect()}),this.restoreHandlers.push(bS(Ae(Ae({},this.bypassOptions),{},{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&0<e.adoptedStyleSheets.length&&r.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,r.mirror.getId(Pe.host(e))),r.restoreHandlers.push(CS({mirror:r.mirror,stylesheetManager:r.bypassOptions.stylesheetManager},e))},0))}},{key:"observeAttachShadow",value:function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}},{key:"patchAttachShadow",value:function(e,r){var i=this;this.restoreHandlers.push(Nk(e.prototype,"attachShadow",function(n){return function(e){var e=n.call(this,e),t=Pe.shadowRoot(this);return t&&Qk(this)&&i.addShadowRoot(t,r),e}}))}},{key:"reset",value:function(){this.restoreHandlers.forEach(function(e){try{e()}catch(w){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}]),AS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",PS="undefined"==typeof Uint8Array?[]:new Uint8Array(256),LS=0;LS<AS.length;LS++)PS[AS.charCodeAt(LS)]=LS;var DS=new Map,NS=function(e,t,n){var r;if(e&&(FS(e,t)||"object"===S(e)))return t=n,n=e.constructor.name,(r=DS.get(t))||(r=new Map,DS.set(t,r)),r.has(n)||r.set(n,[]),-1===(n=(t=r.get(n)).indexOf(e))&&(n=t.length,t.push(e)),n};var US=function(e,t,n){return e.map(function(e){return function r(i,t,n){return i instanceof Array?i.map(function(e){return r(e,t,n)}):null===i?i:i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray?{rr_type:i.constructor.name,args:[Object.values(i)]}:i instanceof ArrayBuffer?{rr_type:i.constructor.name,base64:function(){for(var e=new Uint8Array(i),t=e.length,n="",r=0;r<t;r+=3)n=(n=(n=(n+=AS[e[r]>>2])+AS[(3&e[r])<<4|e[r+1]>>4])+AS[(15&e[r+1])<<2|e[r+2]>>6])+AS[63&e[r+2]];return t%3==2?n=n.substring(0,n.length-1)+"=":t%3==1&&(n=n.substring(0,n.length-2)+"=="),n}()}:i instanceof DataView?{rr_type:i.constructor.name,args:[r(i.buffer,t,n),i.byteOffset,i.byteLength]}:i instanceof HTMLImageElement?{rr_type:i.constructor.name,src:i.src}:i instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:i.toDataURL()}:i instanceof ImageData?{rr_type:i.constructor.name,args:[r(i.data,t,n),i.width,i.height]}:FS(i,t)||"object"===S(i)?{rr_type:i.constructor.name,index:NS(i,t,n)}:i}(e,t,n)})},FS=function(t,n){var e=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof n[e]});return Boolean(e.find(function(e){return t instanceof n[e]}))};function jS(e,a,s,u){var t=[];try{var n=Nk(e.HTMLCanvasElement.prototype,"getContext",function(o){return function(e){for(var t,n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Vk(this,a,s,!0)||(t="experimental-webgl"===(t=e)?"webgl":t,"__context"in this||(this.__context=t),u&&["webgl","webgl2"].includes(t)&&(r[0]&&"object"===S(r[0])?(t=r[0]).preserveDrawingBuffer||(t.preserveDrawingBuffer=!0):r.splice(0,1,{preserveDrawingBuffer:!0}))),o.apply(this,[e].concat(r))}});t.push(n)}catch(P){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){t.forEach(function(e){return e()})}}function zS(t,s,u,l,c,f){var n,r=[],e=Me(Object.getOwnPropertyNames(t));try{for(e.s();!(n=e.n()).done;)!function(){var a=n.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))return;try{if("function"!=typeof t[a])return;var e=Nk(t,a,function(o){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=o.apply(this,t);return NS(i,f,this),"tagName"in this.canvas&&!Vk(this.canvas,l,c,!0)&&(r=US(t,f,this),u(this.canvas,{type:s,property:a,args:r})),i}});r.push(e)}catch(N){e=zk(t,a,{set:function(e){u(this.canvas,{type:s,property:a,args:[e],setter:!0})}});r.push(e)}}()}catch(Le){e.e(Le)}finally{e.f()}return r}var BS='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',WS="undefined"!=typeof self&&self.Blob&&new Blob([BS],{type:"text/javascript;charset=utf-8"});function HS(e){var t,n;try{if(t=WS&&(self.URL||self.webkitURL).createObjectURL(WS))return(n=new Worker(t,{name:null==e?void 0:e.name})).addEventListener("error",function(){(self.URL||self.webkitURL).revokeObjectURL(t)}),n;throw""}catch(v){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(BS),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}var qS,VS,GS,JS,$S=k(function u(e){var n=this,t=(b(this,u),M(this,"pendingCanvasMutations",new Map),M(this,"rafStamps",{latestId:0,invokeId:null}),M(this,"mirror"),M(this,"mutationCb"),M(this,"resetObservers"),M(this,"frozen",!1),M(this,"locked",!1),M(this,"processMutation",function(e,t){(n.rafStamps.invokeId&&n.rafStamps.latestId!==n.rafStamps.invokeId||!n.rafStamps.invokeId)&&(n.rafStamps.invokeId=n.rafStamps.latestId),n.pendingCanvasMutations.has(e)||n.pendingCanvasMutations.set(e,[]),n.pendingCanvasMutations.get(e).push(t)}),e.sampling),t=void 0===t?"all":t,r=e.win,i=e.blockClass,o=e.blockSelector,a=e.recordCanvas,s=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&"all"===t&&this.initCanvasMutationObserver(r,i,o),a&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,i,o,{dataURLOptions:s})},[{key:"reset",value:function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}},{key:"freeze",value:function(){this.frozen=!0}},{key:"unfreeze",value:function(){this.frozen=!1}},{key:"lock",value:function(){this.locked=!0}},{key:"unlock",value:function(){this.locked=!1}},{key:"initCanvasFPSObserver",value:function(e,o,r,i,a){var s=this,t=jS(o,r,i,!0),u=new Map,l=new HS;l.onmessage=function(e){var t,n=e.data.id;u.set(n,!1),"base64"in e.data&&(t=(e=e.data).base64,s.mutationCb({id:n,type:iS["2D"],commands:[{property:"clearRect",args:[0,0,e.width,e.height]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:t}],type:e.type}]},0,0]}]}))};var c=1e3/e,f=0,d=function(e){var t,n;h=(f&&e-f<c||(f=e,t=[],o.document.querySelectorAll("canvas").forEach(function(e){Vk(e,r,i,!0)||t.push(e)}),t.forEach((n=A(B().m(function o(t){var n,r,i;return B().w(function(e){for(;;)switch(e.n){case 0:if(n=s.mirror.getId(t),u.get(n))return e.a(2);e.n=1;break;case 1:if(0===t.width||0===t.height)return e.a(2);e.n=2;break;case 2:return u.set(n,!0),["webgl","webgl2"].includes(t.__context)&&(r=t.getContext(t.__context),!1===(null==(i=null==r?void 0:r.getContextAttributes())?void 0:i.preserveDrawingBuffer))&&r.clear(r.COLOR_BUFFER_BIT),e.n=3,createImageBitmap(t);case 3:i=e.v,l.postMessage({id:n,bitmap:i,width:t.width,height:t.height,dataURLOptions:a.dataURLOptions},[i]);case 4:return e.a(2)}},o)})),function(e){return n.apply(this,arguments)}))),requestAnimationFrame(d))},h=requestAnimationFrame(d);this.resetObservers=function(){t(),cancelAnimationFrame(h)}}},{key:"initCanvasMutationObserver",value:function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r,i,o=jS(e,t,n,!1),a=function(a,s,u,l){var t,n=[],e=Me(Object.getOwnPropertyNames(s.CanvasRenderingContext2D.prototype));try{for(e.s();!(t=e.n()).done;)!function(){var o=t.value;try{if("function"!=typeof s.CanvasRenderingContext2D.prototype[o])return;var e=Nk(s.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vk(this.canvas,u,l,!0)||setTimeout(function(){var e=US(n,s,t);a(t.canvas,{type:iS["2D"],property:o,args:e})},0),i.apply(this,n)}});n.push(e)}catch(L){e=zk(s.CanvasRenderingContext2D.prototype,o,{set:function(e){a(this.canvas,{type:iS["2D"],property:o,args:[e],setter:!0})}});n.push(e)}}()}catch(Le){e.e(Le)}finally{e.f()}return function(){n.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),s=(r=this.processMutation.bind(this),t=t,n=n,i=[],"undefined"!=typeof(e=e).WebGLRenderingContext&&i.push.apply(i,Ue(zS(e.WebGLRenderingContext.prototype,iS.WebGL,r,t,n,e))),"undefined"!=typeof e.WebGL2RenderingContext&&i.push.apply(i,Ue(zS(e.WebGL2RenderingContext.prototype,iS.WebGL2,r,t,n,e))),function(){i.forEach(function(e){return e()})});this.resetObservers=function(){o(),a(),s()}}},{key:"startPendingCanvasMutationFlusher",value:function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})}},{key:"startRAFTimestamping",value:function(){var t=this,n=function(e){t.rafStamps.latestId=e,requestAnimationFrame(n)};requestAnimationFrame(n)}},{key:"flushPendingCanvasMutations",value:function(){var r=this;this.pendingCanvasMutations.forEach(function(e,t){var n=r.mirror.getId(t);r.flushPendingCanvasMutationFor(t,n)}),requestAnimationFrame(function(){return r.flushPendingCanvasMutations()})}},{key:"flushPendingCanvasMutationFor",value:function(e,t){var n,r;this.frozen||this.locked||(r=this.pendingCanvasMutations.get(e))&&-1!==t&&(n=r.map(function(e){return e.type,z(e,qy)}),r=r[0].type,this.mutationCb({id:t,type:r,commands:n}),this.pendingCanvasMutations["delete"](e))}}]),ZS=k(function u(e){b(this,u),M(this,"trackedLinkElements",new WeakSet),M(this,"mutationCb"),M(this,"adoptedStyleSheetCb"),M(this,"styleMirror",new Yk),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb},[{key:"attachLinkElement",value:function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}},{key:"trackLinkElement",value:function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}},{key:"adoptStyleSheets",value:function(e,t){var r=this;if(0!==e.length){var i,o={id:t,styleIds:[]},a=[],n=Me(e);try{for(n.s();!(i=n.n()).done;)!function(){var e,n=i.value;r.styleMirror.has(n)?e=r.styleMirror.getId(n):(e=r.styleMirror.add(n),a.push({styleId:e,rules:Array.from(n.rules||CSSRule,function(e,t){return{rule:l0(e,n.href),index:t}})})),o.styleIds.push(e)}()}catch(Le){n.e(Le)}finally{n.f()}0<a.length&&(o.styles=a),this.adoptedStyleSheetCb(o)}}},{key:"reset",value:function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}},{key:"trackStylesheetInLinkElement",value:function(e){}}]),KS=k(function u(){b(this,u),M(this,"nodeMap",new WeakMap),M(this,"active",!1)},[{key:"inOtherBuffer",value:function(e,t){e=this.nodeMap.get(e);return e&&Array.from(e).some(function(e){return e!==t})}},{key:"add",value:function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}},{key:"destroy",value:function(){}}]),YS=!1;try{2!==Array.from([1],function(e){return 2*e})[0]&&(JS=document.createElement("iframe"),document.body.appendChild(JS),Array.from=(null==(jy=JS.contentWindow)?void 0:jy.Array.from)||Array.from,document.body.removeChild(JS))}catch(Le){console.debug("Unable to override Array.from",Le)}var XS,QS=new c0;function e_(){var e=0<arguments.length&&arguments[0]!==undefined?arguments[0]:{},r=e.emit,i=e.checkoutEveryNms,o=e.checkoutEveryNth,t=e.blockClass,u=void 0===t?"rr-block":t,t=e.blockSelector,l=void 0===t?null:t,t=e.ignoreClass,D=void 0===t?"rr-ignore":t,t=e.ignoreSelector,N=void 0===t?null:t,t=e.maskTextClass,c=void 0===t?"rr-mask":t,t=e.maskTextSelector,f=void 0===t?null:t,t=e.inlineStylesheet,d=void 0===t||t,t=e.maskAllInputs,n=e.maskInputOptions,U=e.slimDOMOptions,h=e.maskInputFn,p=e.maskTextFn,F=e.hooks,j=e.packFn,a=e.sampling,s=void 0===a?{}:a,a=e.dataURLOptions,g=void 0===a?{}:a,a=e.mousemoveWait,m=e.recordDOM,z=void 0===m||m,m=e.recordCanvas,v=void 0!==m&&m,m=e.recordCrossOriginIframes,m=void 0!==m&&m,y=e.recordAfter,B=void 0===y?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":y,y=e.userTriggeredOnInput,W=void 0!==y&&y,y=e.collectFonts,H=void 0!==y&&y,y=e.inlineImages,w=void 0!==y&&y,b=e.plugins,y=e.keepIframeSrcFn,k=void 0===y?function(){return!1}:y,y=e.ignoreCSSAttributes,q=void 0===y?new Set([]):y,S=(uS=e.errorHandler,!m||window.parent===window),_=!1;if(!S)try{window.parent.document&&(_=!1)}catch(Ee){_=!0}if(S&&!r)throw new Error("emit function is required");if(!S&&!_)return function(){};void 0!==a&&void 0===s.mousemove&&(s.mousemove=a),QS.reset();var V,E=!0===t?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==n?n:{password:!0},C=U0(U),O=(!function(e){"NodeList"in(e=0<arguments.length&&e!==undefined?e:window)&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}(),0),G=function(e){var t,n=Me(b||[]);try{for(n.s();!(t=n.n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}}catch(Le){n.e(Le)}finally{n.f()}return e=j&&!_?j(e):e};qS=function(e,t){var n;e.timestamp=Dk(),null==(n=mS[0])||!n.isFrozen()||e.type===eS.FullSnapshot||e.type===eS.IncrementalSnapshot&&e.data.source===tS.Mutation||mS.forEach(function(e){return e.unfreeze()}),S?null!=r&&r(G(e),t):_&&(n={type:"rrweb",event:G(e),origin:window.location.origin,isCheckout:t},window.parent.postMessage(n,"*")),e.type===eS.FullSnapshot?(V=e,O=0):e.type!==eS.IncrementalSnapshot||e.data.source===tS.Mutation&&e.data.isAttachIframe||(O++,t=o&&o<=O,n=i&&e.timestamp-V.timestamp>i,(t||n)&&VS(!0))};var J,x=function(e){qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.Mutation},e)})},$=function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.Scroll},e)})},Z=function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.CanvasMutation},e)})},R=new ZS({mutationCb:x,adoptedStyleSheetCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.AdoptedStyleSheet},e)})}}),I=new TS({mirror:QS,mutationCb:x,stylesheetManager:R,recordCrossOriginIframes:m,wrappedEmit:qS}),T=Me(b||[]);try{for(T.s();!(J=T.n()).done;){var K=J.value;K.getMirror&&K.getMirror({nodeMirror:QS,crossOriginIframeMirror:I.crossOriginIframeMirror,crossOriginIframeStyleMirror:I.crossOriginIframeStyleMirror})}}catch(Le){T.e(Le)}finally{T.f()}var M=new KS,A=(GS=new $S({recordCanvas:v,mutationCb:Z,win:window,blockClass:u,blockSelector:l,mirror:QS,sampling:s.canvas,dataURLOptions:g}),new MS({mutationCb:x,scrollCb:$,bypassOptions:{blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:f,inlineStylesheet:d,maskInputOptions:E,dataURLOptions:g,maskTextFn:p,maskInputFn:h,recordCanvas:v,inlineImages:w,sampling:s,slimDOMOptions:C,iframeManager:I,stylesheetManager:R,canvasManager:GS,keepIframeSrcFn:k,processedNodeManager:M},mirror:QS}));VS=function(){var e,t,n,r,i,o,a=0<arguments.length&&arguments[0]!==undefined&&arguments[0];if(z){qS({type:eS.Meta,data:{href:window.location.href,width:Hk(),height:Wk()}},a),R.reset(),A.init(),mS.forEach(function(e){return e.lock()});s=document,r=void 0===(r=(e={mirror:QS,blockClass:u,blockSelector:l,maskTextClass:c,maskTextSelector:f,inlineStylesheet:d,maskAllInputs:E,maskTextFn:p,maskInputFn:h,slimDOM:C,dataURLOptions:g,recordCanvas:v,inlineImages:w,onSerialize:function(e){$k(e,QS)&&I.addIframe(e),Zk(e,QS)&&R.trackLinkElement(e),Kk(e)&&A.addShadowRoot(Pe.shadowRoot(e),document)},onIframeLoad:function(e,t){I.attachIframe(e,t),A.observeAttachShadow(e)},onStylesheetLoad:function(e,t){R.attachLinkElement(e,t)},keepIframeSrcFn:k}).mirror)?new c0:r,t=e.inlineImages,n=e.recordCanvas,i=e.slimDOM,o=e.keepIframeSrcFn;var s=F0(s,{doc:s,mirror:r,blockClass:void 0===(s=e.blockClass)?"rr-block":s,blockSelector:void 0===(r=e.blockSelector)?null:r,maskTextClass:void 0===(s=e.maskTextClass)?"rr-mask":s,maskTextSelector:void 0===(r=e.maskTextSelector)?null:r,skipChild:!1,inlineStylesheet:void 0===(s=e.inlineStylesheet)||s,maskInputOptions:!0===(r=void 0!==(r=e.maskAllInputs)&&r)?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===r?{password:!0}:r,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:U0(void 0!==i&&i),dataURLOptions:e.dataURLOptions,inlineImages:void 0!==t&&t,recordCanvas:void 0!==n&&n,preserveWhiteSpace:e.preserveWhiteSpace,onSerialize:e.onSerialize,onIframeLoad:e.onIframeLoad,iframeLoadTimeout:e.iframeLoadTimeout,onStylesheetLoad:e.onStylesheetLoad,stylesheetLoadTimeout:e.stylesheetLoadTimeout,keepIframeSrcFn:void 0===o?function(){return!1}:o,newlyAddedElement:!1});if(!s)return console.warn("Failed to snapshot the document");qS({type:eS.FullSnapshot,data:{node:s,initialOffset:Bk(window)}},a),mS.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&0<document.adoptedStyleSheets.length&&R.adoptStyleSheets(document.adoptedStyleSheets,QS.getId(document))}};try{var P=[],Y=function(e){return gS(OS)({mutationCb:x,mousemoveCb:function(e,t){return qS({type:eS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.MouseInteraction},e)})},scrollCb:$,viewportResizeCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.ViewportResize},e)})},inputCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.Input},e)})},mediaInteractionCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.StyleDeclaration},e)})},canvasMutationCb:Z,fontCb:function(e){return qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.Font},e)})},selectionCb:function(e){qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.Selection},e)})},customElementCb:function(e){qS({type:eS.IncrementalSnapshot,data:Ae({source:tS.CustomElement},e)})},blockClass:u,ignoreClass:D,ignoreSelector:N,maskTextClass:c,maskTextSelector:f,maskInputOptions:E,inlineStylesheet:d,sampling:s,recordDOM:z,recordCanvas:v,inlineImages:w,userTriggeredOnInput:W,collectFonts:H,doc:e,maskInputFn:h,maskTextFn:p,keepIframeSrcFn:k,blockSelector:l,slimDOMOptions:C,dataURLOptions:g,mirror:QS,iframeManager:I,stylesheetManager:R,shadowDomManager:A,processedNodeManager:M,canvasManager:GS,ignoreCSSAttributes:q,plugins:(null==(e=null==b?void 0:b.filter(function(e){return e.observer}))?void 0:e.map(function(t){return{observer:t.observer,options:t.options,callback:function(e){return qS({type:eS.Plugin,data:{plugin:t.name,payload:e}})}}}))||[]},F)},L=(I.addLoadListener(function(e){try{P.push(Y(e.contentDocument))}catch(X){console.warn(X)}}),function(){VS(),P.push(Y(document)),YS=!0});return["interactive","complete"].includes(document.readyState)?L():(P.push(Uk("DOMContentLoaded",function(){qS({type:eS.DomContentLoaded,data:{}}),"DOMContentLoaded"===B&&L()})),P.push(Uk("load",function(){qS({type:eS.Load,data:{}}),"load"===B&&L()},window))),function(){P.forEach(function(e){try{e()}catch(X){String(X).toLowerCase().includes("cross-origin")||console.warn(X)}}),M.destroy(),YS=!1,uS=void 0}}catch(X){console.warn(X)}}e_.addCustomEvent=function(e,t){if(!YS)throw new Error("please add custom event after start recording");qS({type:eS.Custom,data:{tag:e,payload:t}})},e_.freezePage=function(){mS.forEach(function(e){return e.freeze()})},e_.takeFullSnapshot=function(e){if(!YS)throw new Error("please take full snapshot after start recording");VS(e)},e_.mirror=QS,(e=XS=XS||{})[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped";var t_='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',n_={maskAllText:!0,maskAllInputs:!0,blockAllMedia:!0,autoDetectSensitiveData:!0,mask:[".tdem-mask","[data-tdem-mask]","[data-sensitive]",".sensitive",".private"],block:[".tdem-block","[data-tdem-block]",".secret","[data-secret]","iframe[srcdoc]:not([src])",".replayer-wrapper"],ignore:[".tdem-ignore","[data-tdem-ignore]",'input[type="file"]','input[type="password"]'],maskInputOptions:{password:!0,email:!0,tel:!0,text:!1}},r_=(i_.maskPhone=function(e){return e.replace(this.phoneRegex,function(e){var t=e.replace(/[^\d]/g,"");return 11===t.length?e.substring(0,3)+"****"+e.substring(7):13===t.length?e.substring(0,6)+"****"+e.substring(10):e.substring(0,3)+"****"+e.substring(e.length-4)})},i_.maskIdCard=function(e){return e.replace(this.idCardRegex,function(e){return 18===e.length?e.substring(0,6)+"********"+e.substring(14):15===e.length?e.substring(0,6)+"******"+e.substring(12):e})},i_.maskEmail=function(e){return e.replace(this.emailRegex,function(e){var t,n=e.indexOf("@");return n<=1?"*"+e.substring(1):(t=e.substring(0,n),n=e.substring(n),t.charAt(0)+"***"+t.charAt(t.length-1)+n)})},i_.maskBankCard=function(e){return e.replace(this.bankCardRegex,function(e){var t=e.replace(/[^\d]/g,"");return t.length<13?e:t.substring(0,4)+" **** **** "+t.substring(t.length-4)})},i_.maskIP=function(e){return e.replace(this.ipv4Regex,function(e){e=e.split(".");return e[0]+".*.*."+e[3]})},i_.autoMask=function(e){var t;return e&&"string"==typeof e?(t=this.maskPhone(t=e),t=this.maskIdCard(t),t=this.maskEmail(t),this.maskBankCard(t)):e},i_.hasSensitiveData=function(e){return!(!e||"string"!=typeof e)&&(this.phoneRegex.test(e)||this.idCardRegex.test(e)||this.emailRegex.test(e)||this.bankCardRegex.test(e))},i_.phoneRegex=/1[3-9]\d{9}|(?:\+?86)?1[3-9]\d{9}/g,i_.idCardRegex=/[1-9]\d{5}(?:19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dXx]|[1-9]\d{7}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}/g,i_.emailRegex=/[\w.-]+@[\w.-]+\.\w{2,}/g,i_.bankCardRegex=/\b\d{4}[\s-]?\d{4}[\s-]?\d{4}[\s-]?\d{1,7}\b/g,i_.ipv4Regex=/\b(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\b/g,i_);function i_(){}function o_(e,t){return void 0===e&&(e={}),h(h(h({},t=void 0===t?n_:t),e),{mask:a_(t.mask,e.mask),block:a_(t.block,e.block),ignore:a_(t.ignore,e.ignore),maskInputOptions:h(h({},t.maskInputOptions),e.maskInputOptions)})}function a_(e,t){e=new Set(qu(e||[],t||[]));return Array.from(e)}d_.prototype.push=function(e,t){if(this.emitFn=t,3===e.type&&this.isMutationEvent(e)){var n=e.data;if(this.buffer){if(this.enableRepeatDetection&&this.isRepeatPattern(n)){if(this.repeatCount++,3<this.repeatCount)return this.buffer=this.cloneEvent(e),void this.droppedByRepeat++}else this.repeatCount=0;this.mergeInto(n,e.timestamp),this.mergedCount++,(null!=(n=null==(n=this.buffer.data.adds)?void 0:n.length)?n:0)>=this.maxAddsPerMerge&&this.flush()}else this.buffer=this.cloneEvent(e),this.scheduleFlush()}else this.flush(),t(e)},d_.prototype.flush=function(){this.clearTimer(),this.buffer&&this.emitFn&&(this.emitFn(this.buffer),this.buffer=null,this.repeatCount=0)},d_.prototype.destroy=function(){this.flush(),this.clearTimer(),this.emitFn=null},d_.prototype.getStats=function(){return{mergedCount:this.mergedCount,droppedByRepeat:this.droppedByRepeat,cancelledByOffset:this.cancelledByOffset}},d_.prototype.isMutationEvent=function(e){return 0===(null==(e=e.data)?void 0:e.source)},d_.prototype.isRepeatPattern=function(e){var t;return!!this.buffer&&(t=null!=(t=this.buffer.data.adds)?t:[],e=null!=(e=e.adds)?e:[],0!==t.length)&&0!==e.length&&t.length===e.length&&(null==(t=t[0])?void 0:t.parentId)===(null==(t=e[0])?void 0:t.parentId)},d_.prototype.mergeInto=function(e,t){var n,r,i,o;if(this.buffer){var a=this.buffer.data;this.buffer.timestamp=Math.max(this.buffer.timestamp,t);for(var s=this,u=0,l=null!=(t=e.removes)?t:[];u<l.length;u++)!function(t){var e=(null!=(n=a.adds)?n:[]).findIndex(function(e){return(null==(e=e.node)?void 0:e.id)===t.id});0<=e?(a.adds.splice(e,1),s.cancelledByOffset++):(a.removes=null!=(n=a.removes)?n:[],a.removes.push(t))}(l[u]);for(var c=0,f=null!=(t=e.adds)?t:[];c<f.length;c++){var d=f[c];a.adds=null!=(r=a.adds)?r:[],a.adds.push(d)}for(var h=0,p=null!=(t=e.attributes)?t:[];h<p.length;h++)!function(t){a.attributes=null!=(i=a.attributes)?i:[];var e=a.attributes.findIndex(function(e){return e.id===t.id});0<=e?a.attributes[e]=t:a.attributes.push(t)}(p[h]);for(var g=0,m=null!=(t=e.texts)?t:[];g<m.length;g++)!function(t){a.texts=null!=(o=a.texts)?o:[];var e=a.texts.findIndex(function(e){return e.id===t.id});0<=e?a.texts[e]=t:a.texts.push(t)}(m[g])}},d_.prototype.cloneEvent=function(e){var t=e.data;return{type:e.type,timestamp:e.timestamp,data:{source:0,adds:qu(null!=(e=t.adds)?e:[]),removes:qu(null!=(e=t.removes)?e:[]),attributes:qu(null!=(e=t.attributes)?e:[]),texts:qu(null!=(e=t.texts)?e:[])}}},d_.prototype.scheduleFlush=function(){var e=this;this.clearTimer(),this.flushTimer=setTimeout(function(){e.flushTimer=null,e.flush()},this.windowMs)},d_.prototype.clearTimer=function(){null!==this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null)};var s_=d_,u_=(f_.prototype.startRecording=function(e){var r,i,n=this;if(void 0===e&&(e={}),"recording"!==this.state){this.mutationLimitReached=!1,this.throttleCount=0,this.throttleWindowStart=Date.now(),this.throttleNotified=!1,this.mutationAddsInWindow=0;var t="buffer"===this.options.mode?12e4:3e5,t="number"==typeof e.checkoutEveryNms&&0<e.checkoutEveryNms?e.checkoutEveryNms:t,o="number"==typeof e.checkoutEveryNth&&0<e.checkoutEveryNth?e.checkoutEveryNth:undefined,a=o_(e.privacy||{},n_),s=h(h(h(h({emit:function(e,t){n.handleEvent(e,t)},checkoutEveryNms:t},o?{checkoutEveryNth:o}:{}),{sampling:{scroll:150,mousemove:!l.ios()&&50,mouseInteraction:!0,input:"last"},slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:!0}}),(t={},(o=a).maskAllInputs!==undefined&&(t.maskAllInputs=o.maskAllInputs),o.maskInputOptions&&(t.maskInputOptions=o.maskInputOptions),null!=(s=o.mask)&&s.length&&(t.maskTextSelector=o.mask.join(",")),null!=(s=o.block)&&s.length&&(t.blockSelector=o.block.join(",")),o.blockAllMedia&&(t.blockSelector=t.blockSelector?t.blockSelector+","+t_:t_,t.ignoreCSSAttributes=new Set(["background-image"])),null!=(s=o.ignore)&&s.length&&(t.ignoreSelector=o.ignore.join(",")),!o.maskTextFn&&!1===o.autoDetectSensitiveData||(t.maskTextFn=(r=o.maskTextFn,i=!1!==o.autoDetectSensitiveData,function(e,t){var n;return e&&(n=e,i&&(n=r_.autoMask(n)),r?r(n,t):n)})),t)),e.rrwebConfig);try{this.hookMutationObserver(),this.stopRecordingFn=e_(s),this.state="recording",this.lastCheckoutTime=Date.now(),this.startCheckpointTimer(),g("RecorderManager","Recording started with config:",{maskAllText:a.maskAllText,maskAllInputs:a.maskAllInputs,autoDetectSensitiveData:a.autoDetectSensitiveData,mutationLimit:this.mutationLimit,checkpointIntervalMs:12e4})}catch(X){uy("RecorderManager","Failed to start recording:",X),this.state="stopped"}}else sy("RecorderManager","Already recording")},f_.prototype.stopRecording=function(){var e;this.stopCheckpointTimer(),null!=(e=this.mutationMerger)&&e.destroy(),this.unhookMutationObserver(),this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=undefined),this.state="stopped",g("RecorderManager","Recording stopped")},f_.prototype.pauseRecording=function(){"recording"===this.state&&(this.stopRecording(),this.state="paused",g("RecorderManager","Recording paused"))},f_.prototype.resumeRecording=function(e){void 0===e&&(e={}),"paused"===this.state&&(this.startRecording(e),g("RecorderManager","Recording resumed"))},f_.prototype.hookMutationObserver=function(){try{var r,e,t=window.MutationObserver;t&&(r=this,(e=function(n){return new t(function(e,t){r.unhookMutationObserver(),r.onMutationHandler(e)&&n(e,t)})}).prototype=t.prototype,window.MutationObserver=e,this.restoreMutationObserver=function(){window.MutationObserver=t},ay("RecorderManager","MutationObserver hooked"))}catch(Le){sy("RecorderManager","Failed to hook MutationObserver:",Le)}},f_.prototype.unhookMutationObserver=function(){this.restoreMutationObserver&&(this.restoreMutationObserver(),this.restoreMutationObserver=null,ay("RecorderManager","MutationObserver restored"))},f_.prototype.onMutationHandler=function(e){var t,n=this;return!this.mutationLimitReached&&(t=(e=e.length)>this.mutationLimit,(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(this.mutationLimitReached=!0,uy("RecorderManager","Mutation limit reached: "+e+" > "+this.mutationLimit+". Stopping."),setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1))},f_.prototype.checkMutationLimit=function(e){var n=this;if(this.mutationLimitReached)return!1;if(3!==e.type)return!0;e=e.data;if(0!==(null==e?void 0:e.source))return!0;e=Array.isArray(e.adds)?e.adds.length:0;if(0===e)return!0;this.mutationAddsInWindow+=e;var t=e>this.mutationLimit||this.mutationAddsInWindow>2*this.mutationLimit;return(e>this.mutationBreadcrumbLimit||t)&&this.emitMutationBreadcrumb(e,t),!t||(uy("RecorderManager","Mutation limit: "+e+" adds (window: "+this.mutationAddsInWindow+"). Stopping."),this.mutationLimitReached=!0,setTimeout(function(){var e,t;null!=(t=(e=n.options).onMutationLimitReached)&&t.call(e),n.stopRecording()},0),!1)},f_.prototype.emitMutationBreadcrumb=function(e,t){var n;try{null!=(n=e_.addCustomEvent)&&n.call(e_,"replay.mutations",{count:e,limit:t,timestamp:Date.now()})}catch(b){}},f_.prototype.handleEvent=function(e,t){var n=this,r=(t&&(null!=(r=(i=this.options).onCheckout)&&r.call(i),this.lastCheckoutTime=Date.now(),null!=(i=this.mutationMerger))&&i.flush(),e.type);if(t||2===r||4===r||r<=1||this.checkEventThrottle()){if(3===r&&!this.mutationLimitReached){var i=Date.now();if(12e4<=i-this.lastCheckoutTime){this.lastCheckoutTime=i;try{var o=e_.takeFullSnapshot;"function"==typeof o&&(o(!0),ay("RecorderManager","Inline checkpoint: forced FullSnapshot"))}catch(Le){sy("RecorderManager","Inline checkpoint failed:",Le)}}}this.checkMutationLimit(e)&&(this.mutationMerger?this.mutationMerger.push(e,function(e){n.options.onRecordingEvent(e)}):this.options.onRecordingEvent(e))}},f_.prototype.checkEventThrottle=function(){var e,t=Date.now();if(5e3<t-this.throttleWindowStart&&(this.throttleCount=0,this.throttleWindowStart=t,this.throttleNotified=!1,this.mutationAddsInWindow=0),this.throttleCount++,300<this.throttleCount){if(!this.throttleNotified){this.throttleNotified=!0,sy("RecorderManager","Event throttled: "+this.throttleCount+" events in 5000ms window");try{null!=(e=e_.addCustomEvent)&&e.call(e_,"replay.throttled",{count:this.throttleCount,window:5e3})}catch(v){}}return!1}return!0},f_.prototype.startCheckpointTimer=function(){var t=this;this.stopCheckpointTimer(),this.checkpointTimer=setInterval(function(){if("recording"===t.state&&!t.mutationLimitReached)try{var e=e_.takeFullSnapshot;"function"==typeof e&&(e(!0),t.lastCheckoutTime=Date.now(),ay("RecorderManager","Checkpoint: forced FullSnapshot"))}catch(Le){sy("RecorderManager","Checkpoint FullSnapshot failed:",Le)}},12e4)},f_.prototype.stopCheckpointTimer=function(){null!==this.checkpointTimer&&(clearInterval(this.checkpointTimer),this.checkpointTimer=null)},f_.prototype.getState=function(){return this.state},f_.prototype.isRecording=function(){return"recording"===this.state},f_.prototype.getLastCheckoutTime=function(){return this.lastCheckoutTime},f_.prototype.takeFullSnapshot=function(){var e,t;"recording"===this.state&&this.stopRecordingFn&&(null!=(t=null==(e=this.stopRecordingFn)?void 0:e.takeFullSnapshot)&&t.call(e),this.lastCheckoutTime=Date.now())},f_.prototype.isMutationLimitReached=function(){return this.mutationLimitReached},f_),l_=(c_.prototype.initializeSampling=function(){return null!==this.samplingDecision?{mode:this.currentMode,shouldRecord:!1!==this.currentMode}:Math.random()<this.config.sessionSampleRate?(this.currentMode="session",this.samplingDecision=!0,g("SamplerManager","Sampled: session mode"),{mode:"session",shouldRecord:!0}):0<this.config.errorSampleRate?(this.currentMode="buffer",this.samplingDecision=!0,g("SamplerManager","Sampled: buffer mode"),{mode:"buffer",shouldRecord:!0}):(this.currentMode=!1,this.samplingDecision=!1,g("SamplerManager","Not sampled"),{mode:!1,shouldRecord:!1})},c_.prototype.decideSamplingMode=function(){return this.initializeSampling().mode},c_.prototype.onErrorOccurred=function(e){return"buffer"===this.currentMode&&!this.hasUpgraded&&!!(Math.random()<this.config.errorSampleRate)&&(this.switchMode("session"),this.hasUpgraded=!0)},c_.prototype.switchMode=function(e){var t=this.currentMode;this.currentMode=e,this.samplingDecision=!1!==e,g("SamplerManager","Mode switched: "+t+" -> "+e)},c_.prototype.getCurrentMode=function(){return this.currentMode},c_.prototype.isSampled=function(){return!0===this.samplingDecision},c_.prototype.isSessionMode=function(){return"session"===this.currentMode},c_.prototype.isBufferMode=function(){return"buffer"===this.currentMode},c_.prototype.upgradeToSessionMode=function(){return"buffer"===this.currentMode&&Math.random()<this.config.errorSampleRate&&(this.currentMode="session",g("SamplerManager","Upgraded to session mode due to error"),!0)},c_.prototype.forceMode=function(e){this.currentMode=e,this.samplingDecision=!1!==e},c_.prototype.reset=function(){this.currentMode=!1,this.samplingDecision=null},c_.prototype.getConfig=function(){return h({},this.config)},c_);function c_(e){var t;void 0===e&&(e={}),this.currentMode=!1,this.samplingDecision=null,this.hasUpgraded=!1,this.config={sessionSampleRate:null!=(t=e.sessionSampleRate)?t:.1,errorSampleRate:null!=(t=e.errorSampleRate)?t:1}}function f_(e,t){this.state="stopped",this.lastCheckoutTime=0,this.checkpointTimer=null,this.mutationLimitReached=!1,this.mutationMerger=null,this.mutationBreadcrumbLimit=750,this.mutationLimit=1e4,this.restoreMutationObserver=null,this.throttleCount=0,this.throttleWindowStart=0,this.throttleNotified=!1,this.mutationAddsInWindow=0,this.options=e,this.mutationBreadcrumbLimit=null!=(e=null==t?void 0:t.mutationBreadcrumbLimit)?e:750,this.mutationLimit=null!=(e=null==t?void 0:t.mutationLimit)?e:1e4,null!=t&&t.enableMutationMerge&&(this.mutationMerger=new s_({windowMs:null!=(e=null==t?void 0:t.mutationMergeWindowMs)?e:200,maxAddsPerMerge:500,enableRepeatDetection:!0}))}function d_(e){var t;this.buffer=null,this.flushTimer=null,this.repeatCount=0,this.emitFn=null,this.mergedCount=0,this.droppedByRepeat=0,this.cancelledByOffset=0,this.windowMs=null!=(t=null==e?void 0:e.windowMs)?t:200,this.maxAddsPerMerge=null!=(t=null==e?void 0:e.maxAddsPerMerge)?t:500,this.enableRepeatDetection=null==(t=null==e?void 0:e.enableRepeatDetection)||t}function h_(e){for(var t=e.length;0<=--t;)e[t]=0}var p_=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),g_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),m_=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),v_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),y_=new Array(576),w_=(h_(y_),new Array(60)),b_=(h_(w_),new Array(512)),k_=(h_(b_),new Array(256)),S_=(h_(k_),new Array(29));h_(S_);var __,E_,C_,O_=new Array(30);function x_(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function R_(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}h_(O_);var I_=function(e){return e<256?b_[e]:b_[256+(e>>>7)]},T_=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},M_=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,T_(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},A_=function(e,t,n){M_(e,n[2*t],n[2*t+1])},P_=function(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1},L_=function(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)o=o+n[a-1]<<1,i[a]=o;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=P_(i[s]++,s))}},D_=function(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},N_=function(e){8<e.bi_valid?T_(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},U_=function(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]},F_=function(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&U_(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!U_(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},j_=function(e,t,n){var r,i,o,a,s=0;if(0!==e.sym_next)for(;r=255&e.pending_buf[e.sym_buf+s++],r+=(255&e.pending_buf[e.sym_buf+s++])<<8,i=e.pending_buf[e.sym_buf+s++],0==r?A_(e,i,t):(o=k_[i],A_(e,o+256+1,t),0!==(a=p_[o])&&(i-=S_[o],M_(e,i,a)),o=I_(--r),A_(e,o,n),0!==(a=g_[o])&&(r-=O_[o],M_(e,r,a))),s<e.sym_next;);A_(e,256,t)},z_=function(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)F_(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F_(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,F_(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var c,f,d,h,p,g=e,m=t.dyn_tree,v=t.max_code,y=t.stat_desc.static_tree,w=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,k=t.stat_desc.extra_base,S=t.stat_desc.max_length,_=0,E=0;E<=15;E++)g.bl_count[E]=0;for(m[2*g.heap[g.heap_max]+1]=0,c=g.heap_max+1;c<573;c++)(E=m[2*m[2*(f=g.heap[c])+1]+1]+1)>S&&(E=S,_++),m[2*f+1]=E,v<f||(g.bl_count[E]++,h=0,k<=f&&(h=b[f-k]),p=m[2*f],g.opt_len+=p*(E+h),w&&(g.static_len+=p*(y[2*f+1]+h)));if(0!==_){do{for(E=S-1;0===g.bl_count[E];)E--}while(g.bl_count[E]--,g.bl_count[E+1]+=2,g.bl_count[S]--,0<(_-=2));for(E=S;0!==E;E--)for(f=g.bl_count[E];0!==f;)(d=g.heap[--c])>v||(m[2*d+1]!==E&&(g.opt_len+=(E-m[2*d+1])*m[2*d],m[2*d+1]=E),f--)}L_(o,l,e.bl_count)},B_=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))},W_=function(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,l=4;for(0===a&&(u=138,l=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<l)for(;A_(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(A_(e,i,e.bl_tree),s--),A_(e,16,e.bl_tree),M_(e,s-3,2)):s<=10?(A_(e,17,e.bl_tree),M_(e,s-3,3)):(A_(e,18,e.bl_tree),M_(e,s-11,7));o=i,l=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}},H_=!1,q_=function(e,t,n,r){M_(e,0+(r?1:0),3),N_(e),T_(e,n),T_(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},V_=function(e){if(!H_){for(var t,n,r,i=new Array(16),o=0,a=0;a<28;a++)for(S_[a]=o,t=0;t<1<<p_[a];t++)k_[o++]=a;for(k_[o-1]=a,a=r=0;a<16;a++)for(O_[a]=r,t=0;t<1<<g_[a];t++)b_[r++]=a;for(r>>=7;a<30;a++)for(O_[a]=r<<7,t=0;t<1<<g_[a]-7;t++)b_[256+r++]=a;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)y_[2*t+1]=8,t++,i[8]++;for(;t<=255;)y_[2*t+1]=9,t++,i[9]++;for(;t<=279;)y_[2*t+1]=7,t++,i[7]++;for(;t<=287;)y_[2*t+1]=8,t++,i[8]++;for(L_(y_,287,i),t=0;t<30;t++)w_[2*t+1]=5,w_[2*t]=P_(t,5);__=new x_(y_,p_,257,286,15),E_=new x_(w_,g_,0,30,15),C_=new x_(new Array(0),m_,0,19,7),H_=!0}e.l_desc=new R_(e.dyn_ltree,__),e.d_desc=new R_(e.dyn_dtree,E_),e.bl_desc=new R_(e.bl_tree,C_),e.bi_buf=0,e.bi_valid=0,D_(e)},xe=q_,o=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),z_(e,e.l_desc),z_(e,e.d_desc),s=function(e){var t;for(B_(e,e.dyn_ltree,e.l_desc.max_code),B_(e,e.dyn_dtree,e.d_desc.max_code),z_(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*v_[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),(o=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)q_(e,t,n,r);else if(4===e.strategy||o===i)M_(e,2+(r?1:0),3),j_(e,y_,w_);else{M_(e,4+(r?1:0),3);var u=e,l=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(M_(u,t-257,5),M_(u,n-1,5),M_(u,l-4,4),a=0;a<l;a++)M_(u,u.bl_tree[2*v_[a]+1],3);W_(u,u.dyn_ltree,t-1),W_(u,u.dyn_dtree,n-1),j_(e,e.dyn_ltree,e.dyn_dtree)}D_(e),r&&N_(e)},Rm=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(k_[n]+256+1)]++,e.dyn_dtree[2*I_(t)]++),e.sym_next===e.sym_end},Re=function(e){M_(e,2,3),A_(e,256,y_),16===(e=e).bi_valid?(T_(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)},G_=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0},J_=new Uint32Array(function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}()),$_=function(e,t,n,r){var i=J_,o=r+n;e^=-1;for(var a=r;a<o;a++)e=e>>>8^i[255&(e^t[a])];return-1^e},Z_={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},s={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},K_=V_,Y_=xe,X_=o,Q_=Rm,eE=Re,tE=s.Z_NO_FLUSH,nE=s.Z_PARTIAL_FLUSH,rE=s.Z_FULL_FLUSH,iE=s.Z_FINISH,oE=s.Z_BLOCK,aE=s.Z_OK,sE=s.Z_STREAM_END,uE=s.Z_STREAM_ERROR,lE=s.Z_DATA_ERROR,cE=s.Z_BUF_ERROR,fE=s.Z_DEFAULT_COMPRESSION,dE=s.Z_FILTERED,hE=s.Z_HUFFMAN_ONLY,pE=s.Z_RLE,gE=s.Z_FIXED,mE=s.Z_UNKNOWN,vE=s.Z_DEFLATED,Le=function(e,t){return e.msg=Z_[t],t},yE=function(e){return 2*e-(4<e?9:0)},wE=function(e){for(var t=e.length;0<=--t;)e[t]=0},bE=function(e){for(var t,n,r=e.w_size,i=t=e.hash_size;n=e.head[--i],e.head[i]=r<=n?n-r:0,--t;);for(i=t=r;n=e.prev[--i],e.prev[i]=r<=n?n-r:0,--t;);},kE=function(e,t,n){return(t<<e.hash_shift^n)&e.hash_mask},SE=function(e,t){n=e.legacy_hash?e.ins_h=kE(e,e.ins_h,e.window[t+3-1]):(n=(n=e.window)[t]|n[t+1]<<8|n[t+2]<<16|n[t+3]<<24,e.ins_h=Math.imul(n,66521)+66521>>>16&e.hash_mask);var n,r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},_E=function(e){var t=e.state,n=t.pending;0!==(n=e.avail_out<n?e.avail_out:n)&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending)&&(t.pending_out=0)},EE=function(e,t){X_(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_E(e.strm)},CE=function(e,t){e.pending_buf[e.pending++]=t},OE=function(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},xE=function(e,t,n,r){var i=e.avail_in;return 0===(i=r<i?r:i)?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),1===e.state.wrap?e.adler=G_(e.adler,t,i,n):2===e.state.wrap&&(e.adler=$_(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},RE=function(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.w_size-262<e.strstart?e.strstart-(e.w_size-262):0,l=e.window,c=e.w_mask,f=e.prev,d=e.strstart+258,h=l[o+a-1],p=l[o+a];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(l[(n=t)+a]===p&&l[n+a-1]===h&&l[n]===l[o]&&l[++n]===l[o+1]){for(o+=2,n++;l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&l[++o]===l[++n]&&o<d;);if(r=258-(d-o),o=d-258,a<r){if(e.match_start=t,s<=(a=r))break;h=l[o+a-1],p=l[o+a]}}}while((t=f[t&c])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead},IE=function(e){var t,n,r=e.w_size;do{if(t=e.window_size-e.lookahead-e.strstart,r+(r-262)<=e.strstart&&(e.window.set(e.window.subarray(r,r+r-t),0),e.match_start-=r,e.strstart-=r,e.block_start-=r,e.strstart<e.insert&&(e.insert=e.strstart),bE(e),t+=r),0===e.strm.avail_in)break;if(t=xE(e.strm,e.window,e.strstart+e.lookahead,t),e.lookahead+=t,e.legacy_hash){if(3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=kE(e,e.ins_h,e.window[n+1]);e.insert&&(SE(e,n),n++,e.insert--,!(e.lookahead+e.insert<3)););}else if(3<e.lookahead+e.insert)for(n=e.strstart-e.insert;e.insert&&(SE(e,n),n++,e.insert--,!(e.lookahead+e.insert<=3)););}while(e.lookahead<262&&0!==e.strm.avail_in)},TE=function(e,t){for(var n,r,i,o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,s=e.strm.avail_in;n=65535,i=e.bi_valid+42>>3,!(e.strm.avail_out<i||(n=(i=e.strm.avail_out-i)<(n=n>(r=e.strstart-e.block_start)+e.strm.avail_in?r+e.strm.avail_in:n)?i:n)<o&&(0===n&&t!==iE||t===tE||n!==r+e.strm.avail_in)||(a=t===iE&&n===r+e.strm.avail_in?1:0,Y_(e,0,0,a),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,_E(e.strm),r&&(n<r&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(xE(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n),0!==a)););return(s-=e.strm.avail_in)&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.strstart<e.insert)&&(e.insert=e.strstart),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=e.w_size-e.insert<s?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),a?4:t!==tE&&t!==iE&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(i=e.window_size-e.strstart,e.strm.avail_in>i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.strstart<e.insert)&&(e.insert=e.strstart),(i=i>e.strm.avail_in?e.strm.avail_in:i)&&(xE(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=e.w_size-e.insert<i?e.w_size-e.insert:i),e.high_water<e.strstart&&(e.high_water=e.strstart),o=(i=65535<e.pending_buf_size-(i=e.bi_valid+42>>3)?65535:e.pending_buf_size-i)>e.w_size?e.w_size:i,((r=e.strstart-e.block_start)>=o||(r||t===iE)&&t!==tE&&0===e.strm.avail_in&&r<=i)&&(n=i<r?i:r,a=t===iE&&0===e.strm.avail_in&&n===r?1:0,Y_(e,e.block_start,n,a),e.block_start+=n,_E(e.strm)),a?3:1)},fa=function(e,t){for(var n,r;;){if(e.lookahead<262){if(IE(e),e.lookahead<262&&t===tE)return 1;if(0===e.lookahead)break}if((n=0)!==(n=3<=e.lookahead?SE(e,e.strstart):n)&&e.strstart-n<=e.w_size-262&&(e.match_length=RE(e,n)),3<=e.match_length)if(r=Q_(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,n=SE(e,e.strstart),0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=kE(e,e.ins_h,e.window[e.strstart+1]));else r=Q_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(EE(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===iE?(EE(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(EE(e,!1),0===e.strm.avail_out)?1:2},Wn=function(e,t){for(var n,r,i;;){if(e.lookahead<262){if(IE(e),e.lookahead<262&&t===tE)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(n=SE(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=RE(e,n),e.match_length<=5)&&(e.strategy===dE||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=Q_(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(n=SE(e,e.strstart)),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(EE(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=Q_(e,0,e.window[e.strstart-1]))&&EE(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Q_(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===iE?(EE(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(EE(e,!1),0===e.strm.avail_out)?1:2};function ME(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var AE=[new ME(0,0,0,0,TE),new ME(4,4,8,4,fa),new ME(4,5,16,8,fa),new ME(4,6,32,32,fa),new ME(4,4,16,16,Wn),new ME(8,16,32,32,Wn),new ME(8,16,128,128,Wn),new ME(8,32,128,256,Wn),new ME(32,128,258,1024,Wn),new ME(32,258,258,4096,Wn)];function PE(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=vE,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),wE(this.dyn_ltree),wE(this.dyn_dtree),wE(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),wE(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),wE(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var LE=function(e){var t;return!e||!(t=e.state)||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},DE=function(e){if(LE(e))return Le(e,uE);e.total_in=e.total_out=0,e.data_type=mE;var t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,K_(t),aE},NE=function(e){var t=DE(e);return t===aE&&((e=e.state).window_size=2*e.w_size,wE(e.head),e.max_lazy_match=AE[e.level].max_lazy,e.good_match=AE[e.level].good_length,e.nice_match=AE[e.level].nice_length,e.max_chain_length=AE[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t},Ar=function(e,t,n,r,i,o,a){if(!e)return uE;var s=1;if(t===fE&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),i<1||9<i||n!==vE||r<8||15<r||t<0||9<t||o<0||gE<o||8===r&&1!==s)return Le(e,uE);8===r&&(r=9);var u=new PE;return(e.state=u).strm=e,u.status=42,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.legacy_hash=a?1:0,u.hash_bits=i+7,!u.legacy_hash&&u.hash_bits<15&&(u.hash_bits=15),u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<i+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=3*(u.lit_bufsize-1),u.level=t,u.strategy=o,u.method=n,NE(e)},UE=Ar,FE=function(e,t){return LE(e)||2!==e.state.wrap?uE:(e.state.gzhead=t,aE)},jE=function(e,t){if(LE(e)||oE<t||t<0)return e?Le(e,uE):uE;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==iE)return Le(e,0===e.avail_out?cE:uE);var r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(_E(e),0===e.avail_out)return n.last_flush=-1,aE}else if(0===e.avail_in&&yE(t)<=yE(r)&&t!==iE)return Le(e,cE);if(666===n.status&&0!==e.avail_in)return Le(e,cE);if(42===n.status&&0===n.wrap&&(n.status=113),42===n.status){r=vE+(n.w_bits-8<<4)<<8;if(r|=(n.strategy>=hE||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(r|=32),OE(n,r+=31-r%31),0!==n.strstart&&(OE(n,e.adler>>>16),OE(n,65535&e.adler)),e.adler=1,n.status=113,_E(e),0!==n.pending)return n.last_flush=-1,aE}if(57===n.status)if(e.adler=0,CE(n,31),CE(n,139),CE(n,8),n.gzhead)CE(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),CE(n,255&n.gzhead.time),CE(n,n.gzhead.time>>8&255),CE(n,n.gzhead.time>>16&255),CE(n,n.gzhead.time>>24&255),CE(n,9===n.level?2:n.strategy>=hE||n.level<2?4:0),CE(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(CE(n,255&n.gzhead.extra.length),CE(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=$_(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(CE(n,0),CE(n,0),CE(n,0),CE(n,0),CE(n,0),CE(n,9===n.level?2:n.strategy>=hE||n.level<2?4:0),CE(n,3),n.status=113,_E(e),0!==n.pending)return n.last_flush=-1,aE;if(69===n.status){if(n.gzhead.extra){for(var i=n.pending,o=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+o>n.pending_buf_size;){var a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=$_(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=a,_E(e),0!==n.pending)return n.last_flush=-1,aE;i=0,o-=a}r=new Uint8Array(n.gzhead.extra);n.pending_buf.set(r.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=$_(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){var s,u=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>u&&(e.adler=$_(e.adler,n.pending_buf,n.pending-u,u)),_E(e),0!==n.pending)return n.last_flush=-1,aE;u=0}}while(s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,CE(n,s),0!=s);n.gzhead.hcrc&&n.pending>u&&(e.adler=$_(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){var l,c=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>c&&(e.adler=$_(e.adler,n.pending_buf,n.pending-c,c)),_E(e),0!==n.pending)return n.last_flush=-1,aE;c=0}}while(l=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,CE(n,l),0!=l);n.gzhead.hcrc&&n.pending>c&&(e.adler=$_(e.adler,n.pending_buf,n.pending-c,c))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(_E(e),0!==n.pending))return n.last_flush=-1,aE;CE(n,255&e.adler),CE(n,e.adler>>8&255),e.adler=0}if(n.status=113,_E(e),0!==n.pending)return n.last_flush=-1,aE}if(0!==e.avail_in||0!==n.lookahead||t!==tE&&666!==n.status){r=0===n.level?TE(n,t):n.strategy===hE?function(e,t){for(var n;;){if(0===e.lookahead&&(IE(e),0===e.lookahead)){if(t===tE)return 1;break}if(e.match_length=0,n=Q_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(EE(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===iE?(EE(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(EE(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===pE?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=258){if(IE(e),e.lookahead<=258&&t===tE)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){for(o=e.strstart+258;r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<o;);e.match_length=258-(o-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=Q_(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Q_(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(EE(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===iE?(EE(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(EE(e,!1),0===e.strm.avail_out)?1:2}(n,t):AE[n.level].func(n,t);if(3!==r&&4!==r||(n.status=666),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),aE;if(2===r&&(t===nE?eE(n):t!==oE&&(Y_(n,0,0,!1),t===rE)&&(wE(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),_E(e),0===e.avail_out))return n.last_flush=-1,aE}return t!==iE||!(n.wrap<=0)&&(2===n.wrap?(CE(n,255&e.adler),CE(n,e.adler>>8&255),CE(n,e.adler>>16&255),CE(n,e.adler>>24&255),CE(n,255&e.total_in),CE(n,e.total_in>>8&255),CE(n,e.total_in>>16&255),CE(n,e.total_in>>24&255)):(OE(n,e.adler>>>16),OE(n,65535&e.adler)),_E(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?aE:sE},zE=function(e){var t;return LE(e)?uE:(t=e.state.status,e.state=null,113===t?Le(e,lE):aE)},BE=function(e,t){var n=t.length;if(LE(e))return uE;var r=e.state,i=r.wrap;if(2===i||1===i&&42!==r.status||r.lookahead)return uE;1===i&&(e.adler=G_(e.adler,t,n,0)),r.wrap=0,r.w_size<=n&&(0===i&&(wE(r.head),r.strstart=0,r.block_start=0,r.insert=0),(o=new Uint8Array(r.w_size)).set(t.subarray(n-r.w_size,n),0),t=o,n=r.w_size);var o=e.avail_in,a=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,IE(r);3<=r.lookahead;){for(var u=r.strstart,l=r.lookahead-2;SE(r,u),u++,--l;);r.strstart=u,r.lookahead=2,IE(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=a,e.input=s,e.avail_in=o,r.wrap=i,aE},WE=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},HE=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==S(n))throw new TypeError(n+"must be non-object");for(var r in n)WE(n,r)&&(e[r]=n[r])}}return e},qE=function(e){for(var t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;for(var i=new Uint8Array(t),o=0,a=0,s=e.length;o<s;o++){var u=e[o];i.set(u,a),a+=u.length}return i},VE=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(yO){VE=!1}for(var GE=new Uint8Array(256),JE=0;JE<256;JE++)GE[JE]=252<=JE?6:248<=JE?5:240<=JE?4:224<=JE?3:192<=JE?2:1;GE[254]=GE[255]=1;var $E=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);for(var t,n,r,i,o=e.length,a=0,s=0;s<o;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),a+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(a),s=i=0;i<a;s++)55296==(64512&(n=e.charCodeAt(s)))&&s+1<o&&56320==(64512&(r=e.charCodeAt(s+1)))&&(n=65536+(n-55296<<10)+(r-56320),s++),n<128?t[i++]=n:(n<2048?t[i++]=192|n>>>6:(n<65536?t[i++]=224|n>>>12:(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63),t[i++]=128|n>>>6&63),t[i++]=128|63&n);return t},ZE=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},KE=Object.prototype.toString,YE=s.Z_NO_FLUSH,XE=s.Z_SYNC_FLUSH,QE=s.Z_FULL_FLUSH,eC=s.Z_FINISH,tC=s.Z_OK,nC=s.Z_STREAM_END,rC={level:s.Z_DEFAULT_COMPRESSION,method:s.Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:s.Z_DEFAULT_STRATEGY,legacyHash:!0};function iC(e){this.options=HE({},rC,e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZE,this.strm.avail_out=0,UE(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash));if(t!==tC)throw new Error(Z_[t]);if(e.header&&FE(this.strm,e.header),e.dictionary){e="string"==typeof e.dictionary?$E(e.dictionary):"[object ArrayBuffer]"===KE.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if((t=BE(this.strm,e))!==tC)throw new Error(Z_[t]);this._dict_set=!0}}function oC(e,t){t=new iC(t);if(t.push(e,!0),t.err)throw t.msg||Z_[t.err];return t.result}iC.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;for(r=t===~~t?t:!0===t?eC:YE,"string"==typeof e?i.input=$E(e):"[object ArrayBuffer]"===KE.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(r===XE||r===QE)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(jE(i,r)===nC)return 0<i.next_out&&this.onData(i.output.subarray(0,i.next_out)),n=zE(this.strm),this.onEnd(n),this.ended=!0,n===tC;if(0!==i.avail_out){if(0<r&&0<i.next_out)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},iC.prototype.onData=function(e){this.chunks.push(e)},iC.prototype.onEnd=function(e){e===tC&&(this.result=qE(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var a={Deflate:iC,deflate:oC,deflateRaw:function(e,t){return(t=t||{}).raw=!0,oC(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,oC(e,t)},constants:s},aC=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),sC=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),uC=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),lC=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),cC=function(e,t,n,r,i,o,a,s){for(var u,l,c,f,d,h,p,g,m,v=s.bits,y=0,w=0,b=0,k=0,S=0,_=0,E=0,C=0,O=0,x=0,R=null,I=new Uint16Array(16),T=new Uint16Array(16),M=null,y=0;y<=15;y++)I[y]=0;for(w=0;w<r;w++)I[t[n+w]]++;for(S=v,k=15;1<=k&&0===I[k];k--);if(k<S&&(S=k),0===k)i[o++]=20971520,i[o++]=20971520,s.bits=1;else{for(b=1;b<k&&0===I[b];b++);for(S<b&&(S=b),y=C=1;y<=15;y++)if((C=(C<<1)-I[y])<0)return-1;if(0<C&&(0===e||1!==k))return-1;for(T[1]=0,y=1;y<15;y++)T[y+1]=T[y]+I[y];for(w=0;w<r;w++)0!==t[n+w]&&(a[T[t[n+w]]++]=w);if(h=0===e?(R=M=a,20):1===e?(R=aC,M=sC,257):(R=uC,M=lC,0),y=b,d=o,E=w=x=0,c=-1,f=(O=1<<(_=S))-1,1===e&&852<O||2===e&&592<O)return 1;for(;;){for(m=a[w]+1<h?(g=0,a[w]):a[w]>=h?(g=M[a[w]-h],R[a[w]-h]):(g=96,0),u=1<<(p=y-E),b=l=1<<_;i[d+(x>>E)+(l-=u)]=p<<24|g<<16|m|0,0!==l;);for(u=1<<y-1;x&u;)u>>=1;if(0!==u?x=(x&u-1)+u:x=0,w++,0==--I[y]){if(y===k)break;y=t[n+a[w]]}if(S<y&&(x&f)!==c){for(d+=b,C=1<<(_=y-(E=0===E?S:E));_+E<k&&!((C-=I[_+E])<=0);)_++,C<<=1;if(O+=1<<_,1===e&&852<O||2===e&&592<O)return 1;i[c=x&f]=S<<24|_<<16|d-o|0}}0!==x&&(i[d+x]=y-E<<24|64<<16|0),s.bits=S}return 0},fC=s.Z_FINISH,dC=s.Z_BLOCK,hC=s.Z_TREES,pC=s.Z_OK,gC=s.Z_STREAM_END,mC=s.Z_NEED_DICT,vC=s.Z_STREAM_ERROR,yC=s.Z_DATA_ERROR,wC=s.Z_MEM_ERROR,bC=s.Z_BUF_ERROR,kC=s.Z_DEFLATED,SC=16209,_C=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function EC(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var CC,OC,xC=function(e){var t;return!e||!(t=e.state)||t.strm!==e||t.mode<16180||16211<t.mode?1:0},RC=function(e){var t;return xC(e)?vC:(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=16180,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,pC)},IC=function(e){var t;return xC(e)?vC:((t=e.state).wsize=0,t.whave=0,t.wnext=0,RC(e))},TC=function(e,t){var n,r;return xC(e)||(r=e.state,t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?vC:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,IC(e))},MC=function(e,t){var n;return e?(n=new EC,(e.state=n).strm=e,n.window=null,n.mode=16180,(n=TC(e,t))!==pC&&(e.state=null),n):vC},AC=!0,PC=function(e,t,n,r){var i,e=e.state;return null===e.window&&(e.window=new Uint8Array(1<<e.wbits)),0===e.wsize&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0),e.wsize<=r?(e.window.set(t.subarray(n-e.wsize,n),0),e.wnext=0,e.whave=e.wsize):((i=e.wsize-e.wnext)>r&&(i=r),e.window.set(t.subarray(n-r,n-r+i),e.wnext),(r-=i)?(e.window.set(t.subarray(n-r,n),0),e.wnext=r,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0},LC=IC,DC=MC,NC=function(e,t){var n,r,i,o,a,s,u,l,c,f,d,h,p,g,m,v,y,w,b,k,S,_,E,C,O=0,x=new Uint8Array(4),R=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(xC(e)||!e.output||!e.input&&0!==e.avail_in)return vC;16191===(n=e.state).mode&&(n.mode=16192),a=e.next_out,i=e.output,o=e.next_in,r=e.input,l=n.hold,c=n.bits,f=s=e.avail_in,d=u=e.avail_out,_=pC;e:for(;;)switch(n.mode){case 16180:if(0===n.wrap)n.mode=16192;else{for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}2&n.wrap&&35615===l?(0===n.wbits&&(n.wbits=15),x[n.check=0]=255&l,x[1]=l>>>8&255,n.check=$_(n.check,x,2,0),c=l=0,n.mode=16181):(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31?(e.msg="incorrect header check",n.mode=SC):(15&l)!==kC?(e.msg="unknown compression method",n.mode=SC):(c-=4,S=8+(15&(l>>>=4)),0===n.wbits&&(n.wbits=S),15<S||S>n.wbits?(e.msg="invalid window size",n.mode=SC):(n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&l?16189:16191,c=l=0)))}break;case 16181:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.flags=l,(255&n.flags)!==kC){e.msg="unknown compression method",n.mode=SC;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=SC;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&4&n.wrap&&(x[0]=255&l,x[1]=l>>>8&255,n.check=$_(n.check,x,2,0)),c=l=0,n.mode=16182;case 16182:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.time=l),512&n.flags&&4&n.wrap&&(x[0]=255&l,x[1]=l>>>8&255,x[2]=l>>>16&255,x[3]=l>>>24&255,n.check=$_(n.check,x,4,0)),c=l=0,n.mode=16183;case 16183:for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&4&n.wrap&&(x[0]=255&l,x[1]=l>>>8&255,n.check=$_(n.check,x,2,0)),c=l=0,n.mode=16184;case 16184:if(1024&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&4&n.wrap&&(x[0]=255&l,x[1]=l>>>8&255,n.check=$_(n.check,x,2,0)),c=l=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&((h=(h=n.length)>s?s:h)&&(n.head&&(S=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+h),S)),512&n.flags&&4&n.wrap&&(n.check=$_(n.check,r,h,o)),s-=h,o+=h,n.length-=h),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.name+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=$_(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===s)break e;for(h=0;S=r[o+h++],n.head&&S&&n.length<65536&&(n.head.comment+=String.fromCharCode(S)),S&&h<s;);if(512&n.flags&&4&n.wrap&&(n.check=$_(n.check,r,h,o)),s-=h,o+=h,S)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;c<16;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=SC;break}c=l=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=16191;break;case 16189:for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}e.adler=n.check=_C(l),c=l=0,n.mode=16190;case 16190:if(0===n.havedict)return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,mC;e.adler=n.check=1,n.mode=16191;case 16191:if(t===dC||t===hC)break e;case 16192:if(n.last)l>>>=7&c,c-=7&c,n.mode=16206;else{for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}switch(n.last=1&l,--c,3&(l>>>=1)){case 0:n.mode=16193;break;case 1:if(function(e){if(AC){CC=new Int32Array(512),OC=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(cC(1,e.lens,0,288,CC,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;cC(2,e.lens,0,32,OC,0,e.work,{bits:5}),AC=!1}e.lencode=CC,e.lenbits=9,e.distcode=OC,e.distbits=5}(n),n.mode=16199,t!==hC)break;l>>>=2,c-=2;break e;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=SC}l>>>=2,c-=2}break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=SC;break}if(n.length=65535&l,c=l=0,n.mode=16194,t===hC)break e;case 16194:n.mode=16195;case 16195:if(h=n.length){if(0===(h=u<(h=s<h?s:h)?u:h))break e;i.set(r.subarray(o,o+h),a),s-=h,o+=h,u-=h,a+=h,n.length-=h}else n.mode=16191;break;case 16196:for(;c<14;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(n.nlen=257+(31&l),l>>>=5,c-=5,n.ndist=1+(31&l),l>>>=5,c-=5,n.ncode=4+(15&l),l>>>=4,c-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=SC;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;c<3;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.lens[R[n.have++]]=7&l,l>>>=3,c-=3}for(;n.have<19;)n.lens[R[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},_=cC(0,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid code lengths set",n.mode=SC;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;v=(O=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&O,!((m=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(y<16)l>>>=m,c-=m,n.lens[n.have++]=y;else{if(16===y){for(C=m+2;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(l>>>=m,c-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=SC;break}S=n.lens[n.have-1],h=3+(3&l),l>>>=2,c-=2}else if(17===y){for(C=m+3;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=3+(7&(l>>>=m)),l>>>=3,c=c-m-3}else{for(C=m+7;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}S=0,h=11+(127&(l>>>=m)),l>>>=7,c=c-m-7}if(n.have+h>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=SC;break}for(;h--;)n.lens[n.have++]=S}}if(n.mode===SC)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=SC;break}if(n.lenbits=9,E={bits:n.lenbits},_=cC(1,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,_){e.msg="invalid literal/lengths set",n.mode=SC;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},_=cC(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,_){e.msg="invalid distances set",n.mode=SC;break}if(n.mode=16199,t===hC)break e;case 16199:n.mode=16200;case 16200:if(6<=s&&258<=u){e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,function(e,t){var n,r,i,o,a,s,u=e.state,l=e.next_in,c=e.input,f=l+(e.avail_in-5),d=e.next_out,h=e.output,p=d-(t-e.avail_out),g=d+(e.avail_out-257),m=u.dmax,v=u.wsize,y=u.whave,w=u.wnext,b=u.window,k=u.hold,S=u.bits,_=u.lencode,E=u.distcode,C=(1<<u.lenbits)-1,O=(1<<u.distbits)-1;t:do{for(S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=_[k&C];;){if(k>>>=r=n>>>24,S-=r,0==(r=n>>>16&255))h[d++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=_[(65535&n)+(k&(1<<r)-1)];continue}if(32&r){u.mode=16191;break t}e.msg="invalid literal/length code",u.mode=16209;break t}for(i=65535&n,(r&=15)&&(S<r&&(k+=c[l++]<<S,S+=8),i+=k&(1<<r)-1,k>>>=r,S-=r),S<15&&(k+=c[l++]<<S,S+=8,k+=c[l++]<<S,S+=8),n=E[k&O];;){if(k>>>=r=n>>>24,S-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=E[(65535&n)+(k&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=16209;break t}if(o=65535&n,S<(r&=15)&&(k+=c[l++]<<S,(S+=8)<r)&&(k+=c[l++]<<S,S+=8),(o+=k&(1<<r)-1)>m){e.msg="invalid distance too far back",u.mode=16209;break t}if(k>>>=r,S-=r,o>(r=d-p)){if((r=o-r)>y&&u.sane){e.msg="invalid distance too far back",u.mode=16209;break t}if(s=b,(a=0)===w){if(a+=v-r,r<i){for(i-=r;h[d++]=b[a++],--r;);a=d-o,s=h}}else if(w<r){if(a+=v+w-r,(r-=w)<i){for(i-=r;h[d++]=b[a++],--r;);if(a=0,w<i){for(i-=r=w;h[d++]=b[a++],--r;);a=d-o,s=h}}}else if(a+=w-r,r<i){for(i-=r;h[d++]=b[a++],--r;);a=d-o,s=h}for(;2<i;)h[d++]=s[a++],h[d++]=s[a++],h[d++]=s[a++],i-=3;i&&(h[d++]=s[a++],1<i)&&(h[d++]=s[a++])}else{for(a=d-o;h[d++]=h[a++],h[d++]=h[a++],h[d++]=h[a++],2<(i-=3););i&&(h[d++]=h[a++],1<i)&&(h[d++]=h[a++])}break}}break}}while(l<f&&d<g);l-=i=S>>3,k&=(1<<(S-=i<<3))-1,e.next_in=l,e.next_out=d,e.avail_in=l<f?f-l+5:5-(l-f),e.avail_out=d<g?g-d+257:257-(d-g),u.hold=k,u.bits=S}(e,d),a=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,l=n.hold,c=n.bits,16191===n.mode&&(n.back=-1);break}for(n.back=0;v=(O=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,y=65535&O,!((m=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(v&&0==(240&v)){for(w=m,b=v,k=y;v=(O=n.lencode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&O,!(w+(m=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=m,c-=m,n.back+=m,n.length=y,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=16191;break}if(64&v){e.msg="invalid literal/length code",n.mode=SC;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;v=(O=n.distcode[l&(1<<n.distbits)-1])>>>16&255,y=65535&O,!((m=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(0==(240&v)){for(w=m,b=v,k=y;v=(O=n.distcode[k+((l&(1<<w+b)-1)>>w)])>>>16&255,y=65535&O,!(w+(m=O>>>24)<=c);){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}l>>>=w,c-=w,n.back+=w}if(l>>>=m,c-=m,n.back+=m,64&v){e.msg="invalid distance code",n.mode=SC;break}n.offset=y,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(C=n.extra;c<C;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=SC;break}n.mode=16204;case 16204:if(0===u)break e;if(n.offset>(h=d-u)){if((h=n.offset-h)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=SC;break}p=h>n.wnext?(h-=n.wnext,n.wsize-h):n.wnext-h,h>n.length&&(h=n.length),g=n.window}else g=i,p=a-n.offset,h=n.length;for(u-=h=u<h?u:h,n.length-=h;i[a++]=g[p++],--h;);0===n.length&&(n.mode=16200);break;case 16205:if(0===u)break e;i[a++]=n.length,u--,n.mode=16200;break;case 16206:if(n.wrap){for(;c<32;){if(0===s)break e;s--,l|=r[o++]<<c,c+=8}if(d-=u,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=(n.flags?$_:G_)(n.check,i,d,a-d)),d=u,4&n.wrap&&(n.flags?l:_C(l))!==n.check){e.msg="incorrect data check",n.mode=SC;break}c=l=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;c<32;){if(0===s)break e;s--,l+=r[o++]<<c,c+=8}if(4&n.wrap&&l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=SC;break}c=l=0}n.mode=16208;case 16208:_=gC;break e;case SC:_=yC;break e;case 16210:return wC;default:return vC}return e.next_out=a,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=l,n.bits=c,(n.wsize||d!==e.avail_out&&n.mode<SC&&(n.mode<16206||t!==fC))&&PC(e,e.output,e.next_out,d-e.avail_out),d-=e.avail_out,e.total_in+=f-=e.avail_in,e.total_out+=d,n.total+=d,4&n.wrap&&d&&(e.adler=n.check=(n.flags?$_:G_)(n.check,i,d,e.next_out-d)),e.data_type=n.bits+(n.last?64:0)+(16191===n.mode?128:0)+(16199===n.mode||16194===n.mode?256:0),_=(0==f&&0===d||t===fC)&&_===pC?bC:_},UC=function(e){var t;return xC(e)?vC:((t=e.state).window&&(t.window=null),e.state=null,pC)},FC=function(e,t){return xC(e)||0==(2&(e=e.state).wrap)?vC:((e.head=t).done=!1,pC)},jC=function(e,t){var n,r=t.length;return xC(e)||0!==(n=e.state).wrap&&16190!==n.mode?vC:16190===n.mode&&G_(1,t,r,0)!==n.check?yC:PC(e,t,r,r)?(n.mode=16210,wC):(n.havedict=1,pC)},zC=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},BC=Object.prototype.toString,WC=s.Z_NO_FLUSH,HC=s.Z_FINISH,qC=s.Z_OK,VC=s.Z_STREAM_END,GC=s.Z_NEED_DICT,JC=s.Z_STREAM_ERROR,$C=s.Z_DATA_ERROR,ZC=s.Z_MEM_ERROR,KC=s.Z_BUF_ERROR,YC={chunkSize:65536,windowBits:15,to:""};function XC(e){this.options=HE({},YC,e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZE,this.strm.avail_out=0,DC(this.strm,t.windowBits));if(e!==qC)throw new Error(Z_[e]);if(this.header=new zC,FC(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=$E(t.dictionary):"[object ArrayBuffer]"===BC.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=jC(this.strm,t.dictionary))!==qC)throw new Error(Z_[e])}function QC(e,t){t=new XC(t);if(t.push(e,!0),t.err)throw t.msg||Z_[t.err];return t.result}XC.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize,a=this.options.dictionary;if(this.ended)return!1;for(r=t===~~t?t:!0===t?HC:WC,"[object ArrayBuffer]"===BC.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(o),i.next_out=0,i.avail_out=o),(n=NC(i,r))===GC&&a&&((n=jC(i,a))===qC?n=NC(i,r):n===$C&&(n=GC));0<i.avail_in&&n===VC&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)LC(i),n=NC(i,r);switch(n){case JC:case $C:case GC:case ZC:return this.onEnd(n),!(this.ended=!0)}var s,u,l,c=i.avail_out;if(i.next_out&&(0===i.avail_out||n===VC||0<r)&&("string"===this.options.to?(s=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+GE[e[n]]>t?n:t}(i.output,i.next_out),u=i.next_out-s,l=function(e,t){var n=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(var r=new Array(2*n),i=0,o=0;o<n;){var a=e[o++];if(a<128)r[i++]=a;else{var s=GE[a];if(4<s)r[i++]=65533,o+=s-1;else{for(a&=2===s?31:3===s?15:7;1<s&&o<n;)a=a<<6|63&e[o++],s--;1<s?r[i++]=65533:a<65536?r[i++]=a:(a-=65536,r[i++]=55296|a>>10&1023,r[i++]=56320|1023&a)}}}var u=r,l=i;if(l<65534&&u.subarray&&VE)return String.fromCharCode.apply(null,u.length===l?u:u.subarray(0,l));for(var c="",f=0;f<l;f++)c+=String.fromCharCode(u[f]);return c}(i.output,s),i.next_out=u,i.avail_out=o-u,u&&i.output.set(i.output.subarray(s,s+u),0),this.onData(l)):(this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0)),n!==qC&&n!==KC||0!==c){if(n===VC)return n=UC(this.strm),this.onEnd(n),this.ended=!0;if(0===i.avail_in){if(r===HC)return n=UC(this.strm),this.onEnd(n===qC?KC:n),!(this.ended=!0);break}}}return!0},XC.prototype.onData=function(e){this.chunks.push(e)},XC.prototype.onEnd=function(e){e===qC&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=qE(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var eO={Inflate:XC,inflate:QC,inflateRaw:function(e,t){return(t=t||{}).raw=!0,QC(e,t)},ungzip:QC,constants:s},tO={Deflate:a.Deflate,deflate:a.deflate,deflateRaw:a.deflateRaw,gzip:a.gzip,Inflate:eO.Inflate,inflate:eO.inflate,inflateRaw:eO.inflateRaw,ungzip:eO.ungzip,constants:s},nO=(aO.prototype.uploadReplay=function(n){return Wu(this,void 0,void 0,function(){var t;return Hu(this,function(e){switch(e.label){case 0:if(this.isUploading)return sy("Uploader","Upload in progress, skipping"),[2,!1];this.isUploading=!0,e.label=1;case 1:return e.trys.push([1,3,4,5]),(t=this.config.beforeSend(n))?[4,this.doUploadWithRetry(t,0)]:(g("Uploader","Upload cancelled by beforeSend"),[2,!1]);case 2:return e.sent(),g("Uploader","Upload success:",{replay_id:n.replay_id,segment_id:n.segment_id}),[2,!0];case 3:return uy("Uploader","Upload failed:",t=e.sent()),this.config.onError(t),[2,!1];case 4:return this.isUploading=!1,[7];case 5:return[2]}})})},aO.prototype.doUploadWithRetry=function(r,i){return Wu(this,void 0,void 0,function(){var t,n;return Hu(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,5]),[4,this.doUpload(r)];case 1:return e.sent(),[3,5];case 2:return t=e.sent(),i<this.config.maxRetries?(g("Uploader","Retrying in "+(n=1e3*Math.pow(2,i))+"ms (attempt "+(i+1)+"/"+this.config.maxRetries+")"),[4,this.sleep(n)]):[3,4];case 3:return e.sent(),[2,this.doUploadWithRetry(r,i+1)];case 4:throw t;case 5:return[2]}})})},aO.prototype.prepareUploadPayload=function(e){var t=e.replay_format||"rrweb",n=e.events_encoding||"plain_json";if("rrweb"!==t)return e;if(!this.config.eventsCompression||"gzip_base64"===n)return h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:n});try{var r=tO.gzip(e.events),i=this.uint8ArrayToBase64(r),o=e.events.length,a=r.length,s=i.length;return g("Uploader","Events compressed: "+Math.round(o/1024)+"KB -> gzip "+Math.round(a/1024)+"KB -> base64 "+Math.round(s/1024)+"KB"),h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"gzip_base64",events:i})}catch(X){return sy("Uploader","Events compression failed, fallback to plain_json:",X),h(h({},e),{replay_format:t,platform:e.platform||"web",events_encoding:"plain_json"})}},aO.prototype.uint8ArrayToBase64=function(e){for(var t="",n=0;n<e.length;n+=32768){for(var r=e.subarray(n,n+32768),i="",o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);t+=i}if("function"==typeof btoa)return btoa(t);if("undefined"!=typeof Buffer)return Buffer.from(e).toString("base64");throw new Error("base64 encode is not supported")},aO.prototype.doUpload=function(i){return Wu(this,void 0,void 0,function(){var t,n,r;return Hu(this,function(e){switch(e.label){case 0:if(t=this.prepareUploadPayload(i),r=JSON.stringify(t),n={"Content-Type":"application/json","X-App-ID":this.config.appId},g("Uploader","Sending replay payload: "+Math.round(r.length/1024)+"KB, events_encoding="+(t.events_encoding||"plain_json")),r.length<65536||g("Uploader","Data size "+Math.round(r.length/1024)+"KB exceeds keepalive limit, using normal fetch"),this.config.transport)return[4,this.config.transport.request({kind:"replay",url:this.config.uploadUrl,method:"POST",headers:n,body:r})];throw new Error("Replay Transport is not configured");case 1:if(t=e.sent(),!(n=t||{ok:!1,status:0,statusText:"Transport failed"}).ok)throw new Error("HTTP "+(n.status||0)+": "+(n.statusText||"Transport failed"));if(0!==(r="string"==typeof n.body?JSON.parse(n.body):n.body).code)throw new Error("Server error (code "+r.code+"): "+r.message);return[2]}})})},aO.prototype.sendBeacon=function(e){var t;try{var n=this.prepareUploadPayload(e),r=JSON.stringify(n);return!(null==(t=this.config.transport)||!t.handoff||(this.config.transport.handoff({kind:"replay",url:this.config.uploadUrl,method:"POST",contentType:"application/json",body:r,sendBeacon:!0}),0))}catch(X){return uy("Uploader","sendBeacon failed:",X),!1}},aO.prototype.isUploadInProgress=function(){return this.isUploading},aO.prototype.sleep=function(t){return new Promise(function(e){return setTimeout(e,t)})},aO),rO=["a","button",'input[type="button"]','input[type="submit"]','[role="button"]',"[onclick]","[ng-click]","[v-on\\:click]"].join(","),iO=(oO.prototype.start=function(){this.isRunning||(document.addEventListener("pointerdown",this.handlePointerDown,!0),document.addEventListener("click",this.handleClick,!0),this.isRunning=!0,g("ClickDetector","Started"))},oO.prototype.stop=function(){this.isRunning&&(document.removeEventListener("pointerdown",this.handlePointerDown,!0),document.removeEventListener("click",this.handleClick,!0),this.cleanupSlowClick(),this.isRunning=!1,g("ClickDetector","Stopped"))},oO.prototype.handlePointerDown=function(e){var t,n,r=this,i=e.target;i&&i instanceof Element&&(i=this.getClickableElement(i))&&(this.cleanupSlowClick(),this.clickStartTime=Date.now(),this.clickNode=i,t=this.getNodeInfo(i),n=this.getExternalNavigationReason(e,i),this.options.onClickStart({node:t,timestamp:this.clickStartTime,target:i,event:e,effectiveActionReason:n||undefined}),n?this.markEffectiveAction(n):(this.slowClickTimeoutId=setTimeout(function(){r.handleSlowClick("timeout")},this.options.slowClickTimeout),this.startMutationObserver()))},oO.prototype.handleClick=function(e){var t=this,n=e.target,r=Date.now();this.rageActiveTarget&&r-this.rageLastClickTime>=this.options.rageClickWindow&&(this.rageActiveTarget=null,this.rageLastClickTime=0),this.rageActiveTarget&&this.isSameTarget(this.rageActiveTarget,n)?this.rageLastClickTime=r:(this.clickHistory.push({time:r,target:n}),this.clickHistory=this.clickHistory.filter(function(e){return r-e.time<t.options.rageClickWindow}),(e=this.clickHistory.filter(function(e){return t.isSameTarget(e.target,n)})).length>=this.options.rageClickCount&&(this.options.onRageClick({node:this.getNodeInfo(n),clickCount:e.length,timeWindowMs:this.options.rageClickWindow,timestamp:r}),this.rageActiveTarget=n,this.rageLastClickTime=r))},oO.prototype.startMutationObserver=function(){var t=this;this.clickNode&&document.body&&"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver(function(e){t.hasSignificantMutation(e)&&(t.emitEffectiveAction("dom_mutation"),t.handleSlowClick("mutation"))}),this.mutationObserver.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"],characterData:!0}))},oO.prototype.hasSignificantMutation=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];if("characterData"===r.type)return!0;if("childList"===r.type&&(0<r.addedNodes.length||0<r.removedNodes.length)&&Array.from(r.addedNodes).concat(Array.from(r.removedNodes)).some(function(e){return e.nodeType===Node.ELEMENT_NODE&&!["SCRIPT","STYLE","LINK"].includes(e.tagName)}))return!0;if("attributes"===r.type){r=r.attributeName;if(["class","style","hidden","disabled","aria-hidden","aria-disabled","aria-busy"].includes(r||""))return!0}}return!1},oO.prototype.handleSlowClick=function(e){var t;this.clickNode&&this.clickStartTime&&((t=Date.now()-this.clickStartTime)>=this.options.slowClickThreshold&&this.options.onSlowClick({node:this.getNodeInfo(this.clickNode),timeAfterClickMs:t,endReason:e,timestamp:this.clickStartTime}),this.cleanupSlowClick())},oO.prototype.cleanupSlowClick=function(){this.slowClickTimeoutId&&(clearTimeout(this.slowClickTimeoutId),this.slowClickTimeoutId=null),this.mutationObserver&&(this.mutationObserver.disconnect(),this.mutationObserver=null),this.clickStartTime=0,this.clickNode=null},oO.prototype.isSameTarget=function(e,t){return e===t||e.contains(t)||t.contains(e)},oO.prototype.markEffectiveAction=function(e){this.clickNode&&this.clickStartTime&&(this.emitEffectiveAction(e),this.cleanupSlowClick())},oO.prototype.emitEffectiveAction=function(e){this.clickNode&&this.options.onEffectiveAction({reason:e,timestamp:Date.now(),node:this.getNodeInfo(this.clickNode)})},oO.prototype.getClickableElement=function(e){return e.matches(rO)?e:e.closest(rO)},oO.prototype.getExternalNavigationReason=function(e,t){var n=t.closest("a");if(n){if(n.download)return"download";var r=(n.getAttribute("target")||"").toLowerCase();if(r&&"_self"!==r)return"external_navigation";if(n.href&&(1===e.button||e.metaKey||e.ctrlKey||e.shiftKey))return"external_navigation"}r=t.closest("form"),n=((null==r?void 0:r.getAttribute("target"))||"").toLowerCase();return n&&"_self"!==n?"external_navigation":t.hasAttribute("data-tdem-ignore-dead-click")||t.closest("[data-tdem-ignore-dead-click]")||t.hasAttribute("data-tdem-effective-action")||t.closest("[data-tdem-effective-action]")?"custom":null},oO.prototype.getNodeInfo=function(e){var t;return{id:(null==(t=e.__sn)?void 0:t.id)||0,tagName:e.tagName.toLowerCase(),textContent:(e.textContent||"").trim().substring(0,100),selector:this.getSelector(e)}},oO.prototype.getSelector=function(e){for(var t=[],n=e;n&&n!==document.body&&t.length<5;){var r,i=n.tagName.toLowerCase();if(n.id){i+="#"+n.id,t.unshift(i);break}n.className&&"string"==typeof n.className&&0<(r=n.className.trim().split(/\s+/).slice(0,2)).length&&(i+="."+r.join(".")),t.unshift(i),n=n.parentElement}return t.join(" > ")},oO.prototype.isActive=function(){return this.isRunning},oO);function oO(e){var t;void 0===e&&(e={}),this.isRunning=!1,this.clickStartTime=0,this.clickNode=null,this.slowClickTimeoutId=null,this.mutationObserver=null,this.clickHistory=[],this.rageActiveTarget=null,this.rageLastClickTime=0,this.options={slowClickTimeout:null!=(t=e.slowClickTimeout)?t:7e3,slowClickThreshold:null!=(t=e.slowClickThreshold)?t:3e3,rageClickCount:null!=(t=e.rageClickCount)?t:5,rageClickWindow:null!=(t=e.rageClickWindow)?t:1e3,onSlowClick:e.onSlowClick||function(){},onRageClick:e.onRageClick||function(){},onClickStart:e.onClickStart||function(){},onEffectiveAction:e.onEffectiveAction||function(){},onDeadClick:e.onDeadClick||function(){}},this.handleClick=this.handleClick.bind(this),this.handlePointerDown=this.handlePointerDown.bind(this)}function aO(e){var t;this.isUploading=!1,this.useCompression=!1,this.config={uploadUrl:e.uploadUrl||"/api/v1/collect/replay",appId:e.appId,maxRetries:null!=(t=e.maxRetries)?t:3,beforeSend:e.beforeSend||function(e){return e},onError:e.onError||function(){},eventsCompression:null==(t=e.eventsCompression)||t,transport:e.transport}}function sO(e){var t=null==(t=e)?void 0:t._tdemSampleGate;return!t||!t.isDecided||t.isSampled&&!1!==e._replaySampled}new r({name:"sessionReplay"});var Te=new r({name:"sessionReplay",sessionManager:null,eventBuffer:null,recorderManager:null,samplerManager:null,uploader:null,clickDetector:null,flushTimer:null,replayConfig:null,isInitialized:!1,errorOnlyUpload:!0,_errorOnlyUploadLocallyConfigured:!1,_tdemRef:null,_isCheckoutFlushing:!1,_lastLifecycleSnapshotAt:0,_errorFlushInFlight:!1,init:function(e){},onNewTdem:function(e,t){var t=this.parseConfig(t),n=null!=(n=t.debug)&&n;iy=n,t.enabled?(this.replayConfig=t,this.errorOnlyUpload=!1!==t.errorOnlyUpload,this._errorOnlyUploadLocallyConfigured=t.errorOnlyUpload!==undefined,this._tdemRef=e,this.initializeModules(e,t),(n=this.samplerManager.initializeSampling()).shouldRecord?(this.startReplay(e,t,n.mode),this.registerReplaySamplingCheck(e,t),this.listenForErrors(e,t),this.listenForPerformance(e),this.listenForLifecycle(e,t),this.listenForUnload(e),this.isInitialized=!0):g("Plugin","Not sampled by local sampler, skipping")):g("Plugin","disabled")},setErrorOnlyUpload:function(e){this._errorOnlyUploadLocallyConfigured?g("Plugin","errorOnlyUpload has local config ("+this.errorOnlyUpload+"), ignoring remote override ("+e+")"):this.errorOnlyUpload!==e&&(g("Plugin","errorOnlyUpload switched: "+this.errorOnlyUpload+" -> "+e),this.errorOnlyUpload=e)},shouldSkipBufferFlush:function(){var e;return!0===(null==(e=this.samplerManager)?void 0:e.isBufferMode())&&this.errorOnlyUpload},hasPendingErrorFlush:function(){return!0===this._errorFlushInFlight},registerReplaySamplingCheck:function(t,e){var n=this,r=setInterval(function(){var e=null==(e=t)?void 0:e._tdemSampleGate;e&&e.isDecided&&(e.isSampled?(e=t._replaySampled)!==undefined&&(clearInterval(r),!1===e?(g("Plugin","Replay not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()):g("Plugin","Both session and replay sampled, replay continues")):(clearInterval(r),g("Plugin","Session not sampled, stopping replay and clearing buffer"),n.stopReplay(),n.eventBuffer&&n.eventBuffer.clear()))},50);setTimeout(function(){clearInterval(r)},5e3)},parseConfig:function(e){return!0===e?{enabled:!0}:"object"===S(e)?h(h({},e),{enabled:!1!==e.enabled}):{enabled:!1}},initializeModules:function(t,e){var n=this,r=(this.sessionManager=new ly({stickySession:null==(r=e.stickySession)||r}),this.sessionManager.setTdemInstance(t),t.sessionManager=this.sessionManager,this.eventBuffer=new py({},null!=(r=e.useCompression)&&r),this.samplerManager=new l_({sessionSampleRate:e.sessionSampleRate,errorSampleRate:e.errorSampleRate}),this.recorderManager=new u_({onRecordingEvent:function(e){n.handleRecordingEvent(e,t)},onCheckout:function(){if(!n._isCheckoutFlushing){n._isCheckoutFlushing=!0;try{var e,t;n.shouldSkipBufferFlush()?g("SessionReplay","Checkout in buffer mode, skip flush"):n.hasPendingErrorFlush()?g("SessionReplay","Checkout skipped, error-triggered flush in flight"):(e=n._tdemRef,t=n.replayConfig,e&&t&&n.eventBuffer&&!n.eventBuffer.isEmpty()&&(g("SessionReplay","Checkout triggered, flushing current buffer"),n.flushReplayData(e,t,!0)))}finally{n._isCheckoutFlushing=!1}}},mode:"session"},e),(t.config.url||t.config.hostUrl||"").replace(/\/+$/,""));this.uploader=new nO({uploadUrl:e.uploadUrl||r+"/api/v1/collect/replay",appId:String(t.config.id||""),beforeSend:e.beforeSend,onError:e.onError,eventsCompression:null==(r=e.eventsCompression)||r,transport:null==(r=t.getInternalTransport)?void 0:r.call(t)}),this.clickDetector=new iO({slowClickTimeout:e.slowClickTimeout,slowClickThreshold:e.slowClickThreshold,rageClickCount:e.rageClickCount,rageClickWindow:e.rageClickWindow,onSlowClick:function(e){n.handleSlowClick(e,t)},onRageClick:function(e){n.handleRageClick(e,t)}}),g("Plugin","Modules initialized")},startReplay:function(e,t,n){var r;this.sessionManager&&this.recorderManager&&this.eventBuffer?(g("Plugin","Session started:",(this.sessionManager.restoreSession()||this.sessionManager.createSession(n)).id,"mode:",n),this.recorderManager.options.mode=n,r=o_(h({maskAllText:!1!==t.maskAllInputs,maskAllInputs:t.maskAllInputs,maskTextSelector:t.maskTextSelector,blockSelector:t.blockSelector,ignoreSelector:t.ignoreSelector},t.privacy)),this.recorderManager.startRecording({privacy:r}),this.clickDetector&&this.clickDetector.start(),"session"===n?this.startFlushTimer(e,t):g("Plugin","Buffer mode - flush on error only")):uy("Plugin","Modules not initialized")},handleRecordingEvent:function(e,t){this.eventBuffer&&this.sessionManager&&(this.sanitizeDataURLs(e),this.eventBuffer.addEvent(e),this.sessionManager.updateActivity())},sanitizeDataURLs:function(e){var t=e.type;if(2===t){var n=null==(n=e.data)?void 0:n.node;n&&this.sanitizeNodeTree(n,1024)}else if(3===t){n=e.data;if(0===(null==n?void 0:n.source)&&Array.isArray(n.adds)){for(var r=0,i=n.adds;r<i.length;r++){var o=i[r];null!=o&&o.node&&this.sanitizeNodeTree(o.node,1024)}if(Array.isArray(n.attributes))for(var a=0,s=n.attributes;a<s.length;a++){var u=s[a];if(null!=u&&u.attributes)for(var l=0,c=Object.entries(u.attributes);l<c.length;l++){var f=c[l],d=f[0],f=f[1];"string"==typeof f&&1024<f.length&&f.startsWith("data:")&&(u.attributes[d]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}}}}},sanitizeNodeTree:function(e,t){if(e){if(e.attributes)for(var n=e.attributes,r=0,i=Object.keys(n);r<i.length;r++){var o=i[r],a=n[o];"string"==typeof a&&a.length>t&&a.startsWith("data:")&&(n[o]='data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg"%3E%3C/svg%3E')}if(Array.isArray(e.childNodes))for(var s=0,u=e.childNodes;s<u.length;s++){var l=u[s];this.sanitizeNodeTree(l,t)}}},handleSlowClick:function(e,t){g("ClickDetector","Slow click detected:",e.timeAfterClickMs,"ms"),this.addCustomEvent({category:"ui.slowClickDetected",message:"Slow click: "+e.timeAfterClickMs+"ms on "+e.node.tagName,data:{node:e.node,timeAfterClickMs:e.timeAfterClickMs,endReason:e.endReason}},t)},handleRageClick:function(e,t){g("ClickDetector","Rage click detected:",e.clickCount,"clicks"),this.addCustomEvent({category:"ui.multiClick",message:"Rage click: "+e.clickCount+" clicks on "+e.node.tagName,data:{node:e.node,clickCount:e.clickCount,timeWindowMs:e.timeWindowMs}},t)},addCustomEvent:function(e,t){this.eventBuffer&&(e={type:5,data:{tag:e.category,payload:h({message:e.message},e.data)},timestamp:Date.now()},this.eventBuffer.addEvent(e))},startFlushTimer:function(e,t){var n=this;this.flushTimer&&clearInterval(this.flushTimer),this.flushTimer=setInterval(function(){n.flushReplayData(e,t)},2e4)},flushReplayData:function(c,f,d){return void 0===d&&(d=!1),Wu(this,void 0,void 0,function(){var t,n,r,i,o,a,s,u,l;return Hu(this,function(e){switch(e.label){case 0:return this.sessionManager&&this.eventBuffer&&this.uploader&&sO(c)&&(t=this.sessionManager.getSession())?this.sessionManager.shouldRefreshSession()?(g("Plugin","Session expired, refreshing"),this.stopReplay(),i=this.sessionManager.refreshSession(),c.lifeCycle.emit("sessionRefreshed"),n=c._replaySampled,i.sampled&&!1!==n&&this.startReplay(c,f,i.sampled),[2]):this.eventBuffer.isEmpty()?[2]:(n=this.eventBuffer.getEventCount(),!d&&n<10?(g("Flush","Skipping flush, only "+n+" events (min: 10)"),[2]):(0!==t.segmentId||this.eventBuffer.hasCheckout()||(sy("Flush","First segment missing FullSnapshot, triggering manual checkout"),this.recorderManager&&this.recorderManager.takeFullSnapshot()),[4,this.eventBuffer.finishAsync()])):[2];case 1:if(0===(r=e.sent()).eventCount)return[2];if(0===(i=r.events).length&&r.eventsJson)try{i=JSON.parse(r.eventsJson)}catch(H){return uy("Flush","Failed to parse eventsJson from worker:",H),[2]}s=this.splitEventsIntoChunks(i),g("Flush","Flushing "+r.eventCount+" events in "+s.length+" chunk(s), total size: "+Math.round(r.uncompressedSize/1024)+"KB"),o=!0,a=0,s=s,e.label=2;case 2:return a<s.length?(u=s[a],u=JSON.stringify(u),u={project_key:String(c.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:u},[4,this.uploader.uploadReplay(u)]):[3,5];case 3:if(!e.sent())return o=!1,[3,5];e.label=4;case 4:return a++,[3,2];case 5:return u=this.eventBuffer.isUsingWorker(),l=u?"(worker)":"(sync)",g("Flush","Flushing "+r.eventCount+" events, size: "+Math.round(r.uncompressedSize/1024)+"KB "+l),o&&(this.eventBuffer.clear(),this.sessionManager.saveSession()),[2]}})})},splitEventsIntoChunks:function(e,t,n){if(void 0===t&&(t=3145728),void 0===n&&(n=5242880),0===e.length)return[];var r=JSON.stringify(e);if(r.length<=t)return[e];sy("Split","Events size "+Math.round(r.length/1024)+"KB exceeds limit "+Math.round(t/1024)+"KB, splitting");for(var i=[],o=[],a=2,s=0,u=e;s<u.length;s++){var l,c,f=u[s],d=JSON.stringify(f).length+1;0<o.length&&t<a+d&&(i.push(o),o=[],a=2),n<d?((c=2===(l=f.type)||4===l)?uy:sy)("Split","Single event too large ("+Math.round(d/1024)+"KB), type="+l+(c?" (baseline snapshot, replay may become unplayable)":"")+", skipping"):(o.push(f),a+=d)}return 0<o.length&&i.push(o),i},stopReplay:function(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),g("Plugin","Recording stopped")},listenForErrors:function(t,n){var r=this;t.lifeCycle.on("errorOccurred",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){e&&r.handleError(e,t,n)})}),t.lifeCycle.on("tdemEventCreated",function(e){(Array.isArray(e)?e:[e]).forEach(function(e){r.isErrorTDEMEvent(e)&&r.handleError(e,t,n)})})},isErrorTDEMEvent:function(e){return!!e&&("error"===String(e.event_category||"").toLowerCase()||(e=String(e.event_type||"").toLowerCase(),["js_error","promise_error","resource_error","api_error"].includes(e)))},handleError:function(e,t,n){var r=this;this.samplerManager&&(this.samplerManager.isBufferMode()&&this.samplerManager.onErrorOccurred(e)&&(g("Plugin","Converting to session mode due to error"),this._errorFlushInFlight=!0,this.flushReplayData(t,n,!0)["finally"](function(){r._errorFlushInFlight=!1}),this.startFlushTimer(t,n)),this.addCustomEvent({category:"error",message:(null==e?void 0:e.msg)||(null==e?void 0:e.message)||"Unknown error",data:{type:(null==e?void 0:e.type)||"error",stack:null==e?void 0:e.stack}},t))},listenForPerformance:function(n){var r=this;if(n.lifeCycle.on("afterReportWebVitals",function(e){r.handlePerformanceEvent("webVitals",e,n)}),n.lifeCycle.on("afterReportPagePerformance",function(e){r.handlePerformanceEvent("pageLoad",e,n)}),"undefined"!=typeof PerformanceObserver)try{var e=new PerformanceObserver(function(e){var t,e=e.getEntries(),e=e[e.length-1];e&&r.addCustomEvent({category:"performance.lcp",message:"LCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime,element:(null==(t=e.element)?void 0:t.tagName)||"unknown",size:e.size}},n)}),t=(e.observe({type:"largest-contentful-paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){"first-contentful-paint"===e.name&&r.addCustomEvent({category:"performance.fcp",message:"FCP: "+Math.round(e.startTime)+"ms",data:{value:e.startTime}},n)})})),i=(t.observe({type:"paint",buffered:!0}),new PerformanceObserver(function(e){e.getEntries().forEach(function(e){100<e.duration&&r.addCustomEvent({category:"performance.longTask",message:"Long Task: "+Math.round(e.duration)+"ms",data:{duration:e.duration,startTime:e.startTime}},n)})}));i.observe({type:"longtask",buffered:!0}),n.lifeCycle.on("destroy",function(){e.disconnect(),t.disconnect(),i.disconnect()})}catch(De){}},handlePerformanceEvent:function(e,n,r){var i=this;n&&("webVitals"===e?["LCP","FCP","FID","CLS","TTFB","TTI","INP"].forEach(function(e){var t=n[e];t!==undefined&&-1!==t&&0<t&&i.addCustomEvent({category:"performance."+e.toLowerCase(),message:e+": "+("number"==typeof t?Math.round(t):t)+("CLS"===e?"":"ms"),data:{metric:e,value:t}},r)}):"pageLoad"===e&&this.addCustomEvent({category:"performance.pageLoad",message:"Page Load: "+(n.firstScreenTiming?Math.round(n.firstScreenTiming):"N/A")+"ms",data:{dnsLookup:n.dnsLookup,tcp:n.tcp,ssl:n.ssl,ttfb:n.ttfb,contentDownload:n.contentDownload,domParse:n.domParse,resourceDownload:n.resourceDownload,firstScreenTiming:n.firstScreenTiming}},r))},listenForLifecycle:function(o,t){var n,e,a=this;"undefined"!=typeof document&&(n=function(e){var t,n=null==(n=a.sessionManager)?void 0:n.getSession(),n=(null==n?void 0:n.replayId)||"",r=(null==(i=null==(r=o)?void 0:r.getOriginFrom)?void 0:i.call(r))||("undefined"!=typeof location?location.href:""),i="undefined"!=typeof document&&document.title||"";null!=(t=o.reportTDEMEvent)&&t.call(o,{event_id:Fl(),event_type:e,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:r,data:{page_title:i,replay_id:n,is_effective_action:!1,tags:{environment:o.config.env||"production",version:String(o.config.version||"")},event_properties:{visibility_state:"undefined"!=typeof document?document.visibilityState:"",lifecycle_type:e}}})},document.addEventListener("visibilitychange",e=function(){var e;if("undefined"!=typeof document){if("hidden"===document.visibilityState)return n(p.TAB_HIDDEN),a.shouldSkipBufferFlush()?void g("Lifecycle","Buffer mode (errorOnlyUpload), skip flush on hidden"):a.hasPendingErrorFlush()?void g("Lifecycle","Hidden flush skipped, error-triggered flush in flight"):void a.flushReplayData(o,t,!0);"visible"===document.visibilityState&&(n(p.TAB_VISIBLE),(e=Date.now())-a._lastLifecycleSnapshotAt<5e3||(a._lastLifecycleSnapshotAt=e,null!=(e=a.recorderManager)&&e.takeFullSnapshot(),a.shouldSkipBufferFlush()?g("Lifecycle","Buffer mode (errorOnlyUpload), skip flush on visible"):a.hasPendingErrorFlush()?g("Lifecycle","Visible flush skipped, error-triggered flush in flight"):a.flushReplayData(o,t,!0)))}}),o.lifeCycle.on("destroy",function(){document.removeEventListener("visibilitychange",e)}))},listenForUnload:function(e){var t=this,n=function(){t.shouldSkipBufferFlush()?g("Unload","Buffer mode (errorOnlyUpload), skip flush on unload"):t.hasPendingErrorFlush()?g("Unload","Unload flush skipped, error-triggered flush in flight"):t.flushOnUnload(e)};window.addEventListener("beforeunload",n),window.addEventListener("pagehide",n),e.lifeCycle.on("destroy",function(){window.removeEventListener("beforeunload",n),window.removeEventListener("pagehide",n)})},flushOnUnload:function(e){if(this.sessionManager&&this.eventBuffer&&this.uploader&&sO(e)){var t=this.sessionManager.getSession();if(t&&(this.recorderManager&&this.recorderManager.stopRecording(),this.clickDetector&&this.clickDetector.stop(),!this.eventBuffer.isEmpty())){var n=this.eventBuffer.finish();if(0!==n.eventCount){for(var n=this.splitEventsIntoChunks(n.events,51200,51200),r=0,i=0,o=0,a=n;o<a.length;o++){var s=a[o],s={project_key:String(e.config.id||""),session_id:t.id,replay_id:t.replayId,segment_id:this.sessionManager.incrementSegmentId(),timestamp:Date.now(),replay_start_timestamp:t.started,replay_format:"rrweb",platform:"web",events_encoding:"plain_json",events:JSON.stringify(s)};this.uploader.sendBeacon(s)?r++:(i++,sy("Unload","sendBeacon rejected chunk (segment_id="+s.segment_id+"), likely exceeds 64KB browser limit or queue full"))}g("SessionReplay","sendBeacon on unload: "+r+"/"+n.length+" chunk(s) queued, "+i+" rejected")}}}},destroy:function(){this.stopReplay(),this.sessionManager&&this.sessionManager.saveSession(),this.sessionManager=null,this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this.recorderManager=null,this.samplerManager=null,this.uploader=null,this.clickDetector=null,this.replayConfig=null,this._tdemRef=null,this._isCheckoutFlushing=!1,this._lastLifecycleSnapshotAt=0,this.isInitialized=!1,g("Plugin","destroyed")}}),uO={enabled:!0,ruleVersion:"1.0.0",payloadAllowlist:[],click:{enabled:!0,deadClickWindowMs:3e3,rageClickWindowMs:1e3,rageClickCount:5,errorClickWindowMs:3e3,resolveOnDomMutation:!0,resolveOnSpaNavigation:!0,resolveOnExternalNavigation:!0,resolveOnWindowOpen:!0,resolveOnPageUnload:!0,resolveOnFormAction:!0,resolveOnApiSuccess:!0,ignoreDeadClickSelectors:[],effectiveActionSelectors:[]},performance:{enabled:!0,slowPageLcpThreshold:4e3,slowPageInpThreshold:500},form:{enabled:!0,fieldIdAttr:"data-field-id",formIdAttr:"data-form-id",longFocusThresholdMs:2e4,incompleteMinFieldRatio:.3,zigzagMinCount:2},navigation:{enabled:!0,backForwardAsStruggle:!0},custom:{enabled:!0,detector:undefined}},lO=new Set([p.JS_ERROR,p.PROMISE_ERROR,p.RESOURCE_ERROR,p.API_ERROR]),cO=new Set([p.FORM_CHANGE,p.FORM_SUBMIT,p.FORM_SUBMIT_RESULT]),lt=(new r({name:"struggleMonitor"}),new r({name:"struggleMonitor",instanceStates:new Map,originalWindowOpen:null,windowOpenHooked:!1,onNewTdem:function(t){var n,r=this,e=!0===(e=this.$getConfig(t))?h({},uO):e&&"object"===S(e)?h(h(h({},uO),e),{click:h(h({},uO.click),e.click||{}),performance:h(h({},uO.performance),e.performance||{}),form:h(h({},uO.form),e.form||{}),navigation:h(h({},uO.navigation),e.navigation||{}),custom:h(h({},uO.custom),e.custom||{}),payloadAllowlist:(Array.isArray(e.payloadAllowlist)?e:uO).payloadAllowlist,enabled:!1!==e.enabled}):h(h({},uO),{enabled:!1});e.enabled&&(n={config:e,clickDetector:null,recentClicks:[],pendingDeadClicks:new Map,focusStartMap:new Map,formStateMap:new Map,removeDomListeners:[],onEventCreated:null,onDestroy:null},this.instanceStates.set(t,n),this.initClickDetector(t,n),this.initFormListeners(t,n),n.onEventCreated=function(e){r.handleEventCreated(t,n,e||[])},t.lifeCycle.on("tdemEventCreated",n.onEventCreated),n.onDestroy=function(){return r.cleanupInstance(t)},t.lifeCycle.on("destroy",n.onDestroy))},initClickDetector:function(t,n){var e,r=this;"undefined"!=typeof window&&"undefined"!=typeof document&&(n.clickDetector=new iO({slowClickTimeout:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,slowClickThreshold:null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,rageClickCount:null!=(e=null==(e=n.config.click)?void 0:e.rageClickCount)?e:5,rageClickWindow:null!=(e=null==(e=n.config.click)?void 0:e.rageClickWindowMs)?e:1e3,onRageClick:function(e){r.onRageClick(t,n,e)},onClickStart:function(e){r.onClickStart(t,n,e)},onEffectiveAction:function(e){r.onEffectiveAction(n,e)},onSlowClick:function(e){r.onSlowClick(t,n,e)}}),n.clickDetector.start(),this.initClickEffectiveActionListeners(n),this.initWindowOpenHook())},initClickEffectiveActionListeners:function(n){var e,t=this;"undefined"!=typeof window&&((e=function(e,t){window.addEventListener(e,t),n.removeDomListeners.push(function(){window.removeEventListener(e,t)})})("pagehide",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}),e("beforeunload",function(){var e;!1!==(null==(e=n.config.click)?void 0:e.resolveOnPageUnload)&&(t.resolvePendingDeadClicks(n,"page_unload"),null!=(e=n.clickDetector))&&e.markEffectiveAction("page_unload")}))},initWindowOpenHook:function(){var r,i;"undefined"==typeof window||this.windowOpenHooked||(r=window.open,this.originalWindowOpen=r,this.windowOpenHooked=!0,i=this,window.open=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=r.apply(window,e);return i.resolveWindowOpenActions(),n})},resolveWindowOpenActions:function(){var n=this,r=Date.now();this.instanceStates.forEach(function(e){var t;!1!==(null==(t=e.config.click)?void 0:t.resolveOnWindowOpen)&&(null!=(t=e.clickDetector)&&t.markEffectiveAction("window_open"),n.resolvePendingDeadClicks(e,"window_open",r,n.getCurrentPageUrl()))})},restoreWindowOpenHook:function(){"undefined"!=typeof window&&this.windowOpenHooked&&this.originalWindowOpen&&(window.open=this.originalWindowOpen,this.originalWindowOpen=null,this.windowOpenHooked=!1)},initFormListeners:function(r,i){var e,t,o=this;null!=(t=i.config.form)&&t.enabled&&"undefined"!=typeof document&&((t=function(e,t,n){void 0===n&&(n=!0),document.addEventListener(e,t,n),i.removeDomListeners.push(function(){document.removeEventListener(e,t,n)})})("focusin",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_FOCUS,e,e.form||undefined)}),t("focusout",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_BLUR,e,e.form||undefined)}),t("change",function(e){e=o.getTrackableField(e.target);e&&o.reportFormEvent(r,i,p.FORM_CHANGE,e,e.form||undefined)}),t("submit",function(e){e=e.target;e instanceof HTMLFormElement&&o.reportFormEvent(r,i,p.FORM_SUBMIT,null,e)}),t("invalid",function(e){var t,n,e=o.getTrackableField(e.target);e&&(n=e.form||undefined,n=o.buildFormBaseData(r,i,e,n),n={event_id:Fl(),event_type:p.FORM_SUBMIT_RESULT,event_category:Nl.BEHAVIOR,timestamp:Date.now(),page_url:"undefined"!=typeof window?window.location.href:(null==(t=r.getOriginFrom)?void 0:t.call(r))||"",data:h(h({},n),{event_name:"form_submit_fail",is_effective_action:!0,validation_message:e.validationMessage||undefined,event_properties:h(h({},n.event_properties||{}),{status:"fail",validation_code:!1===(null==(t=e.validity)?void 0:t.valid)?"invalid":"validation_error"})})},null!=(e=r.reportTDEMEvent))&&e.call(r,n)}),e=function(){o.reportPendingUncompletedForms(r,i,"pagehide")},"undefined"!=typeof window)&&(window.addEventListener("pagehide",e),i.removeDomListeners.push(function(){window.removeEventListener("pagehide",e)}))},getTrackableField:function(e){return!(e&&e instanceof Element)||!(e=e.closest("input, textarea, select"))||e instanceof HTMLInputElement&&["button","submit","reset","image","hidden"].includes(e.type)?null:e},buildFormBaseData:function(e,t,n,r){var n=n||null,r=r||(null==n?void 0:n.form)||undefined,i=(null==(i=t.config.form)?void 0:i.fieldIdAttr)||"data-field-id",t=(null==(t=t.config.form)?void 0:t.formIdAttr)||"data-form-id",i=n?n.getAttribute(i)||n.id||n.name||n.tagName.toLowerCase()+"_"+(n.type||"field"):undefined,t=r&&(r.getAttribute(t)||r.id||r.getAttribute("name")||r.getAttribute("action"))||undefined,o="string"==typeof(null==(o=n)?void 0:o.value)?n.value.length:0,o=0===o?"0":o<=10?"1_10":o<=50?"11_50":"51_plus";return{replay_id:ef(e),is_effective_action:!0,form_id:t,field_id:i,tags:{},event_properties:{field_name:(null==n?void 0:n.name)||"",field_type:(null==n?void 0:n.type)||(null==(e=null==n?void 0:n.tagName)?void 0:e.toLowerCase())||"",form_name:(null==r?void 0:r.getAttribute("name"))||"",is_required:String(!(null==n||!n.required)),value_length_bucket:String(o)}}},reportFormEvent:function(e,t,n,r,i){var t=this.buildFormBaseData(e,t,r,i),i="undefined"!=typeof window?window.location.href:(null==(r=e.getOriginFrom)?void 0:r.call(e))||"",r={event_id:Fl(),timestamp:Date.now(),page_url:i};n!==p.FORM_FOCUS?n!==p.FORM_BLUR?n!==p.FORM_CHANGE?(i=h(h({},r),{event_type:p.FORM_SUBMIT,event_category:Nl.BEHAVIOR,data:h(h({},t),{submit_method:"native_submit"})}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_CHANGE,event_category:Nl.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_BLUR,event_category:Nl.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i)):(i=h(h({},r),{event_type:p.FORM_FOCUS,event_category:Nl.BEHAVIOR,data:t}),null!=(n=e.reportTDEMEvent)&&n.call(e,i))},onClickStart:function(e,t,n){var r,i=t.config.click||uO.click;!1!==i.enabled&&(r=n.node.selector||n.node.tagName||"unknown",this.shouldIgnoreDeadClick(n.target,i)?this.resolvePendingDeadClicks(t,"custom",n.timestamp,this.getCurrentPageUrl()):this.scheduleDeadClick(e,t,{pendingId:"pending_"+n.timestamp+"_"+Math.random().toString(16).slice(2),timestamp:n.timestamp,pageUrl:this.getCurrentPageUrl(),ownerKey:r,node:n.node}))},onEffectiveAction:function(e,t){this.shouldResolveByReason(e,t.reason)&&this.resolvePendingDeadClicks(e,t.reason,t.timestamp,this.getCurrentPageUrl())},scheduleDeadClick:function(t,n,r){var i=this,o=null!=(e=null==(e=n.config.click)?void 0:e.deadClickWindowMs)?e:3e3,e=setTimeout(function(){var e=n.pendingDeadClicks.get(r.pendingId);e&&(n.pendingDeadClicks["delete"](r.pendingId),i.emitDeadClick(t,n,e,o))},o);n.pendingDeadClicks.set(r.pendingId,h(h({},r),{timeout:e}))},emitDeadClick:function(e,t,n,r){var i,o=n.clickEventId?[n.clickEventId]:undefined;null!=(i=e.reportStruggle)&&i.call(e,{type:"dead_click",ownerType:"element",ownerKey:n.ownerKey,pageUrl:n.pageUrl,triggerEventId:n.clickEventId,relatedEventIds:o,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{timeout_ms:r,selector:n.node.selector||""}})},resolvePendingDeadClicks:function(r,i,o,a){void 0===o&&(o=Date.now());var e,s=null!=(e=null==(e=r.config.click)?void 0:e.deadClickWindowMs)?e:3e3;r.pendingDeadClicks.forEach(function(e,t){var n=o-e.timestamp;n<0||s<n||"spa_navigation"!==i&&"page_unload"!==i&&a&&e.pageUrl&&a!==e.pageUrl||(clearTimeout(e.timeout),r.pendingDeadClicks["delete"](t))})},linkPendingDeadClickToClickEvent:function(e,n,r){var i=n.timestamp||Date.now(),o=this.getEventPageUrl(n);e.pendingDeadClicks.forEach(function(e){var t;e.clickEventId||(t=i-e.timestamp)<0||1e3<t||o&&e.pageUrl&&o!==e.pageUrl||(e.clickEventId=n.event_id,r&&"unknown"!==r&&(e.ownerKey=r))})},shouldResolveByReason:function(e,t){e=e.config.click||uO.click;return!1!==e.enabled&&("dom_mutation"===t?!1!==e.resolveOnDomMutation:"spa_navigation"===t?!1!==e.resolveOnSpaNavigation:"external_navigation"===t||"download"===t?!1!==e.resolveOnExternalNavigation:"window_open"===t?!1!==e.resolveOnWindowOpen:"page_unload"===t?!1!==e.resolveOnPageUnload:"form_change"===t||"form_submit"===t?!1!==e.resolveOnFormAction:"api_success"!==t||!1!==e.resolveOnApiSuccess)},shouldIgnoreDeadClick:function(t,e){return qu(e.ignoreDeadClickSelectors||[],e.effectiveActionSelectors||[]).some(function(e){try{return!!e&&!!t.closest(e)}catch(Le){return!1}})},getCurrentPageUrl:function(){return"undefined"==typeof window?"":window.location.href},getEventPageUrl:function(e){return(null==e?void 0:e.page_url)||(null==(e=null==e?void 0:e.data)?void 0:e.page_url)||""},onRageClick:function(e,t,n){var r=n.node.selector||n.node.tagName||"unknown",i=null!=(o=null==(o=t.config.click)?void 0:o.rageClickWindowMs)?o:1e3,o=t.recentClicks.filter(function(e){return n.timestamp-e.timestamp<=i}).map(function(e){return e.eventId}).filter(Boolean).slice(-10),r={type:"rage_click",ownerType:"element",ownerKey:r,pageUrl:window.location.href,triggerEventId:o[0],relatedEventIds:o.length?o:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{clickCount:n.clickCount,timeWindowMs:n.timeWindowMs,selector:n.node.selector||""}};null!=(o=e.reportStruggle)&&o.call(e,r)},onSlowClick:function(e,t,n){},handleEventCreated:function(i,o,e){var t,a=this,s=Date.now(),n=o.config.click||uO.click,r=Math.max(null!=(t=n.errorClickWindowMs)?t:3e3,null!=(t=n.rageClickWindowMs)?t:1e3,null!=(t=n.deadClickWindowMs)?t:3e3);o.recentClicks=o.recentClicks.filter(function(e){return s-e.timestamp<=r}),e.forEach(function(e){var t,n,r;e&&e.event_type!==p.STRUGGLE&&(t=e.timestamp||s,n=a.getEventPageUrl(e),e.event_type===p.CLICK?(r=(null==(r=e.data)?void 0:r.target_element)||(null==(r=e.data)?void 0:r.target_id)||(null==(r=e.data)?void 0:r.target_class)||"unknown",o.recentClicks.push({eventId:e.event_id,timestamp:t,pageUrl:n,ownerKey:r}),a.linkPendingDeadClickToClickEvent(o,e,r)):(a.isEffectiveActionEvent(o,e)&&(a.resolvePendingDeadClicks(o,a.getEffectiveActionReason(e),t,n),null!=(r=o.clickDetector)&&r.markEffectiveAction(a.getEffectiveActionReason(e))),lO.has(e.event_type)?a.tryReportErrorClick(i,o,e):e.event_type===p.PAGE_LOAD||e.event_type===p["true"]?a.tryReportSlowPage(i,o,e):e.event_type===p.FORM_FOCUS?(a.trackFormFocus(o,e),a.trackFormChangeAndZigzag(i,o,e)):e.event_type===p.FORM_CHANGE?a.trackFormChangeAndZigzag(i,o,e):e.event_type===p.FORM_BLUR?a.tryReportLongFocusTime(i,o,e):e.event_type===p.FORM_SUBMIT?a.trackFormSubmitResult(o,e):e.event_type===p.FORM_SUBMIT_RESULT?(a.trackFormSubmitResult(o,e),a.tryReportFormValidationError(i,o,e)):e.event_type===p.PAGE_VIEW&&null!=(n=null==(t=e.data)?void 0:t.event_properties)&&n.navigation_type&&a.tryReportBackForward(i,o,e)),a.tryReportCustomStruggle(i,o,e))})},isEffectiveActionEvent:function(e,t){var n;return!1!==(null==(n=e.config.click)?void 0:n.enabled)&&(t.event_type===p.API_CALL?!1!==(null==(n=e.config.click)?void 0:n.resolveOnApiSuccess):t.event_type===p.PAGE_VIEW&&null!=(n=null==(n=t.data)?void 0:n.event_properties)&&n.navigation_type?!1!==(null==(n=e.config.click)?void 0:n.resolveOnSpaNavigation):cO.has(t.event_type)?!1!==(null==(n=e.config.click)?void 0:n.resolveOnFormAction):!0===(null==(e=t.data)?void 0:e.is_effective_action))},getEffectiveActionReason:function(e){return e.event_type===p.API_CALL?"api_success":e.event_type===p.PAGE_VIEW?"spa_navigation":e.event_type===p.FORM_CHANGE?"form_change":e.event_type===p.FORM_SUBMIT||e.event_type===p.FORM_SUBMIT_RESULT?"form_submit":"custom"},getFormStateKey:function(e,t){return e||t||"unknown_form"},ensureFormState:function(e,t,n){var r=this.getFormStateKey(t,n);return e.formStateMap.has(r)||e.formStateMap.set(r,{formId:t||r,pageUrl:n||"",touchedFieldIds:new Set,requiredFieldIds:new Set,changedFieldIds:new Set,focusPath:[],zigzagHits:0,hasSuccessSubmit:!1,reportedZigzag:!1,reportedUncompleted:!1}),e.formStateMap.get(r)},recordFormTouch:function(e,t){var n,e=this.ensureFormState(e,null==(e=null==t?void 0:t.data)?void 0:e.form_id,null==t?void 0:t.page_url),r=String((null==(r=null==t?void 0:t.data)?void 0:r.field_id)||"");return r&&(e.touchedFieldIds.add(r),!0===(null==(n=t.data)?void 0:n.is_required)&&e.requiredFieldIds.add(r),t.event_type===p.FORM_CHANGE)&&e.changedFieldIds.add(r),null!=t&&t.page_url&&(e.pageUrl=t.page_url),e},trackFormFocus:function(e,t){var n,r=t,i=String((null==(i=null==r?void 0:r.data)?void 0:i.field_id)||"");i&&((n=this.recordFormTouch(e,r)).focusPath.push(i),12<n.focusPath.length&&n.focusPath.shift(),e.focusStartMap.set(i,{timestamp:t.timestamp||Date.now(),eventId:t.event_id,formId:null==(n=null==r?void 0:r.data)?void 0:n.form_id,pageUrl:null==r?void 0:r.page_url}))},trackFormChangeAndZigzag:function(e,t,n){var r,i,o,a,s;n.event_type!==p.FORM_CHANGE?n.event_type!==p.FORM_FOCUS||(s=(i=this.recordFormTouch(t,r=n)).focusPath).length<4||i.reportedZigzag||(o=(s=s.slice(-4))[0],a=s[1],!o)||!a||o===a||o!==s[2]||a!==s[3]||i.changedFieldIds.size<2||(i.zigzagHits+=1,s=null!=(a=null==(o=t.config.form)?void 0:o.zigzagMinCount)?a:2,i.zigzagHits<s)||(i.reportedZigzag=!0,null==(o=e.reportStruggle))||o.call(e,{type:"form_zigzag",ownerType:"form",ownerKey:i.formId,pageUrl:i.pageUrl,formId:i.formId,fieldId:String((null==(a=null==r?void 0:r.data)?void 0:a.field_id)||""),triggerEventId:r.event_id,relatedEventIds:[r.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{zigzag_hits:i.zigzagHits,changed_field_count:i.changedFieldIds.size}}):this.recordFormTouch(t,n)},trackFormSubmitResult:function(e,t){t.event_type!==p.FORM_SUBMIT&&t.event_type!==p.FORM_SUBMIT_RESULT||((e=this.recordFormTouch(e,t)).lastSubmitEventId=t.event_id,t.event_type!==p.FORM_SUBMIT_RESULT)||"success"===(null==(t=null==(t=t.data)?void 0:t.event_properties)?void 0:t.status)&&(e.hasSuccessSubmit=!0)},reportPendingUncompletedForms:function(t,n,r){var i=this;n.formStateMap.forEach(function(e){i.tryReportUncompletedForm(t,n,e,r)})},tryReportUncompletedForm:function(e,t,n,r){var i,o,a,s;n.reportedUncompleted||n.hasSuccessSubmit||0===n.touchedFieldIds.size||(a=0<(o=n.requiredFieldIds.size)?o:n.touchedFieldIds.size)<=0||(a=n.changedFieldIds.size/a)<(s=null!=(s=null==(s=t.config.form)?void 0:s.incompleteMinFieldRatio)?s:.3)||(n.reportedUncompleted=!0,null==(i=e.reportStruggle))||i.call(e,{type:"uncompleted_form",ownerType:"form",ownerKey:n.formId,pageUrl:n.pageUrl,formId:n.formId,triggerEventId:n.lastSubmitEventId,relatedEventIds:n.lastSubmitEventId?[n.lastSubmitEventId]:undefined,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{touched_field_count:n.touchedFieldIds.size,changed_field_count:n.changedFieldIds.size,required_field_count:o,changed_ratio:Number(a.toFixed(4)),threshold_ratio:s}})},tryReportLongFocusTime:function(e,t,n){var r,i,o,a,s=String((null==(s=null==n?void 0:n.data)?void 0:s.field_id)||"");s&&(i=t.focusStartMap.get(s))&&(t.focusStartMap["delete"](s),o=null!=(o=null==(o=t.config.form)?void 0:o.longFocusThresholdMs)?o:2e4,(a=Math.max((n.timestamp||Date.now())-i.timestamp,0))<o||null==(r=e.reportStruggle)||r.call(e,{type:"long_focus_time",ownerType:"field",ownerKey:s,pageUrl:(null==n?void 0:n.page_url)||i.pageUrl,formId:(null==(e=null==n?void 0:n.data)?void 0:e.form_id)||i.formId,fieldId:s,triggerEventId:n.event_id,relatedEventIds:[i.eventId||"",n.event_id].filter(Boolean),detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{focus_duration_ms:a,threshold_ms:o}}))},tryReportErrorClick:function(e,t,n){var r,i,o;t.recentClicks.length&&(i=null!=(o=(t.config.click||uO.click).errorClickWindowMs)?o:3e3,o=qu(t.recentClicks).reverse().find(function(e){return 0<=n.timestamp-e.timestamp&&n.timestamp-e.timestamp<=i}))&&null!=(r=e.reportStruggle)&&r.call(e,{type:"error_click",ownerType:"element",ownerKey:o.ownerKey,pageUrl:o.pageUrl||n.page_url,triggerEventId:o.eventId,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{errorEventType:n.event_type}})},tryReportSlowPage:function(e,t,n){var r,i,o,a=t.config.performance||uO.performance;a.enabled&&(i=(null==(i=n.data)?void 0:i.measurements)||{},r=Number(i.lcp||0),i=Number(i.inp||0),o=null!=(o=a.slowPageLcpThreshold)?o:4e3,a=null!=(a=a.slowPageInpThreshold)?a:500,o<=r||a<=i)&&null!=(o=e.reportStruggle)&&o.call(e,{type:"slow_page",ownerType:"page",ownerKey:n.page_url||("undefined"!=typeof window?window.location.href:""),pageUrl:n.page_url,triggerEventId:n.event_id,detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{lcp:r,inp:i,sourceEventType:n.event_type}})},tryReportFormValidationError:function(e,t,n){var r,i,o,a,s=(null==(s=null==n?void 0:n.data)?void 0:s.event_properties)||{},u=(null==n?void 0:n.data)||{};"fail"===String((null==s?void 0:s.status)||(null===(i=u)?void 0:i.status)||"")&&(i=String((null==s?void 0:s.field_id)||(null===(i=u)?void 0:i.field_id)||""),o=String((null==s?void 0:s.form_id)||(null===(o=u)?void 0:o.form_id)||""),a=i||o||(null==n?void 0:n.page_url)||"unknown",null!=(r=e.reportStruggle))&&r.call(e,{type:"form_validation_error",ownerType:i?"field":"form",ownerKey:a,pageUrl:null==n?void 0:n.page_url,formId:o,fieldId:i,triggerEventId:n.event_id,relatedEventIds:[n.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{validation_code:(null==s?void 0:s.validation_code)||(null===(e=u)?void 0:e.validation_code),validation_message:null==(a=null==n?void 0:n.data)?void 0:a.validation_message,sourceEventType:n.event_type}})},tryReportBackForward:function(e,t,n){var r,i,o=t.config.navigation||uO.navigation;o.enabled&&o.backForwardAsStruggle&&(n=null==(n=null==(o=n)?void 0:o.data)?void 0:n.event_properties,"back"!==(i=String((null==n?void 0:n.navigation_type)||""))&&"forward"!==i||null==(r=e.reportStruggle)||r.call(e,{type:"back_forward",ownerType:"page",ownerKey:String((null==n?void 0:n.to_page)||"")||(null==o?void 0:o.page_url)||"unknown",pageUrl:null==o?void 0:o.page_url,triggerEventId:o.event_id,relatedEventIds:[o.event_id],detectionSource:"rule_engine",ruleVersion:t.config.ruleVersion,payloadAllowlist:t.config.payloadAllowlist,payload:{navigation_type:i,from_page:null==n?void 0:n.from_page,to_page:null==n?void 0:n.to_page}}))},tryReportCustomStruggle:function(n,r,i){var e=r.config.custom||uO.custom;e.enabled&&"function"==typeof e.detector&&(e=e.detector({event:i,tdem:n}),(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){var t,e=h(h({},e),{type:(null==e?void 0:e.type)||"custom_struggle",ownerType:(null==e?void 0:e.ownerType)||"app",ownerKey:(null==e?void 0:e.ownerKey)||i.page_url||"custom",ruleVersion:(null==e?void 0:e.ruleVersion)||r.config.ruleVersion,payloadAllowlist:(null==e?void 0:e.payloadAllowlist)||r.config.payloadAllowlist,detectionSource:(null==e?void 0:e.detectionSource)||"custom"});null!=(t=n.reportStruggle)&&t.call(n,e)}))},cleanupInstance:function(e){var t=this.instanceStates.get(e);t&&(t.onEventCreated&&e.lifeCycle.remove("tdemEventCreated",t.onEventCreated),t.onDestroy&&e.lifeCycle.remove("destroy",t.onDestroy),t.clickDetector&&t.clickDetector.stop(),t.pendingDeadClicks.forEach(function(e){clearTimeout(e.timeout)}),t.pendingDeadClicks.clear(),this.reportPendingUncompletedForms(e,t,"destroy"),t.focusStartMap.clear(),t.formStateMap.clear(),t.removeDomListeners.forEach(function(e){return e()}),t.removeDomListeners=[],this.instanceStates["delete"](e),0===this.instanceStates.size)&&this.restoreWindowOpenHook()},destroy:function(){var n=this;this.instanceStates.forEach(function(e,t){n.cleanupInstance(t)}),this.instanceStates.clear(),this.restoreWindowOpenHook()}}));function fO(e,t,n){try{var r={projectKey:e,sampleRate:t,replaySampleRate:n,timestamp:Date.now()};localStorage.setItem("TDEM_SAMPLE_CONFIG",JSON.stringify(r))}catch(jy){}}function dO(e){return e._tdemSampleGate||null}function hO(e,t,n){e=dO(e);e?!n||t<=0?e.decide(!1):100<=t?e.decide(!0):(n=100*Math.random()<t,e.decide(n)):console.warn("[TDEM] Sample gate not found")}function pO(e,t){var n=dO(e);!(n&&n.isDecided&&n.isSampled)||t<=0?e._replaySampled=!1:100<=t?e._replaySampled=!0:(n=100*Math.random(),e._replaySampled=n<t)}function gO(e,t){var n;t!==undefined&&null!==t&&"function"==typeof(n=null==(n=null==(e=null==(n=null==(e=e.constructor.installedPlugins)?void 0:e.find)?void 0:n.call(e,function(e){return e&&"sessionReplay"===e.name}))?void 0:e.option)?void 0:n.setErrorOnlyUpload)&&n.call(e.option,!!t)}function mO(e,t,n){var r=dO(e);r&&((t=t?function(e){try{var t,n=localStorage.getItem("TDEM_SAMPLE_CONFIG");return n?(t=JSON.parse(n)).projectKey===e&&Date.now()-t.timestamp<6048e5?t:null:null}catch(jy){return null}}(t):null)?(console.info("[TDEM] Using cached config, sampleRate:",t.sampleRate,"replaySampleRate:",t.replaySampleRate),n._cachedSampleRate=t.sampleRate,n._cachedReplaySampleRate=t.replaySampleRate,hO(e,t.sampleRate,0<t.sampleRate),pO(e,t.replaySampleRate)):(console.warn("[TDEM] No cached config, default to not report"),r.decide(!1),e._replaySampled=!1))}In=new r({name:"tdemConfig",_cachedSampleRate:null,_cachedReplaySampleRate:null,onNewTdem:function(e){var t=this;!function(l,c){var f;Wu(this,void 0,void 0,function(){var n,r,i,o,a,s,u;return Hu(this,function(e){switch(e.label){case 0:if(!(n=l.config.id))return mO(l,n,c),[2];if(r=l._prefetchedConfigData)return delete l._prefetchedConfigData,i=r.tdem_sample_rate,o=null!=(f=r.replay_sample_rate)?f:1,a=r.enabled,s=r.error_only_upload,fO(n,i,o),c._cachedSampleRate=i,c._cachedReplaySampleRate=o,hO(l,i,a),pO(l,o),gO(l,s),[2];if(t=(l.config.url||"").replace(/\/+$/,""),!(r=t?t+"/api/v1/config":""))return mO(l,n,c),[2];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,l.transportRequest({kind:"config",url:r,method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_key:n})})];case 2:if(!(u=e.sent()).ok)throw new Error("HTTP "+u.status);if(0===(u="string"==typeof u.body?JSON.parse(u.body):u.body).code&&u.data)return i=u.data.tdem_sample_rate,o=null!=(f=u.data.replay_sample_rate)?f:1,a=u.data.enabled,s=u.data.error_only_upload,fO(n,i,o),c._cachedSampleRate=i,c._cachedReplaySampleRate=o,hO(l,i,a),pO(l,o),gO(l,s),[3,4];throw new Error("API error: code="+u.code);case 3:return u=e.sent(),console.warn("[TDEM] Failed to fetch remote config:",u),mO(l,n,c),[3,4];case 4:return[2]}var t})})}(e,this),e.lifeCycle.on("sessionRefreshed",function(){t.onSessionRefreshed(e)})},onSessionRefreshed:function(e){var t,n=dO(e);n&&n.isDecided&&null!==(t=this._cachedSampleRate)&&t!==undefined&&((t=n.reDecide(t))?pO(e,null!=(n=this._cachedReplaySampleRate)?n:1):e._replaySampled=!1,console.info("[TDEM] Session refreshed, session="+t+", replay="+e._replaySampled))}});return em.use(of),em.use(yf),em.use(gt),em.use(t),em.use(rn),em.use(_t),em.use(n),em.use(yt),em.use(af),em.use(Rf),em.use(gf),em.use(Te),em.use(lt),em.use(mf),em.use(In),em});