您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
一个网页调试的脚本做成的库
当前为
此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.greasyfork.icu/scripts/483696/1497766/PageSpy-2.js
/** * 初始化PageSpy * @time 2024-12-06 * @version 2.0.1 * @link https://fastly.jsdelivr.net/npm/@huolala-tech/page-spy-browser */ /* prettier-ignore */ class initPageSpy { constructor(window = globalThis || self) { return function(){"use strict";function e(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function t(t,n,r){return(n=e(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=function(e){return e&&e.Math==Math&&e},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof n&&n)||function(){return this}()||n||Function("return this")(),a={},s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=l,d=Function.prototype.call,f=u?d.bind(d):function(){return d.apply(d,arguments)},h={},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,m=g&&!p.call({1:2},1);h.f=m?function(e){var t=g(this,e);return!!t&&t.enumerable}:p;var y,v,A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=l,w=Function.prototype,S=w.call,E=b&&w.bind.bind(S,S),x=b?E:function(e){return function(){return S.apply(e,arguments)}},k=x,T=k({}.toString),P=k("".slice),L=function(e){return P(T(e),8,-1)},R=s,I=L,C=Object,O=x("".split),B=R((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==I(e)?O(e,""):C(e)}:C,D=function(e){return null==e},j=D,M=TypeError,U=function(e){if(j(e))throw M("Can't call method on "+e);return e},q=B,N=U,F=function(e){return q(N(e))},H="object"==typeof document&&document.all,_={all:H,IS_HTMLDDA:void 0===H&&void 0!==H},z=_.all,Q=_.IS_HTMLDDA?function(e){return"function"==typeof e||e===z}:function(e){return"function"==typeof e},W=Q,G=_.all,V=_.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:W(e)||e===G}:function(e){return"object"==typeof e?null!==e:W(e)},$=i,J=Q,X=function(e,t){return arguments.length<2?(n=$[e],J(n)?n:void 0):$[e]&&$[e][t];var n},K=x({}.isPrototypeOf),Y=i,Z="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ee=Y.process,te=Y.Deno,ne=ee&&ee.versions||te&&te.version,re=ne&&ne.v8;re&&(v=(y=re.split("."))[0]>0&&y[0]<4?1:+(y[0]+y[1])),!v&&Z&&(!(y=Z.match(/Edge\/(\d+)/))||y[1]>=74)&&(y=Z.match(/Chrome\/(\d+)/))&&(v=+y[1]);var oe=v,ie=oe,ae=s,se=i.String,ce=!!Object.getOwnPropertySymbols&&!ae((function(){var e=Symbol();return!se(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ie&&ie<41})),le=ce&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ue=X,de=Q,fe=K,he=Object,pe=le?function(e){return"symbol"==typeof e}:function(e){var t=ue("Symbol");return de(t)&&fe(t.prototype,he(e))},ge=String,me=function(e){try{return ge(e)}catch(e){return"Object"}},ye=Q,ve=me,Ae=TypeError,be=function(e){if(ye(e))return e;throw Ae(ve(e)+" is not a function")},we=be,Se=D,Ee=function(e,t){var n=e[t];return Se(n)?void 0:we(n)},xe=f,ke=Q,Te=V,Pe=TypeError,Le={exports:{}},Re=i,Ie=Object.defineProperty,Ce=function(e,t){try{Ie(Re,e,{value:t,configurable:!0,writable:!0})}catch(n){Re[e]=t}return t},Oe=Ce,Be="__core-js_shared__",De=i[Be]||Oe(Be,{}),je=De;(Le.exports=function(e,t){return je[e]||(je[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.30.2",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Me=Le.exports,Ue=U,qe=Object,Ne=function(e){return qe(Ue(e))},Fe=Ne,He=x({}.hasOwnProperty),_e=Object.hasOwn||function(e,t){return He(Fe(e),t)},ze=x,Qe=0,We=Math.random(),Ge=ze(1..toString),Ve=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Ge(++Qe+We,36)},$e=Me,Je=_e,Xe=Ve,Ke=ce,Ye=le,Ze=i.Symbol,et=$e("wks"),tt=Ye?Ze.for||Ze:Ze&&Ze.withoutSetter||Xe,nt=function(e){return Je(et,e)||(et[e]=Ke&&Je(Ze,e)?Ze[e]:tt("Symbol."+e)),et[e]},rt=f,ot=V,it=pe,at=Ee,st=function(e,t){var n,r;if("string"===t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;if(ke(n=e.valueOf)&&!Te(r=xe(n,e)))return r;if("string"!==t&&ke(n=e.toString)&&!Te(r=xe(n,e)))return r;throw Pe("Can't convert object to primitive value")},ct=TypeError,lt=nt("toPrimitive"),ut=function(e,t){if(!ot(e)||it(e))return e;var n,r=at(e,lt);if(r){if(void 0===t&&(t="default"),n=rt(r,e,t),!ot(n)||it(n))return n;throw ct("Can't convert object to primitive value")}return void 0===t&&(t="number"),st(e,t)},dt=pe,ft=function(e){var t=ut(e,"string");return dt(t)?t:t+""},ht=V,pt=i.document,gt=ht(pt)&&ht(pt.createElement),mt=function(e){return gt?pt.createElement(e):{}},yt=mt,vt=!c&&!s((function(){return 7!=Object.defineProperty(yt("div"),"a",{get:function(){return 7}}).a})),At=c,bt=f,wt=h,St=A,Et=F,xt=ft,kt=_e,Tt=vt,Pt=Object.getOwnPropertyDescriptor;a.f=At?Pt:function(e,t){if(e=Et(e),t=xt(t),Tt)try{return Pt(e,t)}catch(e){}if(kt(e,t))return St(!bt(wt.f,e,t),e[t])};var Lt={},Rt=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),It=V,Ct=String,Ot=TypeError,Bt=function(e){if(It(e))return e;throw Ot(Ct(e)+" is not an object")},Dt=c,jt=vt,Mt=Rt,Ut=Bt,qt=ft,Nt=TypeError,Ft=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,_t="enumerable",zt="configurable",Qt="writable";Lt.f=Dt?Mt?function(e,t,n){if(Ut(e),t=qt(t),Ut(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Qt in n&&!n[Qt]){var r=Ht(e,t);r&&r[Qt]&&(e[t]=n.value,n={configurable:zt in n?n[zt]:r[zt],enumerable:_t in n?n[_t]:r[_t],writable:!1})}return Ft(e,t,n)}:Ft:function(e,t,n){if(Ut(e),t=qt(t),Ut(n),jt)try{return Ft(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Nt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var Wt=Lt,Gt=A,Vt=c?function(e,t,n){return Wt.f(e,t,Gt(1,n))}:function(e,t,n){return e[t]=n,e},$t={exports:{}},Jt=c,Xt=_e,Kt=Function.prototype,Yt=Jt&&Object.getOwnPropertyDescriptor,Zt=Xt(Kt,"name"),en={EXISTS:Zt,PROPER:Zt&&"something"===function(){}.name,CONFIGURABLE:Zt&&(!Jt||Jt&&Yt(Kt,"name").configurable)},tn=Q,nn=De,rn=x(Function.toString);tn(nn.inspectSource)||(nn.inspectSource=function(e){return rn(e)});var on,an,sn,cn=nn.inspectSource,ln=Q,un=i.WeakMap,dn=ln(un)&&/native code/.test(String(un)),fn=Ve,hn=Me("keys"),pn=function(e){return hn[e]||(hn[e]=fn(e))},gn={},mn=dn,yn=i,vn=V,An=Vt,bn=_e,wn=De,Sn=pn,En=gn,xn="Object already initialized",kn=yn.TypeError,Tn=yn.WeakMap;if(mn||wn.state){var Pn=wn.state||(wn.state=new Tn);Pn.get=Pn.get,Pn.has=Pn.has,Pn.set=Pn.set,on=function(e,t){if(Pn.has(e))throw kn(xn);return t.facade=e,Pn.set(e,t),t},an=function(e){return Pn.get(e)||{}},sn=function(e){return Pn.has(e)}}else{var Ln=Sn("state");En[Ln]=!0,on=function(e,t){if(bn(e,Ln))throw kn(xn);return t.facade=e,An(e,Ln,t),t},an=function(e){return bn(e,Ln)?e[Ln]:{}},sn=function(e){return bn(e,Ln)}}var Rn={set:on,get:an,has:sn,enforce:function(e){return sn(e)?an(e):on(e,{})},getterFor:function(e){return function(t){var n;if(!vn(t)||(n=an(t)).type!==e)throw kn("Incompatible receiver, "+e+" required");return n}}},In=x,Cn=s,On=Q,Bn=_e,Dn=c,jn=en.CONFIGURABLE,Mn=cn,Un=Rn.enforce,qn=Rn.get,Nn=String,Fn=Object.defineProperty,Hn=In("".slice),_n=In("".replace),zn=In([].join),Qn=Dn&&!Cn((function(){return 8!==Fn((function(){}),"length",{value:8}).length})),Wn=String(String).split("String"),Gn=$t.exports=function(e,t,n){"Symbol("===Hn(Nn(t),0,7)&&(t="["+_n(Nn(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!Bn(e,"name")||jn&&e.name!==t)&&(Dn?Fn(e,"name",{value:t,configurable:!0}):e.name=t),Qn&&n&&Bn(n,"arity")&&e.length!==n.arity&&Fn(e,"length",{value:n.arity});try{n&&Bn(n,"constructor")&&n.constructor?Dn&&Fn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Un(e);return Bn(r,"source")||(r.source=zn(Wn,"string"==typeof t?t:"")),e};Function.prototype.toString=Gn((function(){return On(this)&&qn(this).source||Mn(this)}),"toString");var Vn=$t.exports,$n=Q,Jn=Lt,Xn=Vn,Kn=Ce,Yn=function(e,t,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:t;if($n(n)&&Xn(n,i,r),r.global)o?e[t]=n:Kn(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:Jn.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Zn={},er=Math.ceil,tr=Math.floor,nr=Math.trunc||function(e){var t=+e;return(t>0?tr:er)(t)},rr=function(e){var t=+e;return t!=t||0===t?0:nr(t)},or=rr,ir=Math.max,ar=Math.min,sr=function(e,t){var n=or(e);return n<0?ir(n+t,0):ar(n,t)},cr=rr,lr=Math.min,ur=function(e){return e>0?lr(cr(e),9007199254740991):0},dr=ur,fr=function(e){return dr(e.length)},hr=F,pr=sr,gr=fr,mr=function(e){return function(t,n,r){var o,i=hr(t),a=gr(i),s=pr(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},yr={includes:mr(!0),indexOf:mr(!1)},vr=_e,Ar=F,br=yr.indexOf,wr=gn,Sr=x([].push),Er=function(e,t){var n,r=Ar(e),o=0,i=[];for(n in r)!vr(wr,n)&&vr(r,n)&&Sr(i,n);for(;t.length>o;)vr(r,n=t[o++])&&(~br(i,n)||Sr(i,n));return i},xr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kr=Er,Tr=xr.concat("length","prototype");Zn.f=Object.getOwnPropertyNames||function(e){return kr(e,Tr)};var Pr={};Pr.f=Object.getOwnPropertySymbols;var Lr=X,Rr=Zn,Ir=Pr,Cr=Bt,Or=x([].concat),Br=Lr("Reflect","ownKeys")||function(e){var t=Rr.f(Cr(e)),n=Ir.f;return n?Or(t,n(e)):t},Dr=_e,jr=Br,Mr=a,Ur=Lt,qr=function(e,t,n){for(var r=jr(t),o=Ur.f,i=Mr.f,a=0;a<r.length;a++){var s=r[a];Dr(e,s)||n&&Dr(n,s)||o(e,s,i(t,s))}},Nr=s,Fr=Q,Hr=/#|\.prototype\./,_r=function(e,t){var n=Qr[zr(e)];return n==Gr||n!=Wr&&(Fr(t)?Nr(t):!!t)},zr=_r.normalize=function(e){return String(e).replace(Hr,".").toLowerCase()},Qr=_r.data={},Wr=_r.NATIVE="N",Gr=_r.POLYFILL="P",Vr=_r,$r=i,Jr=a.f,Xr=Vt,Kr=Yn,Yr=Ce,Zr=qr,eo=Vr,to=function(e,t){var n,r,o,i,a,s=e.target,c=e.global,l=e.stat;if(n=c?$r:l?$r[s]||Yr(s,{}):($r[s]||{}).prototype)for(r in t){if(i=t[r],o=e.dontCallGetSet?(a=Jr(n,r))&&a.value:n[r],!eo(c?r:s+(l?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Zr(i,o)}(e.sham||o&&o.sham)&&Xr(i,"sham",!0),Kr(n,r,i,e)}},no=L,ro=Array.isArray||function(e){return"Array"==no(e)},oo=c,io=ro,ao=TypeError,so=Object.getOwnPropertyDescriptor,co=oo&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),lo=TypeError,uo=Ne,fo=fr,ho=co?function(e,t){if(io(e)&&!so(e,"length").writable)throw ao("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},po=function(e){if(e>9007199254740991)throw lo("Maximum allowed index exceeded");return e};to({target:"Array",proto:!0,arity:1,forced:s((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=uo(this),n=fo(t),r=arguments.length;po(n+r);for(var o=0;o<r;o++)t[n]=arguments[o],n++;return ho(t,n),n}});var go=l,mo=Function.prototype,yo=mo.apply,vo=mo.call,Ao="object"==typeof Reflect&&Reflect.apply||(go?vo.bind(yo):function(){return vo.apply(yo,arguments)}),bo=x([].slice),wo={};wo[nt("toStringTag")]="z";var So="[object z]"===String(wo),Eo=Q,xo=L,ko=nt("toStringTag"),To=Object,Po="Arguments"==xo(function(){return arguments}()),Lo=So?xo:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=To(e),ko))?n:Po?xo(t):"Object"==(r=xo(t))&&Eo(t.callee)?"Arguments":r},Ro=Lo,Io=String,Co=function(e){if("Symbol"===Ro(e))throw TypeError("Cannot convert a Symbol value to a string");return Io(e)},Oo=ro,Bo=Q,Do=L,jo=Co,Mo=x([].push),Uo=to,qo=X,No=Ao,Fo=f,Ho=x,_o=s,zo=Q,Qo=pe,Wo=bo,Go=function(e){if(Bo(e))return e;if(Oo(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?Mo(n,o):"number"!=typeof o&&"Number"!=Do(o)&&"String"!=Do(o)||Mo(n,jo(o))}var i=n.length,a=!0;return function(e,t){if(a)return a=!1,t;if(Oo(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}},Vo=ce,$o=String,Jo=qo("JSON","stringify"),Xo=Ho(/./.exec),Ko=Ho("".charAt),Yo=Ho("".charCodeAt),Zo=Ho("".replace),ei=Ho(1..toString),ti=/[\uD800-\uDFFF]/g,ni=/^[\uD800-\uDBFF]$/,ri=/^[\uDC00-\uDFFF]$/,oi=!Vo||_o((function(){var e=qo("Symbol")();return"[null]"!=Jo([e])||"{}"!=Jo({a:e})||"{}"!=Jo(Object(e))})),ii=_o((function(){return'"\\udf06\\ud834"'!==Jo("\udf06\ud834")||'"\\udead"'!==Jo("\udead")})),ai=function(e,t){var n=Wo(arguments),r=Go(t);if(zo(r)||void 0!==e&&!Qo(e))return n[1]=function(e,t){if(zo(r)&&(t=Fo(r,this,$o(e),t)),!Qo(t))return t},No(Jo,null,n)},si=function(e,t,n){var r=Ko(n,t-1),o=Ko(n,t+1);return Xo(ni,e)&&!Xo(ri,o)||Xo(ri,e)&&!Xo(ni,r)?"\\u"+ei(Yo(e,0),16):e};Jo&&Uo({target:"JSON",stat:!0,arity:3,forced:oi||ii},{stringify:function(e,t,n){var r=Wo(arguments),o=No(oi?ai:Jo,null,r);return ii&&"string"==typeof o?Zo(o,ti,si):o}});var ci=mt("span").classList,li=ci&&ci.constructor&&ci.constructor.prototype,ui=li===Object.prototype?void 0:li,di={},fi=Er,hi=xr,pi=Object.keys||function(e){return fi(e,hi)},gi=c,mi=Rt,yi=Lt,vi=Bt,Ai=F,bi=pi;di.f=gi&&!mi?Object.defineProperties:function(e,t){vi(e);for(var n,r=Ai(t),o=bi(t),i=o.length,a=0;i>a;)yi.f(e,n=o[a++],r[n]);return e};var wi,Si=X("document","documentElement"),Ei=Bt,xi=di,ki=xr,Ti=gn,Pi=Si,Li=mt,Ri="prototype",Ii="script",Ci=pn("IE_PROTO"),Oi=function(){},Bi=function(e){return"<"+Ii+">"+e+"</"+Ii+">"},Di=function(e){e.write(Bi("")),e.close();var t=e.parentWindow.Object;return e=null,t},ji=function(){try{wi=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;ji="undefined"!=typeof document?document.domain&&wi?Di(wi):(t=Li("iframe"),n="java"+Ii+":",t.style.display="none",Pi.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(Bi("document.F=Object")),e.close(),e.F):Di(wi);for(var r=ki.length;r--;)delete ji[Ri][ki[r]];return ji()};Ti[Ci]=!0;var Mi=Object.create||function(e,t){var n;return null!==e?(Oi[Ri]=Ei(e),n=new Oi,Oi[Ri]=null,n[Ci]=e):n=ji(),void 0===t?n:xi.f(n,t)},Ui=nt,qi=Mi,Ni=Lt.f,Fi=Ui("unscopables"),Hi=Array.prototype;null==Hi[Fi]&&Ni(Hi,Fi,{configurable:!0,value:qi(null)});var _i,zi,Qi,Wi={},Gi=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Vi=_e,$i=Q,Ji=Ne,Xi=Gi,Ki=pn("IE_PROTO"),Yi=Object,Zi=Yi.prototype,ea=Xi?Yi.getPrototypeOf:function(e){var t=Ji(e);if(Vi(t,Ki))return t[Ki];var n=t.constructor;return $i(n)&&t instanceof n?n.prototype:t instanceof Yi?Zi:null},ta=s,na=Q,ra=V,oa=ea,ia=Yn,aa=nt("iterator"),sa=!1;[].keys&&("next"in(Qi=[].keys())?(zi=oa(oa(Qi)))!==Object.prototype&&(_i=zi):sa=!0);var ca=!ra(_i)||ta((function(){var e={};return _i[aa].call(e)!==e}));ca&&(_i={}),na(_i[aa])||ia(_i,aa,(function(){return this}));var la={IteratorPrototype:_i,BUGGY_SAFARI_ITERATORS:sa},ua=Lt.f,da=_e,fa=nt("toStringTag"),ha=function(e,t,n){e&&!n&&(e=e.prototype),e&&!da(e,fa)&&ua(e,fa,{configurable:!0,value:t})},pa=la.IteratorPrototype,ga=Mi,ma=A,ya=ha,va=Wi,Aa=function(){return this},ba=function(e,t,n,r){var o=t+" Iterator";return e.prototype=ga(pa,{next:ma(+!r,n)}),ya(e,o,!1),va[o]=Aa,e},wa=x,Sa=be,Ea=function(e,t,n){try{return wa(Sa(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}},xa=Q,ka=String,Ta=TypeError,Pa=Ea,La=Bt,Ra=function(e){if("object"==typeof e||xa(e))return e;throw Ta("Can't set "+ka(e)+" as a prototype")},Ia=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Pa(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return La(n),Ra(r),t?e(n,r):n.__proto__=r,n}}():void 0),Ca=to,Oa=f,Ba=Q,Da=ba,ja=ea,Ma=Ia,Ua=ha,qa=Vt,Na=Yn,Fa=Wi,Ha=en.PROPER,_a=en.CONFIGURABLE,za=la.IteratorPrototype,Qa=la.BUGGY_SAFARI_ITERATORS,Wa=nt("iterator"),Ga="keys",Va="values",$a="entries",Ja=function(){return this},Xa=function(e,t,n,r,o,i,a){Da(n,t,r);var s,c,l,u=function(e){if(e===o&&g)return g;if(!Qa&&e in h)return h[e];switch(e){case Ga:case Va:case $a:return function(){return new n(this,e)}}return function(){return new n(this)}},d=t+" Iterator",f=!1,h=e.prototype,p=h[Wa]||h["@@iterator"]||o&&h[o],g=!Qa&&p||u(o),m="Array"==t&&h.entries||p;if(m&&(s=ja(m.call(new e)))!==Object.prototype&&s.next&&(ja(s)!==za&&(Ma?Ma(s,za):Ba(s[Wa])||Na(s,Wa,Ja)),Ua(s,d,!0)),Ha&&o==Va&&p&&p.name!==Va&&(_a?qa(h,"name",Va):(f=!0,g=function(){return Oa(p,this)})),o)if(c={values:u(Va),keys:i?g:u(Ga),entries:u($a)},a)for(l in c)(Qa||f||!(l in h))&&Na(h,l,c[l]);else Ca({target:t,proto:!0,forced:Qa||f},c);return h[Wa]!==g&&Na(h,Wa,g,{name:o}),Fa[t]=g,c},Ka=function(e,t){return{value:e,done:t}},Ya=F,Za=function(e){Hi[Fi][e]=!0},es=Wi,ts=Rn,ns=Lt.f,rs=Xa,os=Ka,is=c,as="Array Iterator",ss=ts.set,cs=ts.getterFor(as),ls=rs(Array,"Array",(function(e,t){ss(this,{type:as,target:Ya(e),index:0,kind:t})}),(function(){var e=cs(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,os(void 0,!0)):os("keys"==n?r:"values"==n?t[r]:[r,t[r]],!1)}),"values"),us=es.Arguments=es.Array;if(Za("keys"),Za("values"),Za("entries"),is&&"values"!==us.name)try{ns(us,"name",{value:"values"})}catch(e){}var ds=i,fs={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},hs=ui,ps=ls,gs=Vt,ms=nt,ys=ms("iterator"),vs=ms("toStringTag"),As=ps.values,bs=function(e,t){if(e){if(e[ys]!==As)try{gs(e,ys,As)}catch(t){e[ys]=As}if(e[vs]||gs(e,vs,t),fs[t])for(var n in ps)if(e[n]!==ps[n])try{gs(e,n,ps[n])}catch(t){e[n]=ps[n]}}};for(var ws in fs)bs(ds[ws]&&ds[ws].prototype,ws);bs(hs,"DOMTokenList");var Ss=Lt.f,Es=Q,xs=V,ks=Ia,Ts=Co,Ps=V,Ls=Vt,Rs=Error,Is=x("".replace),Cs=String(Rs("zxcasd").stack),Os=/\n\s*at [^:]*:[^\n]*/,Bs=Os.test(Cs),Ds=A,js=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",Ds(1,7)),7!==e.stack)})),Ms=Vt,Us=function(e,t){if(Bs&&"string"==typeof e&&!Rs.prepareStackTrace)for(;t--;)e=Is(e,Os,"");return e},qs=js,Ns=Error.captureStackTrace,Fs=X,Hs=_e,_s=Vt,zs=K,Qs=Ia,Ws=qr,Gs=function(e,t,n){n in e||Ss(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})},Vs=function(e,t,n){var r,o;return ks&&Es(r=t.constructor)&&r!==n&&xs(o=r.prototype)&&o!==n.prototype&&ks(e,o),e},$s=function(e,t){return void 0===e?arguments.length<2?"":t:Ts(e)},Js=function(e,t){Ps(t)&&"cause"in t&&Ls(e,"cause",t.cause)},Xs=function(e,t,n,r){qs&&(Ns?Ns(e,t):Ms(e,"stack",Us(n,r)))},Ks=c,Ys=to,Zs=Ao,ec=function(e,t,n,r){var o="stackTraceLimit",i=r?2:1,a=e.split("."),s=a[a.length-1],c=Fs.apply(null,a);if(c){var l=c.prototype;if(Hs(l,"cause")&&delete l.cause,!n)return c;var u=Fs("Error"),d=t((function(e,t){var n=$s(r?t:e,void 0),o=r?new c(e):new c;return void 0!==n&&_s(o,"message",n),Xs(o,d,o.stack,2),this&&zs(l,this)&&Vs(o,this,d),arguments.length>i&&Js(o,arguments[i]),o}));d.prototype=l,"Error"!==s?Qs?Qs(d,u):Ws(d,u,{name:!0}):Ks&&o in c&&(Gs(d,c,o),Gs(d,c,"prepareStackTrace")),Ws(d,c);try{l.name!==s&&_s(l,"name",s),l.constructor=d}catch(e){}return d}},tc="WebAssembly",nc=i[tc],rc=7!==Error("e",{cause:7}).cause,oc=function(e,t){var n={};n[e]=ec(e,t,rc),Ys({global:!0,constructor:!0,arity:1,forced:rc},n)},ic=function(e,t){if(nc&&nc[e]){var n={};n[e]=ec(tc+"."+e,t,rc),Ys({target:tc,stat:!0,constructor:!0,arity:1,forced:rc},n)}};oc("Error",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("EvalError",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("RangeError",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("ReferenceError",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("SyntaxError",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("TypeError",(function(e){return function(t){return Zs(e,this,arguments)}})),oc("URIError",(function(e){return function(t){return Zs(e,this,arguments)}})),ic("CompileError",(function(e){return function(t){return Zs(e,this,arguments)}})),ic("LinkError",(function(e){return function(t){return Zs(e,this,arguments)}})),ic("RuntimeError",(function(e){return function(t){return Zs(e,this,arguments)}}));var ac,sc,cc=Bt,lc=s,uc=i.RegExp,dc=lc((function(){var e=uc("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),fc=dc||lc((function(){return!uc("a","y").sticky})),hc={BROKEN_CARET:dc||lc((function(){var e=uc("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:fc,UNSUPPORTED_Y:dc},pc=s,gc=i.RegExp,mc=pc((function(){var e=gc(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),yc=s,vc=i.RegExp,Ac=yc((function(){var e=vc("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),bc=f,wc=x,Sc=Co,Ec=function(){var e=cc(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},xc=hc,kc=Mi,Tc=Rn.get,Pc=mc,Lc=Ac,Rc=Me("native-string-replace",String.prototype.replace),Ic=RegExp.prototype.exec,Cc=Ic,Oc=wc("".charAt),Bc=wc("".indexOf),Dc=wc("".replace),jc=wc("".slice),Mc=(sc=/b*/g,bc(Ic,ac=/a/,"a"),bc(Ic,sc,"a"),0!==ac.lastIndex||0!==sc.lastIndex),Uc=xc.BROKEN_CARET,qc=void 0!==/()??/.exec("")[1];(Mc||qc||Uc||Pc||Lc)&&(Cc=function(e){var t,n,r,o,i,a,s,c=this,l=Tc(c),u=Sc(e),d=l.raw;if(d)return d.lastIndex=c.lastIndex,t=bc(Cc,d,u),c.lastIndex=d.lastIndex,t;var f=l.groups,h=Uc&&c.sticky,p=bc(Ec,c),g=c.source,m=0,y=u;if(h&&(p=Dc(p,"y",""),-1===Bc(p,"g")&&(p+="g"),y=jc(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Oc(u,c.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,m++),n=new RegExp("^(?:"+g+")",p)),qc&&(n=new RegExp("^"+g+"$(?!\\s)",p)),Mc&&(r=c.lastIndex),o=bc(Ic,h?n:c,y),h?o?(o.input=jc(o.input,m),o[0]=jc(o[0],m),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Mc&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),qc&&o&&o.length>1&&bc(Rc,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&f)for(o.groups=a=kc(null),i=0;i<f.length;i++)a[(s=f[i])[0]]=o[s[1]];return o});var Nc=Cc;to({target:"RegExp",proto:!0,forced:/./.exec!==Nc},{exec:Nc});var Fc=L,Hc=x,_c=function(e){if("Function"===Fc(e))return Hc(e)},zc=_c,Qc=Yn,Wc=Nc,Gc=s,Vc=nt,$c=Vt,Jc=Vc("species"),Xc=RegExp.prototype,Kc=x,Yc=rr,Zc=Co,el=U,tl=Kc("".charAt),nl=Kc("".charCodeAt),rl=Kc("".slice),ol=function(e){return function(t,n){var r,o,i=Zc(el(t)),a=Yc(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=nl(i,a))<55296||r>56319||a+1===s||(o=nl(i,a+1))<56320||o>57343?e?tl(i,a):r:e?rl(i,a,a+2):o-56320+(r-55296<<10)+65536}},il={codeAt:ol(!1),charAt:ol(!0)},al=il.charAt,sl=x,cl=Ne,ll=Math.floor,ul=sl("".charAt),dl=sl("".replace),fl=sl("".slice),hl=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,pl=/\$([$&'`]|\d{1,2})/g,gl=f,ml=Bt,yl=Q,vl=L,Al=Nc,bl=TypeError,wl=Ao,Sl=f,El=x,xl=function(e,t,n,r){var o=Vc(e),i=!Gc((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!Gc((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[Jc]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=zc(/./[o]),c=t(o,""[e],(function(e,t,n,r,o){var a=zc(e),c=t.exec;return c===Wc||c===Xc.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));Qc(String.prototype,e,c[0]),Qc(Xc,o,c[1])}r&&$c(Xc[o],"sham",!0)},kl=s,Tl=Bt,Pl=Q,Ll=D,Rl=rr,Il=ur,Cl=Co,Ol=U,Bl=function(e,t,n){return t+(n?al(e,t).length:1)},Dl=Ee,jl=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,c=pl;return void 0!==o&&(o=cl(o),c=hl),dl(i,c,(function(i,c){var l;switch(ul(c,0)){case"$":return"$";case"&":return e;case"`":return fl(t,0,n);case"'":return fl(t,a);case"<":l=o[fl(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var d=ll(u/10);return 0===d?i:d<=s?void 0===r[d-1]?ul(c,1):r[d-1]+ul(c,1):i}l=r[u-1]}return void 0===l?"":l}))},Ml=function(e,t){var n=e.exec;if(yl(n)){var r=gl(n,e,t);return null!==r&&ml(r),r}if("RegExp"===vl(e))return gl(Al,e,t);throw bl("RegExp#exec called on incompatible receiver")},Ul=nt("replace"),ql=Math.max,Nl=Math.min,Fl=El([].concat),Hl=El([].push),_l=El("".indexOf),zl=El("".slice),Ql="$0"==="a".replace(/./,"$0"),Wl=!!/./[Ul]&&""===/./[Ul]("a","$0");xl("replace",(function(e,t,n){var r=Wl?"$":"$0";return[function(e,n){var r=Ol(this),o=Ll(e)?void 0:Dl(e,Ul);return o?Sl(o,e,r,n):Sl(t,Cl(r),e,n)},function(e,o){var i=Tl(this),a=Cl(e);if("string"==typeof o&&-1===_l(o,r)&&-1===_l(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var c=Pl(o);c||(o=Cl(o));var l=i.global;if(l){var u=i.unicode;i.lastIndex=0}for(var d=[];;){var f=Ml(i,a);if(null===f)break;if(Hl(d,f),!l)break;""===Cl(f[0])&&(i.lastIndex=Bl(a,Il(i.lastIndex),u))}for(var h,p="",g=0,m=0;m<d.length;m++){for(var y=Cl((f=d[m])[0]),v=ql(Nl(Rl(f.index),a.length),0),A=[],b=1;b<f.length;b++)Hl(A,void 0===(h=f[b])?h:String(h));var w=f.groups;if(c){var S=Fl([y],A,v,a);void 0!==w&&Hl(S,w);var E=Cl(wl(o,void 0,S))}else E=jl(y,a,v,A,w,o);v>=g&&(p+=zl(a,g,v)+E,g=v+y.length)}return p+zl(a,g)}]}),!!kl((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Ql||Wl);var Gl=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}},Vl={"text/plain":"Text","text/html":"Url",default:"Text"};var $l=function(e,t){var n,r,o,i,a,s,c=!1;t||(t={}),n=t.debug||!1;try{if(o=Gl(),i=document.createRange(),a=document.getSelection(),(s=document.createElement("span")).textContent=e,s.ariaHidden="true",s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var o=Vl[t.format]||Vl.default;window.clipboardData.setData(o,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),i.selectNodeContents(s),a.addRange(i),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");c=!0}catch(o){n&&console.error("unable to copy using execCommand: ",o),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),c=!0}catch(o){n&&console.error("unable to copy using clipboardData: ",o),n&&console.error("falling back to prompt"),r=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(r,e)}}finally{a&&("function"==typeof a.removeRange?a.removeRange(i):a.removeAllRanges()),s&&document.body.removeChild(s),o()}return c},Jl=r($l),Xl=be,Kl=Ne,Yl=B,Zl=fr,eu=TypeError,tu=function(e){return function(t,n,r,o){Xl(n);var i=Kl(t),a=Yl(i),s=Zl(i),c=e?s-1:0,l=e?-1:1;if(r<2)for(;;){if(c in a){o=a[c],c+=l;break}if(c+=l,e?c<0:s<=c)throw eu("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=l)c in a&&(o=n(o,a[c],c,i));return o}},nu={left:tu(!1),right:tu(!0)},ru=s,ou="undefined"!=typeof process&&"process"==L(process),iu=nu.left,au=function(e,t){var n=[][e];return!!n&&ru((function(){n.call(null,t||function(){return 1},1)}))};to({target:"Array",proto:!0,forced:!ou&&oe>79&&oe<83||!au("reduce")},{reduce:function(e){var t=arguments.length;return iu(this,e,t,t>1?arguments[1]:void 0)}});var su="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,cu=Vn,lu=Lt,uu=function(e,t,n){return n.get&&cu(n.get,t,{getter:!0}),n.set&&cu(n.set,t,{setter:!0}),lu.f(e,t,n)},du=Yn,fu=function(e,t,n){for(var r in t)du(e,r,t[r],n);return e},hu=K,pu=TypeError,gu=function(e,t){if(hu(t,e))return e;throw pu("Incorrect invocation")},mu=rr,yu=ur,vu=RangeError,Au=function(e){if(void 0===e)return 0;var t=mu(e),n=yu(t);if(t!==n)throw vu("Wrong length or index");return n},bu=Array,wu=Math.abs,Su=Math.pow,Eu=Math.floor,xu=Math.log,ku=Math.LN2,Tu={pack:function(e,t,n){var r,o,i,a=bu(n),s=8*n-t-1,c=(1<<s)-1,l=c>>1,u=23===t?Su(2,-24)-Su(2,-77):0,d=e<0||0===e&&1/e<0?1:0,f=0;for((e=wu(e))!=e||e===1/0?(o=e!=e?1:0,r=c):(r=Eu(xu(e)/ku),e*(i=Su(2,-r))<1&&(r--,i*=2),(e+=r+l>=1?u/i:u*Su(2,1-l))*i>=2&&(r++,i/=2),r+l>=c?(o=0,r=c):r+l>=1?(o=(e*i-1)*Su(2,t),r+=l):(o=e*Su(2,l-1)*Su(2,t),r=0));t>=8;)a[f++]=255&o,o/=256,t-=8;for(r=r<<t|o,s+=t;s>0;)a[f++]=255&r,r/=256,s-=8;return a[--f]|=128*d,a},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,i=(1<<o)-1,a=i>>1,s=o-7,c=r-1,l=e[c--],u=127&l;for(l>>=7;s>0;)u=256*u+e[c--],s-=8;for(n=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)n=256*n+e[c--],s-=8;if(0===u)u=1-a;else{if(u===i)return n?NaN:l?-1/0:1/0;n+=Su(2,t),u-=a}return(l?-1:1)*n*Su(2,u-t)}},Pu=Ne,Lu=sr,Ru=fr,Iu=ft,Cu=Lt,Ou=A,Bu=function(e,t,n){var r=Iu(t);r in e?Cu.f(e,r,Ou(0,n)):e[r]=n},Du=sr,ju=fr,Mu=Bu,Uu=Array,qu=Math.max,Nu=function(e,t,n){for(var r=ju(e),o=Du(t,r),i=Du(void 0===n?r:n,r),a=Uu(qu(i-o,0)),s=0;o<i;o++,s++)Mu(a,s,e[o]);return a.length=s,a},Fu=i,Hu=x,_u=c,zu=su,Qu=en,Wu=Vt,Gu=uu,Vu=fu,$u=s,Ju=gu,Xu=rr,Ku=ur,Yu=Au,Zu=Tu,ed=ea,td=Ia,nd=Zn.f,rd=function(e){for(var t=Pu(this),n=Ru(t),r=arguments.length,o=Lu(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:Lu(i,n);a>o;)t[o++]=e;return t},od=Nu,id=ha,ad=Rn,sd=Qu.PROPER,cd=Qu.CONFIGURABLE,ld="ArrayBuffer",ud="DataView",dd="prototype",fd="Wrong index",hd=ad.getterFor(ld),pd=ad.getterFor(ud),gd=ad.set,md=Fu[ld],yd=md,vd=yd&&yd[dd],Ad=Fu[ud],bd=Ad&&Ad[dd],wd=Object.prototype,Sd=Fu.Array,Ed=Fu.RangeError,xd=Hu(rd),kd=Hu([].reverse),Td=Zu.pack,Pd=Zu.unpack,Ld=function(e){return[255&e]},Rd=function(e){return[255&e,e>>8&255]},Id=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Cd=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Od=function(e){return Td(e,23,4)},Bd=function(e){return Td(e,52,8)},Dd=function(e,t,n){Gu(e[dd],t,{configurable:!0,get:function(){return n(this)[t]}})},jd=function(e,t,n,r){var o=Yu(n),i=pd(e);if(o+t>i.byteLength)throw Ed(fd);var a=i.bytes,s=o+i.byteOffset,c=od(a,s,s+t);return r?c:kd(c)},Md=function(e,t,n,r,o,i){var a=Yu(n),s=pd(e);if(a+t>s.byteLength)throw Ed(fd);for(var c=s.bytes,l=a+s.byteOffset,u=r(+o),d=0;d<t;d++)c[l+d]=u[i?d:t-d-1]};if(zu){var Ud=sd&&md.name!==ld;if($u((function(){md(1)}))&&$u((function(){new md(-1)}))&&!$u((function(){return new md,new md(1.5),new md(NaN),1!=md.length||Ud&&!cd})))Ud&&cd&&Wu(md,"name",ld);else{(yd=function(e){return Ju(this,vd),new md(Yu(e))})[dd]=vd;for(var qd,Nd=nd(md),Fd=0;Nd.length>Fd;)(qd=Nd[Fd++])in yd||Wu(yd,qd,md[qd]);vd.constructor=yd}td&&ed(bd)!==wd&&td(bd,wd);var Hd=new Ad(new yd(2)),_d=Hu(bd.setInt8);Hd.setInt8(0,2147483648),Hd.setInt8(1,2147483649),!Hd.getInt8(0)&&Hd.getInt8(1)||Vu(bd,{setInt8:function(e,t){_d(this,e,t<<24>>24)},setUint8:function(e,t){_d(this,e,t<<24>>24)}},{unsafe:!0})}else vd=(yd=function(e){Ju(this,vd);var t=Yu(e);gd(this,{type:ld,bytes:xd(Sd(t),0),byteLength:t}),_u||(this.byteLength=t,this.detached=!1)})[dd],bd=(Ad=function(e,t,n){Ju(this,bd),Ju(e,vd);var r=hd(e),o=r.byteLength,i=Xu(t);if(i<0||i>o)throw Ed("Wrong offset");if(i+(n=void 0===n?o-i:Ku(n))>o)throw Ed("Wrong length");gd(this,{type:ud,buffer:e,byteLength:n,byteOffset:i,bytes:r.bytes}),_u||(this.buffer=e,this.byteLength=n,this.byteOffset=i)})[dd],_u&&(Dd(yd,"byteLength",hd),Dd(Ad,"buffer",pd),Dd(Ad,"byteLength",pd),Dd(Ad,"byteOffset",pd)),Vu(bd,{getInt8:function(e){return jd(this,1,e)[0]<<24>>24},getUint8:function(e){return jd(this,1,e)[0]},getInt16:function(e){var t=jd(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=jd(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Cd(jd(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Cd(jd(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Pd(jd(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Pd(jd(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Md(this,1,e,Ld,t)},setUint8:function(e,t){Md(this,1,e,Ld,t)},setInt16:function(e,t){Md(this,2,e,Rd,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Md(this,2,e,Rd,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Md(this,4,e,Id,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Md(this,4,e,Id,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Md(this,4,e,Od,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Md(this,8,e,Bd,t,arguments.length>2?arguments[2]:void 0)}});id(yd,ld),id(Ad,ud);var zd={ArrayBuffer:yd,DataView:Ad},Qd=X,Wd=uu,Gd=c,Vd=nt("species"),$d=function(e){var t=Qd(e);Gd&&t&&!t[Vd]&&Wd(t,Vd,{configurable:!0,get:function(){return this}})},Jd="ArrayBuffer",Xd=zd[Jd];to({global:!0,constructor:!0,forced:i[Jd]!==Xd},{ArrayBuffer:Xd}),$d(Jd);var Kd=x,Yd=s,Zd=Q,ef=Lo,tf=cn,nf=function(){},rf=[],of=X("Reflect","construct"),af=/^\s*(?:class|function)\b/,sf=Kd(af.exec),cf=!af.exec(nf),lf=function(e){if(!Zd(e))return!1;try{return of(nf,rf,e),!0}catch(e){return!1}},uf=function(e){if(!Zd(e))return!1;switch(ef(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cf||!!sf(af,tf(e))}catch(e){return!0}};uf.sham=!0;var df=!of||Yd((function(){var e;return lf(lf.call)||!lf(Object)||!lf((function(){e=!0}))||e}))?uf:lf,ff=df,hf=me,pf=TypeError,gf=Bt,mf=function(e){if(ff(e))return e;throw pf(hf(e)+" is not a constructor")},yf=D,vf=nt("species"),Af=function(e,t){var n,r=gf(e).constructor;return void 0===r||yf(n=gf(r)[vf])?t:mf(n)},bf=to,wf=_c,Sf=s,Ef=Bt,xf=sr,kf=ur,Tf=Af,Pf=zd.ArrayBuffer,Lf=zd.DataView,Rf=Lf.prototype,If=wf(Pf.prototype.slice),Cf=wf(Rf.getUint8),Of=wf(Rf.setUint8);bf({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Sf((function(){return!new Pf(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(If&&void 0===t)return If(Ef(this),e);for(var n=Ef(this).byteLength,r=xf(e,n),o=xf(void 0===t?n:t,n),i=new(Tf(this,Pf))(kf(o-r)),a=new Lf(this),s=new Lf(i),c=0;r<o;)Of(s,c++,Cf(a,r++));return i}});var Bf=L,Df=TypeError,jf=Ea(ArrayBuffer.prototype,"byteLength","get")||function(e){if("ArrayBuffer"!=Bf(e))throw Df("ArrayBuffer expected");return e.byteLength},Mf=jf,Uf=x(ArrayBuffer.prototype.slice),qf=function(e){if(0!==Mf(e))return!1;try{return Uf(e,0,0),!1}catch(e){return!0}},Nf=c,Ff=uu,Hf=qf,_f=ArrayBuffer.prototype;Nf&&!("detached"in _f)&&Ff(_f,"detached",{configurable:!0,get:function(){return Hf(this)}});var zf="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Qf=!zf&&!ou&&"object"==typeof window&&"object"==typeof document,Wf=s,Gf=oe,Vf=Qf,$f=zf,Jf=ou,Xf=i.structuredClone,Kf=!!Xf&&!Wf((function(){if($f&&Gf>92||Jf&&Gf>94||Vf&&Gf>97)return!1;var e=new ArrayBuffer(8),t=Xf(e,{transfer:[e]});return 0!=e.byteLength||8!=t.byteLength})),Yf=i,Zf=x,eh=Ea,th=Au,nh=qf,rh=jf,oh=Kf,ih=Yf.TypeError,ah=Yf.structuredClone,sh=Yf.ArrayBuffer,ch=Yf.DataView,lh=Math.min,uh=sh.prototype,dh=ch.prototype,fh=Zf(uh.slice),hh=eh(uh,"resizable","get"),ph=eh(uh,"maxByteLength","get"),gh=Zf(dh.getInt8),mh=Zf(dh.setInt8),yh=oh&&function(e,t,n){var r=rh(e),o=void 0===t?r:lh(th(t),r),i=!hh||!hh(e);if(nh(e))throw ih("ArrayBuffer is detached");var a=ah(e,{transfer:[e]});if(r==o&&(n||i))return a;if(!n||i)return fh(a,0,o);for(var s=new sh(o,ph&&{maxByteLength:ph(a)}),c=new ch(a),l=new ch(s),u=0;u<o;u++)mh(l,u,gh(c,u));return s},vh=yh;vh&&to({target:"ArrayBuffer",proto:!0},{transfer:function(){return vh(this,arguments.length?arguments[0]:void 0,!0)}});var Ah=yh;Ah&&to({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return Ah(this,arguments.length?arguments[0]:void 0,!1)}});var bh=il.charAt,wh=Co,Sh=Rn,Eh=Xa,xh=Ka,kh="String Iterator",Th=Sh.set,Ph=Sh.getterFor(kh);Eh(String,"String",(function(e){Th(this,{type:kh,string:wh(e),index:0})}),(function(){var e,t=Ph(this),n=t.string,r=t.index;return r>=n.length?xh(void 0,!0):(e=bh(n,r),t.index+=e.length,xh(e,!1))}));var Lh=s,Rh=c,Ih=nt("iterator"),Ch=!Lh((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),!t.size&&!Rh||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ih]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host})),Oh=be,Bh=l,Dh=_c(_c.bind),jh=function(e,t){return Oh(e),void 0===t?e:Bh?Dh(e,t):function(){return e.apply(t,arguments)}},Mh=c,Uh=x,qh=f,Nh=s,Fh=pi,Hh=Pr,_h=h,zh=Ne,Qh=B,Wh=Object.assign,Gh=Object.defineProperty,Vh=Uh([].concat),$h=!Wh||Nh((function(){if(Mh&&1!==Wh({b:1},Wh(Gh({},"a",{enumerable:!0,get:function(){Gh(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=Wh({},e)[n]||Fh(Wh({},t)).join("")!=r}))?function(e,t){for(var n=zh(e),r=arguments.length,o=1,i=Hh.f,a=_h.f;r>o;)for(var s,c=Qh(arguments[o++]),l=i?Vh(Fh(c),i(c)):Fh(c),u=l.length,d=0;u>d;)s=l[d++],Mh&&!qh(a,c,s)||(n[s]=c[s]);return n}:Wh,Jh=f,Xh=Bt,Kh=Ee,Yh=function(e,t,n){var r,o;Xh(e);try{if(!(r=Kh(e,"return"))){if("throw"===t)throw n;return n}r=Jh(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Xh(r),n},Zh=Bt,ep=Yh,tp=Wi,np=nt("iterator"),rp=Array.prototype,op=Lo,ip=Ee,ap=D,sp=Wi,cp=nt("iterator"),lp=function(e){if(!ap(e))return ip(e,cp)||ip(e,"@@iterator")||sp[op(e)]},up=f,dp=be,fp=Bt,hp=me,pp=lp,gp=TypeError,mp=function(e,t){var n=arguments.length<2?pp(e):t;if(dp(n))return fp(up(n,e));throw gp(hp(e)+" is not iterable")},yp=jh,vp=f,Ap=Ne,bp=function(e,t,n,r){try{return r?t(Zh(n)[0],n[1]):t(n)}catch(t){ep(e,"throw",t)}},wp=function(e){return void 0!==e&&(tp.Array===e||rp[np]===e)},Sp=df,Ep=fr,xp=Bu,kp=mp,Tp=lp,Pp=Array,Lp=x,Rp=2147483647,Ip=/[^\0-\u007E]/,Cp=/[.\u3002\uFF0E\uFF61]/g,Op="Overflow: input needs wider integers to process",Bp=RangeError,Dp=Lp(Cp.exec),jp=Math.floor,Mp=String.fromCharCode,Up=Lp("".charCodeAt),qp=Lp([].join),Np=Lp([].push),Fp=Lp("".replace),Hp=Lp("".split),_p=Lp("".toLowerCase),zp=function(e){return e+22+75*(e<26)},Qp=function(e,t,n){var r=0;for(e=n?jp(e/700):e>>1,e+=jp(e/t);e>455;)e=jp(e/35),r+=36;return jp(r+36*e/(e+38))},Wp=function(e){var t=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var o=Up(e,n++);if(o>=55296&&o<=56319&&n<r){var i=Up(e,n++);56320==(64512&i)?Np(t,((1023&o)<<10)+(1023&i)+65536):(Np(t,o),n--)}else Np(t,o)}return t}(e);var n,r,o=e.length,i=128,a=0,s=72;for(n=0;n<e.length;n++)(r=e[n])<128&&Np(t,Mp(r));var c=t.length,l=c;for(c&&Np(t,"-");l<o;){var u=Rp;for(n=0;n<e.length;n++)(r=e[n])>=i&&r<u&&(u=r);var d=l+1;if(u-i>jp((Rp-a)/d))throw Bp(Op);for(a+=(u-i)*d,i=u,n=0;n<e.length;n++){if((r=e[n])<i&&++a>Rp)throw Bp(Op);if(r==i){for(var f=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(f<p)break;var g=f-p,m=36-p;Np(t,Mp(zp(p+g%m))),f=jp(g/m),h+=36}Np(t,Mp(zp(f))),s=Qp(a,d,l==c),a=0,l++}}a++,i++}return qp(t,"")},Gp=TypeError,Vp=function(e,t){if(e<t)throw Gp("Not enough arguments");return e},$p=Nu,Jp=Math.floor,Xp=function(e,t){var n=e.length,r=Jp(n/2);return n<8?Kp(e,t):Yp(e,Xp($p(e,0,r),t),Xp($p(e,r),t),t)},Kp=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},Yp=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e},Zp=to,eg=i,tg=f,ng=x,rg=c,og=Ch,ig=Yn,ag=uu,sg=fu,cg=ha,lg=ba,ug=Rn,dg=gu,fg=Q,hg=_e,pg=jh,gg=Lo,mg=Bt,yg=V,vg=Co,Ag=Mi,bg=A,wg=mp,Sg=lp,Eg=Vp,xg=Xp,kg=nt("iterator"),Tg="URLSearchParams",Pg=Tg+"Iterator",Lg=ug.set,Rg=ug.getterFor(Tg),Ig=ug.getterFor(Pg),Cg=Object.getOwnPropertyDescriptor,Og=function(e){if(!rg)return eg[e];var t=Cg(eg,e);return t&&t.value},Bg=Og("fetch"),Dg=Og("Request"),jg=Og("Headers"),Mg=Dg&&Dg.prototype,Ug=jg&&jg.prototype,qg=eg.RegExp,Ng=eg.TypeError,Fg=eg.decodeURIComponent,Hg=eg.encodeURIComponent,_g=ng("".charAt),zg=ng([].join),Qg=ng([].push),Wg=ng("".replace),Gg=ng([].shift),Vg=ng([].splice),$g=ng("".split),Jg=ng("".slice),Xg=/\+/g,Kg=Array(4),Yg=function(e){return Kg[e-1]||(Kg[e-1]=qg("((?:%[\\da-f]{2}){"+e+"})","gi"))},Zg=function(e){try{return Fg(e)}catch(t){return e}},em=function(e){var t=Wg(e,Xg," "),n=4;try{return Fg(t)}catch(e){for(;n;)t=Wg(t,Yg(n--),Zg);return t}},tm=/[!'()~]|%20/g,nm={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},rm=function(e){return nm[e]},om=function(e){return Wg(Hg(e),tm,rm)},im=lg((function(e,t){Lg(this,{type:Pg,iterator:wg(Rg(e).entries),kind:t})}),"Iterator",(function(){var e=Ig(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n}),!0),am=function(e){this.entries=[],this.url=null,void 0!==e&&(yg(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===_g(e,0)?Jg(e,1):e:vg(e)))};am.prototype={type:Tg,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,n,r,o,i,a,s,c=Sg(e);if(c)for(n=(t=wg(e,c)).next;!(r=tg(n,t)).done;){if(i=(o=wg(mg(r.value))).next,(a=tg(i,o)).done||(s=tg(i,o)).done||!tg(i,o).done)throw Ng("Expected sequence with length 2");Qg(this.entries,{key:vg(a.value),value:vg(s.value)})}else for(var l in e)hg(e,l)&&Qg(this.entries,{key:l,value:vg(e[l])})},parseQuery:function(e){if(e)for(var t,n,r=$g(e,"&"),o=0;o<r.length;)(t=r[o++]).length&&(n=$g(t,"="),Qg(this.entries,{key:em(Gg(n)),value:em(zg(n,"="))}))},serialize:function(){for(var e,t=this.entries,n=[],r=0;r<t.length;)e=t[r++],Qg(n,om(e.key)+"="+om(e.value));return zg(n,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var sm=function(){dg(this,cm);var e=Lg(this,new am(arguments.length>0?arguments[0]:void 0));rg||(this.length=e.entries.length)},cm=sm.prototype;if(sg(cm,{append:function(e,t){Eg(arguments.length,2);var n=Rg(this);Qg(n.entries,{key:vg(e),value:vg(t)}),rg||this.length++,n.updateURL()},delete:function(e){Eg(arguments.length,1);for(var t=Rg(this),n=t.entries,r=vg(e),o=0;o<n.length;)n[o].key===r?Vg(n,o,1):o++;rg||(this.length=n.length),t.updateURL()},get:function(e){Eg(arguments.length,1);for(var t=Rg(this).entries,n=vg(e),r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){Eg(arguments.length,1);for(var t=Rg(this).entries,n=vg(e),r=[],o=0;o<t.length;o++)t[o].key===n&&Qg(r,t[o].value);return r},has:function(e){Eg(arguments.length,1);for(var t=Rg(this).entries,n=vg(e),r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){Eg(arguments.length,1);for(var n,r=Rg(this),o=r.entries,i=!1,a=vg(e),s=vg(t),c=0;c<o.length;c++)(n=o[c]).key===a&&(i?Vg(o,c--,1):(i=!0,n.value=s));i||Qg(o,{key:a,value:s}),rg||(this.length=o.length),r.updateURL()},sort:function(){var e=Rg(this);xg(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,n=Rg(this).entries,r=pg(e,arguments.length>1?arguments[1]:void 0),o=0;o<n.length;)r((t=n[o++]).value,t.key,this)},keys:function(){return new im(this,"keys")},values:function(){return new im(this,"values")},entries:function(){return new im(this,"entries")}},{enumerable:!0}),ig(cm,kg,cm.entries,{name:"entries"}),ig(cm,"toString",(function(){return Rg(this).serialize()}),{enumerable:!0}),rg&&ag(cm,"size",{get:function(){return Rg(this).entries.length},configurable:!0,enumerable:!0}),cg(sm,Tg),Zp({global:!0,constructor:!0,forced:!og},{URLSearchParams:sm}),!og&&fg(jg)){var lm=ng(Ug.has),um=ng(Ug.set),dm=function(e){if(yg(e)){var t,n=e.body;if(gg(n)===Tg)return t=e.headers?new jg(e.headers):new jg,lm(t,"content-type")||um(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Ag(e,{body:bg(0,vg(n)),headers:bg(0,t)})}return e};if(fg(Bg)&&Zp({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Bg(e,arguments.length>1?dm(arguments[1]):{})}}),fg(Dg)){var fm=function(e){return dg(this,Mg),new Dg(e,arguments.length>1?dm(arguments[1]):{})};Mg.constructor=fm,fm.prototype=Mg,Zp({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:fm})}}var hm,pm=to,gm=c,mm=Ch,ym=i,vm=jh,Am=x,bm=Yn,wm=uu,Sm=gu,Em=_e,xm=$h,km=function(e){var t=Ap(e),n=Sp(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=yp(o,r>2?arguments[2]:void 0));var a,s,c,l,u,d,f=Tp(t),h=0;if(!f||this===Pp&&wp(f))for(a=Ep(t),s=n?new this(a):Pp(a);a>h;h++)d=i?o(t[h],h):t[h],xp(s,h,d);else for(u=(l=kp(t,f)).next,s=n?new this:[];!(c=vp(u,l)).done;h++)d=i?bp(l,o,[c.value,h],!0):c.value,xp(s,h,d);return s.length=h,s},Tm=Nu,Pm=il.codeAt,Lm=function(e){var t,n,r=[],o=Hp(Fp(_p(e),Cp,"."),".");for(t=0;t<o.length;t++)n=o[t],Np(r,Dp(Ip,n)?"xn--"+Wp(n):n);return qp(r,".")},Rm=Co,Im=ha,Cm=Vp,Om={URLSearchParams:sm,getState:Rg},Bm=Rn,Dm=Bm.set,jm=Bm.getterFor("URL"),Mm=Om.URLSearchParams,Um=Om.getState,qm=ym.URL,Nm=ym.TypeError,Fm=ym.parseInt,Hm=Math.floor,_m=Math.pow,zm=Am("".charAt),Qm=Am(/./.exec),Wm=Am([].join),Gm=Am(1..toString),Vm=Am([].pop),$m=Am([].push),Jm=Am("".replace),Xm=Am([].shift),Km=Am("".split),Ym=Am("".slice),Zm=Am("".toLowerCase),ey=Am([].unshift),ty="Invalid scheme",ny="Invalid host",ry="Invalid port",oy=/[a-z]/i,iy=/[\d+-.a-z]/i,ay=/\d/,sy=/^0x/i,cy=/^[0-7]+$/,ly=/^\d+$/,uy=/^[\da-f]+$/i,dy=/[\0\t\n\r #%/:<>?@[\\\]^|]/,fy=/[\0\t\n\r #/:<>?@[\\\]^|]/,hy=/^[\u0000-\u0020]+/,py=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,gy=/[\t\n\r]/g,my=function(e){var t,n,r,o;if("number"==typeof e){for(t=[],n=0;n<4;n++)ey(t,e%256),e=Hm(e/256);return Wm(t,".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,o=0,i=0;i<8;i++)0!==e[i]?(o>n&&(t=r,n=o),r=null,o=0):(null===r&&(r=i),++o);return o>n&&(t=r,n=o),t}(e),n=0;n<8;n++)o&&0===e[n]||(o&&(o=!1),r===n?(t+=n?":":"::",o=!0):(t+=Gm(e[n],16),n<7&&(t+=":")));return"["+t+"]"}return e},yy={},vy=xm({},yy,{" ":1,'"':1,"<":1,">":1,"`":1}),Ay=xm({},vy,{"#":1,"?":1,"{":1,"}":1}),by=xm({},Ay,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),wy=function(e,t){var n=Pm(e,0);return n>32&&n<127&&!Em(t,e)?e:encodeURIComponent(e)},Sy={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ey=function(e,t){var n;return 2==e.length&&Qm(oy,zm(e,0))&&(":"==(n=zm(e,1))||!t&&"|"==n)},xy=function(e){var t;return e.length>1&&Ey(Ym(e,0,2))&&(2==e.length||"/"===(t=zm(e,2))||"\\"===t||"?"===t||"#"===t)},ky=function(e){return"."===e||"%2e"===Zm(e)},Ty={},Py={},Ly={},Ry={},Iy={},Cy={},Oy={},By={},Dy={},jy={},My={},Uy={},qy={},Ny={},Fy={},Hy={},_y={},zy={},Qy={},Wy={},Gy={},Vy=function(e,t,n){var r,o,i,a=Rm(e);if(t){if(o=this.parse(a))throw Nm(o);this.searchParams=null}else{if(void 0!==n&&(r=new Vy(n,!0)),o=this.parse(a,null,r))throw Nm(o);(i=Um(new Mm)).bindURL(this),this.searchParams=i}};Vy.prototype={type:"URL",parse:function(e,t,n){var r,o,i,a,s,c=this,l=t||Ty,u=0,d="",f=!1,h=!1,p=!1;for(e=Rm(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Jm(e,hy,""),e=Jm(e,py,"$1")),e=Jm(e,gy,""),r=km(e);u<=r.length;){switch(o=r[u],l){case Ty:if(!o||!Qm(oy,o)){if(t)return ty;l=Ly;continue}d+=Zm(o),l=Py;break;case Py:if(o&&(Qm(iy,o)||"+"==o||"-"==o||"."==o))d+=Zm(o);else{if(":"!=o){if(t)return ty;d="",l=Ly,u=0;continue}if(t&&(c.isSpecial()!=Em(Sy,d)||"file"==d&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=d,t)return void(c.isSpecial()&&Sy[c.scheme]==c.port&&(c.port=null));d="","file"==c.scheme?l=Ny:c.isSpecial()&&n&&n.scheme==c.scheme?l=Ry:c.isSpecial()?l=By:"/"==r[u+1]?(l=Iy,u++):(c.cannotBeABaseURL=!0,$m(c.path,""),l=Qy)}break;case Ly:if(!n||n.cannotBeABaseURL&&"#"!=o)return ty;if(n.cannotBeABaseURL&&"#"==o){c.scheme=n.scheme,c.path=Tm(n.path),c.query=n.query,c.fragment="",c.cannotBeABaseURL=!0,l=Gy;break}l="file"==n.scheme?Ny:Cy;continue;case Ry:if("/"!=o||"/"!=r[u+1]){l=Cy;continue}l=Dy,u++;break;case Iy:if("/"==o){l=jy;break}l=zy;continue;case Cy:if(c.scheme=n.scheme,o==hm)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Tm(n.path),c.query=n.query;else if("/"==o||"\\"==o&&c.isSpecial())l=Oy;else if("?"==o)c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Tm(n.path),c.query="",l=Wy;else{if("#"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Tm(n.path),c.path.length--,l=zy;continue}c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,c.path=Tm(n.path),c.query=n.query,c.fragment="",l=Gy}break;case Oy:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=n.username,c.password=n.password,c.host=n.host,c.port=n.port,l=zy;continue}l=jy}else l=Dy;break;case By:if(l=Dy,"/"!=o||"/"!=zm(d,u+1))continue;u++;break;case Dy:if("/"!=o&&"\\"!=o){l=jy;continue}break;case jy:if("@"==o){f&&(d="%40"+d),f=!0,i=km(d);for(var g=0;g<i.length;g++){var m=i[g];if(":"!=m||p){var y=wy(m,by);p?c.password+=y:c.username+=y}else p=!0}d=""}else if(o==hm||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(f&&""==d)return"Invalid authority";u-=km(d).length+1,d="",l=My}else d+=o;break;case My:case Uy:if(t&&"file"==c.scheme){l=Hy;continue}if(":"!=o||h){if(o==hm||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==d)return ny;if(t&&""==d&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(d))return a;if(d="",l=_y,t)return;continue}"["==o?h=!0:"]"==o&&(h=!1),d+=o}else{if(""==d)return ny;if(a=c.parseHost(d))return a;if(d="",l=qy,t==Uy)return}break;case qy:if(!Qm(ay,o)){if(o==hm||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||t){if(""!=d){var v=Fm(d,10);if(v>65535)return ry;c.port=c.isSpecial()&&v===Sy[c.scheme]?null:v,d=""}if(t)return;l=_y;continue}return ry}d+=o;break;case Ny:if(c.scheme="file","/"==o||"\\"==o)l=Fy;else{if(!n||"file"!=n.scheme){l=zy;continue}if(o==hm)c.host=n.host,c.path=Tm(n.path),c.query=n.query;else if("?"==o)c.host=n.host,c.path=Tm(n.path),c.query="",l=Wy;else{if("#"!=o){xy(Wm(Tm(r,u),""))||(c.host=n.host,c.path=Tm(n.path),c.shortenPath()),l=zy;continue}c.host=n.host,c.path=Tm(n.path),c.query=n.query,c.fragment="",l=Gy}}break;case Fy:if("/"==o||"\\"==o){l=Hy;break}n&&"file"==n.scheme&&!xy(Wm(Tm(r,u),""))&&(Ey(n.path[0],!0)?$m(c.path,n.path[0]):c.host=n.host),l=zy;continue;case Hy:if(o==hm||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&Ey(d))l=zy;else if(""==d){if(c.host="",t)return;l=_y}else{if(a=c.parseHost(d))return a;if("localhost"==c.host&&(c.host=""),t)return;d="",l=_y}continue}d+=o;break;case _y:if(c.isSpecial()){if(l=zy,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=hm&&(l=zy,"/"!=o))continue}else c.fragment="",l=Gy;else c.query="",l=Wy;break;case zy:if(o==hm||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=Zm(s=d))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||$m(c.path,"")):ky(d)?"/"==o||"\\"==o&&c.isSpecial()||$m(c.path,""):("file"==c.scheme&&!c.path.length&&Ey(d)&&(c.host&&(c.host=""),d=zm(d,0)+":"),$m(c.path,d)),d="","file"==c.scheme&&(o==hm||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)Xm(c.path);"?"==o?(c.query="",l=Wy):"#"==o&&(c.fragment="",l=Gy)}else d+=wy(o,Ay);break;case Qy:"?"==o?(c.query="",l=Wy):"#"==o?(c.fragment="",l=Gy):o!=hm&&(c.path[0]+=wy(o,yy));break;case Wy:t||"#"!=o?o!=hm&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":wy(o,yy)):(c.fragment="",l=Gy);break;case Gy:o!=hm&&(c.fragment+=wy(o,vy))}u++}},parseHost:function(e){var t,n,r;if("["==zm(e,0)){if("]"!=zm(e,e.length-1))return ny;if(t=function(e){var t,n,r,o,i,a,s,c=[0,0,0,0,0,0,0,0],l=0,u=null,d=0,f=function(){return zm(e,d)};if(":"==f()){if(":"!=zm(e,1))return;d+=2,u=++l}for(;f();){if(8==l)return;if(":"!=f()){for(t=n=0;n<4&&Qm(uy,f());)t=16*t+Fm(f(),16),d++,n++;if("."==f()){if(0==n)return;if(d-=n,l>6)return;for(r=0;f();){if(o=null,r>0){if(!("."==f()&&r<4))return;d++}if(!Qm(ay,f()))return;for(;Qm(ay,f());){if(i=Fm(f(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;d++}c[l]=256*c[l]+o,2!=++r&&4!=r||l++}if(4!=r)return;break}if(":"==f()){if(d++,!f())return}else if(f())return;c[l++]=t}else{if(null!==u)return;d++,u=++l}}if(null!==u)for(a=l-u,l=7;0!=l&&a>0;)s=c[l],c[l--]=c[u+a-1],c[u+--a]=s;else if(8!=l)return;return c}(Ym(e,1,-1)),!t)return ny;this.host=t}else if(this.isSpecial()){if(e=Lm(e),Qm(dy,e))return ny;if(t=function(e){var t,n,r,o,i,a,s,c=Km(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(o=c[r]))return e;if(i=10,o.length>1&&"0"==zm(o,0)&&(i=Qm(sy,o)?16:8,o=Ym(o,8==i?1:2)),""===o)a=0;else{if(!Qm(10==i?ly:8==i?cy:uy,o))return e;a=Fm(o,i)}$m(n,a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=_m(256,5-t))return null}else if(a>255)return null;for(s=Vm(n),r=0;r<n.length;r++)s+=n[r]*_m(256,3-r);return s}(e),null===t)return ny;this.host=t}else{if(Qm(fy,e))return ny;for(t="",n=km(e),r=0;r<n.length;r++)t+=wy(n[r],yy);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return Em(Sy,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ey(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,n=e.username,r=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,l=t+":";return null!==o?(l+="//",e.includesCredentials()&&(l+=n+(r?":"+r:"")+"@"),l+=my(o),null!==i&&(l+=":"+i)):"file"==t&&(l+="//"),l+=e.cannotBeABaseURL?a[0]:a.length?"/"+Wm(a,"/"):"",null!==s&&(l+="?"+s),null!==c&&(l+="#"+c),l},setHref:function(e){var t=this.parse(e);if(t)throw Nm(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new $y(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+my(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Rm(e)+":",Ty)},getUsername:function(){return this.username},setUsername:function(e){var t=km(Rm(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var n=0;n<t.length;n++)this.username+=wy(t[n],by)}},getPassword:function(){return this.password},setPassword:function(e){var t=km(Rm(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var n=0;n<t.length;n++)this.password+=wy(t[n],by)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?my(e):my(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,My)},getHostname:function(){var e=this.host;return null===e?"":my(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Uy)},getPort:function(){var e=this.port;return null===e?"":Rm(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Rm(e))?this.port=null:this.parse(e,qy))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Wm(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,_y))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Rm(e))?this.query=null:("?"==zm(e,0)&&(e=Ym(e,1)),this.query="",this.parse(e,Wy)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Rm(e))?("#"==zm(e,0)&&(e=Ym(e,1)),this.fragment="",this.parse(e,Gy)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var $y=function(e){var t=Sm(this,Jy),n=Cm(arguments.length,1)>1?arguments[1]:void 0,r=Dm(t,new Vy(e,!1,n));gm||(t.href=r.serialize(),t.origin=r.getOrigin(),t.protocol=r.getProtocol(),t.username=r.getUsername(),t.password=r.getPassword(),t.host=r.getHost(),t.hostname=r.getHostname(),t.port=r.getPort(),t.pathname=r.getPathname(),t.search=r.getSearch(),t.searchParams=r.getSearchParams(),t.hash=r.getHash())},Jy=$y.prototype,Xy=function(e,t){return{get:function(){return jm(this)[e]()},set:t&&function(e){return jm(this)[t](e)},configurable:!0,enumerable:!0}};if(gm&&(wm(Jy,"href",Xy("serialize","setHref")),wm(Jy,"origin",Xy("getOrigin")),wm(Jy,"protocol",Xy("getProtocol","setProtocol")),wm(Jy,"username",Xy("getUsername","setUsername")),wm(Jy,"password",Xy("getPassword","setPassword")),wm(Jy,"host",Xy("getHost","setHost")),wm(Jy,"hostname",Xy("getHostname","setHostname")),wm(Jy,"port",Xy("getPort","setPort")),wm(Jy,"pathname",Xy("getPathname","setPathname")),wm(Jy,"search",Xy("getSearch","setSearch")),wm(Jy,"searchParams",Xy("getSearchParams")),wm(Jy,"hash",Xy("getHash","setHash"))),bm(Jy,"toJSON",(function(){return jm(this).serialize()}),{enumerable:!0}),bm(Jy,"toString",(function(){return jm(this).serialize()}),{enumerable:!0}),qm){var Ky=qm.createObjectURL,Yy=qm.revokeObjectURL;Ky&&bm($y,"createObjectURL",vm(Ky,qm)),Yy&&bm($y,"revokeObjectURL",vm(Yy,qm))}Im($y,"URL"),pm({global:!0,constructor:!0,forced:!mm,sham:!gm},{URL:$y});var Zy=f;to({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return Zy(URL.prototype.toString,this)}});var ev=c,tv=x,nv=uu,rv=URLSearchParams.prototype,ov=tv(rv.forEach);function iv(){return Math.random().toString(36).slice(2)}function av(e){return Object.keys(e)}function sv(e){return Object.prototype.toString.call(e)}function cv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function lv(e){return"string"==typeof e}function uv(e){return"[object BigInt]"===sv(e)}function dv(e){return e instanceof Array}function fv(e){return"object"==typeof e&&null!==e}function hv(e){return e instanceof Blob}function pv(e){return e instanceof URLSearchParams}function gv(e){return e instanceof FormData}function mv(e){return e instanceof File}function yv(e){return e instanceof Document}ev&&!("size"in rv)&&nv(rv,"size",{get:function(){var e=0;return ov(this,(function(){e++})),e},configurable:!0,enumerable:!0});const vv=e=>"".concat(e),Av=e=>({ok:!0,value:e});function bv(e){return void 0===e?Av(vv(e)):null===e?Av(e):function(e){return"number"==typeof e}(e)&&(e===-1/0||e===1/0||Number.isNaN(e))?Av(vv(e)):uv(e)?Av("".concat(e,"n")):"symbol"==typeof e||"function"==typeof e?Av(vv(e.toString())):e instanceof Error?Av(vv(e.stack)):e===Object.prototype?{value:null,ok:!1}:e instanceof Object||"object"==typeof e?{value:e,ok:!1}:Av(e)}function wv(e){const{ok:t,value:n}=bv(e);return t?n:JSON.stringify(e,((e,t)=>bv(t).value),2)}function Sv(e){return void 0===e?"undefined":null===e?"null":uv(e)?"bigint":e instanceof Object?e instanceof Error?"error":"function"==typeof e?"function":"object":typeof e}const Ev={...console},xv=["log","info","error","warn","debug"].reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];console[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e.unproxy[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];Ev[t]("[PageSpy] [".concat(t.toLocaleUpperCase(),"] "),...n)},e)),{unproxy:{}});const kv=e=>{if("object"!=typeof e)return null;const{name:t,message:n,stack:r}=Object(e);return!1===[t,n,r].every(Boolean)?null:{name:t,message:n,stack:r}},Tv=e=>new Promise(((t,n)=>{const r=new FileReader;r.onload=e=>{var n;t(null===(n=e.target)||void 0===n?void 0:n.result)},r.onerror=()=>{n(new Error("blob2base64Async: can not convert"))},r.readAsDataURL(e)})),Pv="message",Lv="broadcast",Rv="ping",Iv="updateRoomInfo";var Cv=Object.freeze({__proto__:null,BROADCAST:Lv,CLOSE:"close",CONNECT:"connect",ERROR:"error",JOIN:"join",LEAVE:"leave",MESSAGE:Pv,PING:Rv,PONG:"pong",UPDATE_ROOM_INFO:Iv});function Ov(e,t){return{role:"client",type:e,data:{...(!(arguments.length>2&&void 0!==arguments[2])||arguments[2])&&{id:iv()},...t}}}class Bv{constructor(e){t(this,"id",""),t(this,"method",""),t(this,"url",""),t(this,"requestType","xhr"),t(this,"requestHeader",null),t(this,"status",0),t(this,"statusText",""),t(this,"readyState",0),t(this,"response",void 0),t(this,"responseReason",null),t(this,"responseType",""),t(this,"responseHeader",null),t(this,"startTime",0),t(this,"endTime",0),t(this,"costTime",0),t(this,"postData",null),t(this,"requestPayload",null),t(this,"withCredentials",!1),t(this,"lastEventId",""),this.id=e}}const Dv=2097152,jv="Exceed maximum limit";var Mv;!function(e){e[e.UNSENT=0]="UNSENT",e[e.OPENED=1]="OPENED",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE"}(Mv||(Mv={}));const Uv="(file)";const qv="Content-Type";function Nv(e,t){if(!t)return e;const n=function(e){return e?gv(e)?"multipart/form-data":pv(e)?"application/x-www-form-urlencoded;charset=UTF-8":yv(e)?"application/xml":hv(e)?e.type:"text/plain;charset=UTF-8":null}(t);if(!n)return e;const r=[qv,n];if(!e)return[r];for(let t=0;t<e.length;t++){const[n]=e[t];if(n.toUpperCase()===qv.toUpperCase())return e}return[...e,r]}async function Fv(e){if(!e)return null;if(pv(e)||gv(e))return function(e){const t=[];let n=e.next();for(;!n.done;){const[r,o]=n.value;let i;i=mv(o)?Uv:String(o),t.push([r,i]),n=e.next()}return t}(e.entries());if(hv(e))return"[object Blob]";if(t=e,ArrayBuffer.isView(t))return"[object TypedArray]";var t;if(yv(e)){return(new XMLSerializer).serializeToString(e)}return lv(e)?e:sv(e)}class Hv{constructor(e){t(this,"socketStore",void 0),t(this,"reqMap",Object.create(null)),this.socketStore=e}getRequestMap(){return this.reqMap}getRequest(e){return this.reqMap[e]}removeRequest(e){delete this.reqMap[e]}createRequest(e){return e?this.reqMap[e]?(xv.warn("The request object has been in store, disallow duplicate create"),!1):(this.reqMap[e]=new Bv(e),!0):(xv.warn('The "id" is required when init request object'),!1)}setRequest(e,t){return!(!e||!t)&&(this.reqMap[e]=t,!0)}sendRequestItem(e,t){var n;if(!1!==(null===(n=Hv.dataProcessor)||void 0===n?void 0:n.call(Hv,t)))try{this.reqMap[e]||(this.reqMap[e]=t);const n=Ov("network",{...t},!1);this.socketStore.dispatchEvent("public-data",n),this.socketStore.broadcastMessage(n,t.readyState!==Mv.DONE),this.deferDeleteRequest(e)}catch(e){xv.error(e.message)}}deferDeleteRequest(e){const t=this.getRequest(e);t&&t.readyState===Mv.DONE&&setTimeout((()=>{delete this.reqMap[e]}),3e3)}}t(Hv,"dataProcessor",void 0);var _v=x,zv=Set.prototype,Qv={Set:Set,add:_v(zv.add),has:_v(zv.has),remove:_v(zv.delete),proto:zv},Wv=Qv.has,Gv=function(e){return Wv(e),e},Vv=f,$v=function(e,t,n){for(var r,o,i=n||e.next;!(r=Vv(i,e)).done;)if(void 0!==(o=t(r.value)))return o},Jv=x,Xv=$v,Kv=Qv.Set,Yv=Qv.proto,Zv=Jv(Yv.forEach),eA=Jv(Yv.keys),tA=eA(new Kv).next,nA=function(e,t,n){return n?Xv(eA(e),t,tA):Zv(e,t)},rA=nA,oA=Qv.Set,iA=Qv.add,aA=function(e){var t=new oA;return rA(e,(function(e){iA(t,e)})),t},sA=Ea(Qv.proto,"size","get")||function(e){return e.size},cA=be,lA=Bt,uA=f,dA=rr,fA=TypeError,hA=Math.max,pA=function(e,t,n,r){this.set=e,this.size=t,this.has=n,this.keys=r};pA.prototype={getIterator:function(){return lA(uA(this.keys,this.set))},includes:function(e){return uA(this.has,this.set,e)}};var gA=function(e){lA(e);var t=+e.size;if(t!=t)throw fA("Invalid size");return new pA(e,hA(dA(t),0),cA(e.has),cA(e.keys))},mA=Gv,yA=aA,vA=sA,AA=gA,bA=nA,wA=$v,SA=Qv.has,EA=Qv.remove,xA=X,kA=function(e){try{return(new(xA("Set")))[e]({size:0,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}),!0}catch(e){return!1}},TA=function(e){var t=mA(this),n=AA(e),r=yA(t);return vA(t)<=n.size?bA(t,(function(e){n.includes(e)&&EA(r,e)})):wA(n.getIterator(),(function(e){SA(t,e)&&EA(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!kA("difference")},{difference:TA});var PA=Gv,LA=sA,RA=gA,IA=nA,CA=$v,OA=Qv.Set,BA=Qv.add,DA=Qv.has,jA=s,MA=function(e){var t=PA(this),n=RA(e),r=new OA;return LA(t)>n.size?CA(n.getIterator(),(function(e){DA(t,e)&&BA(r,e)})):IA(t,(function(e){n.includes(e)&&BA(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!kA("intersection")||jA((function(){return"3,2"!=Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}))},{intersection:MA});var UA=Gv,qA=Qv.has,NA=sA,FA=gA,HA=nA,_A=$v,zA=Yh,QA=function(e){var t=UA(this),n=FA(e);if(NA(t)<=n.size)return!1!==HA(t,(function(e){if(n.includes(e))return!1}),!0);var r=n.getIterator();return!1!==_A(r,(function(e){if(qA(t,e))return zA(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!kA("isDisjointFrom")},{isDisjointFrom:QA});var WA=Gv,GA=sA,VA=nA,$A=gA,JA=function(e){var t=WA(this),n=$A(e);return!(GA(t)>n.size)&&!1!==VA(t,(function(e){if(!n.includes(e))return!1}),!0)};to({target:"Set",proto:!0,real:!0,forced:!kA("isSubsetOf")},{isSubsetOf:JA});var XA=Gv,KA=Qv.has,YA=sA,ZA=gA,eb=$v,tb=Yh,nb=function(e){var t=XA(this),n=ZA(e);if(YA(t)<n.size)return!1;var r=n.getIterator();return!1!==eb(r,(function(e){if(!KA(t,e))return tb(r,"normal",!1)}))};to({target:"Set",proto:!0,real:!0,forced:!kA("isSupersetOf")},{isSupersetOf:nb});var rb=Gv,ob=aA,ib=gA,ab=$v,sb=Qv.add,cb=Qv.has,lb=Qv.remove,ub=function(e){var t=rb(this),n=ib(e).getIterator(),r=ob(t);return ab(n,(function(e){cb(t,e)?lb(r,e):sb(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!kA("symmetricDifference")},{symmetricDifference:ub});var db=Gv,fb=Qv.add,hb=aA,pb=gA,gb=$v,mb=function(e){var t=db(this),n=pb(e).getIterator(),r=hb(t);return gb(n,(function(e){fb(r,e)})),r};to({target:"Set",proto:!0,real:!0,forced:!kA("union")},{union:mb});class yb{constructor(){t(this,"store",{}),t(this,"instanceStore",{})}getStore(){return this.store}resetStore(){this.store={}}getInstanceStore(){return this.instanceStore}resetInstanceStore(){this.instanceStore={}}transformToAtom(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{value:n,ok:r}=bv(e),o=iv();if(r)return{id:o,type:Sv(e),value:n};if(t)try{return{id:o,type:"json",value:JSON.stringify(e)}}catch(e){return{id:o,type:"json",value:null}}return this.add(e)}get(e){const t=this.store[e],n=this.instanceStore[e];if(!t)return null;const r={},o=Object.getOwnPropertyDescriptors(t);Object.keys(o).forEach((e=>{const t=o[e];cv(t,"value")&&(t.value=this.transformToAtom(t.value)),r[e]=yb.getAtomOverview({atomId:iv(),instanceId:n,value:t})}));const i=this.addExtraProperty(e);return{...r,...i}}getOrigin(e){const t=this.store[e];return t||null}add(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=iv();let r=n;var o;fv(o=e)&&cv(o,"constructor")&&"function"==typeof o.constructor&&(r=t),this.store[n]=e,this.instanceStore[n]=r;const i=yb.getSemanticValue(e);return yb.getAtomOverview({atomId:n,value:i,instanceId:r})}static getAtomOverview(e){let{instanceId:t="",atomId:n,value:r}=e;return{id:iv(),type:"atom",__atomId:n,instanceId:t,value:r}}static getSemanticValue(e){if(fv(t=e)&&"[object Object]"===sv(t))return"Object {...}";var t;if(dv(e))return"Array (".concat(e.length,")");return e.constructor.name}addExtraProperty(e){const t=this.store[e],n=this.instanceStore[e],r={};if((t instanceof String||t instanceof Number||t instanceof Boolean)&&(r["[[PrimitiveValue]]"]=this.transformToAtom(t.valueOf())),t instanceof Set){const e={};let n=0;for(const r of t)e[n++]=r;e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}if(t instanceof Map){const e={};let n=0;for(const[r,o]of t.entries())e[n++]={key:r,value:o};e.size=t.size,r["[[Entries]]"]=this.transformToAtom(e)}var o;return(dv(t)||(o=t,"function"==typeof NodeList&&"NodeList"===NodeList.name&&o instanceof NodeList||"function"==typeof HTMLCollection&&"HTMLCollection"===HTMLCollection.name&&o instanceof HTMLCollection))&&(r.length=this.transformToAtom(t.length)),null!==Object.getPrototypeOf(t)?r["[[Prototype]]"]=this.add(Object.getPrototypeOf(t),n):r.___proto___=this.transformToAtom(null),r}}const vb=new yb;class Ab{defaultConfig(){return{}}constructor(){t(this,"value",void 0),t(this,"mergeConfig",(e=>{const t=Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return this.privateKeys.includes(n)||(e[n]=r),e}),{});return this.value={...this.defaultConfig(),...t},this.value})),this.value=this.defaultConfig()}get(){return this.value}set(e,t){this.value[e]=t}}const bb="page-spy-room";var wb;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED"}(wb||(wb={}));const Sb=2e3,Eb=Math.pow(1.5,4)*Sb;class xb{constructor(){t(this,"events",{open:[],close:[],error:[],message:[]})}emit(e,t){this.events[e].forEach((e=>{e(t)})),"close"!==e&&"error"!==e||this.clearListeners()}onOpen(e){this.events.open.push(e)}onClose(e){this.events.close.push(e)}onError(e){this.events.error.push(e)}onMessage(e){this.events.message.push(e)}clearListeners(){Object.entries(this.events).forEach((e=>{let[,t]=e;t.splice(0)}))}}class kb{getSocket(){return this.socketWrapper}updateRoomInfo(){if(this.getPageSpyConfig){var e;const{project:t,title:n}=this.getPageSpyConfig(),r=null===(e=this.getClient)||void 0===e?void 0:e.call(this).getName();this.send({type:Iv,content:{info:{name:r,group:t,tags:{title:n,name:r,group:t}}}},!0)}}constructor(){t(this,"socketUrl",""),t(this,"socketConnection",null),t(this,"debuggerConnection",null),t(this,"pingTimer",null),t(this,"pongTimer",null),t(this,"retryTimer",null),t(this,"isOffline",!1),t(this,"messageCapacity",0),t(this,"messages",[]),t(this,"events",{debug:[],refresh:[],"atom-detail":[],"atom-getter":[],"debugger-online":[],"database-pagination":[],"public-data":[],"harbor-clear":[]}),t(this,"retryInterval",Sb),t(this,"connectable",!0),t(this,"getPageSpyConfig",null),t(this,"getClient",null),this.addListener("atom-detail",kb.handleResolveAtom),this.addListener("atom-getter",kb.handleAtomPropertyGetter),this.addListener("debugger-online",this.handleFlushBuffer)}async init(e){try{var t,n,r,o,i;if(!e)throw Error("WebSocket url cannot be empty");this.socketWrapper.clearListeners(),this.socketWrapper.getState()===wb.OPEN&&await new Promise((e=>{this.socketWrapper.onClose((()=>{this.socketWrapper.clearListeners(),e()})),this.socketWrapper.close()})),null===(t=this.socketWrapper)||void 0===t||t.onOpen((()=>{this.connectOnline()})),null===(n=this.socketWrapper)||void 0===n||n.onMessage((e=>{this.handleMessage(e)})),null===(r=this.socketWrapper)||void 0===r||r.onClose((()=>{this.connectOffline()})),null===(o=this.socketWrapper)||void 0===o||o.onError((()=>{this.connectOffline()})),this.socketUrl=e,null===(i=this.socketWrapper)||void 0===i||i.init(e)}catch(e){xv.error(e.message)}}addListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeListener(e,t){const n=this.events[e]||[],r=n.indexOf(t);r>-1&&n.splice(r,1)}broadcastMessage(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=function(e){return{type:Lv,content:{data:e}}}(e);this.send(n,t)}close(){var e;this.connectable=!1,this.clearPing(),null===(e=this.socketWrapper)||void 0===e||e.close(),this.messages=[],Object.entries(this.events).forEach((e=>{let[t,n]=e;["atom-detail","atom-getter","debugger-online"].includes(t)||n.splice(0)}))}connectOnline(){this.retryInterval=Sb,this.updateRoomInfo(),this.ping()}connectOffline(){this.socketConnection=null,this.debuggerConnection=null,this.clearPing(),this.retryTimer&&clearTimeout(this.retryTimer),this.connectable&&(this.retryTimer=setTimeout((()=>{this.retryInterval<Eb&&(this.retryInterval*=1.5),this.retryTimer=null,this.tryReconnect()}),this.retryInterval))}tryReconnect(){this.init(this.socketUrl)}ping(){this.pingTimer&&clearTimeout(this.pingTimer),this.pongTimer&&clearTimeout(this.pongTimer),this.pingTimer=setTimeout((()=>{this.send({type:"ping",content:null}),this.pingTimer=null,this.pongTimer=setTimeout((()=>{this.connectOffline(),this.pongTimer=null}),5e3)}),5e3)}clearPing(){this.pingTimer&&(clearTimeout(this.pingTimer),this.pingTimer=null),this.pongTimer&&(clearTimeout(this.pongTimer),this.pongTimer=null)}handlePong(){clearTimeout(this.pongTimer),this.pongTimer=null,this.ping()}handleMessage(e){var t;kb.messageFilters.length&&kb.messageFilters.forEach((t=>{e=t(e)}));const{CONNECT:n,MESSAGE:r,ERROR:o,JOIN:i,PING:a,PONG:s,LEAVE:c,CLOSE:l,BROADCAST:u}=Cv,d=JSON.parse(e.data),{type:f}=d;switch(f){case n:const{selfConnection:e,roomConnections:a}=d.content;this.socketConnection=e,this.debuggerConnection=a.find((e=>"Debugger"===e.userId))||null;break;case i:case c:const{connection:s}=d.content;"Debugger"===s.userId&&(f===i?(this.debuggerConnection=s,this.sendClientInfo()):this.debuggerConnection=null);break;case r:const{data:u,from:h,to:p}=d.content;p.address===(null===(t=this.socketConnection)||void 0===t?void 0:t.address)&&this.dispatchEvent(u.type,{source:u,from:h,to:p});break;case l:case o:this.connectOffline()}this.handlePong()}dispatchEvent(e,t){var n;["public-data"].includes(e)?this.events["public-data"].forEach((e=>{e(t)})):null===(n=this.events[e])||void 0===n||n.forEach((e=>{e.call(this,t,(e=>{this.unicastMessage(e,t.from)}))}))}unicastMessage(e,t){const n=function(e,t,n){return{type:Pv,content:{data:e,from:t,to:n}}}(e,this.socketConnection,t);this.send(n)}handleFlushBuffer(e){const{latestId:t}=e.source.data,n=this.messages.findIndex((e=>e.content.data.data.id===t));this.messages.slice(n+1).forEach((t=>{const n={type:Pv,content:{data:t.content.data,from:this.socketConnection,to:e.from}};this.send(n,!0)}))}static handleResolveAtom(e,t){let{source:n}=e;const{type:r,data:o}=n;if("atom-detail"===r){const e=vb.get(o)||{};t(Ov("atom-detail-".concat(o),e,!1))}}static handleAtomPropertyGetter(e,t){let{source:n}=e;const{type:r,data:o}=n;if("atom-getter"===r){const{id:e,parentId:n,key:r,instanceId:a}=o,s=vb.getOrigin(a),c=vb.getOrigin(n);let l={};var i;if(s&&c)l=null===(i=Object.getOwnPropertyDescriptor(c,r))||void 0===i||null===(i=i.get)||void 0===i?void 0:i.call(s);else l=new Error("Getter computed failed");t(Ov("atom-getter-".concat(e),vb.transformToAtom(l)))}}send(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.checkIfSend(e))try{var n;const t=e;t.createdAt=Date.now(),t.requestId=iv();const r=wv(t);null===(n=this.socketWrapper)||void 0===n||n.send(r)}catch(e){xv.error("Incompatible: ".concat(e.message)),this.connectOffline()}this.checkIfCache(e,t)&&(0!==this.messageCapacity&&this.messages.length>=this.messageCapacity&&this.messages.shift(),this.messages.push(e))}checkIfSend(e){return this.socketWrapper.getState()===wb.OPEN&&(!![Iv,Rv].includes(e.type)||!!this.debuggerConnection)}checkIfCache(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.isOffline&&!t&&![Pv,Rv].includes(e.type)}sendClientInfo(){var e;const t=null===(e=this.getClient)||void 0===e?void 0:e.call(this).makeClientInfoMsg();this.broadcastMessage({role:"client",type:"client-info",data:t},!0)}}t(kb,"messageFilters",[]);class Tb extends xb{constructor(){super(...arguments),t(this,"socketInstance",null)}init(e){this.socketInstance=new WebSocket(e);["open","close","error","message"].forEach((e=>{this.socketInstance.addEventListener(e,(t=>{this.events[e].forEach((e=>{e(t)}))}))}))}send(e){var t;null===(t=this.socketInstance)||void 0===t||t.send(wv(e))}close(){var e;null===(e=this.socketInstance)||void 0===e||e.close()}getState(){var e;return null===(e=this.socketInstance)||void 0===e?void 0:e.readyState}}var Pb=new class extends kb{constructor(){super(...arguments),t(this,"socketWrapper",new Tb)}onOffline(){window.dispatchEvent(new CustomEvent("sdk-inactive")),sessionStorage.removeItem(bb)}};class Lb{constructor(){t(this,"name","ConsolePlugin"),t(this,"proxyTypes",["log","info","error","warn","debug"]),t(this,"console",{}),t(this,"$pageSpyConfig",null)}async onInit(e){let{config:t}=e;Lb.hasInitd||(Lb.hasInitd=!0,Pb.addListener("debug",Lb.handleDebugger),this.$pageSpyConfig=t,this.init())}init(){var e=this;this.proxyTypes.forEach((t=>{this.console[t]=window.console[t]||window.console.log||(()=>{}),window.console[t]=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.printLog({logType:t,logs:r,url:window.location.href})}}))}reset(){this.proxyTypes.forEach((e=>{window.console[e]=this.console[e]}))}onReset(){this.reset(),Lb.hasInitd=!1}static handleDebugger(e,t){let{source:n}=e;const{type:r,data:o}=n;if("debug"===r){t(Ov("console",{logType:"debug-origin",logs:[{id:iv(),type:"debug-origin",value:o}]}));try{const e=new Function("return ".concat(o))();t(Ov("console",{logType:"debug-eval",logs:[vb.transformToAtom(e)]}))}catch(e){t(Ov("console",{logType:"error",logs:[{type:"error",value:e.stack}]}))}}}printLog(e){if(e.logs&&e.logs.length){var t,n;const r=null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t?void 0:t.console;if(r){this.reset();const t=r(e);if(this.init(),!1===t)return}this.console[e.logType](...e.logs);const o=Ov("console",{...e,time:Date.now(),logs:e.logs.map((e=>vb.transformToAtom(e,!1)))});if(Pb.broadcastMessage(o),null!==(n=this.$pageSpyConfig)&&void 0!==n&&n.serializeData){const t={...o,data:{...o.data,logs:e.logs.map((e=>vb.transformToAtom(e,!0)))}};Pb.dispatchEvent("public-data",t)}else Pb.dispatchEvent("public-data",o)}}}t(Lb,"hasInitd",!1);class Rb{constructor(){t(this,"name","ErrorPlugin"),t(this,"$pageSpyConfig",null),t(this,"uncaughtErrorListener",(e=>{if(e.error){const{message:t,stack:n}=e.error,r=kv(e.error);this.sendMessage(n||t,r)}else{const t=e.message||"[PageSpy] An unknown error occurred and no stack trace available";this.sendMessage(t,null)}})),t(this,"resourceLoadErrorListener",(e=>{if(!(e instanceof ErrorEvent)){const{target:t}=e;this.sendMessage("[PageSpy] Resource Load Error: Cannot load resource of (".concat(t.src||t.href,")"),null)}})),t(this,"rejectionListener",(e=>{const t=kv(e.reason);this.sendMessage(e.reason,t)}))}onInit(e){let{config:t}=e;Rb.hasInitd||(Rb.hasInitd=!0,this.$pageSpyConfig=t,this.onUncaughtError(),this.onResourceLoadError(),this.onUnhandledRejectionError())}onReset(){window.removeEventListener("error",this.uncaughtErrorListener),window.removeEventListener("error",this.resourceLoadErrorListener),window.removeEventListener("unhandledrejection",this.rejectionListener),Rb.hasInitd=!1}onUncaughtError(){window.addEventListener("error",this.uncaughtErrorListener)}onResourceLoadError(){window.addEventListener("error",this.resourceLoadErrorListener,!0)}onUnhandledRejectionError(){window.addEventListener("unhandledrejection",this.rejectionListener)}sendMessage(e,t){var n,r;const o={logType:"error",logs:[e],time:Date.now(),url:window.location.href,errorDetail:t};if(!1===(null===(n=this.$pageSpyConfig)||void 0===n||null===(n=n.dataProcessor)||void 0===n||null===(r=n.console)||void 0===r?void 0:r.call(n,o)))return;o.logs=o.logs.map((e=>vb.transformToAtom(e)));const i=Ov("console",o);Pb.dispatchEvent("public-data",i),Pb.broadcastMessage(i)}}t(Rb,"hasInitd",!1);var Ib="\t\n\v\f\r \u2028\u2029\ufeff",Cb=U,Ob=Co,Bb=Ib,Db=x("".replace),jb=RegExp("^["+Bb+"]+"),Mb=RegExp("(^|[^"+Bb+"])["+Bb+"]+$"),Ub=function(e){return function(t){var n=Ob(Cb(t));return 1&e&&(n=Db(n,jb,"")),2&e&&(n=Db(n,Mb,"$1")),n}},qb={start:Ub(1),end:Ub(2),trim:Ub(3)},Nb=en.PROPER,Fb=s,Hb=Ib,_b=qb.trim;to({target:"String",proto:!0,forced:function(e){return Fb((function(){return!!Hb[e]()||" "!==" "[e]()||Nb&&Hb[e].name!==e}))}("trim")},{trim:function(){return _b(this)}});class zb extends Hv{constructor(){super(Pb)}}class Qb extends zb{constructor(){super(),t(this,"xhrOpen",null),t(this,"xhrSend",null),t(this,"xhrSetRequestHeader",null),this.initProxyHandler()}initProxyHandler(){const e=this;if(!window.XMLHttpRequest)return;const{open:t,send:n,setRequestHeader:r}=window.XMLHttpRequest.prototype;this.xhrOpen=t,this.xhrSend=n,this.xhrSetRequestHeader=r,window.XMLHttpRequest.prototype.open=function(){const n=this;for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];const a=o[0],s=o[1],c=iv();e.createRequest(c);const l=e.getRequest(c);return l&&(l.url=new URL(s,window.location.href).toString(),l.method=a.toUpperCase(),l.requestType="xhr"),this.pageSpyRequestId=c,this.pageSpyRequestMethod=a,this.pageSpyRequestUrl=s,n.addEventListener("readystatechange",(async()=>{if(l){switch(l.readyState=n.readyState,n.readyState){case n.UNSENT:case n.OPENED:l.status=n.status,l.statusText="Pending",l.startTime||(l.startTime=Date.now());break;case n.HEADERS_RECEIVED:l.status=n.status,l.statusText="Loading";const t=(n.getAllResponseHeaders()||"").trim().split(/[\r\n]+/);l.responseHeader=t.reduce(((e,t)=>{const[n,...r]=t.split(": ");return e.push([n,r.join(": ")]),e}),[]);break;case n.LOADING:l.status=n.status,l.statusText="Loading";break;case n.DONE:l.status=n.status,l.statusText="Done",l.endTime=Date.now(),l.costTime=l.endTime-(l.startTime||l.endTime);const r=await e.formatResponse(n);av(r).forEach((e=>{l[e]=r[e]}));break;default:l.status=n.status,l.statusText="Unknown"}e.sendRequestItem(n.pageSpyRequestId,l)}else xv.warn("The request object is not found on XMLHttpRequest's readystatechange event")})),t.apply(n,o)},window.XMLHttpRequest.prototype.setRequestHeader=function(t,n){const o=e.getRequest(this.pageSpyRequestId);return o?(o.requestHeader||(o.requestHeader=[]),o.requestHeader.push([String(t),String(n)])):xv.warn("The request object is not found on XMLHttpRequest's setRequestHeader event"),r.apply(this,[t,n])},window.XMLHttpRequest.prototype.send=function(t){const r=this,{pageSpyRequestId:o}=r,i=e.getRequest(o);return i?(i.responseType=r.responseType,i.withCredentials=r.withCredentials,"GET"!==i.method&&(i.requestHeader=Nv(i.requestHeader,t),Fv(t).then((t=>{i.requestPayload=t,e.sendRequestItem(r.pageSpyRequestId,i)})))):xv.warn("The request object is not found on XMLHttpRequest's send event"),n.apply(r,[t])}}reset(){this.xhrOpen&&(window.XMLHttpRequest.prototype.open=this.xhrOpen),this.xhrSend&&(window.XMLHttpRequest.prototype.send=this.xhrSend),this.xhrSetRequestHeader&&(window.XMLHttpRequest.prototype.setRequestHeader=this.xhrSetRequestHeader)}async formatResponse(e){const t={response:"",responseReason:null};switch(e.responseType){case"":case"text":if(lv(e.response))try{t.response=JSON.parse(e.response)}catch(n){t.response=e.response}else void 0!==e.response&&(t.response=sv(e.response));break;case"json":void 0!==e.response&&(t.response=e.response);break;case"blob":case"arraybuffer":if(e.response){let n=e.response;if(n instanceof ArrayBuffer){const t=e.getResponseHeader("content-type");t&&(n=new Blob([n],{type:t}))}if(hv(n))if(n.size<=Dv)try{t.response=await Tv(n)}catch(e){t.response=await n.text(),xv.error(e.message)}else t.response="[object Blob]",t.responseReason=jv}break;default:void 0!==e.response&&(t.response=Object.prototype.toString.call(e.response))}return t}}var Wb=i.Promise,Gb={},Vb=be,$b=TypeError,Jb=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw $b("Bad Promise constructor");t=e,n=r})),this.resolve=Vb(t),this.reject=Vb(n)};Gb.f=function(e){return new Jb(e)};var Xb=Bt,Kb=V,Yb=Gb,Zb=to,ew=Wb,tw=s,nw=X,rw=Q,ow=Af,iw=function(e,t){if(Xb(e),Kb(t)&&t.constructor===e)return t;var n=Yb.f(e);return(0,n.resolve)(t),n.promise},aw=Yn,sw=ew&&ew.prototype;if(Zb({target:"Promise",proto:!0,real:!0,forced:!!ew&&tw((function(){sw.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=ow(this,nw("Promise")),n=rw(e);return this.then(n?function(n){return iw(t,e()).then((function(){return n}))}:e,n?function(n){return iw(t,e()).then((function(){throw n}))}:e)}}),rw(ew)){var cw=nw("Promise").prototype.finally;sw.finally!==cw&&aw(sw,"finally",cw,{unsafe:!0})}class lw extends zb{constructor(){super(),t(this,"fetch",null),this.initProxyHandler()}reset(){this.fetch&&(window.fetch=this.fetch)}initProxyHandler(){const e=this,t=window.fetch;t&&(this.fetch=t,window.fetch=function(n){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=t(n,r),i=iv();e.createRequest(i);const a=e.getRequest(i);if(a){let t,s="GET",c=null;lv(n)||n instanceof URL?(s=r.method||"GET",t=n,c=r.headers||null):(s=n.method,t=n.url,c=n.headers),a.url=new URL(t,window.location.href).toString(),a.method=s.toUpperCase(),a.requestType="fetch",a.status=0,a.statusText="Pending",a.startTime=Date.now(),a.readyState=XMLHttpRequest.UNSENT,r.credentials&&"omit"!==r.credentials&&(a.withCredentials=!0),c&&(!function(e){return e instanceof Headers}(c)?fv(c)?a.requestHeader=Object.entries(c).map((e=>{let[t,n]=e;return[String(t),String(n)]})):a.requestHeader=c.map((e=>{let[t,n]=e;return[String(t),String(n)]})):a.requestHeader=[...c.entries()]),"GET"!==a.method&&(a.requestHeader=Nv(a.requestHeader,r.body),Fv(r.body).then((t=>{a.requestPayload=t,e.sendRequestItem(i,a)}))),e.sendRequestItem(i,a),o.then((t=>{a.endTime=Date.now(),a.costTime=a.endTime-(a.startTime||a.endTime),a.status=t.status||200,a.statusText=t.statusText||"Done",a.responseHeader=[...t.headers.entries()],a.readyState=XMLHttpRequest.HEADERS_RECEIVED,e.sendRequestItem(i,a);const n=t.headers.get("content-type");if(n){if(n.includes("application/json"))return a.responseType="json",t.clone().text();if(n.includes("text/html")||n.includes("text/plain"))return a.responseType="text",t.clone().text()}return a.responseType="blob",t.clone().blob()})).then((async e=>{switch(a.responseType){case"text":case"json":try{a.response=JSON.parse(e)}catch(t){a.response=e,a.responseType="text"}break;case"blob":const t=e;if(t.size<=Dv)try{a.response=await Tv(t)}catch(e){a.response=await t.text(),xv.error(e.message)}else a.response="[object Blob]",a.responseReason=jv}})).finally((()=>{a.readyState=XMLHttpRequest.DONE,e.sendRequestItem(i,a)}))}else xv.warn("The request object is not found on window.fetch event");return o})}}class uw extends zb{constructor(){super(),t(this,"sendBeacon",null),this.initProxyHandler()}reset(){this.sendBeacon&&(window.navigator.sendBeacon=this.sendBeacon)}initProxyHandler(){const e=window.navigator.sendBeacon;if(!e)return;const t=this;this.sendBeacon=e,window.navigator.sendBeacon=function(n,r){const o=e.call(window.navigator,n,r),i=iv();t.createRequest(i);const a=t.getRequest(i);return a?(a.url=new URL(n,window.location.href).toString(),a.method="POST",a.status=0,a.statusText="Pending",a.requestType="ping",a.requestHeader=Nv(a.requestHeader,r),a.startTime=Date.now(),Fv(r).then((e=>{a.requestPayload=e,t.sendRequestItem(i,a)})),a.response="",o?(a.status=200,a.statusText="Sent",a.endTime=Date.now(),a.costTime=a.endTime-(a.startTime||a.endTime)):(a.status=500,a.statusText="Unknown"),a.readyState=XMLHttpRequest.DONE,t.sendRequestItem(i,a)):xv.warn("The request object is not on navigator.sendBeacon event"),o}}}const dw=window.EventSource;class fw extends zb{constructor(){super(),this.initProxyHandler()}initProxyHandler(){if(!window.EventSource)return;const e=this;window.EventSource=class{constructor(t,n){const r=iv(),o=new Bv(r);o.url=new URL(t,window.location.href).toString(),o.method="GET",o.requestType="eventsource",o.requestHeader=[["Accept","text/event-stream"],["Cache-Control","no-cache"]],o.readyState=Mv.UNSENT,o.withCredentials=Boolean(null==n?void 0:n.withCredentials),o.responseHeader=[["Content-Type","text/event-stream"]],o.responseType="text",o.startTime=Date.now();const i=new dw(t,n);return i.addEventListener("open",(()=>{o.readyState=Mv.OPENED,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(r,o)})),i.addEventListener("message",(t=>{let{data:n,lastEventId:i}=t;o.status=200,o.statusText="Done",o.readyState=Mv.DONE,o.response=n,o.lastEventId=i,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(r,o)})),i.addEventListener("error",(()=>{o.status=400,o.readyState=Mv.DONE,o.endTime=Date.now(),o.costTime=o.endTime-o.startTime,e.sendRequestItem(r,o)})),i}}}reset(){window.EventSource=dw}}class hw{constructor(){t(this,"name","NetworkPlugin"),t(this,"xhrProxy",null),t(this,"fetchProxy",null),t(this,"beaconProxy",null),t(this,"sseProxy",null)}onInit(e){let{config:t}=e;hw.hasInitd||(hw.hasInitd=!0,Hv.dataProcessor=t.dataProcessor.network,this.xhrProxy=new Qb,this.fetchProxy=new lw,this.beaconProxy=new uw,this.sseProxy=new fw)}onReset(){var e,t,n,r;null===(e=this.xhrProxy)||void 0===e||e.reset(),null===(t=this.fetchProxy)||void 0===t||t.reset(),null===(n=this.beaconProxy)||void 0===n||n.reset(),null===(r=this.sseProxy)||void 0===r||r.reset(),hw.hasInitd=!1}}t(hw,"hasInitd",!1);var pw=i,gw=ha;to({global:!0},{Reflect:{}}),gw(pw.Reflect,"Reflect",!0);var mw; /*! modernizr 4.0.0-alpha (Custom Build) | MIT * * https://modernizr.com/download/?-apng-arrow-avif-beacon-blobworkers-clipboard-contextmenu-cookies-cors-customevent-datachannel-dataworkers-es6array-es6class-es6collections-es6math-es6number-es6object-es6string-es6symbol-es7array-es8object-eventlistener-exiforientation-fetch-forcetouch-generators-getusermedia-hashchange-history-imgcrossorigin-indexeddb-jpeg2000-lazyloading-localstorage-messagechannel-oninput-peerconnection-performance-pointerevents-postmessage-prefetch-promises-proxy-queryselector-requestanimationframe-resizeobserver-restdestructuringarray_restdestructuringobject-restparameters-sandbox-scriptasync-scriptdefer-seamless-serviceworker-sessionstorage-sharedworkers-spreadarray-spreadobject-srcdoc-stringtemplate-transferables-webanimations-webgl-webp-websqldatabase-webworkers-addtest-atrule-domprefixes-hasevent-load-mq-prefixed-prefixedcss-prefixes-printshiv-setclasses-testallprops-testprop-teststyles !*/mw={exports:{}},function(e,t,n,r){function o(e,t){return typeof e===t}function i(e){var t=E.className,n=A._config.classPrefix||"";if(x&&(t=t.baseVal),A._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}A._config.enableClasses&&(e.length>0&&(t+=" "+n+e.join(" "+n)),x?E.className.baseVal=t:E.className=t)}function a(e,t){if("object"==typeof e)for(var n in e)b(e,n)&&a(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),o=A[r[0]];if(2===r.length&&(o=o[r[1]]),void 0!==o)return A;t="function"==typeof t?t():t,1===r.length?A[r[0]]=t:(!A[r[0]]||A[r[0]]instanceof Boolean||(A[r[0]]=new Boolean(A[r[0]])),A[r[0]][r[1]]=t),i([(t&&!1!==t?"":"no-")+r.join("-")]),A._trigger(e,t)}return A}function s(){return"function"!=typeof n.createElement?n.createElement(arguments[0]):x?n.createElementNS.call(n,"http://www.w3.org/2000/svg",arguments[0]):n.createElement.apply(n,arguments)}function c(e,t,r,o){var i,a,c,l,u="modernizr",d=s("div"),f=function(){var e=n.body;return e||((e=s(x?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(c=s("div")).id=o?o[r]:u+(r+1),d.appendChild(c);return(i=s("style")).type="text/css",i.id="s"+u,(f.fake?f:d).appendChild(i),f.appendChild(d),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(n.createTextNode(e)),d.id=u,f.fake&&(f.style.background="",f.style.overflow="hidden",l=E.style.overflow,E.style.overflow="hidden",E.appendChild(f)),a=t(d,e),f.fake&&f.parentNode?(f.parentNode.removeChild(f),E.style.overflow=l,E.offsetHeight):d.parentNode.removeChild(d),!!a}function l(e,n,r){var o;if("getComputedStyle"in t){o=getComputedStyle.call(t,e,n);var i=t.console;null!==o?r&&(o=o.getPropertyValue(r)):i&&i[i.error?"error":"log"].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else o=!n&&e.currentStyle&&e.currentStyle[r];return o}function u(e,t){return!!~(""+e).indexOf(t)}function d(e){return e.replace(/([A-Z])/g,(function(e,t){return"-"+t.toLowerCase()})).replace(/^ms-/,"-ms-")}function f(e){return e.replace(/([a-z])-([a-z])/g,(function(e,t,n){return t+n.toUpperCase()})).replace(/^-/,"")}function h(e,n,i,a){function h(){g&&(delete j.style,delete j.modElem)}if(a=!o(a,"undefined")&&a,!o(i,"undefined")){var p=function(e,n){var o=e.length;if("CSS"in t&&"supports"in t.CSS){for(;o--;)if(t.CSS.supports(d(e[o]),n))return!0;return!1}if("CSSSupportsRule"in t){for(var i=[];o--;)i.push("("+d(e[o])+":"+n+")");return c("@supports ("+(i=i.join(" or "))+") { #modernizr { position: absolute; } }",(function(e){return"absolute"===l(e,null,"position")}))}return r}(e,i);if(!o(p,"undefined"))return p}for(var g,m,y,v,A,b=["modernizr","tspan","samp"];!j.style&&b.length;)g=!0,j.modElem=s(b.shift()),j.style=j.modElem.style;for(y=e.length,m=0;m<y;m++)if(v=e[m],A=j.style[v],u(v,"-")&&(v=f(v)),j.style[v]!==r){if(a||o(i,"undefined"))return h(),"pfx"!==n||v;try{j.style[v]=i}catch(e){}if(j.style[v]!==A)return h(),"pfx"!==n||v}return h(),!1}function p(e,t){return function(){return e.apply(t,arguments)}}function g(e,t,n,r,i){var a=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+T.join(a+" ")+a).split(" ");return o(t,"string")||o(t,"undefined")?h(s,t,r,i):function(e,t,n){var r;for(var i in e)if(e[i]in t)return!1===n?e[i]:o(r=t[e[i]],"function")?p(r,n||t):r;return!1}(s=(e+" "+L.join(a+" ")+a).split(" "),t,n)}function m(e,t){var n=e.deleteDatabase(t);n.onsuccess=function(){a("indexeddb.deletedatabase",!0)},n.onerror=function(){a("indexeddb.deletedatabase",!1)}}var y=[],v={_version:"4.0.0-alpha",_config:{classPrefix:"",enableClasses:!1,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout((function(){t(n[e])}),0)},addTest:function(e,t,n){y.push({name:e,fn:t,options:n})},addAsyncTest:function(e){y.push({name:null,fn:e})}},A=function(){};A.prototype=v,A=new A;var b,w,S=[],E=n.documentElement,x="svg"===E.nodeName.toLowerCase();b=o(w={}.hasOwnProperty,"undefined")||o(w.call,"undefined")?function(e,t){return t in e&&o(e.constructor.prototype[t],"undefined")}:function(e,t){return w.call(e,t)},v._l={},v.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),A.hasOwnProperty(e)&&setTimeout((function(){A._trigger(e,A[e])}),0)},v._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout((function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)}),0),delete this._l[e]}},A._q.push((function(){v.addTest=a}));var k="Moz O ms Webkit",T=v._config.usePrefixes?k.split(" "):[];v._cssomPrefixes=T;var P=function(e){var n,o=U.length,i=t.CSSRule;if(void 0===i)return r;if(!e)return!1;if((n=(e=e.replace(/^@/,"")).replace(/-/g,"_").toUpperCase()+"_RULE")in i)return"@"+e;for(var a=0;a<o;a++){var s=U[a];if(s.toUpperCase()+"_"+n in i)return"@-"+s.toLowerCase()+"-"+e}return!1};v.atRule=P;var L=v._config.usePrefixes?k.toLowerCase().split(" "):[];v._domPrefixes=L;var R,I=(R=!("onblur"in E),function(e,t){var n;return!!e&&(t&&"string"!=typeof t||(t=s(t||"div")),!(n=(e="on"+e)in t)&&R&&(t.setAttribute||(t=s("div")),t.setAttribute(e,""),n="function"==typeof t[e],t[e]!==r&&(t[e]=r),t.removeAttribute(e)),n)});v.hasEvent=I,x||function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x<style>"+t+"</style>",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function o(e){var t=A[e[y]];return t||(t={},v++,e[y]=v,A[v]=t),t}function i(e,n,r){return n||(n=t),h?n.createElement(e):(r||(r=o(n)),!(i=r.cache[e]?r.cache[e].cloneNode():m.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e)).canHaveChildren||g.test(e)||i.tagUrn?i:r.frag.appendChild(i));var i}function a(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,(function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'}))+");return n}")(b,t.frag)}function s(e){e||(e=t);var r=o(e);return!b.shivCSS||f||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),h||a(e,r),e}function c(e){for(var t,n=e.getElementsByTagName("*"),o=n.length,i=RegExp("^(?:"+r().join("|")+")$","i"),a=[];o--;)t=n[o],i.test(t.nodeName)&&a.push(t.applyElement(l(t)));return a}function l(e){for(var t,n=e.attributes,r=n.length,o=e.ownerDocument.createElement(S+":"+e.nodeName);r--;)(t=n[r]).specified&&o.setAttribute(t.nodeName,t.nodeValue);return o.style.cssText=e.style.cssText,o}function u(e){for(var t,n=e.split("{"),o=n.length,i=RegExp("(^|[\\s,>+~])("+r().join("|")+")(?=[[\\s,>+~#.:]|$)","gi"),a="$1"+S+"\\:$2";o--;)(t=n[o]=n[o].split("}"))[t.length-1]=t[t.length-1].replace(i,a),n[o]=t.join("}");return n.join("{")}function d(e){function t(){clearTimeout(a._removeSheetTimer),r&&r.removeNode(!0),r=null}var r,i,a=o(e),s=e.namespaces,l=e.parentWindow;return!E||e.printShived||(void 0===s[S]&&s.add(S),l.attachEvent("onbeforeprint",(function(){t();for(var o,a,s,l=e.styleSheets,d=[],f=l.length,h=Array(f);f--;)h[f]=l[f];for(;s=h.pop();)if(!s.disabled&&w.test(s.media)){try{a=(o=s.imports).length}catch(e){a=0}for(f=0;f<a;f++)h.push(o[f]);try{d.push(s.cssText)}catch(e){}}d=u(d.reverse().join("")),i=c(e),r=n(e,d)})),l.attachEvent("onafterprint",(function(){(function(e){for(var t=e.length;t--;)e[t].removeNode()})(i),clearTimeout(a._removeSheetTimer),a._removeSheetTimer=setTimeout(t,500)})),e.printShived=!0),e}var f,h,p=e.html5||{},g=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,m=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,y="_html5shiv",v=0,A={};!function(){try{var e=t.createElement("a");e.innerHTML="<xyz></xyz>",f="hidden"in e,h=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return void 0===e.cloneNode||void 0===e.createDocumentFragment||void 0===e.createElement}()}catch(e){f=!0,h=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:"3.7.3",shivCSS:!1!==p.shivCSS,supportsUnknownElements:h,shivMethods:!1!==p.shivMethods,type:"default",shivDocument:s,createElement:i,createDocumentFragment:function(e,n){if(e||(e=t),h)return e.createDocumentFragment();for(var i=(n=n||o(e)).frag.cloneNode(),a=0,s=r(),c=s.length;a<c;a++)i.createElement(s[a]);return i},addElements:function(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,s(t)}};e.html5=b,s(t);var w=/^$|\b(?:all|print)\b/,S="html5shiv",E=!h&&function(){var n=t.documentElement;return!(void 0===t.namespaces||void 0===t.parentWindow||void 0===n.applyElement||void 0===n.removeNode||void 0===e.attachEvent)}();b.type+=" print",b.shivPrint=d,d(t),mw.exports&&(mw.exports=b)}(void 0!==t?t:this,n);var C=function(){},O=function(){};t.console&&(C=function(){var e=console.error?"error":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))},O=function(){var e=console.warn?"warn":"log";t.console[e].apply(t.console,Array.prototype.slice.call(arguments))}),v.load=function(){"yepnope"in t?(O("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. yepnope appears to be available on the page, so we’ll use it to handle this call to Modernizr.load, but please update your code to use yepnope directly.\n See http://github.com/Modernizr/Modernizr/issues/1182 for more information."),t.yepnope.apply(t,[].slice.call(arguments,0))):C("yepnope.js (aka Modernizr.load) is no longer included as part of Modernizr. Get it from http://yepnopejs.com. See http://github.com/Modernizr/Modernizr/issues/1182 for more information.")};var B=function(){var e=t.matchMedia||t.msMatchMedia;return e?function(t){var n=e(t);return n&&n.matches||!1}:function(e){var t=!1;return c("@media "+e+" { #modernizr { position: absolute; } }",(function(e){t="absolute"===l(e,null,"position")})),t}}();v.mq=B;var D={elem:s("modernizr")};A._q.push((function(){delete D.elem}));var j={style:D.elem.style};A._q.unshift((function(){delete j.style})),v.testAllProps=g;var M=v.prefixed=function(e,t,n){return 0===e.indexOf("@")?P(e):(-1!==e.indexOf("-")&&(e=f(e)),t?g(e,t,n):g(e,"pfx"))},U=v._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];v._prefixes=U,v.prefixedCSS=function(e){var t=M(e);return t&&d(t)},v.testAllProps=function(e,t,n){return g(e,r,r,t,n)},v.testProp=function(e,t,n){return h([e],r,t,n)},v.testStyles=c,A.addAsyncTest((function(){var e,t=["read","readText","write","writeText"];if(navigator.clipboard){a("clipboard",!0);for(var n=0;n<t.length;n++)e=!!navigator.clipboard[t[n]],a("clipboard."+t[n].toLowerCase(),e)}else a("clipboard",!1)})),A.addTest("contextmenu","contextMenu"in E&&"HTMLMenuItemElement"in t),A.addTest("cors","XMLHttpRequest"in t&&"withCredentials"in new XMLHttpRequest),A.addTest("es6array",!!(Array.prototype&&Array.prototype.copyWithin&&Array.prototype.fill&&Array.prototype.find&&Array.prototype.findIndex&&Array.prototype.keys&&Array.prototype.entries&&Array.prototype.values&&Array.from&&Array.of)),A.addTest("arrow",(function(){try{(0,eval)("()=>{}")}catch(e){return!1}return!0})),A.addTest("es6class",(function(){try{(0,eval)("class A{}")}catch(e){return!1}return!0})),A.addTest("es6collections",!!(t.Map&&t.Set&&t.WeakMap&&t.WeakSet)),A.addTest("generators",(function(){try{new Function("function* test() {}")()}catch(e){return!1}return!0})),A.addTest("es6math",!!(Math&&Math.clz32&&Math.cbrt&&Math.imul&&Math.sign&&Math.log10&&Math.log2&&Math.log1p&&Math.expm1&&Math.cosh&&Math.sinh&&Math.tanh&&Math.acosh&&Math.asinh&&Math.atanh&&Math.hypot&&Math.trunc&&Math.fround)),A.addTest("es6number",!!(Number.isFinite&&Number.isInteger&&Number.isSafeInteger&&Number.isNaN&&Number.parseInt&&Number.parseFloat&&Number.isInteger(Number.MAX_SAFE_INTEGER)&&Number.isInteger(Number.MIN_SAFE_INTEGER)&&Number.isFinite(Number.EPSILON))),A.addTest("es6object",!!(Object.assign&&Object.is&&Object.setPrototypeOf)),A.addTest("promises",(function(){return"Promise"in t&&"resolve"in t.Promise&&"reject"in t.Promise&&"all"in t.Promise&&"race"in t.Promise&&function(){var e;return new t.Promise((function(t){e=t})),"function"==typeof e}()})),A.addTest("restparameters",(function(){try{(0,eval)("function f(...rest) {}")}catch(e){return!1}return!0})),A.addTest("spreadarray",(function(){try{(0,eval)("(function f(){})(...[1])")}catch(e){return!1}return!0})),A.addTest("stringtemplate",(function(){try{return"-1-"===(0,eval)("(function(){var a=1; return `-${a}-`;})()")}catch(e){return!1}})),A.addTest("es6string",!!(String.fromCodePoint&&String.raw&&String.prototype.codePointAt&&String.prototype.repeat&&String.prototype.startsWith&&String.prototype.endsWith&&String.prototype.includes)),A.addTest("es6symbol",!!("function"==typeof Symbol&&Symbol.for&&Symbol.hasInstance&&Symbol.isConcatSpreadable&&Symbol.iterator&&Symbol.keyFor&&Symbol.match&&Symbol.prototype&&Symbol.replace&&Symbol.search&&Symbol.species&&Symbol.split&&Symbol.toPrimitive&&Symbol.toStringTag&&Symbol.unscopables)),A.addTest("es7array",!(!Array.prototype||!Array.prototype.includes)),A.addTest("restdestructuringarray",(function(){try{(0,eval)("var [...rest]=[1]")}catch(e){return!1}return!0})),A.addTest("restdestructuringobject",(function(){try{(0,eval)("var {...rest}={a:1}")}catch(e){return!1}return!0})),A.addTest("spreadobject",(function(){try{(0,eval)("var a={...{b:1}}")}catch(e){return!1}return!0})),A.addTest("es8object",!(!Object.entries||!Object.values)),A.addTest("customevent","CustomEvent"in t&&"function"==typeof t.CustomEvent),A.addTest("eventlistener","addEventListener"in t),A.addTest("forcetouch",(function(){return!!I(M("mouseforcewillbegin",t,!1),t)&&MouseEvent.WEBKIT_FORCE_AT_MOUSE_DOWN&&MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN})),A.addTest("hashchange",(function(){return!1!==I("hashchange",t)&&(n.documentMode===r||n.documentMode>7)})),A.addTest("oninput",(function(){var e,r=s("input");if(r.setAttribute("oninput","return"),r.style.cssText="position:fixed;top:0;",I("oninput",E)||"function"==typeof r.oninput)return!0;try{var o=n.createEvent("KeyboardEvent");e=!1;var i=function(t){e=!0,t.preventDefault(),t.stopPropagation()};o.initKeyEvent("keypress",!0,!0,t,!1,!1,!1,!1,0,"e".charCodeAt(0)),E.appendChild(r),r.addEventListener("input",i,!1),r.focus(),r.dispatchEvent(o),r.removeEventListener("input",i,!1),E.removeChild(r)}catch(r){e=!1}return e}));var q=[""].concat(L);v._domPrefixesAll=q,A.addTest("pointerevents",(function(){for(var e=0,t=q.length;e<t;e++)if(I(q[e]+"pointerdown"))return!0;return!1})),A.addTest("history",(function(){var e=navigator.userAgent;return!!e&&(-1===e.indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone")||"file:"===location.protocol)&&t.history&&"pushState"in t.history})),A.addTest("sandbox","sandbox"in s("iframe")),A.addTest("seamless","seamless"in s("iframe")),A.addTest("srcdoc","srcdoc"in s("iframe")),A.addTest("canvas",(function(){var e=s("canvas");return!(!e.getContext||!e.getContext("2d"))})),A.addAsyncTest((function(){if(!A.canvas)return!1;var e=new Image,t=s("canvas"),n=t.getContext("2d");e.onload=function(){a("apng",(function(){return void 0!==t.getContext&&(n.drawImage(e,0,0),0===n.getImageData(0,0,1,1).data[3])}))},e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACGFjVEwAAAABAAAAAcMq2TYAAAANSURBVAiZY2BgYPgPAAEEAQB9ssjfAAAAGmZjVEwAAAAAAAAAAQAAAAEAAAAAAAAAAAD6A+gBAbNU+2sAAAARZmRBVAAAAAEImWNgYGBgAAAABQAB6MzFdgAAAABJRU5ErkJggg=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){a("avif",1===e.width)},e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAAEcbWV0YQAAAAAAAABIaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGNhdmlmIC0gaHR0cHM6Ly9naXRodWIuY29tL2xpbmstdS9jYXZpZgAAAAAeaWxvYwAAAAAEQAABAAEAAAAAAUQAAQAAABcAAAAqaWluZgEAAAAAAAABAAAAGmluZmUCAAAAAAEAAGF2MDFJbWFnZQAAAAAOcGl0bQAAAAAAAQAAAHJpcHJwAAAAUmlwY28AAAAQcGFzcAAAAAEAAAABAAAAFGlzcGUAAAAAAAAAAQAAAAEAAAAQcGl4aQAAAAADCAgIAAAAFmF2MUOBAAwACggYAAYICGgIIAAAABhpcG1hAAAAAAAAAAEAAQUBAoMDhAAAAB9tZGF0CggYAAYICGgIIBoFHiAAAEQiBACwDoA="})),A.addTest("imgcrossorigin","crossOrigin"in s("img")),A.addAsyncTest((function(){var e=new Image;e.onerror=function(){a("exiforientation",!1)},e.onload=function(){a("exiforientation",2!==e.width)},e.src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QAiRXhpZgAASUkqAAgAAAABABIBAwABAAAABgASAAAAAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAABAAIDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigD/2Q=="})),A.addAsyncTest((function(){var e=new Image;e.onload=e.onerror=function(){a("jpeg2000",1===e.width)},e.src="data:image/jp2;base64,/0//UQAyAAAAAAABAAAAAgAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAEBwEBBwEBBwEBBwEB/1IADAAAAAEAAAQEAAH/XAAEQED/ZAAlAAFDcmVhdGVkIGJ5IE9wZW5KUEVHIHZlcnNpb24gMi4wLjD/kAAKAAAAAABYAAH/UwAJAQAABAQAAf9dAAUBQED/UwAJAgAABAQAAf9dAAUCQED/UwAJAwAABAQAAf9dAAUDQED/k8+kEAGvz6QQAa/PpBABr994EAk//9k="})),A.addTest("lazyloading","loading"in HTMLImageElement.prototype),A.addAsyncTest((function(){function e(e,t,n){function r(t){var r=!(!t||"load"!==t.type)&&1===o.width;a(e,"webp"===e&&r?new Boolean(r):r),n&&n(t)}var o=new Image;o.onerror=r,o.onload=r,o.src=t}var t=[{uri:"data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA=",name:"webp"},{uri:"data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA==",name:"webp.alpha"},{uri:"data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA",name:"webp.animation"},{uri:"data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=",name:"webp.lossless"}],n=t.shift();e(n.name,n.uri,(function(n){if(n&&"load"===n.type)for(var r=0;r<t.length;r++)e(t[r].name,t[r].uri)}))})),A.addTest("messagechannel","MessageChannel"in t),A.addTest("beacon","sendBeacon"in navigator),A.addTest("fetch","fetch"in t),A.addTest("performance",!!M("performance",t));var N=!0;try{t.postMessage({toString:function(){N=!1}},"*")}catch(w){}A.addTest("postmessage",new Boolean("postMessage"in t)),A.addTest("postmessage.structuredclones",N),A.addTest("proxy","Proxy"in t),A.addTest("queryselector","querySelector"in n&&"querySelectorAll"in n),A.addTest("prefetch",(function(){if(11===n.documentMode)return!0;var e=s("link").relList;return!(!e||!e.supports)&&e.supports("prefetch")})),A.addTest("requestanimationframe",!!M("requestAnimationFrame",t),{aliases:["raf"]}),A.addTest("scriptasync","async"in s("script")),A.addTest("scriptdefer","defer"in s("script")),A.addTest("serviceworker","serviceWorker"in navigator),A.addTest("cookies",(function(){try{n.cookie="cookietest=1";var e=-1!==n.cookie.indexOf("cookietest=");return n.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),A.addAsyncTest((function(){var e;try{e=M("indexedDB",t)}catch(e){}if(e){var n,r="modernizr-"+Math.random();try{n=e.open(r)}catch(e){return void a("indexeddb",!1)}n.onerror=function(t){!n.error||"InvalidStateError"!==n.error.name&&"UnknownError"!==n.error.name?(a("indexeddb",!0),m(e,r)):(a("indexeddb",!1),t.preventDefault())},n.onsuccess=function(){a("indexeddb",!0),m(e,r)}}else a("indexeddb",!1)})),A.addTest("localstorage",(function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("sessionstorage",(function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}})),A.addTest("websqldatabase","openDatabase"in t),A.addTest("webanimations","animate"in s("div")),A.addTest("webgl",(function(){return"WebGLRenderingContext"in t})),A.addTest("peerconnection",!!M("RTCPeerConnection",t)),A.addTest("datachannel",(function(){if(!A.peerconnection)return!1;for(var e=0,n=q.length;e<n;e++){var r=t[q[e]+"RTCPeerConnection"];if(r)try{return"createDataChannel"in new r({})}catch(e){}}return!1})),A.addTest("getUserMedia","mediaDevices"in navigator&&"getUserMedia"in navigator.mediaDevices),A.addTest("resizeobserver","ResizeObserver"in t),A.addAsyncTest((function(){function e(){a("blobworkers",!1),n()}function n(){l&&o.revokeObjectURL(l),c&&c.terminate(),u&&clearTimeout(u)}try{var r=t.BlobBuilder,o=t.URL;A._config.usePrefix&&(r=r||t.MozBlobBuilder||t.WebKitBlobBuilder||t.MSBlobBuilder||t.OBlobBuilder,o=o||t.MozURL||t.webkitURL||t.MSURL||t.OURL);var i,s,c,l,u,d="this.onmessage=function(e){postMessage(e.data)}";try{i=new Blob([d],{type:"text/javascript"})}catch(e){}i||((s=new r).append(d),i=s.getBlob()),l=o.createObjectURL(i),(c=new Worker(l)).onmessage=function(e){a("blobworkers","Modernizr"===e.data),n()},c.onerror=e,u=setTimeout(e,200),c.postMessage("Modernizr")}catch(n){e()}})),A.addAsyncTest((function(){try{var e=new Worker("data:text/javascript;base64,dGhpcy5vbm1lc3NhZ2U9ZnVuY3Rpb24oZSl7cG9zdE1lc3NhZ2UoZS5kYXRhKX0=");e.onmessage=function(t){e.terminate(),a("dataworkers","Modernizr"===t.data),e=null},e.onerror=function(){a("dataworkers",!1),e=null},setTimeout((function(){a("dataworkers",!1)}),200),e.postMessage("Modernizr")}catch(e){setTimeout((function(){a("dataworkers",!1)}),0)}})),A.addTest("sharedworkers","SharedWorker"in t),A.addTest("blobconstructor",(function(){try{return!!new Blob}catch(e){return!1}}),{aliases:["blob-constructor"]});var F=M("URL",t,!1);F=F&&t[F],A.addTest("bloburls",F&&"revokeObjectURL"in F&&"createObjectURL"in F),A.addTest("webworkers","Worker"in t),A.addTest("typedarrays","ArrayBuffer"in t),A.addAsyncTest((function(){function e(){a("transferables",!1),t()}function t(){i&&URL.revokeObjectURL(i),s&&s.terminate(),r&&clearTimeout(r)}if(!(A.blobconstructor&&A.bloburls&&A.webworkers&&A.typedarrays))return a("transferables",!1);try{var n,r,o=new Blob(['var hello = "world"'],{type:"text/javascript"}),i=URL.createObjectURL(o),s=new Worker(i);s.onerror=e,r=setTimeout(e,200),n=new ArrayBuffer(1),s.postMessage(n,[n]),a("transferables",0===n.byteLength),t()}catch(t){e()}})),function(){var e,t,n,r,i,a;for(var s in y)if(y.hasOwnProperty(s)){if(e=[],(t=y[s]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(r=o(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)1===(a=e[i].split(".")).length?A[a[0]]=r:(A[a[0]]&&(!A[a[0]]||A[a[0]]instanceof Boolean)||(A[a[0]]=new Boolean(A[a[0]])),A[a[0]][a[1]]=r),S.push((r?"":"no-")+a.join("-"))}}(),i(S),delete v.addTest,delete v.addAsyncTest;for(var H=0;H<A._q.length;H++)A._q[H]();e.Modernizr=A}(window,window,document);const yw={Element:{sandbox:{title:"iframe/sandbox",keyPath:"iframe/sandbox"},srcdoc:{title:"iframe/srcdoc",keyPath:"iframe/srcdoc"},apng:{title:"img/apng",keyPath:"img/apng"},avif:{title:"img/avif",keyPath:"img/avif"},imgcrossorigin:{title:"img/crossorigin",keyPath:"img/crossorigin"},exiforientation:{title:"img/exif-orientation",keyPath:"img/exif-orientation"},lazyloading:{title:"img/lazyloading",keyPath:"img/lazyloading"},webp:{title:"img/webp",keyPath:"img/webp"},prefetch:{title:"link/prefetch",keyPath:"link/prefetch"},scriptasync:{title:"script/async",keyPath:"script/async"},scriptdefer:{title:"script/defer",keyPath:"script/defer"}},Feature:{clipboard:{title:"Clipboard",keyPath:"clipboard"},customevent:{title:"Custom Event",keyPath:"event/customevent"},eventlistener:{title:"Eventlistener",keyPath:"event/eventlistener"},forcetouch:{title:"Force Touch",keyPath:"event/forcetouch"},hashchange:{title:"Hash Change",keyPath:"event/hashchange"},oninput:{title:"Input Event",keyPath:"event/oninput"},pointerevents:{title:"Pointer Event",keyPath:"event/forcetouch"},history:{title:"History",keyPath:"history"},messagechannel:{title:"Message Channel",keyPath:"messagechannel"},postmessage:{title:"Postmessage",keyPath:"postmessage"},performance:{title:"Performance API",keyPath:"performance"},queryselector:{title:"queryselector",keyPath:"queryselector"},requestanimationframe:{title:"requestanimationframe",keyPath:"requestanimationframe"},serviceworker:{title:"Service Worker",keyPath:"serviceworker"},webanimations:{title:"Web Animation",keyPath:"webanimations"},webgl:{title:"WebGL",keyPath:"webgl/webgl"},datachannel:{title:"WebRTC/datachannel",keyPath:"webrtc/datachannel"},getusermedia:{title:"WebRTC/getusermedia",keyPath:"webrtc/getusermedia"},peerconnection:{title:"WebRTC/peerconnection",keyPath:"webrtc/peerconnection"},resizeobserver:{title:"Resizeobserver",keyPath:"window/resizeobserver"},sharedworkers:{title:"Shared Worker",keyPath:"workers/sharedworkers"},webworkers:{title:"Web Worker",keyPath:"workers/webworkers"}},Network:{cors:{title:"Cors",keyPath:"cors"},beacon:{title:"Beacon",keyPath:"network/beacon"},fetch:{title:"Fetch",keyPath:"network/fetch"}},Javascript:{es6array:{title:"ES6 Array",keyPath:"es6/array"},arrow:{title:"ES6 Arrow Function",keyPath:"es6/arrow"},es6class:{title:"ES6 Class",keyPath:"es6/class"},es6collections:{title:"ES6 Collections",keyPath:"es6/collections"},generators:{title:"ES6 Generators",keyPath:"es6/generators"},es6math:{title:"ES6 Math",keyPath:"es6/math"},es6number:{title:"ES6 Number",keyPath:"es6/number"},es6object:{title:"ES6 Object",keyPath:"es6/object"},promises:{title:"ES6 Promise",keyPath:"es6/promises"},restparameters:{title:"ES6 Rest Parameters",keyPath:"es6/rest-parameters"},spreadarray:{title:"ES6 Array Spread",keyPath:"es6/spread-array"},stringtemplate:{title:"ES6 String Template",keyPath:"es6/string-template"},es6string:{title:"ES6 String",keyPath:"es6/string"},es6symbol:{title:"ES6 Symbol",keyPath:"es6/symbol"},proxy:{title:"ES6 Proxy",keyPath:"proxy"},reflect:{title:"ES6 Reflect",customTest:"\"Reflect\" in window &&\n typeof window.Reflect === 'object' &&\n typeof Reflect.has === 'function' &&\n [\n 'apply',\n 'construct',\n 'defineProperty',\n 'deleteProperty',\n 'getOwnPropertyDescriptor',\n 'getPrototypeOf',\n 'has',\n 'isExtensible',\n 'ownKeys',\n 'preventExtensions',\n 'setPrototypeOf',\n ].every((i) => Reflect.has(Reflect, i))"},es7array:{title:"ES7 Array",keyPath:"es7/array"},restdestructuringarray:{title:"ES7 Rest Destructuring",keyPath:"es7/rest-destructuring"},spreadobject:{title:"ES7 Object Spread",keyPath:"es7/spread-object"},es8object:{title:"ES8 Object",keyPath:"es8/object"},finally:{title:"ES9 Promise Finally",customTest:"<ES6 Promise> && !!Promise.prototype.finally"}},Storage:{cookies:{title:"Cookies",keyPath:"storage/cookies"},indexeddb:{title:"IndexedDB",keyPath:"storage/indexeddb"},localstorage:{title:"LocalStorage",keyPath:"storage/localstorage"},sessionstorage:{title:"SessionStorage",keyPath:"storage/sessionstorage"},websqldatabase:{title:"Web SQL Database",keyPath:"storage/websqldatabase"}}},vw=["indexeddb","apng","avif","exiforientation","webp"];async function Aw(){const e={Element:[],Feature:[],Network:[],Javascript:[],Storage:[]};av(yw).forEach((t=>{const n=yw[t],r=av(n).map((async e=>{const t=n[e];return t.keyPath&&(t.keyPath="".concat("https://github.com/Modernizr/Modernizr/tree/master/feature-detects","/").concat(t.keyPath,".js")),vw.indexOf(e)>-1?t.supported=await function(e){return new Promise((t=>{Modernizr.on(e,(e=>{t(e)}))}))}(e):t.supported=Modernizr[e],t}));e[t]=r}));for(const t in e)cv(e,t)&&(e[t]=await Promise.all(e[t]));return e}window.Modernizr.addTest("finally",Modernizr.promises&&!!Promise.prototype.finally),window.Modernizr.addTest("reflect","Reflect"in window&&"object"==typeof window.Reflect&&"function"==typeof Reflect.has&&["apply","construct","defineProperty","deleteProperty","getOwnPropertyDescriptor","getPrototypeOf","has","isExtensible","ownKeys","preventExtensions","setPrototypeOf"].every((e=>Reflect.has(Reflect,e))));class bw{constructor(){t(this,"name","SystemPlugin"),t(this,"$pageSpyConfig",null),t(this,"_cache",null)}onInit(e){let{config:t}=e;bw.hasInitd||(bw.hasInitd=!0,this.$pageSpyConfig=t,this.onceInitPublicData(),Pb.addListener("refresh",(async(e,t)=>{let{source:n}=e;const{data:r}=n;if("system"===r){const e=await this.getSystemInfo();if(null===e)return;t(e)}})),Pb.addListener("harbor-clear",(()=>{this.onceInitPublicData()})))}async onceInitPublicData(){const e=await this.getSystemInfo();null!==e&&Pb.dispatchEvent("public-data",e)}onReset(){bw.hasInitd=!1}async getSystemInfo(){var e,t;if(!this._cache){const e=await Aw();this._cache={system:{ua:navigator.userAgent},features:e}}return!1===(null===(e=this.$pageSpyConfig)||void 0===e||null===(e=e.dataProcessor)||void 0===e||null===(t=e.system)||void 0===t?void 0:t.call(e,this._cache))?null:Ov("system",this._cache)}}t(bw,"hasInitd",!1);class ww{constructor(){t(this,"name","PagePlugin"),t(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;ww.hasInitd||(ww.hasInitd=!0,this.$pageSpyConfig=t,Pb.addListener("refresh",((e,t)=>{let{source:n}=e;const{data:r}=n;if("page"===r){var o,i;const e=ww.collectHtml();if(!1===(null===(o=this.$pageSpyConfig)||void 0===o||null===(o=o.dataProcessor)||void 0===o||null===(i=o.page)||void 0===i?void 0:i.call(o,e)))return;const n=Ov("page",e);Pb.dispatchEvent("public-data",n),t(n)}})))}onReset(){ww.hasInitd=!1}static collectHtml(){return{html:document.documentElement.outerHTML,location:window.location}}}t(ww,"hasInitd",!1);class Sw{constructor(){t(this,"name","StoragePlugin"),t(this,"originSetItem",null),t(this,"originRemoveItem",null),t(this,"originClear",null),t(this,"cookieStoreChangeListener",null),t(this,"$pageSpyConfig",null)}onInit(e){let{config:t}=e;Sw.hasInitd||(Sw.hasInitd=!0,this.$pageSpyConfig=t,this.listenRefreshEvent(),this.onceInitPublicData(),this.initStorageProxy(),Pb.addListener("harbor-clear",(()=>{this.onceInitPublicData()})))}onReset(){this.originClear&&(Storage.prototype.clear=this.originClear),this.originRemoveItem&&(Storage.prototype.removeItem=this.originRemoveItem),this.originSetItem&&(Storage.prototype.setItem=this.originSetItem),this.cookieStoreChangeListener&&window.cookieStore&&window.cookieStore.removeEventListener("change",this.cookieStoreChangeListener),Sw.hasInitd=!1}async sendRefresh(e){let t=null;switch(e){case"localStorage":case"sessionStorage":t=this.takeStorage(e);break;case"cookie":t=await this.takeCookie()}t&&this.sendStorageItem(t)}listenRefreshEvent(){Pb.addListener("refresh",(async e=>{let{source:t}=e;const{data:n}=t;this.sendRefresh(n)}))}takeStorage(e){const t={type:e,action:"get",data:[]},n=window[e],r=n.length;if(!r)return t;for(let e=0;e<=r-1;e++){const r=n.key(e);if(r){const e=n.getItem(r)||"";t.data.push({name:r,value:e})}}return t}async takeCookie(){const e={type:"cookie",action:"get",data:[]};return window.cookieStore?e.data=await window.cookieStore.getAll():e.data=document.cookie.split("; ").map((e=>{const[t,n]=e.split("=");return{name:t,value:n}})),e}initStorageProxy(){const{clear:e,removeItem:t,setItem:n}=Storage.prototype;this.originClear=e,this.originRemoveItem=t,this.originSetItem=n;const r=this;Storage.prototype.clear=function(){e.call(this);const t={type:r.getStorageType(this),action:"clear"};r.sendStorageItem(t)},Storage.prototype.removeItem=function(e){t.call(this,e);const n={type:r.getStorageType(this),action:"remove",name:String(e)};r.sendStorageItem(n)},Storage.prototype.setItem=function(e,t){n.call(this,e,t);const o={type:r.getStorageType(this),action:"set",name:String(e),value:String(t)};r.sendStorageItem(o)},window.cookieStore&&(this.cookieStoreChangeListener=e=>{const{changed:t,deleted:n}=e;t.length>0&&t.forEach((e=>{const t={type:"cookie",action:"set",...e};this.sendStorageItem(t)})),n.length>0&&n.forEach((e=>{const t={type:"cookie",action:"remove",name:e.name};this.sendStorageItem(t)}))},window.cookieStore.addEventListener("change",this.cookieStoreChangeListener))}async onceInitPublicData(){(await Promise.all([this.takeStorage("localStorage"),this.takeStorage("sessionStorage"),this.takeCookie()])).forEach((e=>{var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.call(t,e)))return;const r=Ov("storage",e);Pb.dispatchEvent("public-data",r)}))}getStorageType(e){return e===localStorage?"localStorage":e===sessionStorage?"sessionStorage":e.constructor.name}sendStorageItem(e){var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.storage)||void 0===n?void 0:n.call(t,e)))return;const r=Ov("storage",e);Pb.dispatchEvent("public-data",r),Pb.broadcastMessage(r,!0)}}function Ew(e){return new Promise(((t,n)=>{e.addEventListener("success",(()=>{t(e.result)})),e.addEventListener("error",(()=>{n()}))}))}t(Sw,"hasInitd",!1);class xw{constructor(){t(this,"name","DatabasePlugin"),t(this,"originAdd",null),t(this,"originPut",null),t(this,"originDelete",null),t(this,"originClear",null),t(this,"originDrop",null),t(this,"$pageSpyConfig",null)}static get isSupport(){return!!(IDBFactory&&IDBObjectStore&&window.indexedDB&&window.indexedDB.databases)}onInit(e){let{config:t}=e;xw.isSupport&&(xw.hasInitd||(xw.hasInitd=!0,this.$pageSpyConfig=t,this.listenEvents(),this.initIndexedDBProxy()))}onReset(){this.originAdd&&(IDBObjectStore.prototype.add=this.originAdd),this.originPut&&(IDBObjectStore.prototype.put=this.originPut),this.originClear&&(IDBObjectStore.prototype.clear=this.originClear),this.originDelete&&(IDBObjectStore.prototype.delete=this.originDelete),this.originDrop&&(IDBFactory.prototype.deleteDatabase=this.originDrop),xw.hasInitd=!1}listenEvents(){Pb.addListener("refresh",(async e=>{let{source:t}=e;if("indexedDB"===t.data){const e={action:"basic",result:await this.takeBasicInfo()};this.sendData(e)}})),Pb.addListener("database-pagination",(async e=>{let{source:t}=e;const{db:n,store:r,page:o}=t.data,i=await this.getStoreDataWithPagination({db:n,store:r,page:o});this.sendData(i)}))}initIndexedDBProxy(){const{put:e,add:t,delete:n,clear:r}=IDBObjectStore.prototype;this.originAdd=t,this.originPut=e,this.originDelete=n,this.originClear=r;const o=this;[{origin:e,method:"put"},{origin:t,method:"add"},{origin:n,method:"delete"},{origin:r,method:"clear"}].forEach((e=>{let{origin:t,method:n}=e;IDBObjectStore.prototype[n]=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];const a=t.apply(this,r),s={action:"clear"===n?"clear":"update",database:this.transaction.db.name,store:this.name};return a.addEventListener("success",(()=>{o.sendData(s)})),a}}));const i=IDBFactory.prototype.deleteDatabase;this.originDrop=i,IDBFactory.prototype.deleteDatabase=function(e){const t=i.call(this,e),n={action:"drop",database:e};return t.addEventListener("success",(()=>{o.sendData(n)})),t}}async takeBasicInfo(){const e=await window.indexedDB.databases();if(!e.length)return null;const t=e.filter((e=>e.name&&e.version));if(!t.length)return null;return(await Promise.all(t.map((e=>this.getDBData(e))))).filter(Boolean)}async getDBData(e){try{const t={name:e.name,version:e.version,stores:[]},n=await Ew(window.indexedDB.open(e.name,e.version));if(n.objectStoreNames.length){const e=[...n.objectStoreNames].map((e=>n.transaction(e,"readonly").objectStore(e)));t.stores=e.map((e=>{const{name:t,keyPath:n,autoIncrement:r,indexNames:o}=e;return{name:t,keyPath:n,autoIncrement:r,indexes:[...o]}}))}return t}catch(e){return xv.error("Failed to get indexedDB data, more info: ".concat(e.message)),null}}async getStoreDataWithPagination(e){let{db:t,store:n,page:r}=e;const o={action:"get",database:null,store:null,page:{current:r,prev:null,next:null},total:0,data:[]};if(r<1)return o;const i=await Ew(window.indexedDB.open(t)),a=i.transaction(n,"readonly").objectStore(n);o.database={name:i.name,version:i.version},o.store={name:a.name,keyPath:a.keyPath,autoIncrement:a.autoIncrement,indexes:[...a.indexNames]},o.total=await Ew(a.count());const s=50*(r-1),c=50*r;o.page.prev=r>1?r-1:null,o.page.next=s+50<o.total?r+1:null;let l=0;const u=a.openCursor();return new Promise(((e,t)=>{u.addEventListener("success",(()=>{const t=u.result;t?(l>=s&&l<c&&o.data.push({key:t.key,value:t.value}),l++,t.continue()):e(o)})),u.addEventListener("error",t)}))}sendData(e){var t,n;if(!1===(null===(t=this.$pageSpyConfig)||void 0===t||null===(t=t.dataProcessor)||void 0===t||null===(n=t.database)||void 0===n?void 0:n.call(t,e)))return;const r=Ov("database",e);Pb.broadcastMessage(r,!0),["update","clear","drop"].includes(e.action)&&Pb.dispatchEvent("public-data",r)}}t(xw,"hasInitd",!1);const kw=e=>{const t=new URLSearchParams;return Object.entries(e).forEach((e=>{let[n,r]=e;t.append(n,String(r))})),t.toString()};class Tw{constructor(e){if(this.config=e,!e.api)throw Error("The api base url cannot be empty")}get base(){return this.config.api}getScheme(){return this.config.enableSSL?["https://","wss://"]:["http://","ws://"]}createRoom(){const{project:e,title:t,useSecret:n,secret:r}=this.config,o=this.getScheme(),i=kw({name:navigator.userAgent,group:e,title:t});return fetch("".concat(o[0]).concat(this.base,"/api/v1/room/create?").concat(i),{method:"POST",body:JSON.stringify({useSecret:n,secret:r})}).then((e=>e.json())).then((e=>{const{name:t,address:n}=e.data||{};return{roomUrl:this.getRoomUrl(n),address:n,name:t}})).catch((e=>{throw Error("Request create room failed: ".concat(e.message))}))}getRoomUrl(e){const t=this.getScheme(),{useSecret:n,secret:r}=this.config;return"".concat(t[1]).concat(this.base,"/api/v1/ws/room/join?").concat(kw({address:e,name:"client:".concat(iv()),userId:"Client",forceCreate:!0,useSecret:n,secret:r}))}}const Pw="50%",Lw="100%";function Rw(e){return window.TouchEvent&&e instanceof TouchEvent?e.touches[0]:e}var Iw,Cw="data:image/svg+xml,%3csvg width='250' height='250' viewBox='0 0 250 250' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M62.7935 118.088L173.383 7.49889L174.046 6.83527C179.024 1.85756 187.095 1.85756 192.072 6.83527C197.028 11.7914 197.053 19.8192 192.127 24.8057L89.0585 129.147V133.294L91.8232 136.059H95.9703L138.164 93.8963L163.706 94.588L181.677 112.559V137.441L75.926 243.192C70.9635 248.155 62.9177 248.155 57.9552 243.192C52.9927 238.23 52.9928 230.184 57.9552 225.222L155.412 127.765V123.618L152.647 120.853H148.5L107.029 162.324H79.3819L62.7935 145.735V118.088Z' fill='white' /%3e%3c/svg%3e";const Ow="__pageSpy";class Bw extends Ab{constructor(){super(...arguments),t(this,"privateKeys",["secret"]),t(this,"defaultConfig",(()=>{const e={api:"",project:"default",title:"--",enableSSL:null,disabledPlugins:[],offline:!1,messageCapacity:1e3,useSecret:!1,secret:"",serializeData:!1,dataProcessor:{},clientOrigin:"",autoRender:!0,logo:"data:image/svg+xml,%3csvg width='255' height='255' viewBox='0 0 255 255' fill='none' xmlns='http://www.w3.org/2000/svg'%3e %3cpath d='M183 24L81 126V141.5L90 150.5H105L145 110.5H160.5L169.5 119.5V133.5L72 231' stroke='url(%23paint0_linear_106_8)' stroke-width='25' stroke-linecap='round' /%3e %3cdefs%3e %3clinearGradient id='paint0_linear_106_8' x1='127.5' y1='24' x2='127.5' y2='231' gradientUnits='userSpaceOnUse'%3e %3cstop stop-color='%233D0C7C' /%3e %3cstop offset='0.519204' stop-color='%234E00B1' /%3e %3cstop offset='1' stop-color='%23EFDFFF' /%3e %3c/linearGradient%3e %3c/defs%3e%3c/svg%3e",primaryColor:"#8434e9",modal:{logo:Cw,title:"PageSpy"}};if(!Bw.scriptLink)return e;try{const{host:t,origin:n,protocol:r}=new URL(Bw.scriptLink);return{...e,api:t,clientOrigin:n,enableSSL:r.startsWith("https")}}catch(t){return e}}))}}function Dw(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}t(Bw,"scriptLink",null===(Iw=document.currentScript)||void 0===Iw?void 0:Iw.src);var jw="toast-d8zWd";Dw(".toast-d8zWd {\n position: fixed;\n left: 50%;\n top: 10%;\n transform: translate3d(-50%, 0, 0);\n max-width: 50vw;\n padding: 0.71428571em 0.85714286em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-weight: 500;\n color: var(--primary-color);\n background-color: #fff;\n border-radius: 0.28571429em;\n box-shadow: 0px 4px 4px 2px rgba(0, 0, 0, 0.05);\n z-index: 99999;\n}\n.toast-d8zWd {\n animation: slideIn-4mB0Y 0.3s ease-in-out forwards;\n}\n@keyframes slideIn-4mB0Y {\n 0% {\n transform: translate3d(-50%, 1.78571429em, 0);\n opacity: 0;\n }\n 80% {\n transform: translate3d(-50%, -0.71428571em, 0);\n }\n 100% {\n transform: translate3d(-50%, 0, 0);\n opacity: 1;\n }\n}\n");class Mw{constructor(){if(new.target===Mw)throw new Error("Cannot call `new toast()`")}static get root(){var e;return null!==(e=document.querySelector("#".concat(Ow)))&&void 0!==e?e:document.body}static message(e){const t=document.createElement("div");t.classList.add("page-spy-toast",jw),t.innerText=String(e),Mw.root.appendChild(t);const n=setTimeout((()=>{Mw.root.contains(t)&&Mw.root.removeChild(t),Mw.timer===n&&(Mw.timer=null)}),3e3);Mw.timer=n}static destroy(){const e=Mw.root.querySelectorAll(".page-spy-toast");e.length&&([...e].forEach((e=>{Mw.root.contains(e)&&Mw.root.removeChild(e)})),Mw.timer&&clearTimeout(Mw.timer)),Mw.timer=null}}t(Mw,"timer",null);const Uw={zh:{copyLink:"复制在线调试链接",copied:"复制成功",copyFailed:"复制失败"},en:{copyLink:"Copy online debug link",copied:"Copied",copyFailed:"Copy failed"}},qw=function(){const e=navigator.languages;return["zh-CN","zh-HK","zh-TW","zh","zh-Hans-CN"].some((t=>e.includes(t)))}()?Uw.zh:Uw.en;var Nw={modal:"modal-rlFLa",fadeIn:"fadeIn-mXj-N",content:"content-KlWkz",scaleIn:"scaleIn-JuIZH",fadeOut:"fadeOut-daRKq",scaleOut:"scaleOut-8Pf5H",header:"header-M30Wi",headerLeft:"headerLeft-RfzaN",logo:"logo-OM-Sp",headerRight:"headerRight-Y8nGg",close:"close-bRwD3",main:"main-SA0Hu",footer:"footer-op1wT"};Dw(".modal-rlFLa {\n display: none;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 13000;\n font-size: 14px;\n line-height: 1;\n}\n.modal-rlFLa.show {\n display: block;\n}\n.modal-rlFLa.show {\n animation: fadeIn-mXj-N 0.3s ease-in-out forwards;\n}\n@keyframes fadeIn-mXj-N {\n 0% {\n background-color: rgba(0, 0, 0, 0);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n}\n.modal-rlFLa.show .content-KlWkz {\n animation: scaleIn-JuIZH 0.3s ease-in forwards;\n}\n@keyframes scaleIn-JuIZH {\n 0% {\n opacity: 0;\n transform: translate3d(-50%, -50%, 0) scale(0.8);\n }\n 70% {\n opacity: 1;\n transform: translate3d(-50%, -50%, 0) scale(1.1);\n }\n 100% {\n transform: translate3d(-50%, -50%, 0) scale(1);\n }\n}\n.modal-rlFLa.leaving {\n display: block;\n}\n.modal-rlFLa.leaving {\n animation: fadeOut-daRKq 0.3s ease-in-out forwards;\n}\n@keyframes fadeOut-daRKq {\n 0% {\n background-color: rgba(0, 0, 0, 0.3);\n }\n 100% {\n background-color: rgba(0, 0, 0, 0);\n }\n}\n.modal-rlFLa.leaving .content-KlWkz {\n animation: scaleOut-8Pf5H 0.3s ease-out forwards;\n}\n@keyframes scaleOut-8Pf5H {\n 0% {\n opacity: 1;\n transform: translate3d(-50%, -50%, 0) scale(1);\n }\n 30% {\n transform: translate3d(-50%, -50%, 0) scale(1.1);\n }\n 60% {\n opacity: 0;\n transform: translate3d(-50%, -50%, 0) scale(0.9);\n }\n 100% {\n opacity: 0;\n transform: translate3d(-50%, -50%, 0) scale(0.9);\n }\n}\n.modal-rlFLa .content-KlWkz {\n position: absolute;\n left: 50%;\n top: 45%;\n transform: translate3d(-50%, -50%, 0);\n width: 90%;\n background-color: #fafafa;\n border-radius: 0.42857143em;\n overflow: hidden;\n}\n@media screen and (min-width: 440px) {\n .modal-rlFLa .content-KlWkz {\n max-width: 70%;\n }\n}\n@media screen and (min-width: 768px) {\n .modal-rlFLa .content-KlWkz {\n max-width: 55%;\n }\n}\n@media screen and (min-width: 1024px) {\n .modal-rlFLa .content-KlWkz {\n max-width: 40%;\n }\n}\n@media screen and (min-width: 1440px) {\n .modal-rlFLa .content-KlWkz {\n max-width: 30%;\n }\n}\n@media screen and (min-width: 1920px) {\n .modal-rlFLa .content-KlWkz {\n max-width: 25%;\n }\n}\n.modal-rlFLa .header-M30Wi {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 0.57142857em 1em;\n color: white;\n background-color: var(--primary-color);\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN {\n display: flex;\n align-items: center;\n gap: 0.57142857em;\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN .logo-OM-Sp {\n height: 2em;\n}\n.modal-rlFLa .header-M30Wi .headerLeft-RfzaN b {\n font-size: 1.42857143em;\n}\n.modal-rlFLa .header-M30Wi .headerRight-Y8nGg {\n padding: 6px;\n cursor: pointer;\n}\n.modal-rlFLa .header-M30Wi .headerRight-Y8nGg .close-bRwD3 {\n width: 1.71428571em;\n height: 1.71428571em;\n}\n.modal-rlFLa .main-SA0Hu {\n padding: 1em;\n}\n.modal-rlFLa .footer-op1wT {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n gap: 0.57142857em;\n padding: 0.57142857em 1em;\n border-top: 1px solid #dedede;\n}\n.modal-rlFLa .footer-op1wT button {\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 4.28571429em;\n padding: 0.42857143em 0.42857143em;\n gap: 0.28571429em;\n letter-spacing: 0.4px;\n border: 1px solid #333;\n border-radius: 0.28571429em;\n background-color: white;\n color: #333;\n cursor: pointer;\n white-space: nowrap;\n transition: all ease-in-out 100ms;\n font-size: 0.92857143em;\n}\n.modal-rlFLa .footer-op1wT button[data-primary] {\n border-color: var(--primary-color);\n background-color: var(--primary-color);\n color: white;\n}\n.modal-rlFLa .footer-op1wT button[data-dashed] {\n border-style: dashed;\n}\n.modal-rlFLa .footer-op1wT button:disabled {\n border-color: #c8c8c8;\n background-color: #c8c8c8;\n color: white;\n cursor: not-allowed;\n}\n.modal-rlFLa .footer-op1wT button:active {\n opacity: 0.7;\n}\n.modal-rlFLa .footer-op1wT button img,\n.modal-rlFLa .footer-op1wT button svg {\n width: 1.42857143em;\n height: 1.42857143em;\n}\n@media screen and (max-width: 440px) {\n .modal-rlFLa .footer-op1wT button img,\n .modal-rlFLa .footer-op1wT button svg {\n display: none;\n }\n}\n");const Fw={logo:"",title:"",content:document.createElement("div"),footer:[],mounted:document.body};class Hw{constructor(){if(new.target===Hw)throw new Error("Cannot call `new modal()`")}static get rendered(){return Hw.config.mounted.contains(Hw.root)}static query(e){var t;return null===(t=Hw.root)||void 0===t?void 0:t.querySelector(".".concat(e))}static build(e){Hw.config={...Hw.config,...e},Hw.root||(Hw.root=(new DOMParser).parseFromString(Hw.template,"text/html").querySelector(".".concat(Nw.modal)),Hw.root.addEventListener("click",(e=>{e.stopPropagation(),Hw.close()})),Hw.query(Nw.content).addEventListener("click",(e=>{e.stopPropagation(),e.preventDefault()})),Hw.query(Nw.headerRight).addEventListener("click",(()=>{Hw.close()})),Hw.query(Nw.logo).setAttribute("src",Hw.config.logo),Hw.query(Nw.title).textContent=Hw.config.title)}static show(e){var t,n;if(!Hw.root)return void xv.info("modal has not been ready.");const{content:r,footer:o,mounted:i}=Hw.config,a=null!==(t=null==e?void 0:e.content)&&void 0!==t?t:r,s=null!==(n=null==e?void 0:e.footer)&&void 0!==n?n:o,c=Hw.query(Nw.main),l=Hw.query(Nw.footer);c.innerHTML="",lv(a)?c.insertAdjacentHTML("afterbegin",a):c.appendChild(a),l.innerHTML="",s.forEach((e=>{lv(e)?l.insertAdjacentHTML("beforeend",e):l.insertAdjacentElement("beforeend",e)})),Hw.rendered||i.appendChild(Hw.root),Hw.root.classList.add("show")}static close(){Hw.root&&Hw.rendered&&(Hw.root.classList.remove("show"),Hw.root.classList.add("leaving"),setTimeout((()=>{var e;null===(e=Hw.root)||void 0===e||e.classList.remove("leaving")}),300))}static reset(){Hw.config=Fw,Hw.root=null}}t(Hw,"config",Fw),t(Hw,"template",'\n <div class="'.concat(Nw.modal,'">\n <div class="').concat(Nw.content,'">\n \x3c!-- Header --\x3e\n <div class="').concat(Nw.header,'">\n <div class="').concat(Nw.headerLeft,'">\n <img class="').concat(Nw.logo,'" />\n <b class="').concat(Nw.title,'"></b>\n </div>\n <div class="').concat(Nw.headerRight,'">\n <img class="').concat(Nw.close,'" src="').concat("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cpath fill='white' d='m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z' /%3e%3c/svg%3e",'" />\n </div>\n </div>\n\n \x3c!-- Main content --\x3e\n <div class="').concat(Nw.main,'"></div>\n\n \x3c!-- Footer --\x3e\n <div class="').concat(Nw.footer,'"></div>\n </div>\n </div>\n '));var _w="connectInfo-9svvO";Dw("#__pageSpy {\n font-size: 14px;\n line-height: 1;\n}\n#__pageSpy .page-spy-logo {\n --top-radius: 100%;\n --right-radius: 100%;\n --bottom-radius: 100%;\n --left-radius: 100%;\n position: fixed;\n right: 2.85714286em;\n bottom: 5.71428571em;\n display: flex;\n justify-content: center;\n align-items: center;\n width: 5.71428571em;\n height: 5.71428571em;\n font-size: 1em;\n border-radius: 5.71428571em;\n background-color: #fff;\n box-shadow: 0px 4px 8px 2px rgba(0, 0, 0, 0.2);\n cursor: pointer;\n z-index: 13000;\n transition: opacity ease-in-out 0.3s, transform ease-in-out 0.3s, background-color ease-in-out 0.3s, filter ease-in-out 0.3s;\n}\n#__pageSpy .page-spy-logo.inactive {\n background-color: #a2a2a2;\n filter: grayscale(1);\n}\n#__pageSpy .page-spy-logo::after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n transform: rotateZ(45deg);\n background-color: white;\n border-top-left-radius: var(--top-radius);\n border-top-right-radius: var(--right-radius);\n border-bottom-right-radius: var(--bottom-radius);\n border-bottom-left-radius: var(--left-radius);\n transition: border-radius linear 0.15s;\n}\n#__pageSpy .page-spy-logo .hidden-mixin {\n opacity: 0.35;\n}\n#__pageSpy .page-spy-logo.hidden-in-top {\n opacity: 0.35;\n transform: translateY(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-top img {\n transform: translateY(30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right {\n opacity: 0.35;\n transform: translateX(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-right img {\n transform: translateX(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom {\n opacity: 0.35;\n transform: translateY(65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-bottom img {\n transform: translateY(-30%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left {\n opacity: 0.35;\n transform: translateX(-65%);\n}\n#__pageSpy .page-spy-logo.hidden-in-left img {\n transform: translateX(30%);\n}\n#__pageSpy .page-spy-logo img {\n position: relative;\n display: block;\n z-index: 100;\n transition: transform ease-in-out 0.1s 0.4s;\n width: 3.57142857em;\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n}\n.connectInfo-9svvO {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 4px;\n}\n.connectInfo-9svvO > p {\n flex: 1 0 0;\n text-align: center;\n overflow: hidden;\n}\n.connectInfo-9svvO > p span {\n font-size: 0.85714286em;\n color: #aaa;\n}\n.connectInfo-9svvO > p b {\n display: block;\n margin-top: 12px;\n font-size: 1.28571429em;\n color: #333;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n");var zw="2.0.1";class Qw{static get pluginsWithOrder(){return[...Qw.plugins.pre,...Qw.plugins.normal,...Qw.plugins.post]}static registerPlugin(e){if(!e)return;if("function"==typeof(t=e)&&void 0!==t.prototype)return void xv.error("PageSpy.registerPlugin() expect to pass an instance, not a class");var t;if(!e.name)return void xv.error("The ".concat(e.constructor.name,' plugin should provide a "name" property'));if(Qw.pluginsWithOrder.some((t=>t.name===e.name)))return void xv.info("The ".concat(e.name,' has registered. Consider the following reasons:\n - Duplicate register one same plugin;\n - Plugin\'s "name" conflict with others, you can print all registered plugins by "PageSpy.plugins";'));Qw.plugins[e.enforce||"normal"].push(e)}constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t(this,"root",null),t(this,"version",zw),t(this,"request",null),t(this,"name",""),t(this,"address",""),t(this,"roomUrl",""),t(this,"socketStore",Pb),t(this,"config",new Bw),t(this,"cacheTimer",null),Qw.instance)return xv.warn("Cannot initialize PageSpy multiple times"),Qw.instance;Qw.instance=this;const n=this.config.mergeConfig(e);this.updateConfiguration(),this.triggerPlugins("onInit",{config:n,socketStore:Pb}),this.init()}updateConfiguration(){const{messageCapacity:e,offline:t,useSecret:n}=this.config.get();if(!0===n){const e=JSON.parse(sessionStorage.getItem(bb));this.config.set("secret",(null==e?void 0:e.secret)||function(){const e=Math.floor(1e6*Math.random());return String(e).padStart(6,"0")}())}Pb.connectable=!0,Pb.getPageSpyConfig=()=>this.config.get(),Pb.getClient=()=>Qw.client,Pb.isOffline=t,Pb.messageCapacity=e}async init(){const e=this.config.get();if(!1===e.offline){this.request=new Tw(e);const t=sessionStorage.getItem(bb);if(null===t)await this.createNewConnection();else{const{name:n,address:r,roomUrl:o,project:i}=JSON.parse(t);e.project!==i?await this.createNewConnection():(this.name=n,this.address=r,this.roomUrl=o,this.useOldConnection())}document.addEventListener("visibilitychange",(()=>{!document.hidden&&Pb.getSocket().getState()!==wb.OPEN&&Pb.connectable&&this.useOldConnection()}))}xv.log("Plugins inited"),e.autoRender&&this.render()}async createNewConnection(){if(!this.request)return void xv.error("Cannot get the Request");const e=await this.request.createRoom();this.name=e.name,this.address=e.address,this.roomUrl=e.roomUrl,this.refreshRoomInfo(),Pb.init(e.roomUrl)}useOldConnection(){this.refreshRoomInfo(),Pb.init(this.roomUrl)}refreshRoomInfo(){this.saveSession(),this.cacheTimer=setInterval((()=>{Pb.getSocket().getState()===wb.OPEN&&this.saveSession()}),15e3)}saveSession(){const{name:e,address:t,roomUrl:n,config:r}=this,{useSecret:o,secret:i,project:a}=r.get(),s=JSON.stringify({name:e,address:t,roomUrl:n,project:a,useSecret:o,secret:i});sessionStorage.setItem(bb,s)}triggerPlugins(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const{disabledPlugins:o}=this.config.get();Qw.pluginsWithOrder.forEach((t=>{var r;dv(o)&&o.length&&o.includes(t.name)||null===(r=t[e])||void 0===r||r.apply(t,[{...n[0],modal:Hw,toast:Mw},n.slice(1)])}))}render(){if(document.querySelector("#".concat(Ow)))xv.warn("Cannot render the widget because it has been in the DOM");else if(void 0!==document)"loading"===document.readyState?window.addEventListener("DOMContentLoaded",this.render.bind(this)):this.startRender();else{let e;const t=()=>{document&&"complete"===document.readyState?(e&&clearTimeout(e),this.startRender()):e=setTimeout(t,1)};e=setTimeout(t,1)}}startRender(){const e=this.config.get(),{project:t,clientOrigin:n,title:r,logo:o,useSecret:i,secret:a,primaryColor:s,modal:c}=e,l=(new DOMParser).parseFromString('\n \x3c!-- PageSpy Root Container --\x3e\n <div id="'.concat(Ow,'" style="--primary-color: #8434e9">\n <div class="page-spy-logo">\n <img src="').concat(o,'" alt="Logo" />\n </div>\n </div>\n\n \x3c!-- Default content for modal --\x3e\n <div class="').concat(_w,'">\n <p>\n <span>Device ID</span>\n <b style="font-family: \'Monaco\'" class="page-spy-device-id">\n ').concat(this.address.slice(0,4)||"--","\n </b>\n </p>\n ").concat(i&&a?'\n <p>\n <span>Secret</span>\n <b class="page-spy-secret">'.concat(a,"</b>\n </p>"):"",'\n <p>\n <span>Project</span>\n <b class="page-spy-project">').concat(t,'</b>\n </p>\n <p>\n <span>Title</span>\n <b class="page-spy-title">').concat(r,'</b>\n </p>\n </div>\n\n \x3c!-- Default button for modal --\x3e\n <button class="page-spy-btn" data-primary id="page-spy-copy-link">\n <img src="').concat("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3e %3cg fill='none' stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3e %3cpath d='M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z' /%3e %3cpath d='M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1' /%3e %3c/g%3e%3c/svg%3e",'" alt="Copy" />\n <span>').concat(qw.copyLink,"</span>\n </button>\n "),"text/html"),u=e=>l.querySelector.call(l,e),d=u("#".concat(Ow));d.style.setProperty("--primary-color",s),this.root=d;const f=u(".page-spy-logo");!function(e){let t,n;const r={xAxis:0,yAxis:0},o={x:0,y:0};function i(){if(!r.xAxis&&!r.yAxis)return;const{left:n,top:o}=e.getBoundingClientRect();n>0&&n<r.xAxis&&o>0&&o<r.yAxis?e.isHidden=!1:(t&&clearTimeout(t),t=setTimeout((()=>{t=null,e.disableHidden||(n<=0?e.classList.add("hidden-in-left"):n>=r.xAxis&&e.classList.add("hidden-in-right"),o<=0?e.classList.add("hidden-in-top"):o>=r.yAxis&&e.classList.add("hidden-in-bottom"),e.isHidden=!0)}),1e3))}function a(t){t.preventDefault();const{clientX:i,clientY:a}=Rw(t),s=i-o.x,c=a-o.y;[s,c].some((e=>Math.abs(e)>5))&&(e.isMoveEvent=!0);let l=n.x+s;l<=0?(l=0,e.style.setProperty("--left-radius",Pw)):l>=r.xAxis?(l=r.xAxis,e.style.setProperty("--right-radius",Pw)):(e.style.setProperty("--left-radius",Lw),e.style.setProperty("--right-radius",Lw));let u=n.y+c;u<=0?(u=0,e.style.setProperty("--top-radius",Pw)):u>r.yAxis?(u=r.yAxis,e.style.setProperty("--bottom-radius",Pw)):(e.style.setProperty("--top-radius",Lw),e.style.setProperty("--bottom-radius",Lw)),e.style.left="".concat(l,"px"),e.style.top="".concat(u,"px")}function s(){o.x=0,o.y=0,i(),document.removeEventListener("mousemove",a),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",a),document.removeEventListener("touchend",s)}function c(i){i.stopPropagation(),t&&clearTimeout(t),e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left"),e.isMoveEvent=!1,n=e.getBoundingClientRect(),r.xAxis=window.innerWidth-n.width,r.yAxis=window.innerHeight-n.height;const{clientX:c,clientY:l}=Rw(i);o.x=c,o.y=l,document.addEventListener("mousemove",a,!1),document.addEventListener("mouseup",s,!1),document.addEventListener("touchmove",a,{capture:!1,passive:!1}),document.addEventListener("touchend",s,!1)}e.addEventListener("mousedown",c,!1),e.addEventListener("touchstart",c,{capture:!1,passive:!1}),e.addEventListener("mouseover",(()=>{e.disableHidden=!0,e.isHidden&&e.classList.remove("hidden-in-top","hidden-in-right","hidden-in-bottom","hidden-in-left")}),!1),e.addEventListener("mouseleave",(()=>{e.disableHidden=!1,i()}),!1)}(f);f.addEventListener("click",(()=>{f.isMoveEvent||f.isHidden||Hw.show()}),!1),window.addEventListener("sdk-inactive",(()=>{f.classList.add("inactive")}));const h=u(".".concat(_w));const p=u("#page-spy-copy-link");p.addEventListener("click",(()=>{let e="".concat(n,"/#/devtools?address=").concat(encodeURIComponent(this.address));i&&(e+="&secret=".concat(a));const t=Jl(e)?qw.copied:qw.copyFailed;Hw.close(),Mw.message(t)})),Hw.build({logo:c.logo||Cw,title:c.title||"PageSpy",content:h,footer:[p],mounted:d}),document.documentElement.insertAdjacentElement("beforeend",d),this.triggerPlugins("onMounted",{config:e,root:d,socketStore:Pb}),this.handleDeviceDPR(),xv.log("Render success")}handleDeviceDPR(){const e=window.devicePixelRatio||1,t=document.querySelector('[name="viewport"]');if(t){const n=(t.getAttribute("content")||"").match(/initial-scale=\d+(\.\d+)?/);(n?parseFloat(n[0].split("=")[1]):1)<1&&(this.root.style.fontSize="".concat(14*e,"px"))}}updateRoomInfo(e){if(!e)return;const{project:t,title:n}=e;if(t){this.config.set("project",String(t));const e=document.querySelector(".page-spy-project");e&&(e.textContent=String(t))}if(n){this.config.set("title",String(n));const e=document.querySelector(".page-spy-title");e&&(e.textContent=String(n))}Pb.updateRoomInfo()}abort(){this.triggerPlugins("onReset"),Qw.instance=null,Pb.close(),Hw.reset();const e=document.querySelector("#".concat(Ow));e&&document.documentElement.removeChild(e)}}t(Qw,"instance",null),t(Qw,"plugins",{pre:[],normal:[],post:[]}),t(Qw,"client",new class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{osType:"unknown",osVersion:"unknown",browserType:"unknown",browserVersion:"unknown",framework:"unknown",isDevTools:!1,sdk:"unknown",sdkVersion:"0.0.0"};t(this,"info",void 0),t(this,"plugins",[]),t(this,"_name",""),this.info=e}makeClientInfoMsg(){return{sdk:this.info.sdk,isDevTools:this.info.isDevTools,ua:this.getName(),plugins:this.plugins}}getName(){if(!this._name){const{ua:e,osType:t,osVersion:n,browserType:r,browserVersion:o}=this.info;this._name=e||"".concat(t,"/").concat(n," ").concat(r,"/").concat(o)}return this._name}}({ua:navigator.userAgent,sdk:"browser",sdkVersion:zw}));return[new Lb,new Rb,new hw,new Sw,new xw,new ww,new bw].forEach((e=>{Qw.registerPlugin(e)})),Qw}(); //# sourceMappingURL=index.min.js.map } }