@iro/wechat-adapter
Version:
A super small adapter for wechat mini game.
3 lines (2 loc) • 46.1 kB
JavaScript
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r={exports:{}},n={exports:{}},o=function(t){return t&&t.Math===Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),c=u,s=Function.prototype,f=s.apply,l=s.call,p="object"==typeof Reflect&&Reflect.apply||(c?l.bind(f):function(){return l.apply(f,arguments)}),h=u,v=Function.prototype,d=v.call,y=h&&v.bind.bind(d,d),g=h?y:function(t){return function(){return d.apply(t,arguments)}},m=g,b=m({}.toString),w=m("".slice),O=function(t){return w(b(t),8,-1)},E=O,S=g,T=function(t){if("Function"===E(t))return S(t)},j="object"==typeof document&&document.all,x=void 0===j&&void 0!==j?function(t){return"function"==typeof t||t===j}:function(t){return"function"==typeof t},P={},A=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),G=u,L=Function.prototype.call,k=G?L.bind(L):function(){return L.apply(L,arguments)},C={},R={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,N=I&&!R.call({1:2},1);C.f=N?function(t){var e=I(this,t);return!!e&&e.enumerable}:R;var M,D,_=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},F=a,z=O,H=Object,W=g("".split),U=F((function(){return!H("z").propertyIsEnumerable(0)}))?function(t){return"String"===z(t)?W(t,""):H(t)}:H,V=function(t){return null==t},B=V,X=TypeError,q=function(t){if(B(t))throw new X("Can't call method on "+t);return t},K=U,Y=q,J=function(t){return K(Y(t))},Q=x,Z=function(t){return"object"==typeof t?null!==t:Q(t)},$={},tt=$,et=i,rt=x,nt=function(t){return rt(t)?t:void 0},ot=function(t,e){return arguments.length<2?nt(tt[t])||nt(et[t]):tt[t]&&tt[t][e]||et[t]&&et[t][e]},it=g({}.isPrototypeOf),at="undefined"!=typeof navigator&&String(navigator.userAgent)||"",ut=i,ct=at,st=ut.process,ft=ut.Deno,lt=st&&st.versions||ft&&ft.version,pt=lt&<.v8;pt&&(D=(M=pt.split("."))[0]>0&&M[0]<4?1:+(M[0]+M[1])),!D&&ct&&(!(M=ct.match(/Edge\/(\d+)/))||M[1]>=74)&&(M=ct.match(/Chrome\/(\d+)/))&&(D=+M[1]);var ht=D,vt=ht,dt=a,yt=i.String,gt=!!Object.getOwnPropertySymbols&&!dt((function(){var t=Symbol("symbol detection");return!yt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&vt&&vt<41})),mt=gt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,bt=ot,wt=x,Ot=it,Et=Object,St=mt?function(t){return"symbol"==typeof t}:function(t){var e=bt("Symbol");return wt(e)&&Ot(e.prototype,Et(t))},Tt=String,jt=function(t){try{return Tt(t)}catch(t){return"Object"}},xt=x,Pt=jt,At=TypeError,Gt=function(t){if(xt(t))return t;throw new At(Pt(t)+" is not a function")},Lt=Gt,kt=V,Ct=function(t,e){var r=t[e];return kt(r)?void 0:Lt(r)},Rt=k,It=x,Nt=Z,Mt=TypeError,Dt={exports:{}},_t=i,Ft=Object.defineProperty,zt=i,Ht=function(t,e){try{Ft(_t,t,{value:e,configurable:!0,writable:!0})}catch(r){_t[t]=e}return e},Wt="__core-js_shared__",Ut=Dt.exports=zt[Wt]||Ht(Wt,{});(Ut.versions||(Ut.versions=[])).push({version:"3.36.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Vt=Dt.exports,Bt=function(t,e){return Vt[t]||(Vt[t]=e||{})},Xt=q,qt=Object,Kt=function(t){return qt(Xt(t))},Yt=Kt,Jt=g({}.hasOwnProperty),Qt=Object.hasOwn||function(t,e){return Jt(Yt(t),e)},Zt=g,$t=0,te=Math.random(),ee=Zt(1..toString),re=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ee(++$t+te,36)},ne=Bt,oe=Qt,ie=re,ae=gt,ue=mt,ce=i.Symbol,se=ne("wks"),fe=ue?ce.for||ce:ce&&ce.withoutSetter||ie,le=function(t){return oe(se,t)||(se[t]=ae&&oe(ce,t)?ce[t]:fe("Symbol."+t)),se[t]},pe=k,he=Z,ve=St,de=Ct,ye=function(t,e){var r,n;if("string"===e&&It(r=t.toString)&&!Nt(n=Rt(r,t)))return n;if(It(r=t.valueOf)&&!Nt(n=Rt(r,t)))return n;if("string"!==e&&It(r=t.toString)&&!Nt(n=Rt(r,t)))return n;throw new Mt("Can't convert object to primitive value")},ge=TypeError,me=le("toPrimitive"),be=function(t,e){if(!he(t)||ve(t))return t;var r,n=de(t,me);if(n){if(void 0===e&&(e="default"),r=pe(n,t,e),!he(r)||ve(r))return r;throw new ge("Can't convert object to primitive value")}return void 0===e&&(e="number"),ye(t,e)},we=St,Oe=function(t){var e=be(t,"string");return we(e)?e:e+""},Ee=Z,Se=i.document,Te=Ee(Se)&&Ee(Se.createElement),je=function(t){return Te?Se.createElement(t):{}},xe=je,Pe=!A&&!a((function(){return 7!==Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Ae=A,Ge=k,Le=C,ke=_,Ce=J,Re=Oe,Ie=Qt,Ne=Pe,Me=Object.getOwnPropertyDescriptor;P.f=Ae?Me:function(t,e){if(t=Ce(t),e=Re(e),Ne)try{return Me(t,e)}catch(t){}if(Ie(t,e))return ke(!Ge(Le.f,t,e),t[e])};var De=a,_e=x,Fe=/#|\.prototype\./,ze=function(t,e){var r=We[He(t)];return r===Ve||r!==Ue&&(_e(e)?De(e):!!e)},He=ze.normalize=function(t){return String(t).replace(Fe,".").toLowerCase()},We=ze.data={},Ue=ze.NATIVE="N",Ve=ze.POLYFILL="P",Be=ze,Xe=Gt,qe=u,Ke=T(T.bind),Ye=function(t,e){return Xe(t),void 0===e?t:qe?Ke(t,e):function(){return t.apply(e,arguments)}},Je={},Qe=A&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ze=Z,$e=String,tr=TypeError,er=function(t){if(Ze(t))return t;throw new tr($e(t)+" is not an object")},rr=A,nr=Pe,or=Qe,ir=er,ar=Oe,ur=TypeError,cr=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,fr="enumerable",lr="configurable",pr="writable";Je.f=rr?or?function(t,e,r){if(ir(t),e=ar(e),ir(r),"function"==typeof t&&"prototype"===e&&"value"in r&&pr in r&&!r[pr]){var n=sr(t,e);n&&n[pr]&&(t[e]=r.value,r={configurable:lr in r?r[lr]:n[lr],enumerable:fr in r?r[fr]:n[fr],writable:!1})}return cr(t,e,r)}:cr:function(t,e,r){if(ir(t),e=ar(e),ir(r),nr)try{return cr(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new ur("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var hr=Je,vr=_,dr=A?function(t,e,r){return hr.f(t,e,vr(1,r))}:function(t,e,r){return t[e]=r,t},yr=i,gr=p,mr=T,br=x,wr=P.f,Or=Be,Er=$,Sr=Ye,Tr=dr,jr=Qt,xr=function(t){var e=function(r,n,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,o)}return gr(t,this,arguments)};return e.prototype=t.prototype,e},Pr=function(t,e){var r,n,o,i,a,u,c,s,f,l=t.target,p=t.global,h=t.stat,v=t.proto,d=p?yr:h?yr[l]:yr[l]&&yr[l].prototype,y=p?Er:Er[l]||Tr(Er,l,{})[l],g=y.prototype;for(i in e)n=!(r=Or(p?i:l+(h?".":"#")+i,t.forced))&&d&&jr(d,i),u=y[i],n&&(c=t.dontCallGetSet?(f=wr(d,i))&&f.value:d[i]),a=n&&c?c:e[i],(r||v||typeof u!=typeof a)&&(s=t.bind&&n?Sr(a,yr):t.wrap&&n?xr(a):v&&br(a)?mr(a):a,(t.sham||a&&a.sham||u&&u.sham)&&Tr(s,"sham",!0),Tr(y,i,s),v&&(jr(Er,o=l+"Prototype")||Tr(Er,o,{}),Tr(Er[o],i,a),t.real&&g&&(r||!g[i])&&Tr(g,i,a)))},Ar=Pr,Gr=a,Lr=J,kr=P.f,Cr=A;Ar({target:"Object",stat:!0,forced:!Cr||Gr((function(){kr(1)})),sham:!Cr},{getOwnPropertyDescriptor:function(t,e){return kr(Lr(t),e)}});var Rr=$.Object,Ir=n.exports=function(t,e){return Rr.getOwnPropertyDescriptor(t,e)};Rr.getOwnPropertyDescriptor.sham&&(Ir.sham=!0);var Nr=n.exports,Mr=e(r.exports=Nr);function Dr(){}function _r(){return wx.createImage()}var Fr=wx.createImage();function zr(){var t=wx.createCanvas();return t.style={cursor:null},t}var Hr=new zr,Wr={exports:{}},Ur=Math.ceil,Vr=Math.floor,Br=Math.trunc||function(t){var e=+t;return(e>0?Vr:Ur)(e)},Xr=function(t){var e=+t;return e!=e||0===e?0:Br(e)},qr=Xr,Kr=Math.max,Yr=Math.min,Jr=function(t,e){var r=qr(t);return r<0?Kr(r+e,0):Yr(r,e)},Qr=Xr,Zr=Math.min,$r=function(t){var e=Qr(t);return e>0?Zr(e,9007199254740991):0},tn=function(t){return $r(t.length)},en=J,rn=Jr,nn=tn,on=function(t){return function(e,r,n){var o=en(e),i=nn(o);if(0===i)return!t&&-1;var a,u=rn(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},an={includes:on(!0),indexOf:on(!1)},un=a,cn=Pr,sn=an.indexOf,fn=function(t,e){var r=[][t];return!!r&&un((function(){r.call(null,e||function(){return 1},1)}))},ln=T([].indexOf),pn=!!ln&&1/ln([1],1,-0)<0;cn({target:"Array",proto:!0,forced:pn||!fn("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return pn?ln(this,t,e)||0:sn(this,t,e)}});var hn=i,vn=$,dn=function(t,e){var r=vn[t+"Prototype"],n=r&&r[e];if(n)return n;var o=hn[t],i=o&&o.prototype;return i&&i[e]},yn=dn("Array","indexOf"),gn=it,mn=yn,bn=Array.prototype,wn=e(Wr.exports=function(t){var e=t.indexOf;return t===bn||gn(bn,t)&&e===bn.indexOf?mn:e}),On={exports:{}},En=O,Sn=Array.isArray||function(t){return"Array"===En(t)},Tn=A,jn=Sn,xn=TypeError,Pn=Object.getOwnPropertyDescriptor,An=Tn&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}()?function(t,e){if(jn(t)&&!Pn(t,"length").writable)throw new xn("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Gn=TypeError,Ln={};Ln[le("toStringTag")]="z";var kn="[object z]"===String(Ln),Cn=kn,Rn=x,In=O,Nn=le("toStringTag"),Mn=Object,Dn="Arguments"===In(function(){return arguments}()),_n=Cn?In:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Mn(t),Nn))?r:Dn?In(e):"Object"===(n=In(e))&&Rn(e.callee)?"Arguments":n},Fn=g,zn=x,Hn=Dt.exports,Wn=Fn(Function.toString);zn(Hn.inspectSource)||(Hn.inspectSource=function(t){return Wn(t)});var Un=Hn.inspectSource,Vn=g,Bn=a,Xn=x,qn=_n,Kn=Un,Yn=function(){},Jn=ot("Reflect","construct"),Qn=/^\s*(?:class|function)\b/,Zn=Vn(Qn.exec),$n=!Qn.test(Yn),to=function(t){if(!Xn(t))return!1;try{return Jn(Yn,[],t),!0}catch(t){return!1}},eo=function(t){if(!Xn(t))return!1;switch(qn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $n||!!Zn(Qn,Kn(t))}catch(t){return!0}};eo.sham=!0;var ro=!Jn||Bn((function(){var t;return to(to.call)||!to(Object)||!to((function(){t=!0}))||t}))?eo:to,no=Sn,oo=ro,io=Z,ao=le("species"),uo=Array,co=function(t){var e;return no(t)&&(e=t.constructor,(oo(e)&&(e===uo||no(e.prototype))||io(e)&&null===(e=e[ao]))&&(e=void 0)),void 0===e?uo:e},so=function(t,e){return new(co(t))(0===e?0:e)},fo=A,lo=Je,po=_,ho=jt,vo=TypeError,yo=a,go=ht,mo=le("species"),bo=function(t){return go>=51||!yo((function(){var e=[];return(e.constructor={})[mo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},wo=Pr,Oo=Kt,Eo=Jr,So=Xr,To=tn,jo=An,xo=function(t){if(t>9007199254740991)throw Gn("Maximum allowed index exceeded");return t},Po=so,Ao=function(t,e,r){fo?lo.f(t,e,po(0,r)):t[e]=r},Go=function(t,e){if(!delete t[e])throw new vo("Cannot delete property "+ho(e)+" of "+ho(t))},Lo=bo("splice"),ko=Math.max,Co=Math.min;wo({target:"Array",proto:!0,forced:!Lo},{splice:function(t,e){var r,n,o,i,a,u,c=Oo(this),s=To(c),f=Eo(t,s),l=arguments.length;for(0===l?r=n=0:1===l?(r=0,n=s-f):(r=l-2,n=Co(ko(So(e),0),s-f)),xo(s+r-n),o=Po(c,n),i=0;i<n;i++)(a=f+i)in c&&Ao(o,i,c[a]);if(o.length=n,r<n){for(i=f;i<s-n;i++)u=i+r,(a=i+n)in c?c[u]=c[a]:Go(c,u);for(i=s;i>s-n+r;i--)Go(c,i-1)}else if(r>n)for(i=s-n;i>f;i--)u=i+r-1,(a=i+n-1)in c?c[u]=c[a]:Go(c,u);for(i=0;i<r;i++)c[i+f]=arguments[i+2];return jo(c,s-n+r),o}});var Ro=dn("Array","splice"),Io=it,No=Ro,Mo=Array.prototype,Do=e(On.exports=function(t){var e=t.splice;return t===Mo||Io(Mo,t)&&e===Mo.splice?No:e});function _o(t,e,r){return e=Xo(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,r||[],Xo(t).constructor):e.apply(t,r))}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function zo(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function Ho(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zo(n.key),n)}}function Uo(t,e,r){return e&&Wo(t.prototype,e),r&&Wo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Vo(t,e,r){return(e=zo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}var Ko=function(){return Uo((function t(){Ho(this,t),Vo(this,"style",{cursor:null}),Vo(this,"pathname","")}),[{key:"appendChild",value:function(){}},{key:"removeChild",value:function(){}},{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"setAttribute",value:function(){}}])}(),Yo=Hr.constructor,Jo=function(t){function e(){return Ho(this,e),_o(this,e,arguments)}return Bo(e,Fr.constructor),Uo(e)}(),Qo=function(t){function e(){return Ho(this,e),_o(this,e,arguments)}return Bo(e,Ko),Uo(e)}();function Zo(){var t=wx.createVideo({width:0,height:0,controls:!1});return t.canPlayType=function(){return!0},t}var $o,ti,ei,ri={},ni={body:new Ko("body"),cookie:"",addEventListener:function(t,e){ri[t]=ri[t]||[],ri[t].push(e)},removeEventListener:function(t,e){if(ri[t]&&ri[t].length){var r,n,o=wn(r=ri[t]).call(r,e);-1!==o&&Do(n=ri[t]).call(n,o)}},dispatch:function(t){var e=ri[t.type];e&&e.forEach((function(e){return e(t)}))},createElement:function(t){switch(t=t.toLowerCase()){case"canvas":return new zr;case"image":case"img":return new _r;case"video":return new Zo;default:return new Ko}}},oi={exports:{}},ii={},ai=x,ui=i.WeakMap,ci=ai(ui)&&/native code/.test(String(ui)),si=re,fi=Bt("keys"),li=function(t){return fi[t]||(fi[t]=si(t))},pi={},hi=ci,vi=i,di=Z,yi=dr,gi=Qt,mi=Dt.exports,bi=li,wi=pi,Oi="Object already initialized",Ei=vi.TypeError,Si=vi.WeakMap;if(hi||mi.state){var Ti=mi.state||(mi.state=new Si);Ti.get=Ti.get,Ti.has=Ti.has,Ti.set=Ti.set,$o=function(t,e){if(Ti.has(t))throw new Ei(Oi);return e.facade=t,Ti.set(t,e),e},ti=function(t){return Ti.get(t)||{}},ei=function(t){return Ti.has(t)}}else{var ji=bi("state");wi[ji]=!0,$o=function(t,e){if(gi(t,ji))throw new Ei(Oi);return e.facade=t,yi(t,ji,e),e},ti=function(t){return gi(t,ji)?t[ji]:{}},ei=function(t){return gi(t,ji)}}var xi={set:$o,get:ti,has:ei,enforce:function(t){return ei(t)?ti(t):$o(t,{})},getterFor:function(t){return function(e){var r;if(!di(e)||(r=ti(e)).type!==t)throw new Ei("Incompatible receiver, "+t+" required");return r}}},Pi=A,Ai=Qt,Gi=Function.prototype,Li=Pi&&Object.getOwnPropertyDescriptor,ki=Ai(Gi,"name"),Ci={EXISTS:ki,PROPER:ki&&"something"===function(){}.name,CONFIGURABLE:ki&&(!Pi||Pi&&Li(Gi,"name").configurable)},Ri={},Ii=Qt,Ni=J,Mi=an.indexOf,Di=pi,_i=g([].push),Fi=function(t,e){var r,n=Ni(t),o=0,i=[];for(r in n)!Ii(Di,r)&&Ii(n,r)&&_i(i,r);for(;e.length>o;)Ii(n,r=e[o++])&&(~Mi(i,r)||_i(i,r));return i},zi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Hi=Fi,Wi=zi,Ui=Object.keys||function(t){return Hi(t,Wi)},Vi=A,Bi=Qe,Xi=Je,qi=er,Ki=J,Yi=Ui;Ri.f=Vi&&!Bi?Object.defineProperties:function(t,e){qi(t);for(var r,n=Ki(e),o=Yi(e),i=o.length,a=0;i>a;)Xi.f(t,r=o[a++],n[r]);return t};var Ji,Qi=ot("document","documentElement"),Zi=er,$i=Ri,ta=zi,ea=pi,ra=Qi,na=je,oa="prototype",ia="script",aa=li("IE_PROTO"),ua=function(){},ca=function(t){return"<"+ia+">"+t+"</"+ia+">"},sa=function(t){t.write(ca("")),t.close();var e=t.parentWindow.Object;return t=null,e},fa=function(){try{Ji=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;fa="undefined"!=typeof document?document.domain&&Ji?sa(Ji):(e=na("iframe"),r="java"+ia+":",e.style.display="none",ra.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(ca("document.F=Object")),t.close(),t.F):sa(Ji);for(var n=ta.length;n--;)delete fa[oa][ta[n]];return fa()};ea[aa]=!0;var la,pa,ha,va=Object.create||function(t,e){var r;return null!==t?(ua[oa]=Zi(t),r=new ua,ua[oa]=null,r[aa]=t):r=fa(),void 0===e?r:$i.f(r,e)},da=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ya=Qt,ga=x,ma=Kt,ba=da,wa=li("IE_PROTO"),Oa=Object,Ea=Oa.prototype,Sa=ba?Oa.getPrototypeOf:function(t){var e=ma(t);if(ya(e,wa))return e[wa];var r=e.constructor;return ga(r)&&e instanceof r?r.prototype:e instanceof Oa?Ea:null},Ta=dr,ja=function(t,e,r,n){return n&&n.enumerable?t[e]=r:Ta(t,e,r),t},xa=a,Pa=x,Aa=Z,Ga=va,La=Sa,ka=ja,Ca=le("iterator"),Ra=!1;[].keys&&("next"in(ha=[].keys())?(pa=La(La(ha)))!==Object.prototype&&(la=pa):Ra=!0);var Ia=!Aa(la)||xa((function(){var t={};return la[Ca].call(t)!==t}));Pa((la=Ia?{}:Ga(la))[Ca])||ka(la,Ca,(function(){return this}));var Na={IteratorPrototype:la,BUGGY_SAFARI_ITERATORS:Ra},Ma=_n,Da=kn?{}.toString:function(){return"[object "+Ma(this)+"]"},_a=kn,Fa=Je.f,za=dr,Ha=Qt,Wa=Da,Ua=le("toStringTag"),Va=function(t,e,r,n){var o=r?t:t&&t.prototype;o&&(Ha(o,Ua)||Fa(o,Ua,{configurable:!0,value:e}),n&&!_a&&za(o,"toString",Wa))},Ba=Na.IteratorPrototype,Xa=va,qa=_,Ka=Va,Ya=ii,Ja=function(){return this},Qa=g,Za=Gt,$a=Z,tu=function(t){return $a(t)||null===t},eu=String,ru=TypeError,nu=function(t,e,r){try{return Qa(Za(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},ou=Z,iu=q,au=function(t){if(tu(t))return t;throw new ru("Can't set "+eu(t)+" as a prototype")},uu=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=nu(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return iu(r),au(n),ou(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),cu=Pr,su=k,fu=Ci,lu=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Xa(Ba,{next:qa(+!n,r)}),Ka(t,o,!1,!0),Ya[o]=Ja,t},pu=Sa,hu=Va,vu=ja,du=ii,yu=Na,gu=fu.PROPER,mu=yu.BUGGY_SAFARI_ITERATORS,bu=le("iterator"),wu="keys",Ou="values",Eu="entries",Su=function(){return this},Tu=function(t,e,r,n,o,i,a){lu(r,e,n);var u,c,s,f=function(t){if(t===o&&d)return d;if(!mu&&t&&t in h)return h[t];switch(t){case wu:case Ou:case Eu:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,v=h[bu]||h["@@iterator"]||o&&h[o],d=!mu&&v||f(o),y="Array"===e&&h.entries||v;if(y&&(u=pu(y.call(new t)))!==Object.prototype&&u.next&&(hu(u,l,!0,!0),du[l]=Su),gu&&o===Ou&&v&&v.name!==Ou&&(p=!0,d=function(){return su(v,this)}),o)if(c={values:f(Ou),keys:i?d:f(wu),entries:f(Eu)},a)for(s in c)(mu||p||!(s in h))&&vu(h,s,c[s]);else cu({target:e,proto:!0,forced:mu||p},c);return a&&h[bu]!==d&&vu(h,bu,d,{name:o}),du[e]=d,c},ju=function(t,e){return{value:t,done:e}},xu=J,Pu=function(){},Au=ii,Gu=xi,Lu=(Je.f,Tu),ku=ju,Cu="Array Iterator",Ru=Gu.set,Iu=Gu.getterFor(Cu);Lu(Array,"Array",(function(t,e){Ru(this,{type:Cu,target:xu(t),index:0,kind:e})}),(function(){var t=Iu(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,ku(void 0,!0);switch(t.kind){case"keys":return ku(r,!1);case"values":return ku(e[r],!1)}return ku([r,e[r]],!1)}),"values");Au.Arguments=Au.Array;Pu(),Pu(),Pu();var Nu=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),Mu=ja,Du=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:Mu(t,n,e[n],r);return t},_u={exports:{}},Fu={},zu=Fi,Hu=zi.concat("length","prototype");Fu.f=Object.getOwnPropertyNames||function(t){return zu(t,Hu)};var Wu={},Uu=g([].slice),Vu=O,Bu=J,Xu=Fu.f,qu=Uu,Ku="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Wu.f=function(t){return Ku&&"Window"===Vu(t)?function(t){try{return Xu(t)}catch(t){return qu(Ku)}}(t):Xu(Bu(t))};var Yu=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ju=a,Qu=Z,Zu=O,$u=Yu,tc=Object.isExtensible,ec=Ju((function(){tc(1)}))||$u?function(t){return!!Qu(t)&&((!$u||"ArrayBuffer"!==Zu(t))&&(!tc||tc(t)))}:tc,rc=Pr,nc=g,oc=pi,ic=Z,ac=Qt,uc=Je.f,cc=Fu,sc=Wu,fc=ec,lc=Nu,pc=!1,hc=re("meta"),vc=0,dc=function(t){uc(t,hc,{value:{objectID:"O"+vc++,weakData:{}}})},yc=_u.exports={enable:function(){yc.enable=function(){},pc=!0;var t=cc.f,e=nc([].splice),r={};r[hc]=1,t(r).length&&(cc.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===hc){e(n,o,1);break}return n},rc({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:sc.f}))},fastKey:function(t,e){if(!ic(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!ac(t,hc)){if(!fc(t))return"F";if(!e)return"E";dc(t)}return t[hc].objectID},getWeakData:function(t,e){if(!ac(t,hc)){if(!fc(t))return!0;if(!e)return!1;dc(t)}return t[hc].weakData},onFreeze:function(t){return lc&&pc&&fc(t)&&!ac(t,hc)&&dc(t),t}};oc[hc]=!0;var gc=ii,mc=le("iterator"),bc=Array.prototype,wc=_n,Oc=Ct,Ec=V,Sc=ii,Tc=le("iterator"),jc=function(t){if(!Ec(t))return Oc(t,Tc)||Oc(t,"@@iterator")||Sc[wc(t)]},xc=k,Pc=Gt,Ac=er,Gc=jt,Lc=jc,kc=TypeError,Cc=k,Rc=er,Ic=Ct,Nc=Ye,Mc=k,Dc=er,_c=jt,Fc=function(t){return void 0!==t&&(gc.Array===t||bc[mc]===t)},zc=tn,Hc=it,Wc=function(t,e){var r=arguments.length<2?Lc(t):e;if(Pc(r))return Ac(xc(r,t));throw new kc(Gc(t)+" is not iterable")},Uc=jc,Vc=function(t,e,r){var n,o;Rc(t);try{if(!(n=Ic(t,"return"))){if("throw"===e)throw r;return r}n=Cc(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Rc(n),r},Bc=TypeError,Xc=function(t,e){this.stopped=t,this.result=e},qc=Xc.prototype,Kc=function(t,e,r){var n,o,i,a,u,c,s,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),v=!(!r||!r.INTERRUPTED),d=Nc(e,f),y=function(t){return n&&Vc(n,"normal",t),new Xc(!0,t)},g=function(t){return l?(Dc(t),v?d(t[0],t[1],y):d(t[0],t[1])):v?d(t,y):d(t)};if(p)n=t.iterator;else if(h)n=t;else{if(!(o=Uc(t)))throw new Bc(_c(t)+" is not iterable");if(Fc(o)){for(i=0,a=zc(t);a>i;i++)if((u=g(t[i]))&&Hc(qc,u))return u;return new Xc(!1)}n=Wc(t,o)}for(c=p?t.next:n.next;!(s=Mc(c,n)).done;){try{u=g(s.value)}catch(t){Vc(n,"throw",t)}if("object"==typeof u&&u&&Hc(qc,u))return u}return new Xc(!1)},Yc=it,Jc=TypeError,Qc=function(t,e){if(Yc(e,t))return t;throw new Jc("Incorrect invocation")},Zc=Ye,$c=U,ts=Kt,es=tn,rs=so,ns=g([].push),os=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(c,s,f,l){for(var p,h,v=ts(c),d=$c(v),y=es(d),g=Zc(s,f),m=0,b=l||rs,w=e?b(c,y):r||a?b(c,0):void 0;y>m;m++)if((u||m in d)&&(h=g(p=d[m],m,v),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:ns(w,p)}else switch(t){case 4:return!1;case 7:ns(w,p)}return i?-1:n||o?o:w}},is={forEach:os(0),map:os(1),filter:os(2),some:os(3),every:os(4),find:os(5),findIndex:os(6),filterReject:os(7)},as=Pr,us=i,cs=_u.exports,ss=a,fs=dr,ls=Kc,ps=Qc,hs=x,vs=Z,ds=V,ys=Va,gs=Je.f,ms=is.forEach,bs=A,ws=xi.set,Os=xi.getterFor,Es=g,Ss=Du,Ts=_u.exports.getWeakData,js=Qc,xs=er,Ps=V,As=Z,Gs=Kc,Ls=Qt,ks=xi.set,Cs=xi.getterFor,Rs=is.find,Is=is.findIndex,Ns=Es([].splice),Ms=0,Ds=function(t){return t.frozen||(t.frozen=new _s)},_s=function(){this.entries=[]},Fs=function(t,e){return Rs(t.entries,(function(t){return t[0]===e}))};_s.prototype={get:function(t){var e=Fs(this,t);if(e)return e[1]},has:function(t){return!!Fs(this,t)},set:function(t,e){var r=Fs(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Is(this.entries,(function(e){return e[0]===t}));return~e&&Ns(this.entries,e,1),!!~e}};var zs,Hs={getConstructor:function(t,e,r,n){var o=t((function(t,o){js(t,i),ks(t,{type:e,id:Ms++,frozen:void 0}),Ps(o)||Gs(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Cs(e),u=function(t,e,r){var n=a(t),o=Ts(xs(e),!0);return!0===o?Ds(n).set(e,r):o[n.id]=r,t};return Ss(i,{delete:function(t){var e=a(this);if(!As(t))return!1;var r=Ts(t);return!0===r?Ds(e).delete(t):r&&Ls(r,e.id)&&delete r[e.id]},has:function(t){var e=a(this);if(!As(t))return!1;var r=Ts(t);return!0===r?Ds(e).has(t):r&&Ls(r,e.id)}}),Ss(i,r?{get:function(t){var e=a(this);if(As(t)){var r=Ts(t);return!0===r?Ds(e).get(t):r?r[e.id]:void 0}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}},Ws=Nu,Us=i,Vs=g,Bs=Du,Xs=_u.exports,qs=function(t,e,r){var n,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=o?"set":"add",u=us[t],c=u&&u.prototype,s={};if(bs&&hs(u)&&(i||c.forEach&&!ss((function(){(new u).entries().next()})))){var f=(n=e((function(e,r){ws(ps(e,f),{type:t,collection:new u}),ds(r)||ls(r,e[a],{that:e,AS_ENTRIES:o})}))).prototype,l=Os(t);ms(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in c)||i&&"clear"===t||fs(f,t,(function(r,n){var o=l(this).collection;if(!e&&i&&!vs(r))return"get"===t&&void 0;var a=o[t](0===r?0:r,n);return e?this:a}))})),i||gs(f,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else n=r.getConstructor(e,t,o,a),cs.enable();return ys(n,t,!1,!0),s[t]=n,as({global:!0,forced:!0},s),i||r.setStrong(n,t,o),n},Ks=Hs,Ys=Z,Js=xi.enforce,Qs=a,Zs=ci,$s=Object,tf=Array.isArray,ef=$s.isExtensible,rf=$s.isFrozen,nf=$s.isSealed,of=$s.freeze,af=$s.seal,uf=!Us.ActiveXObject&&"ActiveXObject"in Us,cf=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},sf=qs("WeakMap",cf,Ks),ff=sf.prototype,lf=Vs(ff.set);if(Zs)if(uf){zs=Ks.getConstructor(cf,"WeakMap",!0),Xs.enable();var pf=Vs(ff.delete),hf=Vs(ff.has),vf=Vs(ff.get);Bs(ff,{delete:function(t){if(Ys(t)&&!ef(t)){var e=Js(this);return e.frozen||(e.frozen=new zs),pf(this,t)||e.frozen.delete(t)}return pf(this,t)},has:function(t){if(Ys(t)&&!ef(t)){var e=Js(this);return e.frozen||(e.frozen=new zs),hf(this,t)||e.frozen.has(t)}return hf(this,t)},get:function(t){if(Ys(t)&&!ef(t)){var e=Js(this);return e.frozen||(e.frozen=new zs),hf(this,t)?vf(this,t):e.frozen.get(t)}return vf(this,t)},set:function(t,e){if(Ys(t)&&!ef(t)){var r=Js(this);r.frozen||(r.frozen=new zs),hf(this,t)?lf(this,t,e):r.frozen.set(t,e)}else lf(this,t,e);return this}})}else Ws&&Qs((function(){var t=of([]);return lf(new sf,t,1),!rf(t)}))&&Bs(ff,{set:function(t,e){var r;return tf(t)&&(rf(t)?r=of:nf(t)&&(r=af)),lf(this,t,e),r&&r(t),this}});var df=$.WeakMap,yf={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},gf=i,mf=Va,bf=ii;for(var wf in yf)mf(gf[wf],wf),bf[wf]=bf.Array;var Of=new(e(oi.exports=df)),Ef=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(Ho(this,t),this.binaryType="",this.bufferedAmount=0,this.extensions="",this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this.protocol="",this.readyState=3,"string"!=typeof e||!/(^ws:\/\/)|(^wss:\/\/)/.test(e))throw new TypeError("Failed to construct 'WebSocket': The URL '".concat(e,"' is invalid"));this.url=e,this.readyState=t.CONNECTING;var o=wx.connectSocket({url:e,protocols:Array.isArray(n)?n:[n]});return Of.set(this,o),o.onClose((function(e){r.readyState=t.CLOSED,"function"==typeof r.onclose&&r.onclose(e)})),o.onMessage((function(t){"function"==typeof r.onmessage&&r.onmessage(t)})),o.onOpen((function(){r.readyState=t.OPEN,"function"==typeof r.onopen&&r.onopen()})),o.onError((function(t){"function"==typeof r.onerror&&r.onerror(new Error(t.errMsg))})),this}return Uo(t,[{key:"close",value:function(e,r){this.readyState=t.CLOSING,Of.get(this).close({code:e,reason:r})}},{key:"send",value:function(t){if("string"!=typeof t&&!(t instanceof ArrayBuffer))throw new TypeError("Failed to send message: The data ".concat(t," is invalid"));Of.get(this).send({data:t})}}])}();Vo(Ef,"CONNECTING",0),Vo(Ef,"OPEN",1),Vo(Ef,"CLOSING",2),Vo(Ef,"CLOSED",3);var Sf=Uo((function t(e){Ho(this,t),Vo(this,"preventDefault",Dr),Vo(this,"stopPropagation",Dr),Vo(this,"target",Hr),Vo(this,"currentTarget",Hr),this.type=e}));function Tf(t){return function(e){var r=new Sf(t);r.touches=r.targetTouches=e.touches,r.changedTouches=e.changedTouches,r.timeStamp=e.timeStamp,ni.dispatch(r)}}wx.onTouchStart(Tf("touchstart")),wx.onTouchMove(Tf("touchmove")),wx.onTouchEnd(Tf("touchend")),wx.onTouchCancel(Tf("touchcancel"));var jf=Uo((function t(){Ho(this,t)})),xf={getItem:function(t){return wx.getStorageSync(t)},setItem:function(t,e){return wx.setStorageSync(t,e)},clear:function(){wx.clearStorageSync()}},Pf=Date.now();var Af=Object.freeze({__proto__:null,now:function(){return Date.now()-Pf}}),Gf={exports:{}},Lf=is.map;Pr({target:"Array",proto:!0,forced:!bo("map")},{map:function(t){return Lf(this,t,arguments.length>1?arguments[1]:void 0)}});var kf=dn("Array","map"),Cf=it,Rf=kf,If=Array.prototype,Nf=e(Gf.exports=function(t){var e=t.map;return t===If||Cf(If,t)&&e===If.map?Rf:e}),Mf={exports:{}},Df=A,_f=a,Ff=g,zf=Sa,Hf=Ui,Wf=J,Uf=Ff(C.f),Vf=Ff([].push),Bf=Df&&_f((function(){var t=Object.create(null);return t[2]=2,!Uf(t,2)})),Xf=function(t){return function(e){for(var r,n=Wf(e),o=Hf(n),i=Bf&&null===zf(n),a=o.length,u=0,c=[];a>u;)r=o[u++],Df&&!(i?r in n:Uf(n,r))||Vf(c,t?[r,n[r]]:n[r]);return c}},qf={entries:Xf(!0),values:Xf(!1)}.entries;Pr({target:"Object",stat:!0},{entries:function(t){return qf(t)}});var Kf=$.Object.entries,Yf=e(Mf.exports=Kf),Jf={exports:{}},Qf={};Qf.f=Object.getOwnPropertySymbols;var Zf=ot,$f=Fu,tl=Qf,el=er,rl=g([].concat),nl=Zf("Reflect","ownKeys")||function(t){var e=$f.f(el(t)),r=tl.f;return r?rl(e,r(t)):e},ol=Qt,il=nl,al=P,ul=Je,cl=Z,sl=dr,fl=Error,ll=g("".replace),pl=String(new fl("zxcasd").stack),hl=/\n\s*at [^:]*:[^\n]*/,vl=hl.test(pl),dl=_,yl=!a((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",dl(1,7)),7!==t.stack)})),gl=dr,ml=function(t,e){if(vl&&"string"==typeof t&&!fl.prepareStackTrace)for(;e--;)t=ll(t,hl,"");return t},bl=yl,wl=Error.captureStackTrace,Ol=_n,El=String,Sl=function(t){if("Symbol"===Ol(t))throw new TypeError("Cannot convert a Symbol value to a string");return El(t)},Tl=Sl,jl=Pr,xl=it,Pl=Sa,Al=uu,Gl=function(t,e,r){for(var n=il(e),o=ul.f,i=al.f,a=0;a<n.length;a++){var u=n[a];ol(t,u)||r&&ol(r,u)||o(t,u,i(e,u))}},Ll=va,kl=dr,Cl=_,Rl=function(t,e){cl(e)&&"cause"in e&&sl(t,"cause",e.cause)},Il=function(t,e,r,n){bl&&(wl?wl(t,e):gl(t,"stack",ml(r,n)))},Nl=Kc,Ml=function(t,e){return void 0===t?arguments.length<2?"":e:Tl(t)},Dl=le("toStringTag"),_l=Error,Fl=[].push,zl=function(t,e){var r,n=xl(Hl,this);Al?r=Al(new _l,n?Pl(this):Hl):(r=n?this:Ll(Hl),kl(r,Dl,"Error")),void 0!==e&&kl(r,"message",Ml(e)),Il(r,zl,r.stack,1),arguments.length>2&&Rl(r,arguments[2]);var o=[];return Nl(t,Fl,{that:o}),kl(r,"errors",o),r};Al?Al(zl,_l):Gl(zl,_l,{name:!0});var Hl=zl.prototype=Ll(_l.prototype,{constructor:Cl(1,zl),message:Cl(1,""),name:Cl(1,"AggregateError")});jl({global:!0,constructor:!0,arity:2},{AggregateError:zl});var Wl,Ul,Vl,Bl,Xl="process"===O(i.process),ql=Je,Kl=ot,Yl=function(t,e,r){return ql.f(t,e,r)},Jl=A,Ql=le("species"),Zl=ro,$l=jt,tp=TypeError,ep=er,rp=function(t){if(Zl(t))return t;throw new tp($l(t)+" is not a constructor")},np=V,op=le("species"),ip=function(t,e){var r,n=ep(t).constructor;return void 0===n||np(r=ep(n)[op])?e:rp(r)},ap=TypeError,up=/(?:ipad|iphone|ipod).*applewebkit/i.test(at),cp=i,sp=p,fp=Ye,lp=x,pp=Qt,hp=a,vp=Qi,dp=Uu,yp=je,gp=function(t,e){if(t<e)throw new ap("Not enough arguments");return t},mp=up,bp=Xl,wp=cp.setImmediate,Op=cp.clearImmediate,Ep=cp.process,Sp=cp.Dispatch,Tp=cp.Function,jp=cp.MessageChannel,xp=cp.String,Pp=0,Ap={},Gp="onreadystatechange";hp((function(){Wl=cp.location}));var Lp=function(t){if(pp(Ap,t)){var e=Ap[t];delete Ap[t],e()}},kp=function(t){return function(){Lp(t)}},Cp=function(t){Lp(t.data)},Rp=function(t){cp.postMessage(xp(t),Wl.protocol+"//"+Wl.host)};wp&&Op||(wp=function(t){gp(arguments.length,1);var e=lp(t)?t:Tp(t),r=dp(arguments,1);return Ap[++Pp]=function(){sp(e,void 0,r)},Ul(Pp),Pp},Op=function(t){delete Ap[t]},bp?Ul=function(t){Ep.nextTick(kp(t))}:Sp&&Sp.now?Ul=function(t){Sp.now(kp(t))}:jp&&!mp?(Bl=(Vl=new jp).port2,Vl.port1.onmessage=Cp,Ul=fp(Bl.postMessage,Bl)):cp.addEventListener&&lp(cp.postMessage)&&!cp.importScripts&&Wl&&"file:"!==Wl.protocol&&!hp(Rp)?(Ul=Rp,cp.addEventListener("message",Cp,!1)):Ul=Gp in yp("script")?function(t){vp.appendChild(yp("script"))[Gp]=function(){vp.removeChild(this),Lp(t)}}:function(t){setTimeout(kp(t),0)});var Ip={set:wp,clear:Op},Np=i,Mp=A,Dp=Object.getOwnPropertyDescriptor,_p=function(){this.head=null,this.tail=null};_p.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Fp,zp,Hp,Wp,Up,Vp=_p,Bp=/ipad|iphone|ipod/i.test(at)&&"undefined"!=typeof Pebble,Xp=/web0s(?!.*chrome)/i.test(at),qp=i,Kp=function(t){if(!Mp)return Np[t];var e=Dp(Np,t);return e&&e.value},Yp=Ye,Jp=Ip.set,Qp=Vp,Zp=up,$p=Bp,th=Xp,eh=Xl,rh=qp.MutationObserver||qp.WebKitMutationObserver,nh=qp.document,oh=qp.process,ih=qp.Promise,ah=Kp("queueMicrotask");if(!ah){var uh=new Qp,ch=function(){var t,e;for(eh&&(t=oh.domain)&&t.exit();e=uh.get();)try{e()}catch(t){throw uh.head&&Fp(),t}t&&t.enter()};Zp||eh||th||!rh||!nh?!$p&&ih&&ih.resolve?((Wp=ih.resolve(void 0)).constructor=ih,Up=Yp(Wp.then,Wp),Fp=function(){Up(ch)}):eh?Fp=function(){oh.nextTick(ch)}:(Jp=Yp(Jp,qp),Fp=function(){Jp(ch)}):(zp=!0,Hp=nh.createTextNode(""),new rh(ch).observe(Hp,{characterData:!0}),Fp=function(){Hp.data=zp=!zp}),ah=function(t){uh.head||Fp(),uh.add(t)}}var sh=ah,fh=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},lh=i.Promise,ph="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,hh=!ph&&!Xl&&"object"==typeof window&&"object"==typeof document,vh=i,dh=lh,yh=x,gh=Be,mh=Un,bh=le,wh=hh,Oh=ph,Eh=ht,Sh=dh&&dh.prototype,Th=bh("species"),jh=!1,xh=yh(vh.PromiseRejectionEvent),Ph=gh("Promise",(function(){var t=mh(dh),e=t!==String(dh);if(!e&&66===Eh)return!0;if(!Sh.catch||!Sh.finally)return!0;if(!Eh||Eh<51||!/native code/.test(t)){var r=new dh((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Th]=n,!(jh=r.then((function(){}))instanceof n))return!0}return!e&&(wh||Oh)&&!xh})),Ah={CONSTRUCTOR:Ph,REJECTION_EVENT:xh,SUBCLASSING:jh},Gh={},Lh=Gt,kh=TypeError,Ch=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new kh("Bad Promise constructor");e=t,r=n})),this.resolve=Lh(e),this.reject=Lh(r)};Gh.f=function(t){return new Ch(t)};var Rh,Ih,Nh=Pr,Mh=Xl,Dh=i,_h=k,Fh=ja,zh=Va,Hh=function(t){var e=Kl(t);Jl&&e&&!e[Ql]&&Yl(e,Ql,{configurable:!0,get:function(){return this}})},Wh=Gt,Uh=x,Vh=Z,Bh=Qc,Xh=ip,qh=Ip.set,Kh=sh,Yh=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},Jh=fh,Qh=Vp,Zh=xi,$h=lh,tv=Ah,ev=Gh,rv="Promise",nv=tv.CONSTRUCTOR,ov=tv.REJECTION_EVENT,iv=Zh.getterFor(rv),av=Zh.set,uv=$h&&$h.prototype,cv=$h,sv=uv,fv=Dh.TypeError,lv=Dh.document,pv=Dh.process,hv=ev.f,vv=hv,dv=!!(lv&&lv.createEvent&&Dh.dispatchEvent),yv="unhandledrejection",gv=function(t){var e;return!(!Vh(t)||!Uh(e=t.then))&&e},mv=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{u?(a||(2===e.rejection&&Sv(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?s(new fv("Promise-chain cycle")):(n=gv(r))?_h(n,r,c,s):c(r)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},bv=function(t,e){t.notified||(t.notified=!0,Kh((function(){for(var r,n=t.reactions;r=n.get();)mv(r,t);t.notified=!1,e&&!t.rejection&&Ov(t)})))},wv=function(t,e,r){var n,o;dv?((n=lv.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),Dh.dispatchEvent(n)):n={promise:e,reason:r},!ov&&(o=Dh["on"+t])?o(n):t===yv&&Yh("Unhandled promise rejection",r)},Ov=function(t){_h(qh,Dh,(function(){var e,r=t.facade,n=t.value;if(Ev(t)&&(e=Jh((function(){Mh?pv.emit("unhandledRejection",n,r):wv(yv,r,n)})),t.rejection=Mh||Ev(t)?2:1,e.error))throw e.value}))},Ev=function(t){return 1!==t.rejection&&!t.parent},Sv=function(t){_h(qh,Dh,(function(){var e=t.facade;Mh?pv.emit("rejectionHandled",e):wv("rejectionhandled",e,t.value)}))},Tv=function(t,e,r){return function(n){t(e,n,r)}},jv=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,bv(t,!0))},xv=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new fv("Promise can't be resolved itself");var n=gv(e);n?Kh((function(){var r={done:!1};try{_h(n,e,Tv(xv,r,t),Tv(jv,r,t))}catch(e){jv(r,e,t)}})):(t.value=e,t.state=1,bv(t,!1))}catch(e){jv({done:!1},e,t)}}};nv&&(sv=(cv=function(t){Bh(this,sv),Wh(t),_h(Rh,this);var e=iv(this);try{t(Tv(xv,e),Tv(jv,e))}catch(t){jv(e,t)}}).prototype,(Rh=function(t){av(this,{type:rv,done:!1,notified:!1,parent:!1,reactions:new Qh,rejection:!1,state:0,value:void 0})}).prototype=Fh(sv,"then",(function(t,e){var r=iv(this),n=hv(Xh(this,cv));return r.parent=!0,n.ok=!Uh(t)||t,n.fail=Uh(e)&&e,n.domain=Mh?pv.domain:void 0,0===r.state?r.reactions.add(n):Kh((function(){mv(n,r)})),n.promise})),Ih=function(){var t=new Rh,e=iv(t);this.promise=t,this.resolve=Tv(xv,e),this.reject=Tv(jv,e)},ev.f=hv=function(t){return t===cv||undefined===t?new Ih(t):vv(t)}),Nh({global:!0,constructor:!0,wrap:!0,forced:nv},{Promise:cv}),zh(cv,rv,!1,!0),Hh(rv);var Pv=le("iterator"),Av=!1;try{var Gv=0,Lv={next:function(){return{done:!!Gv++}},return:function(){Av=!0}};Lv[Pv]=function(){return this},Array.from(Lv,(function(){throw 2}))}catch(t){}var kv=lh,Cv=function(t,e){try{if(!e&&!Av)return!1}catch(t){return!1}var r=!1;try{var n={};n[Pv]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Rv=Ah.CONSTRUCTOR||!Cv((function(t){kv.all(t).then(void 0,(function(){}))})),Iv=k,Nv=Gt,Mv=Gh,Dv=fh,_v=Kc;Pr({target:"Promise",stat:!0,forced:Rv},{all:function(t){var e=this,r=Mv.f(e),n=r.resolve,o=r.reject,i=Dv((function(){var r=Nv(e.resolve),i=[],a=0,u=1;_v(t,(function(t){var c=a++,s=!1;u++,Iv(r,e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise}});var Fv=Pr,zv=Ah.CONSTRUCTOR;lh&&lh.prototype,Fv({target:"Promise",proto:!0,forced:zv,real:!0},{catch:function(t){return this.then(void 0,t)}});var Hv=k,Wv=Gt,Uv=Gh,Vv=fh,Bv=Kc;Pr({target:"Promise",stat:!0,forced:Rv},{race:function(t){var e=this,r=Uv.f(e),n=r.reject,o=Vv((function(){var o=Wv(e.resolve);Bv(t,(function(t){Hv(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Xv=Gh;Pr({target:"Promise",stat:!0,forced:Ah.CONSTRUCTOR},{reject:function(t){var e=Xv.f(this);return(0,e.reject)(t),e.promise}});var qv=er,Kv=Z,Yv=Gh,Jv=function(t,e){if(qv(t),Kv(e)&&e.constructor===t)return e;var r=Yv.f(t);return(0,r.resolve)(e),r.promise},Qv=Pr,Zv=lh,$v=Ah.CONSTRUCTOR,td=Jv,ed=ot("Promise"),rd=!$v;Qv({target:"Promise",stat:!0,forced:true},{resolve:function(t){return td(rd&&this===ed?Zv:this,t)}});var nd=k,od=Gt,id=Gh,ad=fh,ud=Kc;Pr({target:"Promise",stat:!0,forced:Rv},{allSettled:function(t){var e=this,r=id.f(e),n=r.resolve,o=r.reject,i=ad((function(){var r=od(e.resolve),o=[],i=0,a=1;ud(t,(function(t){var u=i++,c=!1;a++,nd(r,e,t).then((function(t){c||(c=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){c||(c=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),r.promise}});var cd=k,sd=Gt,fd=ot,ld=Gh,pd=fh,hd=Kc,vd="No one promise resolved";Pr({target:"Promise",stat:!0,forced:Rv},{any:function(t){var e=this,r=fd("AggregateError"),n=ld.f(e),o=n.resolve,i=n.reject,a=pd((function(){var n=sd(e.resolve),a=[],u=0,c=1,s=!1;hd(t,(function(t){var f=u++,l=!1;c++,cd(n,e,t).then((function(t){l||s||(s=!0,o(t))}),(function(t){l||s||(l=!0,a[f]=t,--c||i(new r(a,vd)))}))})),--c||i(new r(a,vd))}));return a.error&&i(a.value),n.promise}});var dd=Gh;Pr({target:"Promise",stat:!0},{withResolvers:function(){var t=dd.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var yd=Pr,gd=lh,md=a,bd=ot,wd=x,Od=ip,Ed=Jv,Sd=gd&&gd.prototype;yd({target:"Promise",proto:!0,real:!0,forced:!!gd&&md((function(){Sd.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=Od(this,bd("Promise")),r=wd(t);return this.then(r?function(r){return Ed(e,t()).then((function(){return r}))}:t,r?function(r){return Ed(e,t()).then((function(){throw r}))}:t)}});var Td=g,jd=Xr,xd=Sl,Pd=q,Ad=Td("".charAt),Gd=Td("".charCodeAt),Ld=Td("".slice),kd=function(t){return function(e,r){var n,o,i=xd(Pd(e)),a=jd(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Gd(i,a))<55296||n>56319||a+1===u||(o=Gd(i,a+1))<56320||o>57343?t?Ad(i,a):n:t?Ld(i,a,a+2):o-56320+(n-55296<<10)+65536}},Cd={codeAt:kd(!1),charAt:kd(!0)}.charAt,Rd=Sl,Id=xi,Nd=Tu,Md=ju,Dd="String Iterator",_d=Id.set,Fd=Id.getterFor(Dd);Nd(String,"String",(function(t){_d(this,{type:Dd,string:Rd(t),index:0})}),(function(){var t,e=Fd(this),r=e.string,n=e.index;return n>=r.length?Md(void 0,!0):(t=Cd(r,n),e.index+=t.length,Md(t,!1))}));var zd=e(Jf.exports=$.Promise),Hd=function(){function t(){Ho(this,t),Vo(this,"method","GET"),Vo(this,"dataType","text"),Vo(this,"responseType","utf-8"),Vo(this,"onreadystatechange",Dr),Vo(this,"onloadend",Dr),Vo(this,"onerror",Dr),Vo(this,"event",{}),Vo(this,"responseHeader",{}),Vo(this,"header",{Accept:"*/*"})}return Uo(t,[{key:"open",value:function(e,r){this.method=e,this.url=r,this.readyState=t.OPENED}},{key:"setRequestHeader",value:function(t,e){this.header[t]=e}},{key:"addEventListener",value:function(t,e){this.event[t]=this.event[t]||[],this.event[t].push(e)}},{key:"getResponseHeader",value:function(t){return this.responseHeader&&this.responseHeader[t]}},{key:"getAllResponseHeaders",value:function(){var t,e=this.responseHeader||{};return Nf(t=Yf(e)).call(t,(function(t){return t.join(": ")})).join("\r\n")}},{key:"emit",value:function(t){var e=this,r=this.event[t],n={type:t,target:this,method:this.method,response:this.response,responseText:this.responseText,responseType:this.responseType};r&&r.forEach((function(t){return t.call(e,n)})),"load"===t&&this.onload&&this.onload(n),"error"===t&&this.onerror&&this.onerror(n)}},{key:"readFile",value:function(t,e){return new zd((function(r,n){wx.getFileSystemManager().readFile({encoding:e,filePath:t,success:function(t){return r(t.data)},fail:n})}))}},{key:"send",value:function(e){var r=this;this.readyState=t.LOADING,this.url.match(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}/)?wx.request({data:e,url:this.url,header:this.header,method:this.method,dataType:this.dataType,responseType:"text"===this.responseType||"arraybuffer"===this.responseType?this.responseType:"text",success:function(e){r.readyState=t.DONE,r.responseHeader=e.header,r.status=e.statusCode,r.response=r.responseText=e.data,r.emit("load"),r.emit("readystatechange"),r.onloadend(),r.onreadystatechange()},fail:function(e){console.log("error",e),r.readyState=t.DONE,r.status=e.statusCode,r.response=r.responseText=e,r.responseHeader=e.header,r.emit("error"),r.emit("readystatechange"),r.onerror(),r.onreadystatechange()}}):(this.readyState=t.DONE,this.status=200,this.readFile(this.url,"text"===this.responseType?"utf-8":this.responseType).then((function(t){r.response=r.responseText=t,r.emit("readystatechange"),r.emit("load")})).catch((function(t){r.response=r.responseText=t,r.emit("error")})))}}])}();Vo(Hd,"UNSEND",0),Vo(Hd,"OPENED",1),Vo(Hd,"HEADERS_RECEIVED",2),Vo(Hd,"LOADING",3),Vo(Hd,"DONE",4);var Wd=wx.getSystemInfoSync().platform;if(GameGlobal.canvas=Hr,Hr.addEventListener=ni.addEventListener,Hr.removeEventListener=ni.removeEventListener,"devtools"===Wd)for(var Ud in Object.defineProperties(window,{Image:{value:_r},Element:{value:Ko},ontouchstart:{value:Dr},WebSocket:{value:Ef},addEventListener:{value:Dr},TouchEvent:{value:Sf},XMLDocument:{value:jf},localStorage:{value:xf},XMLHttpRequest:{value:Hd},HTMLVideoElement:{value:Qo},HTMLImageElement:{value:Jo},HTMLCanvasElement:{value:Yo}}),ni){var Vd=Mr(window.document,Ud);Vd&&!Vd.configurable||Object.defineProperty(window.document,Ud,{value:ni[Ud]})}else GameGlobal.Image=_r,GameGlobal.self=GameGlobal,GameGlobal.window=GameGlobal,GameGlobal.ontouchstart=Dr,GameGlobal.document=ni,GameGlobal.location={origin:"",href:""},GameGlobal.WebSocket=Ef,GameGlobal.navigator={language:"zh-cn",appVersion:"5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36",userAgent:"Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36",onLine:!0},GameGlobal.TouchEvent=Sf,GameGlobal.addEventListener=Dr,GameGlobal.performance=Af,GameGlobal.XMLDocument=jf,GameGlobal.removeEventListener=Dr,GameGlobal.localStorage=xf,GameGlobal.XMLHttpRequest=Hd,GameGlobal.HTMLImageElement="Object"!==Fr.constructor.name?Fr.constructor:Jo,GameGlobal.HTMLVideoElement=Qo,GameGlobal.HTMLCanvasElement=Yo,GameGlobal.WebGLRenderingContext=GameGlobal.WebGLRenderingContext||{};
//# sourceMappingURL=wechat-adapter.es.js.map