@iro/wechat-adapter
Version:
A super small adapter for wechat mini game.
3 lines (2 loc) • 46.5 kB
JavaScript
!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";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;r.exports=Nr;var Mr=e(r.exports);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=function(t){var e=t.indexOf;return t===bn||gn(bn,t)&&e===bn.indexOf?mn:e};!function(t){t.exports=wn}(Wr);var On=e(Wr.exports),En={exports:{}},Sn=O,Tn=Array.isArray||function(t){return"Array"===Sn(t)},jn=A,xn=Tn,Pn=TypeError,An=Object.getOwnPropertyDescriptor,Gn=jn&&!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(xn(t)&&!An(t,"length").writable)throw new Pn("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},Ln=TypeError,kn={};kn[le("toStringTag")]="z";var Cn="[object z]"===String(kn),Rn=Cn,In=x,Nn=O,Mn=le("toStringTag"),Dn=Object,_n="Arguments"===Nn(function(){return arguments}()),Fn=Rn?Nn: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=Dn(t),Mn))?r:_n?Nn(e):"Object"===(n=Nn(e))&&In(e.callee)?"Arguments":n},zn=g,Hn=x,Wn=Dt.exports,Un=zn(Function.toString);Hn(Wn.inspectSource)||(Wn.inspectSource=function(t){return Un(t)});var Vn=Wn.inspectSource,Bn=g,Xn=a,qn=x,Kn=Fn,Yn=Vn,Jn=function(){},Qn=ot("Reflect","construct"),Zn=/^\s*(?:class|function)\b/,$n=Bn(Zn.exec),to=!Zn.test(Jn),eo=function(t){if(!qn(t))return!1;try{return Qn(Jn,[],t),!0}catch(t){return!1}},ro=function(t){if(!qn(t))return!1;switch(Kn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return to||!!$n(Zn,Yn(t))}catch(t){return!0}};ro.sham=!0;var no=!Qn||Xn((function(){var t;return eo(eo.call)||!eo(Object)||!eo((function(){t=!0}))||t}))?ro:eo,oo=Tn,io=no,ao=Z,uo=le("species"),co=Array,so=function(t){var e;return oo(t)&&(e=t.constructor,(io(e)&&(e===co||oo(e.prototype))||ao(e)&&null===(e=e[uo]))&&(e=void 0)),void 0===e?co:e},fo=function(t,e){return new(so(t))(0===e?0:e)},lo=A,po=Je,ho=_,vo=jt,yo=TypeError,go=a,mo=ht,bo=le("species"),wo=function(t){return mo>=51||!go((function(){var e=[];return(e.constructor={})[bo]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Oo=Pr,Eo=Kt,So=Jr,To=Xr,jo=tn,xo=Gn,Po=function(t){if(t>9007199254740991)throw Ln("Maximum allowed index exceeded");return t},Ao=fo,Go=function(t,e,r){lo?po.f(t,e,ho(0,r)):t[e]=r},Lo=function(t,e){if(!delete t[e])throw new yo("Cannot delete property "+vo(e)+" of "+vo(t))},ko=wo("splice"),Co=Math.max,Ro=Math.min;Oo({target:"Array",proto:!0,forced:!ko},{splice:function(t,e){var r,n,o,i,a,u,c=Eo(this),s=jo(c),f=So(t,s),l=arguments.length;for(0===l?r=n=0:1===l?(r=0,n=s-f):(r=l-2,n=Ro(Co(To(e),0),s-f)),Po(s+r-n),o=Ao(c,n),i=0;i<n;i++)(a=f+i)in c&&Go(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]:Lo(c,u);for(i=s;i>s-n+r;i--)Lo(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]:Lo(c,u);for(i=0;i<r;i++)c[i+f]=arguments[i+2];return xo(c,s-n+r),o}});var Io=dn("Array","splice"),No=it,Mo=Io,Do=Array.prototype,_o=function(t){var e=t.splice;return t===Do||No(Do,t)&&e===Do.splice?Mo:e};!function(t){t.exports=_o}(En);var Fo=e(En.exports);function zo(t,e,r){return e=Ko(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,Ho()?Reflect.construct(e,r||[],Ko(t).constructor):e.apply(t,r))}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Wo(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 Uo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vo(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,Wo(n.key),n)}}function Bo(t,e,r){return e&&Vo(t.prototype,e),r&&Vo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xo(t,e,r){return(e=Wo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qo(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&&Yo(t,e)}function Ko(t){return Ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ko(t)}function Yo(t,e){return Yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yo(t,e)}var Jo=function(){return Bo((function t(){Uo(this,t),Xo(this,"style",{cursor:null}),Xo(this,"pathname","")}),[{key:"appendChild",value:function(){}},{key:"removeChild",value:function(){}},{key:"addEventListener",value:function(){}},{key:"removeEventListener",value:function(){}},{key:"setAttribute",value:function(){}}])}(),Qo=Hr.constructor,Zo=function(t){function e(){return Uo(this,e),zo(this,e,arguments)}return qo(e,t),Bo(e)}(Fr.constructor),$o=function(t){function e(){return Uo(this,e),zo(this,e,arguments)}return qo(e,t),Bo(e)}(Jo);function ti(){var t=wx.createVideo({width:0,height:0,controls:!1});return t.canPlayType=function(){return!0},t}var ei,ri,ni,oi={},ii={body:new Jo("body"),cookie:"",addEventListener:function(t,e){oi[t]=oi[t]||[],oi[t].push(e)},removeEventListener:function(t,e){if(oi[t]&&oi[t].length){var r,n,o=On(r=oi[t]).call(r,e);-1!==o&&Fo(n=oi[t]).call(n,o)}},dispatch:function(t){var e=oi[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 ti;default:return new Jo}}},ai={exports:{}},ui={},ci=x,si=i.WeakMap,fi=ci(si)&&/native code/.test(String(si)),li=re,pi=Bt("keys"),hi=function(t){return pi[t]||(pi[t]=li(t))},vi={},di=fi,yi=i,gi=Z,mi=dr,bi=Qt,wi=Dt.exports,Oi=hi,Ei=vi,Si="Object already initialized",Ti=yi.TypeError,ji=yi.WeakMap;if(di||wi.state){var xi=wi.state||(wi.state=new ji);xi.get=xi.get,xi.has=xi.has,xi.set=xi.set,ei=function(t,e){if(xi.has(t))throw new Ti(Si);return e.facade=t,xi.set(t,e),e},ri=function(t){return xi.get(t)||{}},ni=function(t){return xi.has(t)}}else{var Pi=Oi("state");Ei[Pi]=!0,ei=function(t,e){if(bi(t,Pi))throw new Ti(Si);return e.facade=t,mi(t,Pi,e),e},ri=function(t){return bi(t,Pi)?t[Pi]:{}},ni=function(t){return bi(t,Pi)}}var Ai={set:ei,get:ri,has:ni,enforce:function(t){return ni(t)?ri(t):ei(t,{})},getterFor:function(t){return function(e){var r;if(!gi(e)||(r=ri(e)).type!==t)throw new Ti("Incompatible receiver, "+t+" required");return r}}},Gi=A,Li=Qt,ki=Function.prototype,Ci=Gi&&Object.getOwnPropertyDescriptor,Ri=Li(ki,"name"),Ii={EXISTS:Ri,PROPER:Ri&&"something"===function(){}.name,CONFIGURABLE:Ri&&(!Gi||Gi&&Ci(ki,"name").configurable)},Ni={},Mi=Qt,Di=J,_i=an.indexOf,Fi=vi,zi=g([].push),Hi=function(t,e){var r,n=Di(t),o=0,i=[];for(r in n)!Mi(Fi,r)&&Mi(n,r)&&zi(i,r);for(;e.length>o;)Mi(n,r=e[o++])&&(~_i(i,r)||zi(i,r));return i},Wi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ui=Hi,Vi=Wi,Bi=Object.keys||function(t){return Ui(t,Vi)},Xi=A,qi=Qe,Ki=Je,Yi=er,Ji=J,Qi=Bi;Ni.f=Xi&&!qi?Object.defineProperties:function(t,e){Yi(t);for(var r,n=Ji(e),o=Qi(e),i=o.length,a=0;i>a;)Ki.f(t,r=o[a++],n[r]);return t};var Zi,$i=ot("document","documentElement"),ta=er,ea=Ni,ra=Wi,na=vi,oa=$i,ia=je,aa="prototype",ua="script",ca=hi("IE_PROTO"),sa=function(){},fa=function(t){return"<"+ua+">"+t+"</"+ua+">"},la=function(t){t.write(fa("")),t.close();var e=t.parentWindow.Object;return t=null,e},pa=function(){try{Zi=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;pa="undefined"!=typeof document?document.domain&&Zi?la(Zi):(e=ia("iframe"),r="java"+ua+":",e.style.display="none",oa.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write(fa("document.F=Object")),t.close(),t.F):la(Zi);for(var n=ra.length;n--;)delete pa[aa][ra[n]];return pa()};na[ca]=!0;var ha,va,da,ya=Object.create||function(t,e){var r;return null!==t?(sa[aa]=ta(t),r=new sa,sa[aa]=null,r[ca]=t):r=pa(),void 0===e?r:ea.f(r,e)},ga=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ma=Qt,ba=x,wa=Kt,Oa=ga,Ea=hi("IE_PROTO"),Sa=Object,Ta=Sa.prototype,ja=Oa?Sa.getPrototypeOf:function(t){var e=wa(t);if(ma(e,Ea))return e[Ea];var r=e.constructor;return ba(r)&&e instanceof r?r.prototype:e instanceof Sa?Ta:null},xa=dr,Pa=function(t,e,r,n){return n&&n.enumerable?t[e]=r:xa(t,e,r),t},Aa=a,Ga=x,La=Z,ka=ya,Ca=ja,Ra=Pa,Ia=le("iterator"),Na=!1;[].keys&&("next"in(da=[].keys())?(va=Ca(Ca(da)))!==Object.prototype&&(ha=va):Na=!0);var Ma=!La(ha)||Aa((function(){var t={};return ha[Ia].call(t)!==t}));Ga((ha=Ma?{}:ka(ha))[Ia])||Ra(ha,Ia,(function(){return this}));var Da={IteratorPrototype:ha,BUGGY_SAFARI_ITERATORS:Na},_a=Fn,Fa=Cn?{}.toString:function(){return"[object "+_a(this)+"]"},za=Cn,Ha=Je.f,Wa=dr,Ua=Qt,Va=Fa,Ba=le("toStringTag"),Xa=function(t,e,r,n){var o=r?t:t&&t.prototype;o&&(Ua(o,Ba)||Ha(o,Ba,{configurable:!0,value:e}),n&&!za&&Wa(o,"toString",Va))},qa=Da.IteratorPrototype,Ka=ya,Ya=_,Ja=Xa,Qa=ui,Za=function(){return this},$a=g,tu=Gt,eu=Z,ru=function(t){return eu(t)||null===t},nu=String,ou=TypeError,iu=function(t,e,r){try{return $a(tu(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},au=Z,uu=q,cu=function(t){if(ru(t))return t;throw new ou("Can't set "+nu(t)+" as a prototype")},su=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=iu(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return uu(r),cu(n),au(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),fu=Pr,lu=k,pu=Ii,hu=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ka(qa,{next:Ya(+!n,r)}),Ja(t,o,!1,!0),Qa[o]=Za,t},vu=ja,du=Xa,yu=Pa,gu=ui,mu=Da,bu=pu.PROPER,wu=mu.BUGGY_SAFARI_ITERATORS,Ou=le("iterator"),Eu="keys",Su="values",Tu="entries",ju=function(){return this},xu=function(t,e,r,n,o,i,a){hu(r,e,n);var u,c,s,f=function(t){if(t===o&&d)return d;if(!wu&&t&&t in h)return h[t];switch(t){case Eu:case Su:case Tu:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,v=h[Ou]||h["@@iterator"]||o&&h[o],d=!wu&&v||f(o),y="Array"===e&&h.entries||v;if(y&&(u=vu(y.call(new t)))!==Object.prototype&&u.next&&(du(u,l,!0,!0),gu[l]=ju),bu&&o===Su&&v&&v.name!==Su&&(p=!0,d=function(){return lu(v,this)}),o)if(c={values:f(Su),keys:i?d:f(Eu),entries:f(Tu)},a)for(s in c)(wu||p||!(s in h))&&yu(h,s,c[s]);else fu({target:e,proto:!0,forced:wu||p},c);return a&&h[Ou]!==d&&yu(h,Ou,d,{name:o}),gu[e]=d,c},Pu=function(t,e){return{value:t,done:e}},Au=J,Gu=function(){},Lu=ui,ku=Ai,Cu=(Je.f,xu),Ru=Pu,Iu="Array Iterator",Nu=ku.set,Mu=ku.getterFor(Iu);Cu(Array,"Array",(function(t,e){Nu(this,{type:Iu,target:Au(t),index:0,kind:e})}),(function(){var t=Mu(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,Ru(void 0,!0);switch(t.kind){case"keys":return Ru(r,!1);case"values":return Ru(e[r],!1)}return Ru([r,e[r]],!1)}),"values");Lu.Arguments=Lu.Array;Gu(),Gu(),Gu();var Du=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),_u=Pa,Fu=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:_u(t,n,e[n],r);return t},zu={exports:{}},Hu={},Wu=Hi,Uu=Wi.concat("length","prototype");Hu.f=Object.getOwnPropertyNames||function(t){return Wu(t,Uu)};var Vu={},Bu=g([].slice),Xu=O,qu=J,Ku=Hu.f,Yu=Bu,Ju="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Vu.f=function(t){return Ju&&"Window"===Xu(t)?function(t){try{return Ku(t)}catch(t){return Yu(Ju)}}(t):Ku(qu(t))};var Qu=a((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Zu=a,$u=Z,tc=O,ec=Qu,rc=Object.isExtensible,nc=Zu((function(){rc(1)}))||ec?function(t){return!!$u(t)&&((!ec||"ArrayBuffer"!==tc(t))&&(!rc||rc(t)))}:rc,oc=Pr,ic=g,ac=vi,uc=Z,cc=Qt,sc=Je.f,fc=Hu,lc=Vu,pc=nc,hc=Du,vc=!1,dc=re("meta"),yc=0,gc=function(t){sc(t,dc,{value:{objectID:"O"+yc++,weakData:{}}})},mc=zu.exports={enable:function(){mc.enable=function(){},vc=!0;var t=fc.f,e=ic([].splice),r={};r[dc]=1,t(r).length&&(fc.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===dc){e(n,o,1);break}return n},oc({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:lc.f}))},fastKey:function(t,e){if(!uc(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!cc(t,dc)){if(!pc(t))return"F";if(!e)return"E";gc(t)}return t[dc].objectID},getWeakData:function(t,e){if(!cc(t,dc)){if(!pc(t))return!0;if(!e)return!1;gc(t)}return t[dc].weakData},onFreeze:function(t){return hc&&vc&&pc(t)&&!cc(t,dc)&&gc(t),t}};ac[dc]=!0;var bc=ui,wc=le("iterator"),Oc=Array.prototype,Ec=Fn,Sc=Ct,Tc=V,jc=ui,xc=le("iterator"),Pc=function(t){if(!Tc(t))return Sc(t,xc)||Sc(t,"@@iterator")||jc[Ec(t)]},Ac=k,Gc=Gt,Lc=er,kc=jt,Cc=Pc,Rc=TypeError,Ic=k,Nc=er,Mc=Ct,Dc=Ye,_c=k,Fc=er,zc=jt,Hc=function(t){return void 0!==t&&(bc.Array===t||Oc[wc]===t)},Wc=tn,Uc=it,Vc=function(t,e){var r=arguments.length<2?Cc(t):e;if(Gc(r))return Lc(Ac(r,t));throw new Rc(kc(t)+" is not iterable")},Bc=Pc,Xc=function(t,e,r){var n,o;Nc(t);try{if(!(n=Mc(t,"return"))){if("throw"===e)throw r;return r}n=Ic(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return Nc(n),r},qc=TypeError,Kc=function(t,e){this.stopped=t,this.result=e},Yc=Kc.prototype,Jc=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=Dc(e,f),y=function(t){return n&&Xc(n,"normal",t),new Kc(!0,t)},g=function(t){return l?(Fc(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=Bc(t)))throw new qc(zc(t)+" is not iterable");if(Hc(o)){for(i=0,a=Wc(t);a>i;i++)if((u=g(t[i]))&&Uc(Yc,u))return u;return new Kc(!1)}n=Vc(t,o)}for(c=p?t.next:n.next;!(s=_c(c,n)).done;){try{u=g(s.value)}catch(t){Xc(n,"throw",t)}if("object"==typeof u&&u&&Uc(Yc,u))return u}return new Kc(!1)},Qc=it,Zc=TypeError,$c=function(t,e){if(Qc(e,t))return t;throw new Zc("Incorrect invocation")},ts=Ye,es=U,rs=Kt,ns=tn,os=fo,is=g([].push),as=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=rs(c),d=es(v),y=ns(d),g=ts(s,f),m=0,b=l||os,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:is(w,p)}else switch(t){case 4:return!1;case 7:is(w,p)}return i?-1:n||o?o:w}},us={forEach:as(0),map:as(1),filter:as(2),some:as(3),every:as(4),find:as(5),findIndex:as(6),filterReject:as(7)},cs=Pr,ss=i,fs=zu.exports,ls=a,ps=dr,hs=Jc,vs=$c,ds=x,ys=Z,gs=V,ms=Xa,bs=Je.f,ws=us.forEach,Os=A,Es=Ai.set,Ss=Ai.getterFor,Ts=g,js=Fu,xs=zu.exports.getWeakData,Ps=$c,As=er,Gs=V,Ls=Z,ks=Jc,Cs=Qt,Rs=Ai.set,Is=Ai.getterFor,Ns=us.find,Ms=us.findIndex,Ds=Ts([].splice),_s=0,Fs=function(t){return t.frozen||(t.frozen=new zs)},zs=function(){this.entries=[]},Hs=function(t,e){return Ns(t.entries,(function(t){return t[0]===e}))};zs.prototype={get:function(t){var e=Hs(this,t);if(e)return e[1]},has:function(t){return!!Hs(this,t)},set:function(t,e){var r=Hs(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ms(this.entries,(function(e){return e[0]===t}));return~e&&Ds(this.entries,e,1),!!~e}};var Ws,Us={getConstructor:function(t,e,r,n){var o=t((function(t,o){Ps(t,i),Rs(t,{type:e,id:_s++,frozen:void 0}),Gs(o)||ks(o,t[n],{that:t,AS_ENTRIES:r})})),i=o.prototype,a=Is(e),u=function(t,e,r){var n=a(t),o=xs(As(e),!0);return!0===o?Fs(n).set(e,r):o[n.id]=r,t};return js(i,{delete:function(t){var e=a(this);if(!Ls(t))return!1;var r=xs(t);return!0===r?Fs(e).delete(t):r&&Cs(r,e.id)&&delete r[e.id]},has:function(t){var e=a(this);if(!Ls(t))return!1;var r=xs(t);return!0===r?Fs(e).has(t):r&&Cs(r,e.id)}}),js(i,r?{get:function(t){var e=a(this);if(Ls(t)){var r=xs(t);return!0===r?Fs(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}},Vs=Du,Bs=i,Xs=g,qs=Fu,Ks=zu.exports,Ys=function(t,e,r){var n,o=-1!==t.indexOf("Map"),i=-1!==t.indexOf("Weak"),a=o?"set":"add",u=ss[t],c=u&&u.prototype,s={};if(Os&&ds(u)&&(i||c.forEach&&!ls((function(){(new u).entries().next()})))){var f=(n=e((function(e,r){Es(vs(e,f),{type:t,collection:new u}),gs(r)||hs(r,e[a],{that:e,AS_ENTRIES:o})}))).prototype,l=Ss(t);ws(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"===t||"set"===t;!(t in c)||i&&"clear"===t||ps(f,t,(function(r,n){var o=l(this).collection;if(!e&&i&&!ys(r))return"get"===t&&void 0;var a=o[t](0===r?0:r,n);return e?this:a}))})),i||bs(f,"size",{configurable:!0,get:function(){return l(this).collection.size}})}else n=r.getConstructor(e,t,o,a),fs.enable();return ms(n,t,!1,!0),s[t]=n,cs({global:!0,forced:!0},s),i||r.setStrong(n,t,o),n},Js=Us,Qs=Z,Zs=Ai.enforce,$s=a,tf=fi,ef=Object,rf=Array.isArray,nf=ef.isExtensible,of=ef.isFrozen,af=ef.isSealed,uf=ef.freeze,cf=ef.seal,sf=!Bs.ActiveXObject&&"ActiveXObject"in Bs,ff=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},lf=Ys("WeakMap",ff,Js),pf=lf.prototype,hf=Xs(pf.set);if(tf)if(sf){Ws=Js.getConstructor(ff,"WeakMap",!0),Ks.enable();var vf=Xs(pf.delete),df=Xs(pf.has),yf=Xs(pf.get);qs(pf,{delete:function(t){if(Qs(t)&&!nf(t)){var e=Zs(this);return e.frozen||(e.frozen=new Ws),vf(this,t)||e.frozen.delete(t)}return vf(this,t)},has:function(t){if(Qs(t)&&!nf(t)){var e=Zs(this);return e.frozen||(e.frozen=new Ws),df(this,t)||e.frozen.has(t)}return df(this,t)},get:function(t){if(Qs(t)&&!nf(t)){var e=Zs(this);return e.frozen||(e.frozen=new Ws),df(this,t)?yf(this,t):e.frozen.get(t)}return yf(this,t)},set:function(t,e){if(Qs(t)&&!nf(t)){var r=Zs(this);r.frozen||(r.frozen=new Ws),df(this,t)?hf(this,t,e):r.frozen.set(t,e)}else hf(this,t,e);return this}})}else Vs&&$s((function(){var t=uf([]);return hf(new lf,t,1),!of(t)}))&&qs(pf,{set:function(t,e){var r;return rf(t)&&(of(t)?r=uf:af(t)&&(r=cf)),hf(this,t,e),r&&r(t),this}});var gf=$.WeakMap,mf={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},bf=i,wf=Xa,Of=ui;for(var Ef in mf)wf(bf[Ef],Ef),Of[Ef]=Of.Array;var Sf=gf;!function(t){t.exports=Sf}(ai);var Tf=new(e(ai.exports)),jf=function(){function t(e){var r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(Uo(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 Tf.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 Bo(t,[{key:"close",value:function(e,r){this.readyState=t.CLOSING,Tf.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"));Tf.get(this).send({data:t})}}])}();Xo(jf,"CONNECTING",0),Xo(jf,"OPEN",1),Xo(jf,"CLOSING",2),Xo(jf,"CLOSED",3);var xf=Bo((function t(e){Uo(this,t),Xo(this,"preventDefault",Dr),Xo(this,"stopPropagation",Dr),Xo(this,"target",Hr),Xo(this,"currentTarget",Hr),this.type=e}));function Pf(t){return function(e){var r=new xf(t);r.touches=r.targetTouches=e.touches,r.changedTouches=e.changedTouches,r.timeStamp=e.timeStamp,ii.dispatch(r)}}wx.onTouchStart(Pf("touchstart")),wx.onTouchMove(Pf("touchmove")),wx.onTouchEnd(Pf("touchend")),wx.onTouchCancel(Pf("touchcancel"));var Af=Bo((function t(){Uo(this,t)})),Gf={getItem:function(t){return wx.getStorageSync(t)},setItem:function(t,e){return wx.setStorageSync(t,e)},clear:function(){wx.clearStorageSync()}},Lf=Date.now();var kf=Object.freeze({__proto__:null,now:function(){return Date.now()-Lf}}),Cf={exports:{}},Rf=us.map;Pr({target:"Array",proto:!0,forced:!wo("map")},{map:function(t){return Rf(this,t,arguments.length>1?arguments[1]:void 0)}});var If=dn("Array","map"),Nf=it,Mf=If,Df=Array.prototype,_f=function(t){var e=t.map;return t===Df||Nf(Df,t)&&e===Df.map?Mf:e};!function(t){t.exports=_f}(Cf);var Ff=e(Cf.exports),zf={exports:{}},Hf=A,Wf=a,Uf=g,Vf=ja,Bf=Bi,Xf=J,qf=Uf(C.f),Kf=Uf([].push),Yf=Hf&&Wf((function(){var t=Object.create(null);return t[2]=2,!qf(t,2)})),Jf=function(t){return function(e){for(var r,n=Xf(e),o=Bf(n),i=Yf&&null===Vf(n),a=o.length,u=0,c=[];a>u;)r=o[u++],Hf&&!(i?r in n:qf(n,r))||Kf(c,t?[r,n[r]]:n[r]);return c}},Qf={entries:Jf(!0),values:Jf(!1)}.entries;Pr({target:"Object",stat:!0},{entries:function(t){return Qf(t)}});var Zf=$.Object.entries;!function(t){t.exports=Zf}(zf);var $f=e(zf.exports),tl={exports:{}},el={};el.f=Object.getOwnPropertySymbols;var rl=ot,nl=Hu,ol=el,il=er,al=g([].concat),ul=rl("Reflect","ownKeys")||function(t){var e=nl.f(il(t)),r=ol.f;return r?al(e,r(t)):e},cl=Qt,sl=ul,fl=P,ll=Je,pl=Z,hl=dr,vl=Error,dl=g("".replace),yl=String(new vl("zxcasd").stack),gl=/\n\s*at [^:]*:[^\n]*/,ml=gl.test(yl),bl=_,wl=!a((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",bl(1,7)),7!==t.stack)})),Ol=dr,El=function(t,e){if(ml&&"string"==typeof t&&!vl.prepareStackTrace)for(;e--;)t=dl(t,gl,"");return t},Sl=wl,Tl=Error.captureStackTrace,jl=Fn,xl=String,Pl=function(t){if("Symbol"===jl(t))throw new TypeError("Cannot convert a Symbol value to a string");return xl(t)},Al=Pl,Gl=Pr,Ll=it,kl=ja,Cl=su,Rl=function(t,e,r){for(var n=sl(e),o=ll.f,i=fl.f,a=0;a<n.length;a++){var u=n[a];cl(t,u)||r&&cl(r,u)||o(t,u,i(e,u))}},Il=ya,Nl=dr,Ml=_,Dl=function(t,e){pl(e)&&"cause"in e&&hl(t,"cause",e.cause)},_l=function(t,e,r,n){Sl&&(Tl?Tl(t,e):Ol(t,"stack",El(r,n)))},Fl=Jc,zl=function(t,e){return void 0===t?arguments.length<2?"":e:Al(t)},Hl=le("toStringTag"),Wl=Error,Ul=[].push,Vl=function(t,e){var r,n=Ll(Bl,this);Cl?r=Cl(new Wl,n?kl(this):Bl):(r=n?this:Il(Bl),Nl(r,Hl,"Error")),void 0!==e&&Nl(r,"message",zl(e)),_l(r,Vl,r.stack,1),arguments.length>2&&Dl(r,arguments[2]);var o=[];return Fl(t,Ul,{that:o}),Nl(r,"errors",o),r};Cl?Cl(Vl,Wl):Rl(Vl,Wl,{name:!0});var Bl=Vl.prototype=Il(Wl.prototype,{constructor:Ml(1,Vl),message:Ml(1,""),name:Ml(1,"AggregateError")});Gl({global:!0,constructor:!0,arity:2},{AggregateError:Vl});var Xl,ql,Kl,Yl,Jl="process"===O(i.process),Ql=Je,Zl=ot,$l=function(t,e,r){return Ql.f(t,e,r)},tp=A,ep=le("species"),rp=no,np=jt,op=TypeError,ip=er,ap=function(t){if(rp(t))return t;throw new op(np(t)+" is not a constructor")},up=V,cp=le("species"),sp=function(t,e){var r,n=ip(t).constructor;return void 0===n||up(r=ip(n)[cp])?e:ap(r)},fp=TypeError,lp=/(?:ipad|iphone|ipod).*applewebkit/i.test(at),pp=i,hp=p,vp=Ye,dp=x,yp=Qt,gp=a,mp=$i,bp=Bu,wp=je,Op=function(t,e){if(t<e)throw new fp("Not enough arguments");return t},Ep=lp,Sp=Jl,Tp=pp.setImmediate,jp=pp.clearImmediate,xp=pp.process,Pp=pp.Dispatch,Ap=pp.Function,Gp=pp.MessageChannel,Lp=pp.String,kp=0,Cp={},Rp="onreadystatechange";gp((function(){Xl=pp.location}));var Ip=function(t){if(yp(Cp,t)){var e=Cp[t];delete Cp[t],e()}},Np=function(t){return function(){Ip(t)}},Mp=function(t){Ip(t.data)},Dp=function(t){pp.postMessage(Lp(t),Xl.protocol+"//"+Xl.host)};Tp&&jp||(Tp=function(t){Op(arguments.length,1);var e=dp(t)?t:Ap(t),r=bp(arguments,1);return Cp[++kp]=function(){hp(e,void 0,r)},ql(kp),kp},jp=function(t){delete Cp[t]},Sp?ql=function(t){xp.nextTick(Np(t))}:Pp&&Pp.now?ql=function(t){Pp.now(Np(t))}:Gp&&!Ep?(Yl=(Kl=new Gp).port2,Kl.port1.onmessage=Mp,ql=vp(Yl.postMessage,Yl)):pp.addEventListener&&dp(pp.postMessage)&&!pp.importScripts&&Xl&&"file:"!==Xl.protocol&&!gp(Dp)?(ql=Dp,pp.addEventListener("message",Mp,!1)):ql=Rp in wp("script")?function(t){mp.appendChild(wp("script"))[Rp]=function(){mp.removeChild(this),Ip(t)}}:function(t){setTimeout(Np(t),0)});var _p={set:Tp,clear:jp},Fp=i,zp=A,Hp=Object.getOwnPropertyDescriptor,Wp=function(){this.head=null,this.tail=null};Wp.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 Up,Vp,Bp,Xp,qp,Kp=Wp,Yp=/ipad|iphone|ipod/i.test(at)&&"undefined"!=typeof Pebble,Jp=/web0s(?!.*chrome)/i.test(at),Qp=i,Zp=function(t){if(!zp)return Fp[t];var e=Hp(Fp,t);return e&&e.value},$p=Ye,th=_p.set,eh=Kp,rh=lp,nh=Yp,oh=Jp,ih=Jl,ah=Qp.MutationObserver||Qp.WebKitMutationObserver,uh=Qp.document,ch=Qp.process,sh=Qp.Promise,fh=Zp("queueMicrotask");if(!fh){var lh=new eh,ph=function(){var t,e;for(ih&&(t=ch.domain)&&t.exit();e=lh.get();)try{e()}catch(t){throw lh.head&&Up(),t}t&&t.enter()};rh||ih||oh||!ah||!uh?!nh&&sh&&sh.resolve?((Xp=sh.resolve(void 0)).constructor=sh,qp=$p(Xp.then,Xp),Up=function(){qp(ph)}):ih?Up=function(){ch.nextTick(ph)}:(th=$p(th,Qp),Up=function(){th(ph)}):(Vp=!0,Bp=uh.createTextNode(""),new ah(ph).observe(Bp,{characterData:!0}),Up=function(){Bp.data=Vp=!Vp}),fh=function(t){lh.head||Up(),lh.add(t)}}var hh=fh,vh=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},dh=i.Promise,yh="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,gh=!yh&&!Jl&&"object"==typeof window&&"object"==typeof document,mh=i,bh=dh,wh=x,Oh=Be,Eh=Vn,Sh=le,Th=gh,jh=yh,xh=ht,Ph=bh&&bh.prototype,Ah=Sh("species"),Gh=!1,Lh=wh(mh.PromiseRejectionEvent),kh=Oh("Promise",(function(){var t=Eh(bh),e=t!==String(bh);if(!e&&66===xh)return!0;if(!Ph.catch||!Ph.finally)return!0;if(!xh||xh<51||!/native code/.test(t)){var r=new bh((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((r.constructor={})[Ah]=n,!(Gh=r.then((function(){}))instanceof n))return!0}return!e&&(Th||jh)&&!Lh})),Ch={CONSTRUCTOR:kh,REJECTION_EVENT:Lh,SUBCLASSING:Gh},Rh={},Ih=Gt,Nh=TypeError,Mh=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw new Nh("Bad Promise constructor");e=t,r=n})),this.resolve=Ih(e),this.reject=Ih(r)};Rh.f=function(t){return new Mh(t)};var Dh,_h,Fh=Pr,zh=Jl,Hh=i,Wh=k,Uh=Pa,Vh=Xa,Bh=function(t){var e=Zl(t);tp&&e&&!e[ep]&&$l(e,ep,{configurable:!0,get:function(){return this}})},Xh=Gt,qh=x,Kh=Z,Yh=$c,Jh=sp,Qh=_p.set,Zh=hh,$h=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}},tv=vh,ev=Kp,rv=Ai,nv=dh,ov=Ch,iv=Rh,av="Promise",uv=ov.CONSTRUCTOR,cv=ov.REJECTION_EVENT,sv=rv.getterFor(av),fv=rv.set,lv=nv&&nv.prototype,pv=nv,hv=lv,vv=Hh.TypeError,dv=Hh.document,yv=Hh.process,gv=iv.f,mv=gv,bv=!!(dv&&dv.createEvent&&Hh.dispatchEvent),wv="unhandledrejection",Ov=function(t){var e;return!(!Kh(t)||!qh(e=t.then))&&e},Ev=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&&Pv(e),e.rejection=1),!0===u?r=i:(f&&f.enter(),r=u(i),f&&(f.exit(),o=!0)),r===t.promise?s(new vv("Promise-chain cycle")):(n=Ov(r))?Wh(n,r,c,s):c(r)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},Sv=function(t,e){t.notified||(t.notified=!0,Zh((function(){for(var r,n=t.reactions;r=n.get();)Ev(r,t);t.notified=!1,e&&!t.rejection&&jv(t)})))},Tv=function(t,e,r){var n,o;bv?((n=dv.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),Hh.dispatchEvent(n)):n={promise:e,reason:r},!cv&&(o=Hh["on"+t])?o(n):t===wv&&$h("Unhandled promise rejection",r)},jv=function(t){Wh(Qh,Hh,(function(){var e,r=t.facade,n=t.value;if(xv(t)&&(e=tv((function(){zh?yv.emit("unhandledRejection",n,r):Tv(wv,r,n)})),t.rejection=zh||xv(t)?2:1,e.error))throw e.value}))},xv=function(t){return 1!==t.rejection&&!t.parent},Pv=function(t){Wh(Qh,Hh,(function(){var e=t.facade;zh?yv.emit("rejectionHandled",e):Tv("rejectionhandled",e,t.value)}))},Av=function(t,e,r){return function(n){t(e,n,r)}},Gv=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Sv(t,!0))},Lv=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new vv("Promise can't be resolved itself");var n=Ov(e);n?Zh((function(){var r={done:!1};try{Wh(n,e,Av(Lv,r,t),Av(Gv,r,t))}catch(e){Gv(r,e,t)}})):(t.value=e,t.state=1,Sv(t,!1))}catch(e){Gv({done:!1},e,t)}}};uv&&(hv=(pv=function(t){Yh(this,hv),Xh(t),Wh(Dh,this);var e=sv(this);try{t(Av(Lv,e),Av(Gv,e))}catch(t){Gv(e,t)}}).prototype,(Dh=function(t){fv(this,{type:av,done:!1,notified:!1,parent:!1,reactions:new ev,rejection:!1,state:0,value:void 0})}).prototype=Uh(hv,"then",(function(t,e){var r=sv(this),n=gv(Jh(this,pv));return r.parent=!0,n.ok=!qh(t)||t,n.fail=qh(e)&&e,n.domain=zh?yv.domain:void 0,0===r.state?r.reactions.add(n):Zh((function(){Ev(n,r)})),n.promise})),_h=function(){var t=new Dh,e=sv(t);this.promise=t,this.resolve=Av(Lv,e),this.reject=Av(Gv,e)},iv.f=gv=function(t){return t===pv||undefined===t?new _h(t):mv(t)}),Fh({global:!0,constructor:!0,wrap:!0,forced:uv},{Promise:pv}),Vh(pv,av,!1,!0),Bh(av);var kv=le("iterator"),Cv=!1;try{var Rv=0,Iv={next:function(){return{done:!!Rv++}},return:function(){Cv=!0}};Iv[kv]=function(){return this},Array.from(Iv,(function(){throw 2}))}catch(t){}var Nv=dh,Mv=function(t,e){try{if(!e&&!Cv)return!1}catch(t){return!1}var r=!1;try{var n={};n[kv]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Dv=Ch.CONSTRUCTOR||!Mv((function(t){Nv.all(t).then(void 0,(function(){}))})),_v=k,Fv=Gt,zv=Rh,Hv=vh,Wv=Jc;Pr({target:"Promise",stat:!0,forced:Dv},{all:function(t){var e=this,r=zv.f(e),n=r.resolve,o=r.reject,i=Hv((function(){var r=Fv(e.resolve),i=[],a=0,u=1;Wv(t,(function(t){var c=a++,s=!1;u++,_v(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 Uv=Pr,Vv=Ch.CONSTRUCTOR;dh&&dh.prototype,Uv({target:"Promise",proto:!0,forced:Vv,real:!0},{catch:function(t){return this.then(void 0,t)}});var Bv=k,Xv=Gt,qv=Rh,Kv=vh,Yv=Jc;Pr({target:"Promise",stat:!0,forced:Dv},{race:function(t){var e=this,r=qv.f(e),n=r.reject,o=Kv((function(){var o=Xv(e.resolve);Yv(t,(function(t){Bv(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Jv=Rh;Pr({target:"Promise",stat:!0,forced:Ch.CONSTRUCTOR},{reject:function(t){var e=Jv.f(this);return(0,e.reject)(t),e.promise}});var Qv=er,Zv=Z,$v=Rh,td=function(t,e){if(Qv(t),Zv(e)&&e.constructor===t)return e;var r=$v.f(t);return(0,r.resolve)(e),r.promise},ed=Pr,rd=dh,nd=Ch.CONSTRUCTOR,od=td,id=ot("Promise"),ad=!nd;ed({target:"Promise",stat:!0,forced:true},{resolve:function(t){return od(ad&&this===id?rd:this,t)}});var ud=k,cd=Gt,sd=Rh,fd=vh,ld=Jc;Pr({target:"Promise",stat:!0,forced:Dv},{allSettled:function(t){var e=this,r=sd.f(e),n=r.resolve,o=r.reject,i=fd((function(){var r=cd(e.resolve),o=[],i=0,a=1;ld(t,(function(t){var u=i++,c=!1;a++,ud(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 pd=k,hd=Gt,vd=ot,dd=Rh,yd=vh,gd=Jc,md="No one promise resolved";Pr({target:"Promise",stat:!0,forced:Dv},{any:function(t){var e=this,r=vd("AggregateError"),n=dd.f(e),o=n.resolve,i=n.reject,a=yd((function(){var n=hd(e.resolve),a=[],u=0,c=1,s=!1;gd(t,(function(t){var f=u++,l=!1;c++,pd(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,md)))}))})),--c||i(new r(a,md))}));return a.error&&i(a.value),n.promise}});var bd=Rh;Pr({target:"Promise",stat:!0},{withResolvers:function(){var t=bd.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var wd=Pr,Od=dh,Ed=a,Sd=ot,Td=x,jd=sp,xd=td,Pd=Od&&Od.prototype;wd({target:"Promise",proto:!0,real:!0,forced:!!Od&&Ed((function(){Pd.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=jd(this,Sd("Promise")),r=Td(t);return this.then(r?function(r){return xd(e,t()).then((function(){return r}))}:t,r?function(r){return xd(e,t()).then((function(){throw r}))}:t)}});var Ad=g,Gd=Xr,Ld=Pl,kd=q,Cd=Ad("".charAt),Rd=Ad("".charCodeAt),Id=Ad("".slice),Nd=function(t){return function(e,r){var n,o,i=Ld(kd(e)),a=Gd(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Rd(i,a))<55296||n>56319||a+1===u||(o=Rd(i,a+1))<56320||o>57343?t?Cd(i,a):n:t?Id(i,a,a+2):o-56320+(n-55296<<10)+65536}},Md={codeAt:Nd(!1),charAt:Nd(!0)}.charAt,Dd=Pl,_d=Ai,Fd=xu,zd=Pu,Hd="String Iterator",Wd=_d.set,Ud=_d.getterFor(Hd);Fd(String,"String",(function(t){Wd(this,{type:Hd,string:Dd(t),index:0})}),(function(){var t,e=Ud(this),r=e.string,n=e.index;return n>=r.length?zd(void 0,!0):(t=Md(r,n),e.index+=t.length,zd(t,!1))}));var Vd=$.Promise;!function(t){t.exports=Vd}(tl);var Bd=e(tl.exports),Xd=function(){function t(){Uo(this,t),Xo(this,"method","GET"),Xo(this,"dataType","text"),Xo(this,"responseType","utf-8"),Xo(this,"onreadystatechange",Dr),Xo(this,"onloadend",Dr),Xo(this,"onerror",Dr),Xo(this,"event",{}),Xo(this,"responseHeader",{}),Xo(this,"header",{Accept:"*/*"})}return Bo(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 Ff(t=$f(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 Bd((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")})))}}])}();Xo(Xd,"UNSEND",0),Xo(Xd,"OPENED",1),Xo(Xd,"HEADERS_RECEIVED",2),Xo(Xd,"LOADING",3),Xo(Xd,"DONE",4);var qd=wx.getSystemInfoSync().platform;if(GameGlobal.canvas=Hr,Hr.addEventListener=ii.addEventListener,Hr.removeEventListener=ii.removeEventListener,"devtools"===qd)for(var Kd in Object.defineProperties(window,{Image:{value:_r},Element:{value:Jo},ontouchstart:{value:Dr},WebSocket:{value:jf},addEventListener:{value:Dr},TouchEvent:{value:xf},XMLDocument:{value:Af},localStorage:{value:Gf},XMLHttpRequest:{value:Xd},HTMLVideoElement:{value:$o},HTMLImageElement:{value:Zo},HTMLCanvasElement:{value:Qo}}),ii){var Yd=Mr(window.document,Kd);Yd&&!Yd.configurable||Object.defineProperty(window.document,Kd,{value:ii[Kd]})}else GameGlobal.Image=_r,GameGlobal.self=GameGlobal,GameGlobal.window=GameGlobal,GameGlobal.ontouchstart=Dr,GameGlobal.document=ii,GameGlobal.location={origin:"",href:""},GameGlobal.WebSocket=jf,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=xf,GameGlobal.addEventListener=Dr,GameGlobal.performance=kf,GameGlobal.XMLDocument=Af,GameGlobal.removeEventListener=Dr,GameGlobal.localStorage=Gf,GameGlobal.XMLHttpRequest=Xd,GameGlobal.HTMLImageElement="Object"!==Fr.constructor.name?Fr.constructor:Zo,GameGlobal.HTMLVideoElement=$o,GameGlobal.HTMLCanvasElement=Qo,GameGlobal.WebGLRenderingContext=GameGlobal.WebGLRenderingContext||{}}));
//# sourceMappingURL=wechat-adapter.min.js.map