@hysc/external
Version:
Boom external js sdk
3 lines • 77.1 kB
JavaScript
"use strict";(()=>{var xn=Object.create;var Ie=Object.defineProperty,Rn=Object.defineProperties,Cn=Object.getOwnPropertyDescriptor,kn=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertyNames,xt=Object.getOwnPropertySymbols,On=Object.getPrototypeOf,Ct=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable;var Rt=(n,e,r)=>e in n?Ie(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,kt=(n,e)=>{for(var r in e||(e={}))Ct.call(e,r)&&Rt(n,r,e[r]);if(xt)for(var r of xt(e))qn.call(e,r)&&Rt(n,r,e[r]);return n},Ft=(n,e)=>Rn(n,kn(e));var me=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(e,r)=>(typeof require!="undefined"?require:e)[r]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var D=(n,e)=>()=>(n&&(e=n(n=0)),e);var rt=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),Ot=(n,e)=>{for(var r in e)Ie(n,r,{get:e[r],enumerable:!0})},qt=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fn(e))!Ct.call(n,a)&&a!==r&&Ie(n,a,{get:()=>e[a],enumerable:!(t=Cn(e,a))||t.enumerable});return n};var he=(n,e,r)=>(r=n!=null?xn(On(n)):{},qt(e||!n||!n.__esModule?Ie(r,"default",{value:n,enumerable:!0}):r,n)),Ut=n=>qt(Ie({},"__esModule",{value:!0}),n);var Fe=(n,e,r)=>new Promise((t,a)=>{var f=y=>{try{l(r.next(y))}catch(g){a(g)}},c=y=>{try{l(r.throw(y))}catch(g){a(g)}},l=y=>y.done?t(y.value):Promise.resolve(y.value).then(f,c);l((r=r.apply(n,e)).next())});var zt=rt((ks,Jt)=>{"use strict";var Dn=me("buffer").Buffer;Jt.exports=function(n){if(n instanceof Uint8Array){if(n.byteOffset===0&&n.byteLength===n.buffer.byteLength)return n.buffer;if(typeof n.buffer.slice=="function")return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}if(Dn.isBuffer(n)){for(var e=new Uint8Array(n.length),r=n.length,t=0;t<r;t++)e[t]=n[t];return e.buffer}else throw new Error("Argument must be a Buffer")}});var Vt=rt((Oe,Kt)=>{"use strict";(function(){var n,e=0xdeadbeefcafe,r=(e&16777215)==15715070;function t(i,s,o){i!=null&&(typeof i=="number"?this.fromNumber(i,s,o):s==null&&typeof i!="string"?this.fromString(i,256):this.fromString(i,s))}function a(){return new t(null)}function f(i,s,o,u,m,h){for(;--h>=0;){var d=s*this[i++]+o[u]+m;m=Math.floor(d/67108864),o[u++]=d&67108863}return m}function c(i,s,o,u,m,h){for(var d=s&32767,v=s>>15;--h>=0;){var R=this[i]&32767,U=this[i++]>>15,W=v*R+U*d;R=d*R+((W&32767)<<15)+o[u]+(m&1073741823),m=(R>>>30)+(W>>>15)+v*U+(m>>>30),o[u++]=R&1073741823}return m}function l(i,s,o,u,m,h){for(var d=s&16383,v=s>>14;--h>=0;){var R=this[i]&16383,U=this[i++]>>14,W=v*R+U*d;R=d*R+((W&16383)<<14)+o[u]+m,m=(R>>28)+(W>>14)+v*U,o[u++]=R&268435455}return m}var y=typeof navigator!="undefined";y&&r&&navigator.appName=="Microsoft Internet Explorer"?(t.prototype.am=c,n=30):y&&r&&navigator.appName!="Netscape"?(t.prototype.am=f,n=26):(t.prototype.am=l,n=28),t.prototype.DB=n,t.prototype.DM=(1<<n)-1,t.prototype.DV=1<<n;var g=52;t.prototype.FV=Math.pow(2,g),t.prototype.F1=g-n,t.prototype.F2=2*n-g;var B="0123456789abcdefghijklmnopqrstuvwxyz",T=new Array,S,I;for(S="0".charCodeAt(0),I=0;I<=9;++I)T[S++]=I;for(S="a".charCodeAt(0),I=10;I<36;++I)T[S++]=I;for(S="A".charCodeAt(0),I=10;I<36;++I)T[S++]=I;function E(i){return B.charAt(i)}function x(i,s){var o=T[i.charCodeAt(s)];return o==null?-1:o}function C(i){for(var s=this.t-1;s>=0;--s)i[s]=this[s];i.t=this.t,i.s=this.s}function M(i){this.t=1,this.s=i<0?-1:0,i>0?this[0]=i:i<-1?this[0]=i+this.DV:this.t=0}function F(i){var s=a();return s.fromInt(i),s}function K(i,s){var o;if(s==16)o=4;else if(s==8)o=3;else if(s==256)o=8;else if(s==2)o=1;else if(s==32)o=5;else if(s==4)o=2;else{this.fromRadix(i,s);return}this.t=0,this.s=0;for(var u=i.length,m=!1,h=0;--u>=0;){var d=o==8?i[u]&255:x(i,u);if(d<0){i.charAt(u)=="-"&&(m=!0);continue}m=!1,h==0?this[this.t++]=d:h+o>this.DB?(this[this.t-1]|=(d&(1<<this.DB-h)-1)<<h,this[this.t++]=d>>this.DB-h):this[this.t-1]|=d<<h,h+=o,h>=this.DB&&(h-=this.DB)}o==8&&i[0]&128&&(this.s=-1,h>0&&(this[this.t-1]|=(1<<this.DB-h)-1<<h)),this.clamp(),m&&t.ZERO.subTo(this,this)}function k(){for(var i=this.s&this.DM;this.t>0&&this[this.t-1]==i;)--this.t}function O(i){if(this.s<0)return"-"+this.negate().toString(i);var s;if(i==16)s=4;else if(i==8)s=3;else if(i==2)s=1;else if(i==32)s=5;else if(i==4)s=2;else return this.toRadix(i);var o=(1<<s)-1,u,m=!1,h="",d=this.t,v=this.DB-d*this.DB%s;if(d-- >0)for(v<this.DB&&(u=this[d]>>v)>0&&(m=!0,h=E(u));d>=0;)v<s?(u=(this[d]&(1<<v)-1)<<s-v,u|=this[--d]>>(v+=this.DB-s)):(u=this[d]>>(v-=s)&o,v<=0&&(v+=this.DB,--d)),u>0&&(m=!0),m&&(h+=E(u));return m?h:"0"}function A(){var i=a();return t.ZERO.subTo(this,i),i}function ce(){return this.s<0?this.negate():this}function ve(i){var s=this.s-i.s;if(s!=0)return s;var o=this.t;if(s=o-i.t,s!=0)return this.s<0?-s:s;for(;--o>=0;)if((s=this[o]-i[o])!=0)return s;return 0}function de(i){var s=1,o;return(o=i>>>16)!=0&&(i=o,s+=16),(o=i>>8)!=0&&(i=o,s+=8),(o=i>>4)!=0&&(i=o,s+=4),(o=i>>2)!=0&&(i=o,s+=2),(o=i>>1)!=0&&(i=o,s+=1),s}function We(){return this.t<=0?0:this.DB*(this.t-1)+de(this[this.t-1]^this.s&this.DM)}function Qe(i,s){var o;for(o=this.t-1;o>=0;--o)s[o+i]=this[o];for(o=i-1;o>=0;--o)s[o]=0;s.t=this.t+i,s.s=this.s}function Qr(i,s){for(var o=i;o<this.t;++o)s[o-i]=this[o];s.t=Math.max(this.t-i,0),s.s=this.s}function $r(i,s){var o=i%this.DB,u=this.DB-o,m=(1<<u)-1,h=Math.floor(i/this.DB),d=this.s<<o&this.DM,v;for(v=this.t-1;v>=0;--v)s[v+h+1]=this[v]>>u|d,d=(this[v]&m)<<o;for(v=h-1;v>=0;--v)s[v]=0;s[h]=d,s.t=this.t+h+1,s.s=this.s,s.clamp()}function Xr(i,s){s.s=this.s;var o=Math.floor(i/this.DB);if(o>=this.t){s.t=0;return}var u=i%this.DB,m=this.DB-u,h=(1<<u)-1;s[0]=this[o]>>u;for(var d=o+1;d<this.t;++d)s[d-o-1]|=(this[d]&h)<<m,s[d-o]=this[d]>>u;u>0&&(s[this.t-o-1]|=(this.s&h)<<m),s.t=this.t-o,s.clamp()}function Yr(i,s){for(var o=0,u=0,m=Math.min(i.t,this.t);o<m;)u+=this[o]-i[o],s[o++]=u&this.DM,u>>=this.DB;if(i.t<this.t){for(u-=i.s;o<this.t;)u+=this[o],s[o++]=u&this.DM,u>>=this.DB;u+=this.s}else{for(u+=this.s;o<i.t;)u-=i[o],s[o++]=u&this.DM,u>>=this.DB;u-=i.s}s.s=u<0?-1:0,u<-1?s[o++]=this.DV+u:u>0&&(s[o++]=u),s.t=o,s.clamp()}function ei(i,s){var o=this.abs(),u=i.abs(),m=o.t;for(s.t=m+u.t;--m>=0;)s[m]=0;for(m=0;m<u.t;++m)s[m+o.t]=o.am(0,u[m],s,m,0,o.t);s.s=0,s.clamp(),this.s!=i.s&&t.ZERO.subTo(s,s)}function ti(i){for(var s=this.abs(),o=i.t=2*s.t;--o>=0;)i[o]=0;for(o=0;o<s.t-1;++o){var u=s.am(o,s[o],i,2*o,0,1);(i[o+s.t]+=s.am(o+1,2*s[o],i,2*o+1,u,s.t-o-1))>=s.DV&&(i[o+s.t]-=s.DV,i[o+s.t+1]=1)}i.t>0&&(i[i.t-1]+=s.am(o,s[o],i,2*o,0,1)),i.s=0,i.clamp()}function ri(i,s,o){var u=i.abs();if(!(u.t<=0)){var m=this.abs();if(m.t<u.t){s!=null&&s.fromInt(0),o!=null&&this.copyTo(o);return}o==null&&(o=a());var h=a(),d=this.s,v=i.s,R=this.DB-de(u[u.t-1]);R>0?(u.lShiftTo(R,h),m.lShiftTo(R,o)):(u.copyTo(h),m.copyTo(o));var U=h.t,W=h[U-1];if(W!=0){var H=W*(1<<this.F1)+(U>1?h[U-2]>>this.F2:0),ie=this.FV/H,Ce=(1<<this.F1)/H,$=1<<this.F2,X=o.t,ke=X-U,se=s==null?a():s;for(h.dlShiftTo(ke,se),o.compareTo(se)>=0&&(o[o.t++]=1,o.subTo(se,o)),t.ONE.dlShiftTo(U,se),se.subTo(h,h);h.t<U;)h[h.t++]=0;for(;--ke>=0;){var tt=o[--X]==W?this.DM:Math.floor(o[X]*ie+(o[X-1]+$)*Ce);if((o[X]+=h.am(0,tt,o,ke,0,U))<tt)for(h.dlShiftTo(ke,se),o.subTo(se,o);o[X]<--tt;)o.subTo(se,o)}s!=null&&(o.drShiftTo(U,s),d!=v&&t.ZERO.subTo(s,s)),o.t=U,o.clamp(),R>0&&o.rShiftTo(R,o),d<0&&t.ZERO.subTo(o,o)}}}function ii(i){var s=a();return this.abs().divRemTo(i,null,s),this.s<0&&s.compareTo(t.ZERO)>0&&i.subTo(s,s),s}function ue(i){this.m=i}function ni(i){return i.s<0||i.compareTo(this.m)>=0?i.mod(this.m):i}function si(i){return i}function oi(i){i.divRemTo(this.m,null,i)}function ai(i,s,o){i.multiplyTo(s,o),this.reduce(o)}function ci(i,s){i.squareTo(s),this.reduce(s)}ue.prototype.convert=ni,ue.prototype.revert=si,ue.prototype.reduce=oi,ue.prototype.mulTo=ai,ue.prototype.sqrTo=ci;function ui(){if(this.t<1)return 0;var i=this[0];if(!(i&1))return 0;var s=i&3;return s=s*(2-(i&15)*s)&15,s=s*(2-(i&255)*s)&255,s=s*(2-((i&65535)*s&65535))&65535,s=s*(2-i*s%this.DV)%this.DV,s>0?this.DV-s:-s}function fe(i){this.m=i,this.mp=i.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<i.DB-15)-1,this.mt2=2*i.t}function fi(i){var s=a();return i.abs().dlShiftTo(this.m.t,s),s.divRemTo(this.m,null,s),i.s<0&&s.compareTo(t.ZERO)>0&&this.m.subTo(s,s),s}function li(i){var s=a();return i.copyTo(s),this.reduce(s),s}function mi(i){for(;i.t<=this.mt2;)i[i.t++]=0;for(var s=0;s<this.m.t;++s){var o=i[s]&32767,u=o*this.mpl+((o*this.mph+(i[s]>>15)*this.mpl&this.um)<<15)&i.DM;for(o=s+this.m.t,i[o]+=this.m.am(0,u,i,s,0,this.m.t);i[o]>=i.DV;)i[o]-=i.DV,i[++o]++}i.clamp(),i.drShiftTo(this.m.t,i),i.compareTo(this.m)>=0&&i.subTo(this.m,i)}function hi(i,s){i.squareTo(s),this.reduce(s)}function gi(i,s,o){i.multiplyTo(s,o),this.reduce(o)}fe.prototype.convert=fi,fe.prototype.revert=li,fe.prototype.reduce=mi,fe.prototype.mulTo=gi,fe.prototype.sqrTo=hi;function pi(){return(this.t>0?this[0]&1:this.s)==0}function di(i,s){if(i>4294967295||i<1)return t.ONE;var o=a(),u=a(),m=s.convert(this),h=de(i)-1;for(m.copyTo(o);--h>=0;)if(s.sqrTo(o,u),(i&1<<h)>0)s.mulTo(u,m,o);else{var d=o;o=u,u=d}return s.revert(o)}function yi(i,s){var o;return i<256||s.isEven()?o=new ue(s):o=new fe(s),this.exp(i,o)}t.prototype.copyTo=C,t.prototype.fromInt=M,t.prototype.fromString=K,t.prototype.clamp=k,t.prototype.dlShiftTo=Qe,t.prototype.drShiftTo=Qr,t.prototype.lShiftTo=$r,t.prototype.rShiftTo=Xr,t.prototype.subTo=Yr,t.prototype.multiplyTo=ei,t.prototype.squareTo=ti,t.prototype.divRemTo=ri,t.prototype.invDigit=ui,t.prototype.isEven=pi,t.prototype.exp=di,t.prototype.toString=O,t.prototype.negate=A,t.prototype.abs=ce,t.prototype.compareTo=ve,t.prototype.bitLength=We,t.prototype.mod=ii,t.prototype.modPowInt=yi,t.ZERO=F(0),t.ONE=F(1);function vi(){var i=a();return this.copyTo(i),i}function bi(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function Ii(){return this.t==0?this.s:this[0]<<24>>24}function wi(){return this.t==0?this.s:this[0]<<16>>16}function Ti(i){return Math.floor(Math.LN2*this.DB/Math.log(i))}function Bi(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function Si(i){if(i==null&&(i=10),this.signum()==0||i<2||i>36)return"0";var s=this.chunkSize(i),o=Math.pow(i,s),u=F(o),m=a(),h=a(),d="";for(this.divRemTo(u,m,h);m.signum()>0;)d=(o+h.intValue()).toString(i).substr(1)+d,m.divRemTo(u,m,h);return h.intValue().toString(i)+d}function _i(i,s){this.fromInt(0),s==null&&(s=10);for(var o=this.chunkSize(s),u=Math.pow(s,o),m=!1,h=0,d=0,v=0;v<i.length;++v){var R=x(i,v);if(R<0){i.charAt(v)=="-"&&this.signum()==0&&(m=!0);continue}d=s*d+R,++h>=o&&(this.dMultiply(u),this.dAddOffset(d,0),h=0,d=0)}h>0&&(this.dMultiply(Math.pow(s,h)),this.dAddOffset(d,0)),m&&t.ZERO.subTo(this,this)}function Ei(i,s,o){if(typeof s=="number")if(i<2)this.fromInt(1);else for(this.fromNumber(i,o),this.testBit(i-1)||this.bitwiseTo(t.ONE.shiftLeft(i-1),$e,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(s);)this.dAddOffset(2,0),this.bitLength()>i&&this.subTo(t.ONE.shiftLeft(i-1),this);else{var u=new Array,m=i&7;u.length=(i>>3)+1,s.nextBytes(u),m>0?u[0]&=(1<<m)-1:u[0]=0,this.fromString(u,256)}}function Pi(){var i=this.t,s=new Array;s[0]=this.s;var o=this.DB-i*this.DB%8,u,m=0;if(i-- >0)for(o<this.DB&&(u=this[i]>>o)!=(this.s&this.DM)>>o&&(s[m++]=u|this.s<<this.DB-o);i>=0;)o<8?(u=(this[i]&(1<<o)-1)<<8-o,u|=this[--i]>>(o+=this.DB-8)):(u=this[i]>>(o-=8)&255,o<=0&&(o+=this.DB,--i)),u&128&&(u|=-256),m==0&&(this.s&128)!=(u&128)&&++m,(m>0||u!=this.s)&&(s[m++]=u);return s}function Mi(i){return this.compareTo(i)==0}function xi(i){return this.compareTo(i)<0?this:i}function Ri(i){return this.compareTo(i)>0?this:i}function Ci(i,s,o){var u,m,h=Math.min(i.t,this.t);for(u=0;u<h;++u)o[u]=s(this[u],i[u]);if(i.t<this.t){for(m=i.s&this.DM,u=h;u<this.t;++u)o[u]=s(this[u],m);o.t=this.t}else{for(m=this.s&this.DM,u=h;u<i.t;++u)o[u]=s(m,i[u]);o.t=i.t}o.s=s(this.s,i.s),o.clamp()}function ki(i,s){return i&s}function Fi(i){var s=a();return this.bitwiseTo(i,ki,s),s}function $e(i,s){return i|s}function Oi(i){var s=a();return this.bitwiseTo(i,$e,s),s}function Bt(i,s){return i^s}function qi(i){var s=a();return this.bitwiseTo(i,Bt,s),s}function St(i,s){return i&~s}function Ui(i){var s=a();return this.bitwiseTo(i,St,s),s}function Li(){for(var i=a(),s=0;s<this.t;++s)i[s]=this.DM&~this[s];return i.t=this.t,i.s=~this.s,i}function Di(i){var s=a();return i<0?this.rShiftTo(-i,s):this.lShiftTo(i,s),s}function Ni(i){var s=a();return i<0?this.lShiftTo(-i,s):this.rShiftTo(i,s),s}function Ai(i){if(i==0)return-1;var s=0;return i&65535||(i>>=16,s+=16),i&255||(i>>=8,s+=8),i&15||(i>>=4,s+=4),i&3||(i>>=2,s+=2),i&1||++s,s}function Ji(){for(var i=0;i<this.t;++i)if(this[i]!=0)return i*this.DB+Ai(this[i]);return this.s<0?this.t*this.DB:-1}function zi(i){for(var s=0;i!=0;)i&=i-1,++s;return s}function Ki(){for(var i=0,s=this.s&this.DM,o=0;o<this.t;++o)i+=zi(this[o]^s);return i}function Vi(i){var s=Math.floor(i/this.DB);return s>=this.t?this.s!=0:(this[s]&1<<i%this.DB)!=0}function ji(i,s){var o=t.ONE.shiftLeft(i);return this.bitwiseTo(o,s,o),o}function Hi(i){return this.changeBit(i,$e)}function Gi(i){return this.changeBit(i,St)}function Zi(i){return this.changeBit(i,Bt)}function Wi(i,s){for(var o=0,u=0,m=Math.min(i.t,this.t);o<m;)u+=this[o]+i[o],s[o++]=u&this.DM,u>>=this.DB;if(i.t<this.t){for(u+=i.s;o<this.t;)u+=this[o],s[o++]=u&this.DM,u>>=this.DB;u+=this.s}else{for(u+=this.s;o<i.t;)u+=i[o],s[o++]=u&this.DM,u>>=this.DB;u+=i.s}s.s=u<0?-1:0,u>0?s[o++]=u:u<-1&&(s[o++]=this.DV+u),s.t=o,s.clamp()}function Qi(i){var s=a();return this.addTo(i,s),s}function $i(i){var s=a();return this.subTo(i,s),s}function Xi(i){var s=a();return this.multiplyTo(i,s),s}function Yi(){var i=a();return this.squareTo(i),i}function en(i){var s=a();return this.divRemTo(i,s,null),s}function tn(i){var s=a();return this.divRemTo(i,null,s),s}function rn(i){var s=a(),o=a();return this.divRemTo(i,s,o),new Array(s,o)}function nn(i){this[this.t]=this.am(0,i-1,this,0,0,this.t),++this.t,this.clamp()}function sn(i,s){if(i!=0){for(;this.t<=s;)this[this.t++]=0;for(this[s]+=i;this[s]>=this.DV;)this[s]-=this.DV,++s>=this.t&&(this[this.t++]=0),++this[s]}}function be(){}function _t(i){return i}function on(i,s,o){i.multiplyTo(s,o)}function an(i,s){i.squareTo(s)}be.prototype.convert=_t,be.prototype.revert=_t,be.prototype.mulTo=on,be.prototype.sqrTo=an;function cn(i){return this.exp(i,new be)}function un(i,s,o){var u=Math.min(this.t+i.t,s);for(o.s=0,o.t=u;u>0;)o[--u]=0;var m;for(m=o.t-this.t;u<m;++u)o[u+this.t]=this.am(0,i[u],o,u,0,this.t);for(m=Math.min(i.t,s);u<m;++u)this.am(0,i[u],o,u,0,s-u);o.clamp()}function fn(i,s,o){--s;var u=o.t=this.t+i.t-s;for(o.s=0;--u>=0;)o[u]=0;for(u=Math.max(s-this.t,0);u<i.t;++u)o[this.t+u-s]=this.am(s-u,i[u],o,0,0,this.t+u-s);o.clamp(),o.drShiftTo(1,o)}function le(i){this.r2=a(),this.q3=a(),t.ONE.dlShiftTo(2*i.t,this.r2),this.mu=this.r2.divide(i),this.m=i}function ln(i){if(i.s<0||i.t>2*this.m.t)return i.mod(this.m);if(i.compareTo(this.m)<0)return i;var s=a();return i.copyTo(s),this.reduce(s),s}function mn(i){return i}function hn(i){for(i.drShiftTo(this.m.t-1,this.r2),i.t>this.m.t+1&&(i.t=this.m.t+1,i.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);i.compareTo(this.r2)<0;)i.dAddOffset(1,this.m.t+1);for(i.subTo(this.r2,i);i.compareTo(this.m)>=0;)i.subTo(this.m,i)}function gn(i,s){i.squareTo(s),this.reduce(s)}function pn(i,s,o){i.multiplyTo(s,o),this.reduce(o)}le.prototype.convert=ln,le.prototype.revert=mn,le.prototype.reduce=hn,le.prototype.mulTo=pn,le.prototype.sqrTo=gn;function dn(i,s){var o=i.bitLength(),u,m=F(1),h;if(o<=0)return m;o<18?u=1:o<48?u=3:o<144?u=4:o<768?u=5:u=6,o<8?h=new ue(s):s.isEven()?h=new le(s):h=new fe(s);var d=new Array,v=3,R=u-1,U=(1<<u)-1;if(d[1]=h.convert(this),u>1){var W=a();for(h.sqrTo(d[1],W);v<=U;)d[v]=a(),h.mulTo(W,d[v-2],d[v]),v+=2}var H=i.t-1,ie,Ce=!0,$=a(),X;for(o=de(i[H])-1;H>=0;){for(o>=R?ie=i[H]>>o-R&U:(ie=(i[H]&(1<<o+1)-1)<<R-o,H>0&&(ie|=i[H-1]>>this.DB+o-R)),v=u;!(ie&1);)ie>>=1,--v;if((o-=v)<0&&(o+=this.DB,--H),Ce)d[ie].copyTo(m),Ce=!1;else{for(;v>1;)h.sqrTo(m,$),h.sqrTo($,m),v-=2;v>0?h.sqrTo(m,$):(X=m,m=$,$=X),h.mulTo($,d[ie],m)}for(;H>=0&&!(i[H]&1<<o);)h.sqrTo(m,$),X=m,m=$,$=X,--o<0&&(o=this.DB-1,--H)}return h.revert(m)}function yn(i){var s=this.s<0?this.negate():this.clone(),o=i.s<0?i.negate():i.clone();if(s.compareTo(o)<0){var u=s;s=o,o=u}var m=s.getLowestSetBit(),h=o.getLowestSetBit();if(h<0)return s;for(m<h&&(h=m),h>0&&(s.rShiftTo(h,s),o.rShiftTo(h,o));s.signum()>0;)(m=s.getLowestSetBit())>0&&s.rShiftTo(m,s),(m=o.getLowestSetBit())>0&&o.rShiftTo(m,o),s.compareTo(o)>=0?(s.subTo(o,s),s.rShiftTo(1,s)):(o.subTo(s,o),o.rShiftTo(1,o));return h>0&&o.lShiftTo(h,o),o}function vn(i){if(i<=0)return 0;var s=this.DV%i,o=this.s<0?i-1:0;if(this.t>0)if(s==0)o=this[0]%i;else for(var u=this.t-1;u>=0;--u)o=(s*o+this[u])%i;return o}function bn(i){var s=i.isEven();if(this.isEven()&&s||i.signum()==0)return t.ZERO;for(var o=i.clone(),u=this.clone(),m=F(1),h=F(0),d=F(0),v=F(1);o.signum()!=0;){for(;o.isEven();)o.rShiftTo(1,o),s?((!m.isEven()||!h.isEven())&&(m.addTo(this,m),h.subTo(i,h)),m.rShiftTo(1,m)):h.isEven()||h.subTo(i,h),h.rShiftTo(1,h);for(;u.isEven();)u.rShiftTo(1,u),s?((!d.isEven()||!v.isEven())&&(d.addTo(this,d),v.subTo(i,v)),d.rShiftTo(1,d)):v.isEven()||v.subTo(i,v),v.rShiftTo(1,v);o.compareTo(u)>=0?(o.subTo(u,o),s&&m.subTo(d,m),h.subTo(v,h)):(u.subTo(o,u),s&&d.subTo(m,d),v.subTo(h,v))}if(u.compareTo(t.ONE)!=0)return t.ZERO;if(v.compareTo(i)>=0)return v.subtract(i);if(v.signum()<0)v.addTo(i,v);else return v;return v.signum()<0?v.add(i):v}var J=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],In=(1<<26)/J[J.length-1];function wn(i){var s,o=this.abs();if(o.t==1&&o[0]<=J[J.length-1]){for(s=0;s<J.length;++s)if(o[0]==J[s])return!0;return!1}if(o.isEven())return!1;for(s=1;s<J.length;){for(var u=J[s],m=s+1;m<J.length&&u<In;)u*=J[m++];for(u=o.modInt(u);s<m;)if(u%J[s++]==0)return!1}return o.millerRabin(i)}function Tn(i){var s=this.subtract(t.ONE),o=s.getLowestSetBit();if(o<=0)return!1;var u=s.shiftRight(o);i=i+1>>1,i>J.length&&(i=J.length);for(var m=a(),h=0;h<i;++h){m.fromInt(J[Math.floor(Math.random()*J.length)]);var d=m.modPow(u,this);if(d.compareTo(t.ONE)!=0&&d.compareTo(s)!=0){for(var v=1;v++<o&&d.compareTo(s)!=0;)if(d=d.modPowInt(2,this),d.compareTo(t.ONE)==0)return!1;if(d.compareTo(s)!=0)return!1}}return!0}t.prototype.chunkSize=Ti,t.prototype.toRadix=Si,t.prototype.fromRadix=_i,t.prototype.fromNumber=Ei,t.prototype.bitwiseTo=Ci,t.prototype.changeBit=ji,t.prototype.addTo=Wi,t.prototype.dMultiply=nn,t.prototype.dAddOffset=sn,t.prototype.multiplyLowerTo=un,t.prototype.multiplyUpperTo=fn,t.prototype.modInt=vn,t.prototype.millerRabin=Tn,t.prototype.clone=vi,t.prototype.intValue=bi,t.prototype.byteValue=Ii,t.prototype.shortValue=wi,t.prototype.signum=Bi,t.prototype.toByteArray=Pi,t.prototype.equals=Mi,t.prototype.min=xi,t.prototype.max=Ri,t.prototype.and=Fi,t.prototype.or=Oi,t.prototype.xor=qi,t.prototype.andNot=Ui,t.prototype.not=Li,t.prototype.shiftLeft=Di,t.prototype.shiftRight=Ni,t.prototype.getLowestSetBit=Ji,t.prototype.bitCount=Ki,t.prototype.testBit=Vi,t.prototype.setBit=Hi,t.prototype.clearBit=Gi,t.prototype.flipBit=Zi,t.prototype.add=Qi,t.prototype.subtract=$i,t.prototype.multiply=Xi,t.prototype.divide=en,t.prototype.remainder=tn,t.prototype.divideAndRemainder=rn,t.prototype.modPow=dn,t.prototype.modInverse=bn,t.prototype.pow=cn,t.prototype.gcd=yn,t.prototype.isProbablePrime=wn,t.prototype.square=Yi,t.prototype.Barrett=le;var Re,j,q;function Bn(i){j[q++]^=i&255,j[q++]^=i>>8&255,j[q++]^=i>>16&255,j[q++]^=i>>24&255,q>=et&&(q-=et)}function Et(){Bn(new Date().getTime())}if(j==null){j=new Array,q=0;var Q;if(typeof window!="undefined"&&window.crypto){if(window.crypto.getRandomValues){var Pt=new Uint8Array(32);for(window.crypto.getRandomValues(Pt),Q=0;Q<32;++Q)j[q++]=Pt[Q]}else if(navigator.appName=="Netscape"&&navigator.appVersion<"5"){var Mt=window.crypto.random(32);for(Q=0;Q<Mt.length;++Q)j[q++]=Mt.charCodeAt(Q)&255}}for(;q<et;)Q=Math.floor(65536*Math.random()),j[q++]=Q>>>8,j[q++]=Q&255;q=0,Et()}function Sn(){if(Re==null){for(Et(),Re=Mn(),Re.init(j),q=0;q<j.length;++q)j[q]=0;q=0}return Re.next()}function _n(i){var s;for(s=0;s<i.length;++s)i[s]=Sn()}function Xe(){}Xe.prototype.nextBytes=_n;function Ye(){this.i=0,this.j=0,this.S=new Array}function En(i){var s,o,u;for(s=0;s<256;++s)this.S[s]=s;for(o=0,s=0;s<256;++s)o=o+this.S[s]+i[s%i.length]&255,u=this.S[s],this.S[s]=this.S[o],this.S[o]=u;this.i=0,this.j=0}function Pn(){var i;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,i=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=i,this.S[i+this.S[this.i]&255]}Ye.prototype.init=En,Ye.prototype.next=Pn;function Mn(){return new Ye}var et=256;typeof Oe!="undefined"?Oe=Kt.exports={default:t,BigInteger:t,SecureRandom:Xe}:this.jsbn={BigInteger:t,SecureRandom:Xe}}).call(Oe)});var er={};Ot(er,{SM2:()=>jn,SM3:()=>Vn,SM4:()=>Gn});function z(n,e){this.x=e,this.q=n}function V(n,e,r,t){this.curve=n,this.x=e,this.y=r,this.z=t==null?P.BigInteger.ONE:t,this.zinv=null}function re(n,e,r){this.q=n,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new V(this,null,null),this.reducer=new Nn(this.q)}function Zt(n,e){for(var r=[],t=Math.ceil(e/32),a=e%32,f=1;f<=t;f++){var c=_.Buffer.allocUnsafe(4);c.writeUInt32BE(f);var l=Je(_.Buffer.concat([n,c]));r.push(f===t&&a?_.Buffer.from(l).slice(0,a):_.Buffer.from(l))}return _.Buffer.concat(r,e)}var ye,_,P,Nn,L,te,An,Jn,zn,Kn,Je,Vn,jt,nt,Ht,Gt,qe,jn,Ue,Le,Hn,De,$t,Xt,Yt,Wt,Qt,Ne,Ae,Gn,tr=D(()=>{"use strict";ye=he(zt()),_=me("buffer"),P=he(Vt()),Nn=P.BigInteger.prototype.Barrett;z.prototype.equals=function(n){return n==this||this.q.equals(n.q)&&this.x.equals(n.x)},z.prototype.toBigInteger=function(){return this.x},z.prototype.negate=function(){return new z(this.q,this.x.negate().mod(this.q))},z.prototype.add=function(n){return new z(this.q,this.x.add(n.toBigInteger()).mod(this.q))},z.prototype.subtract=function(n){return new z(this.q,this.x.subtract(n.toBigInteger()).mod(this.q))},z.prototype.multiply=function(n){return new z(this.q,this.x.multiply(n.toBigInteger()).mod(this.q))},z.prototype.square=function(){return new z(this.q,this.x.square().mod(this.q))},z.prototype.divide=function(n){return new z(this.q,this.x.multiply(n.toBigInteger().modInverse(this.q)).mod(this.q))},V.prototype.getX=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var n=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(n),this.curve.fromBigInteger(n)},V.prototype.getY=function(){this.zinv==null&&(this.zinv=this.z.modInverse(this.curve.q));var n=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(n),this.curve.fromBigInteger(n)},V.prototype.equals=function(n){return n==this||(this.isInfinity()?n.isInfinity():n.isInfinity()?this.isInfinity():!!n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q).equals(P.BigInteger.ZERO)&&n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q).equals(P.BigInteger.ZERO))},V.prototype.isInfinity=function(){return this.x==null&&this.y==null||this.z.equals(P.BigInteger.ZERO)&&!this.y.toBigInteger().equals(P.BigInteger.ZERO)},V.prototype.negate=function(){return new V(this.curve,this.x,this.y.negate(),this.z)},V.prototype.add=function(n){if(this.isInfinity())return n;if(n.isInfinity())return this;var e=n.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(n.z)).mod(this.curve.q),r=n.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(n.z)).mod(this.curve.q);if(P.BigInteger.ZERO.equals(r))return P.BigInteger.ZERO.equals(e)?this.twice():this.curve.getInfinity();var t=new P.BigInteger("3"),a=this.x.toBigInteger(),f=this.y.toBigInteger(),c=(n.x.toBigInteger(),n.y.toBigInteger(),r.square()),l=c.multiply(r),y=a.multiply(c),g=e.square().multiply(this.z),B=g.subtract(y.shiftLeft(1)).multiply(n.z).subtract(l).multiply(r).mod(this.curve.q),T=y.multiply(t).multiply(e).subtract(f.multiply(l)).subtract(g.multiply(e)).multiply(n.z).add(e.multiply(l)).mod(this.curve.q),S=l.multiply(this.z).multiply(n.z).mod(this.curve.q);return new V(this.curve,this.curve.fromBigInteger(B),this.curve.fromBigInteger(T),S)},V.prototype.twice=function(){if(this.isInfinity())return this;if(this.y.toBigInteger().signum()==0)return this.curve.getInfinity();var n=new P.BigInteger("3"),e=this.x.toBigInteger(),r=this.y.toBigInteger(),t=r.multiply(this.z),a=t.multiply(r).mod(this.curve.q),f=this.curve.a.toBigInteger(),c=e.square().multiply(n);P.BigInteger.ZERO.equals(f)||(c=c.add(this.z.square().multiply(f)));var l=(c=c.mod(this.curve.q)).square().subtract(e.shiftLeft(3).multiply(a)).shiftLeft(1).multiply(t).mod(this.curve.q),y=c.multiply(n).multiply(e).subtract(a.shiftLeft(1)).shiftLeft(2).multiply(a).subtract(c.square().multiply(c)).mod(this.curve.q),g=t.square().multiply(t).shiftLeft(3).mod(this.curve.q);return new V(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(y),g)},V.prototype.multiply=function(n){if(this.isInfinity())return this;if(n.signum()==0)return this.curve.getInfinity();var e,r=n,t=r.multiply(new P.BigInteger("3")),a=this.negate(),f=this;for(e=t.bitLength()-2;e>0;--e){f=f.twice();var c=t.testBit(e);c!=r.testBit(e)&&(f=f.add(c?this:a))}return f},V.prototype.multiplyTwo=function(n,e,r){var t;t=n.bitLength()>r.bitLength()?n.bitLength()-1:r.bitLength()-1;for(var a=this.curve.getInfinity(),f=this.add(e);t>=0;)a=a.twice(),n.testBit(t)?a=r.testBit(t)?a.add(f):a.add(this):r.testBit(t)&&(a=a.add(e)),--t;return a},re.prototype.getQ=function(){return this.q},re.prototype.getA=function(){return this.a},re.prototype.getB=function(){return this.b},re.prototype.equals=function(n){return n==this||this.q.equals(n.q)&&this.a.equals(n.a)&&this.b.equals(n.b)},re.prototype.getInfinity=function(){return this.infinity},re.prototype.fromBigInteger=function(n){return new z(this.q,n)},re.prototype.reduce=function(n){this.reducer.reduce(n)},re.prototype.decodePointHex=function(n){switch(parseInt(n.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var e=(n.length-2)/2,r=n.substr(2,e),t=n.substr(e+2,e);return new V(this,this.fromBigInteger(new P.BigInteger(r,16)),this.fromBigInteger(new P.BigInteger(t,16)));default:return null}},re.prototype.encodePointHex=function(n){if(n.isInfinity())return"00";var e=n.getX().toBigInteger().toString(16),r=n.getY().toBigInteger().toString(16),t=this.getQ().toString(16).length;for(t%2!=0&&t++;e.length<t;)e="0"+e;for(;r.length<t;)r="0"+r;return"04"+e+r};L=function(n,e){return n<<(e%=32)|n>>>32-e},te=function(n,e){var r=e-n.length;return(r>0?"0".repeat(r):"")+n},An=function(n){return n<16?2043430169:2055708042},Jn=function(n,e,r,t){return t<16?n^e^r:n&e|n&r|e&r},zn=function(n,e,r,t){return t<16?n^e^r:n&e|~n&r},Kn=function(n,e,r){for(var t,a,f,c,l,y=function(F){var K,k=new Array(132);F.forEach(function(ce,ve){k[ve]=ce});for(var O=16;O<68;O++)k[O]=(K=k[O-16]^k[O-9]^L(k[O-3],15))^L(K,15)^L(K,23)^L(k[O-13],7)^k[O-6];for(var A=0;A<64;A++)k[A+68]=k[A]^k[A+4];return k}(e),g=n[0],B=n[1],T=n[2],S=n[3],I=n[4],E=n[5],x=n[6],C=n[7],M=0;M<64;M++)a=(t=L(L(g,12)+I+L(An(M),M),7))^L(g,12),f=Jn(g,B,T,M)+S+a+y[M+68],c=zn(I,E,x,M)+C+t+y[M],S=T,T=L(B,9),B=g,g=f,C=x,x=L(E,19),E=I,I=(l=c)^L(l,9)^L(l,17);return[g^n[0],B^n[1],T^n[2],S^n[3],I^n[4],E^n[5],x^n[6],C^n[7]]},Je=function(n,e,r){if(typeof n=="string"?n=_.Buffer.from(n,e||"utf8"):n instanceof ArrayBuffer&&(n=_.Buffer.from(n)),!_.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var t,a,f,c,l,y;t=n,a=_.Buffer.alloc(1,128),c=_.Buffer.alloc(f=(f=t.length%64)>=56?64-f%56-1:56-f-1,0),l=_.Buffer.alloc(8),y=8*t.length,l.writeUInt32BE(Math.floor(y/Math.pow(2,32)),0),l.writeUInt32BE(y%Math.pow(2,32),4);for(var g=(n=_.Buffer.concat([t,a,c,l],t.length+1+f+8)).length/64,B=new Array(g),T=0;T<g;T++){B[T]=new Array(16);for(var S=0;S<16;S++)B[T][S]=n.readUInt32BE(64*T+4*S)}var I=new Array(g);I[0]=[1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214];for(var E=0;E<g;E++)I[E+1]=Kn(I[E],B[E]);var x=_.Buffer.alloc(32);return I[g].forEach(function(C,M){return x.writeInt32BE(C,4*M)}),r?x.toString(r):(0,ye.default)(x)},Vn={__proto__:null,digest:Je},jt=new P.SecureRandom,nt=function(){var n=new re(new P.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),new P.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),new P.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16)),e=n.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:n,G:e,n:new P.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}(),Ht=nt.curve,Gt=nt.G,qe=nt.n;jn={__proto__:null,constants:{C1C2C3:0,C1C3C2:1,PC:"04"},generateKeyPair:function(){var n=new P.BigInteger(qe.bitLength(),jt).mod(qe.subtract(new P.BigInteger("2"))).add(P.BigInteger.ONE),e=te(n.toString(16),64),r=Gt.multiply(n);return{privateKey:e,publicKey:"04"+te(r.getX().toBigInteger().toString(16),64)+te(r.getY().toBigInteger().toString(16),64)}},encrypt:function(n,e,r){var t=r||{},a=t.mode,f=a===void 0?1:a,c=t.outputEncoding,l=t.pc;if(typeof n=="string"?n=_.Buffer.from(n,t.inputEncoding||"utf8"):n instanceof ArrayBuffer&&(n=_.Buffer.from(n)),!_.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var y=new P.BigInteger(qe.bitLength(),jt).mod(qe.subtract(P.BigInteger.ONE)).add(P.BigInteger.ONE),g=Gt.multiply(y),B=te(g.getX().toBigInteger().toString(16),64)+te(g.getY().toBigInteger().toString(16),64),T=Ht.decodePointHex(e).multiply(y),S=te(T.getX().toBigInteger().toString(16),64),I=te(T.getY().toBigInteger().toString(16),64),E=Zt(_.Buffer.from(S+I,"hex"),n.length),x=te(new P.BigInteger(n.toString("hex"),16).xor(new P.BigInteger(E.toString("hex"),16)).toString(16),2*n.length),C=Je(S+n.toString("hex")+I,"hex","hex"),M=_.Buffer.from((l?"04":"")+(f===0?B+x+C:B+C+x),"hex");return c?M.toString(c):(0,ye.default)(M)},decrypt:function(n,e,r){var t=r||{},a=t.mode,f=a===void 0?1:a,c=t.outputEncoding,l=t.pc;if(typeof n=="string"?n=_.Buffer.from(n,t.inputEncoding):n instanceof ArrayBuffer&&(n=_.Buffer.from(n)),!_.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');var y=(n=l?n.slice(1):n).slice(0,32).toString("hex"),g=n.slice(32,64).toString("hex"),B=Ht.decodePointHex("04"+y+g).multiply(new P.BigInteger(e,16)),T=te(B.getX().toBigInteger().toString(16),64),S=te(B.getY().toBigInteger().toString(16),64),I=n.slice(64,96),E=n.slice(96);f===0&&(I=n.slice(n.length-32),E=n.slice(64,n.length-32));var x=Zt(_.Buffer.from(T+S,"hex"),E.length),C=new P.BigInteger(E.toString("hex"),16).xor(new P.BigInteger(x.toString("hex"),16)).toString(16),M=Je(T+C+S,"hex","hex")===I.toString("hex")?_.Buffer.from(C,"hex"):_.Buffer.alloc(0);return c?M.toString(c):(0,ye.default)(M)}},Ue=[[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5],[43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153],[156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98],[228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166],[71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168],[104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53],[30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135],[212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158],[234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161],[224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227],[29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111],[213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81],[141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216],[10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176],[137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132],[24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72]],Le=[2746333894,1453994832,1736282519,2993693404],Hn=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257],De=/^[0-9a-f]{32}$/i,$t=function(n){return Ue[(4026531840&n)>>>28][(251658240&n)>>>24]<<24|Ue[(15728640&n)>>>20][(983040&n)>>>16]<<16|Ue[(61440&n)>>>12][(3840&n)>>>8]<<8|Ue[(240&n)>>>4][(15&n)>>>0]<<0},Xt=function(n){return(e=$t(n))^L(e,2)^L(e,10)^L(e,18)^L(e,24);var e},Yt=function(n){var e,r=new Array(36);r[0]=n[0]^Le[0],r[1]=n[1]^Le[1],r[2]=n[2]^Le[2],r[3]=n[3]^Le[3];for(var t=new Array(32),a=0;a<32;a++)r[a+4]=r[a]^(e=$t(r[a+1]^r[a+2]^r[a+3]^Hn[a]))^L(e,13)^L(e,23),t[a]=r[a+4];return t},Wt=function(n,e){for(var r=Yt(e),t=0;t<32;t++)n[t+4]=n[t]^Xt(n[t+1]^n[t+2]^n[t+3]^r[t]);return[n[35],n[34],n[33],n[32]]},Qt=function(n,e){for(var r=Yt(e).reverse(),t=0;t<32;t++)n[t+4]=n[t]^Xt(n[t+1]^n[t+2]^n[t+3]^r[t]);return[n[35],n[34],n[33],n[32]]},Ne=function(n){return[n.readInt32BE(0),n.readInt32BE(4),n.readInt32BE(8),n.readInt32BE(12)]},Ae=function(n){for(var e=_.Buffer.alloc(16),r=0;r<4;r++)e.writeInt32BE(n[r],4*r);return e},Gn={__proto__:null,constants:{ECB:1,CBC:2},encrypt:function(n,e,r){var t=r||{},a=t.mode,f=t.iv,c=t.outputEncoding;if(typeof n=="string"?n=_.Buffer.from(n,t.inputEncoding||"utf8"):n instanceof ArrayBuffer&&(n=_.Buffer.from(n)),!_.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');if(!De.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=_.Buffer.from(e,"hex"),a===2&&!De.test(f))throw new TypeError("Invalid value of `iv` option");return function(l,y,g,B){g&&(g=Ne(g)),y=Ne(y);for(var T=[],S=(l=function(O){var A=16-O.length%16,ce=_.Buffer.alloc(A,A);return _.Buffer.concat([O,ce],O.length+A)}(l)).length/16,I=0;I<S;I++)if(g){var E=16*I,x=[g[0]^l.readInt32BE(E),g[1]^l.readInt32BE(E+4),g[2]^l.readInt32BE(E+8),g[3]^l.readInt32BE(E+12)],C=Wt(x,y);T.push(Ae(C)),g=C.slice(0)}else{var M=16*I,F=[l.readInt32BE(M),l.readInt32BE(M+4),l.readInt32BE(M+8),l.readInt32BE(M+12)],K=Wt(F,y);T.push(Ae(K))}var k=_.Buffer.concat(T,l.length);return B?k.toString(B):(0,ye.default)(k)}(n,e,f=a===2?_.Buffer.from(f,"hex"):null,c)},decrypt:function(n,e,r){var t=r||{},a=t.mode,f=t.iv,c=t.outputEncoding;if(typeof n=="string"?n=_.Buffer.from(n,t.inputEncoding):n instanceof ArrayBuffer&&(n=_.Buffer.from(n)),!_.Buffer.isBuffer(n))throw new TypeError('Expected "string" | "Buffer" | "ArrayBuffer" but received "'+Object.prototype.toString.call(n)+'"');if(!De.test(e))throw new TypeError("Invalid value of cipher `key`");if(e=_.Buffer.from(e,"hex"),a===2&&!De.test(f))throw new TypeError("Invalid value of `iv` option");return function(l,y,g,B){g&&(g=Ne(g)),y=Ne(y);var T=[],S=l.length/16;if(g)for(var I=S-1;I>=0;I--){var E,x=16*I;E=I>0?[l.readInt32BE(x-16),l.readInt32BE(x-16+4),l.readInt32BE(x-16+8),l.readInt32BE(x-16+12)]:g;var C=[l.readInt32BE(x),l.readInt32BE(x+4),l.readInt32BE(x+8),l.readInt32BE(x+12)],M=Qt(C,y);T.unshift(Ae([M[0]^E[0],M[1]^E[1],M[2]^E[2],M[3]^E[3]]))}else for(var F=0;F<S;F++){var K=16*F,k=[l.readInt32BE(K),l.readInt32BE(K+4),l.readInt32BE(K+8),l.readInt32BE(K+12)],O=Qt(k,y);T.push(Ae(O))}var A=_.Buffer.concat(T,l.length-T[T.length-1][15]);return B?A.toString(B):(0,ye.default)(A)}(n,e,f=a===2?_.Buffer.from(f,"hex"):null,c)}}});function _e(){return ze>Ke.length-16&&(rr.default.randomFillSync(Ke),ze=0),Ke.slice(ze,ze+=16)}var rr,Ke,ze,st=D(()=>{"use strict";rr=he(me("crypto")),Ke=new Uint8Array(256),ze=Ke.length});var ir,nr=D(()=>{"use strict";ir=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function Zn(n){return typeof n=="string"&&ir.test(n)}var oe,Ee=D(()=>{"use strict";nr();oe=Zn});function ge(n,e=0){return N[n[e+0]]+N[n[e+1]]+N[n[e+2]]+N[n[e+3]]+"-"+N[n[e+4]]+N[n[e+5]]+"-"+N[n[e+6]]+N[n[e+7]]+"-"+N[n[e+8]]+N[n[e+9]]+"-"+N[n[e+10]]+N[n[e+11]]+N[n[e+12]]+N[n[e+13]]+N[n[e+14]]+N[n[e+15]]}function Wn(n,e=0){let r=ge(n,e);if(!oe(r))throw TypeError("Stringified UUID is invalid");return r}var N,sr,Pe=D(()=>{"use strict";Ee();N=[];for(let n=0;n<256;++n)N.push((n+256).toString(16).slice(1));sr=Wn});function Qn(n,e,r){let t=e&&r||0,a=e||new Array(16);n=n||{};let f=n.node||or,c=n.clockseq!==void 0?n.clockseq:ot;if(f==null||c==null){let S=n.random||(n.rng||_e)();f==null&&(f=or=[S[0]|1,S[1],S[2],S[3],S[4],S[5]]),c==null&&(c=ot=(S[6]<<8|S[7])&16383)}let l=n.msecs!==void 0?n.msecs:Date.now(),y=n.nsecs!==void 0?n.nsecs:ct+1,g=l-at+(y-ct)/1e4;if(g<0&&n.clockseq===void 0&&(c=c+1&16383),(g<0||l>at)&&n.nsecs===void 0&&(y=0),y>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");at=l,ct=y,ot=c,l+=122192928e5;let B=((l&268435455)*1e4+y)%4294967296;a[t++]=B>>>24&255,a[t++]=B>>>16&255,a[t++]=B>>>8&255,a[t++]=B&255;let T=l/4294967296*1e4&268435455;a[t++]=T>>>8&255,a[t++]=T&255,a[t++]=T>>>24&15|16,a[t++]=T>>>16&255,a[t++]=c>>>8|128,a[t++]=c&255;for(let S=0;S<6;++S)a[t+S]=f[S];return e||ge(a)}var or,ot,at,ct,ar,cr=D(()=>{"use strict";st();Pe();at=0,ct=0;ar=Qn});function $n(n){if(!oe(n))throw TypeError("Invalid UUID");let e,r=new Uint8Array(16);return r[0]=(e=parseInt(n.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(n.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(n.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(n.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(n.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var Ve,ut=D(()=>{"use strict";Ee();Ve=$n});function Xn(n){n=unescape(encodeURIComponent(n));let e=[];for(let r=0;r<n.length;++r)e.push(n.charCodeAt(r));return e}function Me(n,e,r){function t(a,f,c,l){var y;if(typeof a=="string"&&(a=Xn(a)),typeof f=="string"&&(f=Ve(f)),((y=f)===null||y===void 0?void 0:y.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let g=new Uint8Array(16+a.length);if(g.set(f),g.set(a,f.length),g=r(g),g[6]=g[6]&15|e,g[8]=g[8]&63|128,c){l=l||0;for(let B=0;B<16;++B)c[l+B]=g[B];return c}return ge(g)}try{t.name=n}catch(a){}return t.DNS=Yn,t.URL=es,t}var Yn,es,ft=D(()=>{"use strict";Pe();ut();Yn="6ba7b810-9dad-11d1-80b4-00c04fd430c8",es="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});function ts(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),ur.default.createHash("md5").update(n).digest()}var ur,fr,lr=D(()=>{"use strict";ur=he(me("crypto"));fr=ts});var rs,mr,hr=D(()=>{"use strict";ft();lr();rs=Me("v3",48,fr),mr=rs});var gr,lt,pr=D(()=>{"use strict";gr=he(me("crypto")),lt={randomUUID:gr.default.randomUUID}});function is(n,e,r){if(lt.randomUUID&&!e&&!n)return lt.randomUUID();n=n||{};let t=n.random||(n.rng||_e)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=t[a];return e}return ge(t)}var dr,yr=D(()=>{"use strict";pr();st();Pe();dr=is});function ns(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),vr.default.createHash("sha1").update(n).digest()}var vr,br,Ir=D(()=>{"use strict";vr=he(me("crypto"));br=ns});var ss,wr,Tr=D(()=>{"use strict";ft();Ir();ss=Me("v5",80,br),wr=ss});var Br,Sr=D(()=>{"use strict";Br="00000000-0000-0000-0000-000000000000"});function os(n){if(!oe(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}var _r,Er=D(()=>{"use strict";Ee();_r=os});var Pr={};Ot(Pr,{NIL:()=>Br,parse:()=>Ve,stringify:()=>sr,v1:()=>ar,v3:()=>mr,v4:()=>dr,v5:()=>wr,validate:()=>oe,version:()=>_r});var Mr=D(()=>{"use strict";cr();hr();yr();Tr();Sr();Er();Ee();Pe();ut()});var Or=rt((bo,Fr)=>{"use strict";var gt=Object.defineProperty,as=Object.getOwnPropertyDescriptor,cs=Object.getOwnPropertyNames,us=Object.prototype.hasOwnProperty,fs=(n,e)=>{for(var r in e)gt(n,r,{get:e[r],enumerable:!0})},ls=(n,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of cs(e))!us.call(n,a)&&a!==r&>(n,a,{get:()=>e[a],enumerable:!(t=as(e,a))||t.enumerable});return n},ms=n=>ls(gt({},"__esModule",{value:!0}),n),kr={};fs(kr,{default:()=>vs});Fr.exports=ms(kr);var pe=(tr(),Ut(er)),hs=(Mr(),Ut(Pr)),gs=me("buffer");function ps(n){let e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r="";for(let t=0;t<n;t++){let a=Math.floor(Math.random()*e.length);r+=e.charAt(a)}return r}function je(n){return gs.Buffer.from(n).toString("hex")}var xr="boom",Rr="zdnb",Cr="20231023",ds=class{generateClientId(){return(0,hs.v4)()}setSm2KeyPair(n){this.sm2KeyPair=n}generateSm4KeyPairs(){let n=ps(16),e=pe.SM3.digest(n,"utf8","hex").slice(0,16);return console.log("clientRandom",n,e),{enKey:n,deKey:e}}encryptSm2(n){return pe.SM2.encrypt(n,this.sm2KeyPair,{inputEncoding:"utf8",mode:pe.SM2.constants.C1C2C3,outputEncoding:"base64"})}encryptSm4(n,e,r){return pe.SM4.encrypt(n,je(e),{mode:pe.SM4.constants.CBC,iv:je(r!=null?r:`${xr}${Rr}${Cr}`),inputEncoding:"utf8",outputEncoding:"hex"})}decryptSm4(n,e,r){return pe.SM4.decrypt(n,je(e),{mode:pe.SM4.constants.CBC,iv:je(r!=null?r:`${xr}${Rr}${Cr}`),inputEncoding:"hex",outputEncoding:"utf8"})}},mt="client-id",ht="pair-key",ys=class He{constructor(){if(He.instance)return He.instance;this.boomCrypto=new ds,He.instance=this}getClientId(e){let r=localStorage.getItem(mt);if(e||!r){let t=this.boomCrypto.generateClientId();localStorage.setItem(mt,t)}return localStorage.getItem(mt)}setSm2KeyPair(e){return this.boomCrypto.setSm2KeyPair(e)}getPairKey(e){let r=localStorage.getItem(ht);if(e||!r){let t=this.boomCrypto.generateSm4KeyPairs();localStorage.setItem(ht,JSON.stringify(t))}return JSON.parse(localStorage.getItem(ht))}encryptSm2(e){return this.boomCrypto.encryptSm2(e)}encryptSm4(e,r,t){return this.boomCrypto.encryptSm4(e,r,t)}decryptSm4(e,r,t){return this.boomCrypto.decryptSm4(e,r,t)}},vs=ys});var Un={create:function(){return function(){this.init.apply(this,arguments)}}},Ln=function(n,e){for(var r in e)n[r]=e[r]},Lt="postMessage"in window,Dt=function(n,e){var r="";if(arguments.length<2?r="target error - target and name are both required":typeof n!="object"?r="target error - target itself must be window object":typeof e!="string"&&(r="target error - target name must be string type"),r)throw new Error(r);this.target=n,this.name=e};Dt.prototype.send=function(n){if(Lt)this.target.postMessage(n,"*");else{var e=window.navigator[this.name];if(typeof e=="function")e(n,window);else throw new Error("target callback function is not defined")}};var Nt=Un.create();Nt.prototype={init:function(n){this.setOption(n),this.name=this.options.name,this.targets=this.options.targets,this.listenFunc=this.options.listenFunc,this.initListen()},setOption:function(n){this.options={name:"message",targets:{},listenFunc:[]},Ln(this.options,n||{})},initListen:function(){var n=this,e=function(r){typeof r=="object"&&r.data&&(r=r.data);for(var t=0;t<n.listenFunc.length;t++)n.listenFunc[t](r)};Lt?window.addEventListener?window.addEventListener("message",e,!1):window.attachEvent("onmessage",e):window.navigator[this.name]=e},addTarget:function(n,e){var r=new Dt(n,this.name);this.targets[e]=r},listen:function(n){this.listenFunc.push(n)},clear:function(){this.listenFunc=[]},send:function(n){for(var e in this.targets)this.targets.hasOwnProperty(e)&&this.targets[e].send(n)}};var At=Nt;var w=class{static error(e,r){return{code:e,message:r}}static succ(e="succ"){return{code:200,message:e}}static notInitIframe(){return{code:201,message:"iframe not init"}}};var Y,we=new Map,Te=1,Be,it,b=class{static createMeassage(e,r){Be=e,it=r,Y||(Y=new At,Y.addTarget(e.contentWindow,"iframe"))}static addListener(){Y.clear(),Y.listen(e=>{if(typeof e=="string"){let r;try{r=JSON.parse(e),r&&r.type==="request"?this.getRequest(r):r&&r.type==="response"&&this.getResponse(r)}catch(t){console.log("addListener error",t)}}})}static request(e,r=null){let t={};t.id=Te,t.type="request",t.name=e,r&&(t.data=r);let a=JSON.stringify(t);if(!Y){console.log("request: message is destroy");return}Y.targets.iframe&&Y.targets.iframe.send(a),Te++}static getRequest(e){this.assembleResponse(e)}static assembleResponse(e){let r={},t=e.id,a=e.type;if(a==="request"&&e.name){r.id=t,r.name=e.name,r.type="response";let f=new CustomEvent(e.name,{detail:e.data}),c=Y.targets.iframe;if(!c){document.dispatchEvent(f);return}switch(e.name){case"participant-joined":c.send(JSON.stringify(r));break;case"room-events":c.send(JSON.stringify(r));break;case"participant-left":c.send(JSON.stringify(r));break;case"room-connected":c.send(JSON.stringify(r));break;case"user-status-change":c.send(JSON.stringify(r));break;case"room-error":c.send(JSON.stringify(r));break;case"change-room-config":c.send(JSON.stringify(r));break;case"change-video-config":c.send(JSON.stringify(r));break;case"room-end":c.send(JSON.stringify(r)),this.clear();break;case"full-screen":c.send(JSON.stringify(r));break;case"need-secret":c.send(JSON.stringify(r)),this.clear();break;case"change-master":c.send(JSON.stringify(r));break;case"snapshot":c.send(JSON.stringify(r));break;case"shareEvent":c.send(JSON.stringify(r));break;case"inviteEvent":c.send(JSON.stringify(r));break;case"callUserEvent":c.send(JSON.stringify(r));break;case"callNoJoin":c.send(JSON.stringify(r));break;case"fullScreen":c.send(JSON.stringify(r));break;case"exitFullScreen":c.send(JSON.stringify(r));break;case"minApp":c.send(JSON.stringify(r));break;case"doubleClick":c.send(JSON.stringify(r));break;case"changeClientSize":c.send(JSON.stringify(r));break;case"get-participants":c.send(JSON.stringify(r));break;case"maxWindow":c.send(JSON.stringify(r));break;case"exitMax":c.send(JSON.stringify(r));break;case"signalChanged":c.send(JSON.stringify(r));break;default:r.data="not support name",c.send(JSON.stringify(r)),f=new CustomEvent(a,{detail:"not support name"})}document.dispatchEvent(f)}}static getResponse(e){let r=e.id,t={};t.code="200",e.data&&(t.data=e.data);let a=we.get(r);a&&a.resolve(t),we.delete(r)}static clear(){Y.clear(),Y=void 0,console.log("clear _iframe"),Be&&Be.remove(),Be=void 0,typeof it=="function"&&it()}static refreshIframe(e){return new Promise((r,t)=>{Be?(we.set(Te,{resolve:r,reject:t}),this.request("refreshIframe",{url:e})):t(w.notInitIframe())})}static setPromiseMap(e,r){we.set(Te,{resolve:e,reject:r})}static getPromiseMap(){return we.get(Te)}};var Se=class{static organizeUrl(e,r,t){let a=this.organizeParameters(r,t);return e+"#/out/joinRoom?"+a}static organizeParameters(e,r){let t=this.obtainBusinessParametersObject(e,r),a="";for(let f in t){let c="";typeof t[f]=="object"?c=JSON.stringify(t[f]):c=t[f]+"",c.length>0&&c!="undefined"&&(a+=`&${f}=${encodeURIComponent(c)}`)}return a?a.substring(1):""}static obtainBusinessParametersObject(e,r){let t={};if(t=e,r)for(let a in r)r[a]!==void 0&&r[a]!==null&&(t[a]=r[a]);return t}};var Nr=he(Or());var qr,Ge,Ur,pt,Lr,dt,Dr=30*1e3,bs={code:311,message:"\u7F51\u7EDC\u8BF7\u6C42\u8D85\u65F6"},p=class{static setBaseBusinessURL(e){Lr=e}static getBaseBusinessURL(){return Lr}static setBusinessToken(e){e&&e.indexOf("Bearer")==-1?dt="Bearer "+e:dt=e}static getBusinessToken(){return dt}static setBaseURL(e){Ge=e}static getBaseURL(){return Ge}static setEncryptKey(e){this.encryptKey=e,this.encrypt.setSm2KeyPair(e)}static setServerAPI(e){Ur=e}static getServerAPI(){return Ur}static setToken(e){qr=e}static getToken(){return qr}static setCustomToken(e){pt=e}static getCustomToken(){return pt}static setupEncrypt(){this.encrypt=new Nr.default}static generateClientId(){return Fe(this,null,function*(){let e=this.encrypt.getClientId(!0);return this.clientId=e,yield this.trans()})}static trans(){return Fe(this,null,function*(){let e=this.encrypt.getPairKey(!0);this.pairKey=e,console.log("pairkey",e);let r=this.encrypt.encryptSm2(`${e.enKey}:${e.deKey}`);return console.log("trans sm2 encrypt data",r),fetch(Ge+"/api/store",{headers:{"Access-Control-Allow-Origin":"*",imei:this.clientId,"Content-Type":"application/json"},method:"POST",body:JSON.stringify({p:r})})})}static get(e,r,t){return this.request("GET",e,r,t)}static post(e,r,t,a=Dr){return this.request("POST",e,r,t,a)}static request(e="GET",r,t,a,f=Dr){let c=new Promise((y,g)=>{setTimeout(()=>{g(bs)},f)}),l=new Promise((y,g)=>Fe(this,null,function*(){r.startsWith("http")||(r=Ge+r);let B;a?B=a:B=pt;let T={"Content-Type":"application/json",Authorization:B};this.encryptKey&&(this.clientId||(yield this.generateClientId()),this.clientId&&(T.imei=this.clientId));let S=this.encryptKey?JSON.stringify({data:this.encrypt.encryptSm4(JSON.stringify(t),this.pairKey.enKey)}):JSON.stringify(t);fetch(r,{body:e==="GET"?null:S,headers:T,method:e}).then(I=>this.handleServerData(I,r,t)).then(I=>{console.log(`
############# data=
`,I,r),I&&I.msg&&(I.message=I.msg)