/*! Aliplayer - v2.9.7 - 2021-07-08 10.47.02 */ !function i(n,o,a){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);throw(r=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",r}r=o[t]={exports:{}},n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,i,n,o,a)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e>6],n=0==(32&i);if(31==(31&i)){let e=i;for(i=0;128==(128&e);){if(e=t.readUInt8(r),t.isError(e))return e;i<<=7,i|=127&e}}else i&=31;var o=s.tag[i];return{cls:e,primitive:n,tag:i,tagStr:o}}function h(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;var n=127&i;if(4>=8)n++;const o=a.alloc(2+n);o[0]=r,o[1]=128|n;for(let e=1+n,t=i.length;0>=8)o[e]=255&t;return this._createEncoderBuffer([o,i])},l.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"!==e)return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported");{const r=a.alloc(2*t.length);for(let e=0;e>=7)i++}const n=a.alloc(i);let o=n.length-1;for(let t=r.length-1;0<=t;t--){let e=r[t];for(n[o--]=127&e;0<(e>>=7);)n[o--]=128|127&e}return this._createEncoderBuffer(n)},l.prototype._encodeTime=function(e,t){let r;const i=new Date(e);return"gentime"===t?r=[u(i.getUTCFullYear()),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(i.getUTCFullYear()%100),u(i.getUTCMonth()+1),u(i.getUTCDate()),u(i.getUTCHours()),u(i.getUTCMinutes()),u(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!a.isBuffer(t)){const n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=a.from(n)}if(a.isBuffer(t)){let e=t.length;0===t.length&&e++;const i=a.alloc(e);return t.copy(i),0===t.length&&(i[0]=0),this._createEncoderBuffer(i)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;256<=e;e>>=8)r++;const i=new Array(r);for(let e=i.length-1;0<=e;e--)i[e]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(a.from(i))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,r){const i=this._baseState;let n;if(null===i["default"])return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i["default"],t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);else if("le"===r)for(i=o=0;o>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);return this.strip()},g.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i>>26):o+=8;this.strip()},g.prototype._parseBase=function(e,t,r){this.words=[0];for(var i=0,n=this.length=1;n<=67108863;n*=t)i++;for(var n=n/t|0,o=e.length-r,a=o%--i,s=Math.min(o,o-a)+r,l=0,u=r;u"};var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function o(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0,i=(r.length=i)-1|0,n=(a=(0|e.words[0])*(0|t.words[0]))/67108864|0;r.words[0]=67108863&a;for(var o=1;o>>26,l=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)s+=(a=(0|e.words[o-c|0])*(0|t.words[c])+l)/67108864|0,l=67108863&a;r.words[o]=0|l,n=0|s}return 0!==n?r.words[o]=0|n:r.length--,r.strip()}g.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){s="";for(var r=0,i=0,n=0;n>>24-r&16777215)||n!==this.length-1?d[6-a.length]+a+s:a+s;26<=(r+=2)&&(r-=26,n--)}for(0!==i&&(s=i.toString(16)+s);s.length%t!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(e===(0|e)&&2<=e&&e<=36){var l=f[e],u=p[e];for(s="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modn(u).toString(e);s=(c=c.idivn(u)).isZero()?h+s:d[l-h.length]+h+s}for(this.isZero()&&(s="0"+s);s.length%t!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}y(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>=13),64<=t&&(e+=7,t>>>=7),8<=t&&(e+=4,t>>>=4),2<=t&&(e+=2,t>>>=2),e+t},g.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,e=0;return 0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},g.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},g.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},g.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;re.length?this.clone().iand(e):e.clone().iand(this)},g.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},g.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},g.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},g.prototype.inotn=function(e){y("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0>26-e),this.strip()},g.prototype.notn=function(e){return this.clone().inotn(e)},g.prototype.setn=function(e,t){y("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<e.length?(r=this,e):(r=e,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},g.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,u=0|i[1],c=8191&u,h=u>>>13,d=0|i[2],f=8191&d,p=d>>>13,y=0|i[3],g=8191&y,m=y>>>13,b=0|i[4],_=8191&b,v=b>>>13,w=0|i[5],S=8191&w,E=w>>>13,T=0|i[6],x=8191&T,M=T>>>13,k=0|i[7],P=8191&k,C=k>>>13,A=0|i[8],I=8191&A,R=A>>>13,L=0|i[9],D=8191&L,B=L>>>13,O=0|n[0],U=8191&O,N=O>>>13,H=0|n[1],j=8191&H,F=H>>>13,q=0|n[2],V=8191&q,z=q>>>13,K=0|n[3],W=8191&K,X=K>>>13,G=0|n[4],Y=8191&G,J=G>>>13,Q=0|n[5],Z=8191&Q,$=Q>>>13,a=0|n[6],u=8191&a,d=a>>>13,y=0|n[7],b=8191&y,w=y>>>13,T=0|n[8],k=8191&T,A=T>>>13,i=0|n[9],L=8191&i,O=i>>>13;r.negative=e.negative^t.negative,r.length=19;var K=(0+Math.imul(s,U)|0)+((8191&(q=(q=Math.imul(s,N))+Math.imul(l,U)|0))<<13)|0,ee=((G=Math.imul(l,N))+(q>>>13)|0)+(K>>>26)|0;K&=67108863,H=Math.imul(c,U),q=(q=Math.imul(c,N))+Math.imul(h,U)|0,G=Math.imul(h,N);Q=(ee+(H+Math.imul(s,j)|0)|0)+((8191&(q=(q=q+Math.imul(s,F)|0)+Math.imul(l,j)|0))<<13)|0;ee=((G=G+Math.imul(l,F)|0)+(q>>>13)|0)+(Q>>>26)|0,Q&=67108863,H=Math.imul(f,U),q=(q=Math.imul(f,N))+Math.imul(p,U)|0,G=Math.imul(p,N),H=H+Math.imul(c,j)|0,q=(q=q+Math.imul(c,F)|0)+Math.imul(h,j)|0,G=G+Math.imul(h,F)|0;a=(ee+(H+Math.imul(s,V)|0)|0)+((8191&(q=(q=q+Math.imul(s,z)|0)+Math.imul(l,V)|0))<<13)|0;ee=((G=G+Math.imul(l,z)|0)+(q>>>13)|0)+(a>>>26)|0,a&=67108863,H=Math.imul(g,U),q=(q=Math.imul(g,N))+Math.imul(m,U)|0,G=Math.imul(m,N),H=H+Math.imul(f,j)|0,q=(q=q+Math.imul(f,F)|0)+Math.imul(p,j)|0,G=G+Math.imul(p,F)|0,H=H+Math.imul(c,V)|0,q=(q=q+Math.imul(c,z)|0)+Math.imul(h,V)|0,G=G+Math.imul(h,z)|0;y=(ee+(H+Math.imul(s,W)|0)|0)+((8191&(q=(q=q+Math.imul(s,X)|0)+Math.imul(l,W)|0))<<13)|0;ee=((G=G+Math.imul(l,X)|0)+(q>>>13)|0)+(y>>>26)|0,y&=67108863,H=Math.imul(_,U),q=(q=Math.imul(_,N))+Math.imul(v,U)|0,G=Math.imul(v,N),H=H+Math.imul(g,j)|0,q=(q=q+Math.imul(g,F)|0)+Math.imul(m,j)|0,G=G+Math.imul(m,F)|0,H=H+Math.imul(f,V)|0,q=(q=q+Math.imul(f,z)|0)+Math.imul(p,V)|0,G=G+Math.imul(p,z)|0,H=H+Math.imul(c,W)|0,q=(q=q+Math.imul(c,X)|0)+Math.imul(h,W)|0,G=G+Math.imul(h,X)|0;T=(ee+(H+Math.imul(s,Y)|0)|0)+((8191&(q=(q=q+Math.imul(s,J)|0)+Math.imul(l,Y)|0))<<13)|0;ee=((G=G+Math.imul(l,J)|0)+(q>>>13)|0)+(T>>>26)|0,T&=67108863,H=Math.imul(S,U),q=(q=Math.imul(S,N))+Math.imul(E,U)|0,G=Math.imul(E,N),H=H+Math.imul(_,j)|0,q=(q=q+Math.imul(_,F)|0)+Math.imul(v,j)|0,G=G+Math.imul(v,F)|0,H=H+Math.imul(g,V)|0,q=(q=q+Math.imul(g,z)|0)+Math.imul(m,V)|0,G=G+Math.imul(m,z)|0,H=H+Math.imul(f,W)|0,q=(q=q+Math.imul(f,X)|0)+Math.imul(p,W)|0,G=G+Math.imul(p,X)|0,H=H+Math.imul(c,Y)|0,q=(q=q+Math.imul(c,J)|0)+Math.imul(h,Y)|0,G=G+Math.imul(h,J)|0;n=(ee+(H+Math.imul(s,Z)|0)|0)+((8191&(q=(q=q+Math.imul(s,$)|0)+Math.imul(l,Z)|0))<<13)|0;ee=((G=G+Math.imul(l,$)|0)+(q>>>13)|0)+(n>>>26)|0,n&=67108863,H=Math.imul(x,U),q=(q=Math.imul(x,N))+Math.imul(M,U)|0,G=Math.imul(M,N),H=H+Math.imul(S,j)|0,q=(q=q+Math.imul(S,F)|0)+Math.imul(E,j)|0,G=G+Math.imul(E,F)|0,H=H+Math.imul(_,V)|0,q=(q=q+Math.imul(_,z)|0)+Math.imul(v,V)|0,G=G+Math.imul(v,z)|0,H=H+Math.imul(g,W)|0,q=(q=q+Math.imul(g,X)|0)+Math.imul(m,W)|0,G=G+Math.imul(m,X)|0,H=H+Math.imul(f,Y)|0,q=(q=q+Math.imul(f,J)|0)+Math.imul(p,Y)|0,G=G+Math.imul(p,J)|0,H=H+Math.imul(c,Z)|0,q=(q=q+Math.imul(c,$)|0)+Math.imul(h,Z)|0,G=G+Math.imul(h,$)|0;i=(ee+(H+Math.imul(s,u)|0)|0)+((8191&(q=(q=q+Math.imul(s,d)|0)+Math.imul(l,u)|0))<<13)|0;ee=((G=G+Math.imul(l,d)|0)+(q>>>13)|0)+(i>>>26)|0,i&=67108863,H=Math.imul(P,U),q=(q=Math.imul(P,N))+Math.imul(C,U)|0,G=Math.imul(C,N),H=H+Math.imul(x,j)|0,q=(q=q+Math.imul(x,F)|0)+Math.imul(M,j)|0,G=G+Math.imul(M,F)|0,H=H+Math.imul(S,V)|0,q=(q=q+Math.imul(S,z)|0)+Math.imul(E,V)|0,G=G+Math.imul(E,z)|0,H=H+Math.imul(_,W)|0,q=(q=q+Math.imul(_,X)|0)+Math.imul(v,W)|0,G=G+Math.imul(v,X)|0,H=H+Math.imul(g,Y)|0,q=(q=q+Math.imul(g,J)|0)+Math.imul(m,Y)|0,G=G+Math.imul(m,J)|0,H=H+Math.imul(f,Z)|0,q=(q=q+Math.imul(f,$)|0)+Math.imul(p,Z)|0,G=G+Math.imul(p,$)|0,H=H+Math.imul(c,u)|0,q=(q=q+Math.imul(c,d)|0)+Math.imul(h,u)|0,G=G+Math.imul(h,d)|0;e=(ee+(H+Math.imul(s,b)|0)|0)+((8191&(q=(q=q+Math.imul(s,w)|0)+Math.imul(l,b)|0))<<13)|0;ee=((G=G+Math.imul(l,w)|0)+(q>>>13)|0)+(e>>>26)|0,e&=67108863,H=Math.imul(I,U),q=(q=Math.imul(I,N))+Math.imul(R,U)|0,G=Math.imul(R,N),H=H+Math.imul(P,j)|0,q=(q=q+Math.imul(P,F)|0)+Math.imul(C,j)|0,G=G+Math.imul(C,F)|0,H=H+Math.imul(x,V)|0,q=(q=q+Math.imul(x,z)|0)+Math.imul(M,V)|0,G=G+Math.imul(M,z)|0,H=H+Math.imul(S,W)|0,q=(q=q+Math.imul(S,X)|0)+Math.imul(E,W)|0,G=G+Math.imul(E,X)|0,H=H+Math.imul(_,Y)|0,q=(q=q+Math.imul(_,J)|0)+Math.imul(v,Y)|0,G=G+Math.imul(v,J)|0,H=H+Math.imul(g,Z)|0,q=(q=q+Math.imul(g,$)|0)+Math.imul(m,Z)|0,G=G+Math.imul(m,$)|0,H=H+Math.imul(f,u)|0,q=(q=q+Math.imul(f,d)|0)+Math.imul(p,u)|0,G=G+Math.imul(p,d)|0,H=H+Math.imul(c,b)|0,q=(q=q+Math.imul(c,w)|0)+Math.imul(h,b)|0,G=G+Math.imul(h,w)|0;t=(ee+(H+Math.imul(s,k)|0)|0)+((8191&(q=(q=q+Math.imul(s,A)|0)+Math.imul(l,k)|0))<<13)|0;ee=((G=G+Math.imul(l,A)|0)+(q>>>13)|0)+(t>>>26)|0,t&=67108863,H=Math.imul(D,U),q=(q=Math.imul(D,N))+Math.imul(B,U)|0,G=Math.imul(B,N),H=H+Math.imul(I,j)|0,q=(q=q+Math.imul(I,F)|0)+Math.imul(R,j)|0,G=G+Math.imul(R,F)|0,H=H+Math.imul(P,V)|0,q=(q=q+Math.imul(P,z)|0)+Math.imul(C,V)|0,G=G+Math.imul(C,z)|0,H=H+Math.imul(x,W)|0,q=(q=q+Math.imul(x,X)|0)+Math.imul(M,W)|0,G=G+Math.imul(M,X)|0,H=H+Math.imul(S,Y)|0,q=(q=q+Math.imul(S,J)|0)+Math.imul(E,Y)|0,G=G+Math.imul(E,J)|0,H=H+Math.imul(_,Z)|0,q=(q=q+Math.imul(_,$)|0)+Math.imul(v,Z)|0,G=G+Math.imul(v,$)|0,H=H+Math.imul(g,u)|0,q=(q=q+Math.imul(g,d)|0)+Math.imul(m,u)|0,G=G+Math.imul(m,d)|0,H=H+Math.imul(f,b)|0,q=(q=q+Math.imul(f,w)|0)+Math.imul(p,b)|0,G=G+Math.imul(p,w)|0,H=H+Math.imul(c,k)|0,q=(q=q+Math.imul(c,A)|0)+Math.imul(h,k)|0,G=G+Math.imul(h,A)|0;s=(ee+(H+Math.imul(s,L)|0)|0)+((8191&(q=(q=q+Math.imul(s,O)|0)+Math.imul(l,L)|0))<<13)|0;ee=((G=G+Math.imul(l,O)|0)+(q>>>13)|0)+(s>>>26)|0,s&=67108863,H=Math.imul(D,j),q=(q=Math.imul(D,F))+Math.imul(B,j)|0,G=Math.imul(B,F),H=H+Math.imul(I,V)|0,q=(q=q+Math.imul(I,z)|0)+Math.imul(R,V)|0,G=G+Math.imul(R,z)|0,H=H+Math.imul(P,W)|0,q=(q=q+Math.imul(P,X)|0)+Math.imul(C,W)|0,G=G+Math.imul(C,X)|0,H=H+Math.imul(x,Y)|0,q=(q=q+Math.imul(x,J)|0)+Math.imul(M,Y)|0,G=G+Math.imul(M,J)|0,H=H+Math.imul(S,Z)|0,q=(q=q+Math.imul(S,$)|0)+Math.imul(E,Z)|0,G=G+Math.imul(E,$)|0,H=H+Math.imul(_,u)|0,q=(q=q+Math.imul(_,d)|0)+Math.imul(v,u)|0,G=G+Math.imul(v,d)|0,H=H+Math.imul(g,b)|0,q=(q=q+Math.imul(g,w)|0)+Math.imul(m,b)|0,G=G+Math.imul(m,w)|0,H=H+Math.imul(f,k)|0,q=(q=q+Math.imul(f,A)|0)+Math.imul(p,k)|0,G=G+Math.imul(p,A)|0;c=(ee+(H+Math.imul(c,L)|0)|0)+((8191&(q=(q=q+Math.imul(c,O)|0)+Math.imul(h,L)|0))<<13)|0;ee=((G=G+Math.imul(h,O)|0)+(q>>>13)|0)+(c>>>26)|0,c&=67108863,H=Math.imul(D,V),q=(q=Math.imul(D,z))+Math.imul(B,V)|0,G=Math.imul(B,z),H=H+Math.imul(I,W)|0,q=(q=q+Math.imul(I,X)|0)+Math.imul(R,W)|0,G=G+Math.imul(R,X)|0,H=H+Math.imul(P,Y)|0,q=(q=q+Math.imul(P,J)|0)+Math.imul(C,Y)|0,G=G+Math.imul(C,J)|0,H=H+Math.imul(x,Z)|0,q=(q=q+Math.imul(x,$)|0)+Math.imul(M,Z)|0,G=G+Math.imul(M,$)|0,H=H+Math.imul(S,u)|0,q=(q=q+Math.imul(S,d)|0)+Math.imul(E,u)|0,G=G+Math.imul(E,d)|0,H=H+Math.imul(_,b)|0,q=(q=q+Math.imul(_,w)|0)+Math.imul(v,b)|0,G=G+Math.imul(v,w)|0,H=H+Math.imul(g,k)|0,q=(q=q+Math.imul(g,A)|0)+Math.imul(m,k)|0,G=G+Math.imul(m,A)|0;f=(ee+(H+Math.imul(f,L)|0)|0)+((8191&(q=(q=q+Math.imul(f,O)|0)+Math.imul(p,L)|0))<<13)|0;ee=((G=G+Math.imul(p,O)|0)+(q>>>13)|0)+(f>>>26)|0,f&=67108863,H=Math.imul(D,W),q=(q=Math.imul(D,X))+Math.imul(B,W)|0,G=Math.imul(B,X),H=H+Math.imul(I,Y)|0,q=(q=q+Math.imul(I,J)|0)+Math.imul(R,Y)|0,G=G+Math.imul(R,J)|0,H=H+Math.imul(P,Z)|0,q=(q=q+Math.imul(P,$)|0)+Math.imul(C,Z)|0,G=G+Math.imul(C,$)|0,H=H+Math.imul(x,u)|0,q=(q=q+Math.imul(x,d)|0)+Math.imul(M,u)|0,G=G+Math.imul(M,d)|0,H=H+Math.imul(S,b)|0,q=(q=q+Math.imul(S,w)|0)+Math.imul(E,b)|0,G=G+Math.imul(E,w)|0,H=H+Math.imul(_,k)|0,q=(q=q+Math.imul(_,A)|0)+Math.imul(v,k)|0,G=G+Math.imul(v,A)|0;g=(ee+(H+Math.imul(g,L)|0)|0)+((8191&(q=(q=q+Math.imul(g,O)|0)+Math.imul(m,L)|0))<<13)|0;ee=((G=G+Math.imul(m,O)|0)+(q>>>13)|0)+(g>>>26)|0,g&=67108863,H=Math.imul(D,Y),q=(q=Math.imul(D,J))+Math.imul(B,Y)|0,G=Math.imul(B,J),H=H+Math.imul(I,Z)|0,q=(q=q+Math.imul(I,$)|0)+Math.imul(R,Z)|0,G=G+Math.imul(R,$)|0,H=H+Math.imul(P,u)|0,q=(q=q+Math.imul(P,d)|0)+Math.imul(C,u)|0,G=G+Math.imul(C,d)|0,H=H+Math.imul(x,b)|0,q=(q=q+Math.imul(x,w)|0)+Math.imul(M,b)|0,G=G+Math.imul(M,w)|0,H=H+Math.imul(S,k)|0,q=(q=q+Math.imul(S,A)|0)+Math.imul(E,k)|0,G=G+Math.imul(E,A)|0;_=(ee+(H+Math.imul(_,L)|0)|0)+((8191&(q=(q=q+Math.imul(_,O)|0)+Math.imul(v,L)|0))<<13)|0;ee=((G=G+Math.imul(v,O)|0)+(q>>>13)|0)+(_>>>26)|0,_&=67108863,H=Math.imul(D,Z),q=(q=Math.imul(D,$))+Math.imul(B,Z)|0,G=Math.imul(B,$),H=H+Math.imul(I,u)|0,q=(q=q+Math.imul(I,d)|0)+Math.imul(R,u)|0,G=G+Math.imul(R,d)|0,H=H+Math.imul(P,b)|0,q=(q=q+Math.imul(P,w)|0)+Math.imul(C,b)|0,G=G+Math.imul(C,w)|0,H=H+Math.imul(x,k)|0,q=(q=q+Math.imul(x,A)|0)+Math.imul(M,k)|0,G=G+Math.imul(M,A)|0;S=(ee+(H+Math.imul(S,L)|0)|0)+((8191&(q=(q=q+Math.imul(S,O)|0)+Math.imul(E,L)|0))<<13)|0;ee=((G=G+Math.imul(E,O)|0)+(q>>>13)|0)+(S>>>26)|0,S&=67108863,H=Math.imul(D,u),q=(q=Math.imul(D,d))+Math.imul(B,u)|0,G=Math.imul(B,d),H=H+Math.imul(I,b)|0,q=(q=q+Math.imul(I,w)|0)+Math.imul(R,b)|0,G=G+Math.imul(R,w)|0,H=H+Math.imul(P,k)|0,q=(q=q+Math.imul(P,A)|0)+Math.imul(C,k)|0,G=G+Math.imul(C,A)|0;x=(ee+(H+Math.imul(x,L)|0)|0)+((8191&(q=(q=q+Math.imul(x,O)|0)+Math.imul(M,L)|0))<<13)|0;ee=((G=G+Math.imul(M,O)|0)+(q>>>13)|0)+(x>>>26)|0,x&=67108863,H=Math.imul(D,b),q=(q=Math.imul(D,w))+Math.imul(B,b)|0,G=Math.imul(B,w),H=H+Math.imul(I,k)|0,q=(q=q+Math.imul(I,A)|0)+Math.imul(R,k)|0,G=G+Math.imul(R,A)|0;P=(ee+(H+Math.imul(P,L)|0)|0)+((8191&(q=(q=q+Math.imul(P,O)|0)+Math.imul(C,L)|0))<<13)|0;ee=((G=G+Math.imul(C,O)|0)+(q>>>13)|0)+(P>>>26)|0,P&=67108863,H=Math.imul(D,k),q=(q=Math.imul(D,A))+Math.imul(B,k)|0,G=Math.imul(B,A);I=(ee+(H+Math.imul(I,L)|0)|0)+((8191&(q=(q=q+Math.imul(I,O)|0)+Math.imul(R,L)|0))<<13)|0;ee=((G=G+Math.imul(R,O)|0)+(q>>>13)|0)+(I>>>26)|0,I&=67108863;L=(ee+Math.imul(D,L)|0)+((8191&(q=(q=Math.imul(D,O))+Math.imul(B,L)|0))<<13)|0;return ee=((G=Math.imul(B,O))+(q>>>13)|0)+(L>>>26)|0,L&=67108863,o[0]=K,o[1]=Q,o[2]=a,o[3]=y,o[4]=T,o[5]=n,o[6]=i,o[7]=e,o[8]=t,o[9]=s,o[10]=c,o[11]=f,o[12]=g,o[13]=_,o[14]=S,o[15]=x,o[16]=P,o[17]=I,o[18]=L,0!=ee&&(o[19]=ee,r.length++),r};function l(e,t,r){return(new u).mulp(e,t,r)}function u(e,t){this.x=e,this.y=t}Math.imul||(a=o),g.prototype.mulTo=function(e,t){var r=this.length+e.length,t=(10===this.length&&10===e.length?a:r<63?o:r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}:l)(this,e,t);return t},u.prototype.makeRBT=function(e){for(var t=new Array(e),r=g.prototype._countBits(e)-1,i=0;i>=1;return i},u.prototype.permute=function(e,t,r,i,n,o){for(var a=0;a>>=1)r++;return 1<>>=13),n>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=n>>>26,this.words[r]=67108863&n}return 0!==t&&(this.words[r]=t,this.length++),this},g.prototype.muln=function(e){return this.clone().imuln(e)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new g(1);for(var r=this,i=0;i>>26-t<<26-t;if(0!=t){for(var n=0,o=0;o>>26-t}n&&(this.words[o]=n,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,l=0;l>>n,u=c&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},g.prototype.ishrn=function(e,t,r){return y(0===this.negative),this.iushrn(e,t,r)},g.prototype.shln=function(e){return this.clone().ishln(e)},g.prototype.ushln=function(e){return this.clone().iushln(e)},g.prototype.shrn=function(e){return this.clone().ishrn(e)},g.prototype.ushrn=function(e){return this.clone().iushrn(e)},g.prototype.testn=function(e){y("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e)&&!!(this.words[e]&1<>>t<>26)-(s/67108864|0);this.words[o+r]=67108863&a}for(;o>26,this.words[o+r]=67108863&a;if(0===n)return this.strip();for(y(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this.strip()},g.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var a,s=i.length-n.length;if("mod"!==t){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var l=0;lthis.length||this.cmp(e)<0?{div:new g(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new g(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new g(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,n,o},g.prototype.div=function(e){return this.divmod(e,"div",!1).div},g.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},g.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},g.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),e=e.andln(1),i=r.cmp(i);return i<0||1===e&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},g.prototype.modn=function(e){y(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(t*r+(0|this.words[i]))%e;return r},g.prototype.idivn=function(e){y(e<=67108863);for(var t=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},g.prototype.divn=function(e){return this.clone().idivn(e)},g.prototype.egcd=function(e){y(0===e.negative),y(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),i=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var l=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0>>26;n&=67108863,this.words[i]=n}return 0!==r&&(this.words[i]=r,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),e=1e.length)return 1;if(this.lengththis.n;);e=t>>22,n=o}0===(e.words[i-10]=n>>>=22)&&10>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},g._prime=function(e){if(c[e])return c[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new v;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new w}return c[e]=t},S.prototype._verify1=function(e){y(0===e.negative,"red works only with positives"),y(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){y(0==(e.negative|t.negative),"red works only with positives"),y(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);t=e.add(t);return 0<=t.cmp(this.m)&&t.isub(this.m),t._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);t=e.iadd(t);return 0<=t.cmp(this.m)&&t.isub(this.m),t},S.prototype.sub=function(e,t){this._verify2(e,t);t=e.sub(t);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);t=e.isub(t);return t.cmpn(0)<0&&t.iadd(this.m),t},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(y(t%2==1),3===t){t=this.m.add(new g(1)).iushrn(2);return this.pow(e,t)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);y(!r.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var l=this.pow(s,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=i;0!==c.cmp(n);){for(var d=c,f=0;0!==d.cmp(n);f++)d=d.redSqr();y(f>u&1;n!==r[0]&&(n=this.sqr(n)),0!=c||0!==o?(o<<=1,o|=c,(4===++a||0===i&&0===u)&&(n=this.mul(n,r[o]),o=a=0)):a=0}s=26}return n},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},g.mont=function(e){return new E(e)},r(E,S),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;e=e.imul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new g(0)._forceRed(this);e=e.mul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:19}],16:[function(e,t,r){"use strict";r.byteLength=function(e){var t=c(e),e=t[0],t=t[1];return 3*(e+t)/4-t},r.toByteArray=function(e){var t,r,i=c(e),n=i[0],i=i[1],o=new u(function(e,t){return 3*(e+t)/4-t}(n,i)),a=0,s=0>16&255,o[a++]=t>>8&255,o[a++]=255&t;2===i&&(t=l[e.charCodeAt(r)]<<2|l[e.charCodeAt(r+1)]>>4,o[a++]=255&t);1===i&&(t=l[e.charCodeAt(r)]<<10|l[e.charCodeAt(r+1)]<<4|l[e.charCodeAt(r+2)]>>2,o[a++]=t>>8&255,o[a++]=255&t);return o},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,n=[],o=0,a=r-i;o>18&63]+s[e>>12&63]+s[e>>6&63]+s[63&e]}(i));return n.join("")}(e,o,a>2]+s[t<<4&63]+"==")):2==i&&(t=(e[r-2]<<8)+e[r-1],n.push(s[t>>10]+s[t>>4&63]+s[t<<2&63]+"="));return n.join("")};for(var s=[],l=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=0,o=i.length;n>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);else if("le"===r)for(i=o=0;o>>26-a&67108863,26<=(a+=24)&&(a-=26,i++);return this._strip()},g.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i>>26):o+=8;this._strip()},g.prototype._parseBase=function(e,t,r){this.words=[0];for(var i=0,n=this.length=1;n<=67108863;n*=t)i++;for(var n=n/t|0,o=e.length-r,a=o%--i,s=Math.min(o,o-a)+r,l=0,u=r;u"}var d=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];g.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){s="";for(var r=0,i=0,n=0;n>>24-r&16777215)||n!==this.length-1?d[6-a.length]+a+s:a+s;26<=(r+=2)&&(r-=26,n--)}for(0!==i&&(s=i.toString(16)+s);s.length%t!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}if(e===(0|e)&&2<=e&&e<=36){var l=f[e],u=p[e];for(s="",(c=this.clone()).negative=0;!c.isZero();){var c,h=c.modrn(u).toString(e);s=(c=c.idivn(u)).isZero()?h+s:d[l-h.length]+h+s}for(this.isZero()&&(s="0"+s);s.length%t!=0;)s="0"+s;return s=0!==this.negative?"-"+s:s}y(!1,"Base should be between 2 and 36")},g.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2>>26,l=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++)s+=(a=(0|e.words[o-c|0])*(0|t.words[c])+l)/67108864|0,l=67108863&a;r.words[o]=0|l,n=0|s}return 0!==n?r.words[o]=0|n:r.length--,r._strip()}g.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),r=r||Math.max(1,i);y(i<=r,"byte array longer than desired length"),y(0>8&255),r>16&255),6===o?(r>24&255),o=i=0):(i=a>>>24,o+=2)}if(r>8&255),0<=r&&(e[r--]=a>>16&255),6===o?(0<=r&&(e[r--]=a>>24&255),o=i=0):(i=a>>>24,o+=2)}if(0<=r)for(e[r--]=i;0<=r;)e[r--]=0},Math.clz32?g.prototype._countBits=function(e){return 32-Math.clz32(e)}:g.prototype._countBits=function(e){var t=e,e=0;return 4096<=t&&(e+=13,t>>>=13),64<=t&&(e+=7,t>>>=7),8<=t&&(e+=4,t>>>=4),2<=t&&(e+=2,t>>>=2),e+t},g.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,e=0;return 0==(8191&t)&&(e+=13,t>>>=13),0==(127&t)&&(e+=7,t>>>=7),0==(15&t)&&(e+=4,t>>>=4),0==(3&t)&&(e+=2,t>>>=2),0==(1&t)&&e++,e},g.prototype.bitLength=function(){var e=this.words[this.length-1],e=this._countBits(e);return 26*(this.length-1)+e},g.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},g.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},g.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,r=0;re.length?this.clone().iand(e):e.clone().iand(this)},g.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},g.prototype.iuxor=function(e){for(var t,r=this.length>e.length?(t=this,e):(t=e,this),i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},g.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},g.prototype.inotn=function(e){y("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26),e=e%26;this._expand(t),0>26-e),this._strip()},g.prototype.notn=function(e){return this.clone().inotn(e)},g.prototype.setn=function(e,t){y("number"==typeof e&&0<=e);var r=e/26|0,e=e%26;return this._expand(1+r),this.words[r]=t?this.words[r]|1<e.length?(r=this,e):(r=e,this),n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;oe.length?this.clone().iadd(e):e.clone().iadd(this)},g.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;for(var n=0>26,this.words[a]=67108863&t;for(;0!==o&&a>26,this.words[a]=67108863&t;if(0===o&&a>>13,u=0|i[1],c=8191&u,h=u>>>13,d=0|i[2],f=8191&d,p=d>>>13,y=0|i[3],g=8191&y,m=y>>>13,b=0|i[4],_=8191&b,v=b>>>13,w=0|i[5],S=8191&w,E=w>>>13,T=0|i[6],x=8191&T,M=T>>>13,k=0|i[7],P=8191&k,C=k>>>13,A=0|i[8],I=8191&A,R=A>>>13,L=0|i[9],D=8191&L,B=L>>>13,O=0|n[0],U=8191&O,N=O>>>13,H=0|n[1],j=8191&H,F=H>>>13,q=0|n[2],V=8191&q,z=q>>>13,K=0|n[3],W=8191&K,X=K>>>13,G=0|n[4],Y=8191&G,J=G>>>13,Q=0|n[5],Z=8191&Q,$=Q>>>13,a=0|n[6],u=8191&a,d=a>>>13,y=0|n[7],b=8191&y,w=y>>>13,T=0|n[8],k=8191&T,A=T>>>13,i=0|n[9],L=8191&i,O=i>>>13;r.negative=e.negative^t.negative,r.length=19;var K=(0+Math.imul(s,U)|0)+((8191&(q=(q=Math.imul(s,N))+Math.imul(l,U)|0))<<13)|0,ee=((G=Math.imul(l,N))+(q>>>13)|0)+(K>>>26)|0;K&=67108863,H=Math.imul(c,U),q=(q=Math.imul(c,N))+Math.imul(h,U)|0,G=Math.imul(h,N);Q=(ee+(H+Math.imul(s,j)|0)|0)+((8191&(q=(q=q+Math.imul(s,F)|0)+Math.imul(l,j)|0))<<13)|0;ee=((G=G+Math.imul(l,F)|0)+(q>>>13)|0)+(Q>>>26)|0,Q&=67108863,H=Math.imul(f,U),q=(q=Math.imul(f,N))+Math.imul(p,U)|0,G=Math.imul(p,N),H=H+Math.imul(c,j)|0,q=(q=q+Math.imul(c,F)|0)+Math.imul(h,j)|0,G=G+Math.imul(h,F)|0;a=(ee+(H+Math.imul(s,V)|0)|0)+((8191&(q=(q=q+Math.imul(s,z)|0)+Math.imul(l,V)|0))<<13)|0;ee=((G=G+Math.imul(l,z)|0)+(q>>>13)|0)+(a>>>26)|0,a&=67108863,H=Math.imul(g,U),q=(q=Math.imul(g,N))+Math.imul(m,U)|0,G=Math.imul(m,N),H=H+Math.imul(f,j)|0,q=(q=q+Math.imul(f,F)|0)+Math.imul(p,j)|0,G=G+Math.imul(p,F)|0,H=H+Math.imul(c,V)|0,q=(q=q+Math.imul(c,z)|0)+Math.imul(h,V)|0,G=G+Math.imul(h,z)|0;y=(ee+(H+Math.imul(s,W)|0)|0)+((8191&(q=(q=q+Math.imul(s,X)|0)+Math.imul(l,W)|0))<<13)|0;ee=((G=G+Math.imul(l,X)|0)+(q>>>13)|0)+(y>>>26)|0,y&=67108863,H=Math.imul(_,U),q=(q=Math.imul(_,N))+Math.imul(v,U)|0,G=Math.imul(v,N),H=H+Math.imul(g,j)|0,q=(q=q+Math.imul(g,F)|0)+Math.imul(m,j)|0,G=G+Math.imul(m,F)|0,H=H+Math.imul(f,V)|0,q=(q=q+Math.imul(f,z)|0)+Math.imul(p,V)|0,G=G+Math.imul(p,z)|0,H=H+Math.imul(c,W)|0,q=(q=q+Math.imul(c,X)|0)+Math.imul(h,W)|0,G=G+Math.imul(h,X)|0;T=(ee+(H+Math.imul(s,Y)|0)|0)+((8191&(q=(q=q+Math.imul(s,J)|0)+Math.imul(l,Y)|0))<<13)|0;ee=((G=G+Math.imul(l,J)|0)+(q>>>13)|0)+(T>>>26)|0,T&=67108863,H=Math.imul(S,U),q=(q=Math.imul(S,N))+Math.imul(E,U)|0,G=Math.imul(E,N),H=H+Math.imul(_,j)|0,q=(q=q+Math.imul(_,F)|0)+Math.imul(v,j)|0,G=G+Math.imul(v,F)|0,H=H+Math.imul(g,V)|0,q=(q=q+Math.imul(g,z)|0)+Math.imul(m,V)|0,G=G+Math.imul(m,z)|0,H=H+Math.imul(f,W)|0,q=(q=q+Math.imul(f,X)|0)+Math.imul(p,W)|0,G=G+Math.imul(p,X)|0,H=H+Math.imul(c,Y)|0,q=(q=q+Math.imul(c,J)|0)+Math.imul(h,Y)|0,G=G+Math.imul(h,J)|0;n=(ee+(H+Math.imul(s,Z)|0)|0)+((8191&(q=(q=q+Math.imul(s,$)|0)+Math.imul(l,Z)|0))<<13)|0;ee=((G=G+Math.imul(l,$)|0)+(q>>>13)|0)+(n>>>26)|0,n&=67108863,H=Math.imul(x,U),q=(q=Math.imul(x,N))+Math.imul(M,U)|0,G=Math.imul(M,N),H=H+Math.imul(S,j)|0,q=(q=q+Math.imul(S,F)|0)+Math.imul(E,j)|0,G=G+Math.imul(E,F)|0,H=H+Math.imul(_,V)|0,q=(q=q+Math.imul(_,z)|0)+Math.imul(v,V)|0,G=G+Math.imul(v,z)|0,H=H+Math.imul(g,W)|0,q=(q=q+Math.imul(g,X)|0)+Math.imul(m,W)|0,G=G+Math.imul(m,X)|0,H=H+Math.imul(f,Y)|0,q=(q=q+Math.imul(f,J)|0)+Math.imul(p,Y)|0,G=G+Math.imul(p,J)|0,H=H+Math.imul(c,Z)|0,q=(q=q+Math.imul(c,$)|0)+Math.imul(h,Z)|0,G=G+Math.imul(h,$)|0;i=(ee+(H+Math.imul(s,u)|0)|0)+((8191&(q=(q=q+Math.imul(s,d)|0)+Math.imul(l,u)|0))<<13)|0;ee=((G=G+Math.imul(l,d)|0)+(q>>>13)|0)+(i>>>26)|0,i&=67108863,H=Math.imul(P,U),q=(q=Math.imul(P,N))+Math.imul(C,U)|0,G=Math.imul(C,N),H=H+Math.imul(x,j)|0,q=(q=q+Math.imul(x,F)|0)+Math.imul(M,j)|0,G=G+Math.imul(M,F)|0,H=H+Math.imul(S,V)|0,q=(q=q+Math.imul(S,z)|0)+Math.imul(E,V)|0,G=G+Math.imul(E,z)|0,H=H+Math.imul(_,W)|0,q=(q=q+Math.imul(_,X)|0)+Math.imul(v,W)|0,G=G+Math.imul(v,X)|0,H=H+Math.imul(g,Y)|0,q=(q=q+Math.imul(g,J)|0)+Math.imul(m,Y)|0,G=G+Math.imul(m,J)|0,H=H+Math.imul(f,Z)|0,q=(q=q+Math.imul(f,$)|0)+Math.imul(p,Z)|0,G=G+Math.imul(p,$)|0,H=H+Math.imul(c,u)|0,q=(q=q+Math.imul(c,d)|0)+Math.imul(h,u)|0,G=G+Math.imul(h,d)|0;e=(ee+(H+Math.imul(s,b)|0)|0)+((8191&(q=(q=q+Math.imul(s,w)|0)+Math.imul(l,b)|0))<<13)|0;ee=((G=G+Math.imul(l,w)|0)+(q>>>13)|0)+(e>>>26)|0,e&=67108863,H=Math.imul(I,U),q=(q=Math.imul(I,N))+Math.imul(R,U)|0,G=Math.imul(R,N),H=H+Math.imul(P,j)|0,q=(q=q+Math.imul(P,F)|0)+Math.imul(C,j)|0,G=G+Math.imul(C,F)|0,H=H+Math.imul(x,V)|0,q=(q=q+Math.imul(x,z)|0)+Math.imul(M,V)|0,G=G+Math.imul(M,z)|0,H=H+Math.imul(S,W)|0,q=(q=q+Math.imul(S,X)|0)+Math.imul(E,W)|0,G=G+Math.imul(E,X)|0,H=H+Math.imul(_,Y)|0,q=(q=q+Math.imul(_,J)|0)+Math.imul(v,Y)|0,G=G+Math.imul(v,J)|0,H=H+Math.imul(g,Z)|0,q=(q=q+Math.imul(g,$)|0)+Math.imul(m,Z)|0,G=G+Math.imul(m,$)|0,H=H+Math.imul(f,u)|0,q=(q=q+Math.imul(f,d)|0)+Math.imul(p,u)|0,G=G+Math.imul(p,d)|0,H=H+Math.imul(c,b)|0,q=(q=q+Math.imul(c,w)|0)+Math.imul(h,b)|0,G=G+Math.imul(h,w)|0;t=(ee+(H+Math.imul(s,k)|0)|0)+((8191&(q=(q=q+Math.imul(s,A)|0)+Math.imul(l,k)|0))<<13)|0;ee=((G=G+Math.imul(l,A)|0)+(q>>>13)|0)+(t>>>26)|0,t&=67108863,H=Math.imul(D,U),q=(q=Math.imul(D,N))+Math.imul(B,U)|0,G=Math.imul(B,N),H=H+Math.imul(I,j)|0,q=(q=q+Math.imul(I,F)|0)+Math.imul(R,j)|0,G=G+Math.imul(R,F)|0,H=H+Math.imul(P,V)|0,q=(q=q+Math.imul(P,z)|0)+Math.imul(C,V)|0,G=G+Math.imul(C,z)|0,H=H+Math.imul(x,W)|0,q=(q=q+Math.imul(x,X)|0)+Math.imul(M,W)|0,G=G+Math.imul(M,X)|0,H=H+Math.imul(S,Y)|0,q=(q=q+Math.imul(S,J)|0)+Math.imul(E,Y)|0,G=G+Math.imul(E,J)|0,H=H+Math.imul(_,Z)|0,q=(q=q+Math.imul(_,$)|0)+Math.imul(v,Z)|0,G=G+Math.imul(v,$)|0,H=H+Math.imul(g,u)|0,q=(q=q+Math.imul(g,d)|0)+Math.imul(m,u)|0,G=G+Math.imul(m,d)|0,H=H+Math.imul(f,b)|0,q=(q=q+Math.imul(f,w)|0)+Math.imul(p,b)|0,G=G+Math.imul(p,w)|0,H=H+Math.imul(c,k)|0,q=(q=q+Math.imul(c,A)|0)+Math.imul(h,k)|0,G=G+Math.imul(h,A)|0;s=(ee+(H+Math.imul(s,L)|0)|0)+((8191&(q=(q=q+Math.imul(s,O)|0)+Math.imul(l,L)|0))<<13)|0;ee=((G=G+Math.imul(l,O)|0)+(q>>>13)|0)+(s>>>26)|0,s&=67108863,H=Math.imul(D,j),q=(q=Math.imul(D,F))+Math.imul(B,j)|0,G=Math.imul(B,F),H=H+Math.imul(I,V)|0,q=(q=q+Math.imul(I,z)|0)+Math.imul(R,V)|0,G=G+Math.imul(R,z)|0,H=H+Math.imul(P,W)|0,q=(q=q+Math.imul(P,X)|0)+Math.imul(C,W)|0,G=G+Math.imul(C,X)|0,H=H+Math.imul(x,Y)|0,q=(q=q+Math.imul(x,J)|0)+Math.imul(M,Y)|0,G=G+Math.imul(M,J)|0,H=H+Math.imul(S,Z)|0,q=(q=q+Math.imul(S,$)|0)+Math.imul(E,Z)|0,G=G+Math.imul(E,$)|0,H=H+Math.imul(_,u)|0,q=(q=q+Math.imul(_,d)|0)+Math.imul(v,u)|0,G=G+Math.imul(v,d)|0,H=H+Math.imul(g,b)|0,q=(q=q+Math.imul(g,w)|0)+Math.imul(m,b)|0,G=G+Math.imul(m,w)|0,H=H+Math.imul(f,k)|0,q=(q=q+Math.imul(f,A)|0)+Math.imul(p,k)|0,G=G+Math.imul(p,A)|0;c=(ee+(H+Math.imul(c,L)|0)|0)+((8191&(q=(q=q+Math.imul(c,O)|0)+Math.imul(h,L)|0))<<13)|0;ee=((G=G+Math.imul(h,O)|0)+(q>>>13)|0)+(c>>>26)|0,c&=67108863,H=Math.imul(D,V),q=(q=Math.imul(D,z))+Math.imul(B,V)|0,G=Math.imul(B,z),H=H+Math.imul(I,W)|0,q=(q=q+Math.imul(I,X)|0)+Math.imul(R,W)|0,G=G+Math.imul(R,X)|0,H=H+Math.imul(P,Y)|0,q=(q=q+Math.imul(P,J)|0)+Math.imul(C,Y)|0,G=G+Math.imul(C,J)|0,H=H+Math.imul(x,Z)|0,q=(q=q+Math.imul(x,$)|0)+Math.imul(M,Z)|0,G=G+Math.imul(M,$)|0,H=H+Math.imul(S,u)|0,q=(q=q+Math.imul(S,d)|0)+Math.imul(E,u)|0,G=G+Math.imul(E,d)|0,H=H+Math.imul(_,b)|0,q=(q=q+Math.imul(_,w)|0)+Math.imul(v,b)|0,G=G+Math.imul(v,w)|0,H=H+Math.imul(g,k)|0,q=(q=q+Math.imul(g,A)|0)+Math.imul(m,k)|0,G=G+Math.imul(m,A)|0;f=(ee+(H+Math.imul(f,L)|0)|0)+((8191&(q=(q=q+Math.imul(f,O)|0)+Math.imul(p,L)|0))<<13)|0;ee=((G=G+Math.imul(p,O)|0)+(q>>>13)|0)+(f>>>26)|0,f&=67108863,H=Math.imul(D,W),q=(q=Math.imul(D,X))+Math.imul(B,W)|0,G=Math.imul(B,X),H=H+Math.imul(I,Y)|0,q=(q=q+Math.imul(I,J)|0)+Math.imul(R,Y)|0,G=G+Math.imul(R,J)|0,H=H+Math.imul(P,Z)|0,q=(q=q+Math.imul(P,$)|0)+Math.imul(C,Z)|0,G=G+Math.imul(C,$)|0,H=H+Math.imul(x,u)|0,q=(q=q+Math.imul(x,d)|0)+Math.imul(M,u)|0,G=G+Math.imul(M,d)|0,H=H+Math.imul(S,b)|0,q=(q=q+Math.imul(S,w)|0)+Math.imul(E,b)|0,G=G+Math.imul(E,w)|0,H=H+Math.imul(_,k)|0,q=(q=q+Math.imul(_,A)|0)+Math.imul(v,k)|0,G=G+Math.imul(v,A)|0;g=(ee+(H+Math.imul(g,L)|0)|0)+((8191&(q=(q=q+Math.imul(g,O)|0)+Math.imul(m,L)|0))<<13)|0;ee=((G=G+Math.imul(m,O)|0)+(q>>>13)|0)+(g>>>26)|0,g&=67108863,H=Math.imul(D,Y),q=(q=Math.imul(D,J))+Math.imul(B,Y)|0,G=Math.imul(B,J),H=H+Math.imul(I,Z)|0,q=(q=q+Math.imul(I,$)|0)+Math.imul(R,Z)|0,G=G+Math.imul(R,$)|0,H=H+Math.imul(P,u)|0,q=(q=q+Math.imul(P,d)|0)+Math.imul(C,u)|0,G=G+Math.imul(C,d)|0,H=H+Math.imul(x,b)|0,q=(q=q+Math.imul(x,w)|0)+Math.imul(M,b)|0,G=G+Math.imul(M,w)|0,H=H+Math.imul(S,k)|0,q=(q=q+Math.imul(S,A)|0)+Math.imul(E,k)|0,G=G+Math.imul(E,A)|0;_=(ee+(H+Math.imul(_,L)|0)|0)+((8191&(q=(q=q+Math.imul(_,O)|0)+Math.imul(v,L)|0))<<13)|0;ee=((G=G+Math.imul(v,O)|0)+(q>>>13)|0)+(_>>>26)|0,_&=67108863,H=Math.imul(D,Z),q=(q=Math.imul(D,$))+Math.imul(B,Z)|0,G=Math.imul(B,$),H=H+Math.imul(I,u)|0,q=(q=q+Math.imul(I,d)|0)+Math.imul(R,u)|0,G=G+Math.imul(R,d)|0,H=H+Math.imul(P,b)|0,q=(q=q+Math.imul(P,w)|0)+Math.imul(C,b)|0,G=G+Math.imul(C,w)|0,H=H+Math.imul(x,k)|0,q=(q=q+Math.imul(x,A)|0)+Math.imul(M,k)|0,G=G+Math.imul(M,A)|0;S=(ee+(H+Math.imul(S,L)|0)|0)+((8191&(q=(q=q+Math.imul(S,O)|0)+Math.imul(E,L)|0))<<13)|0;ee=((G=G+Math.imul(E,O)|0)+(q>>>13)|0)+(S>>>26)|0,S&=67108863,H=Math.imul(D,u),q=(q=Math.imul(D,d))+Math.imul(B,u)|0,G=Math.imul(B,d),H=H+Math.imul(I,b)|0,q=(q=q+Math.imul(I,w)|0)+Math.imul(R,b)|0,G=G+Math.imul(R,w)|0,H=H+Math.imul(P,k)|0,q=(q=q+Math.imul(P,A)|0)+Math.imul(C,k)|0,G=G+Math.imul(C,A)|0;x=(ee+(H+Math.imul(x,L)|0)|0)+((8191&(q=(q=q+Math.imul(x,O)|0)+Math.imul(M,L)|0))<<13)|0;ee=((G=G+Math.imul(M,O)|0)+(q>>>13)|0)+(x>>>26)|0,x&=67108863,H=Math.imul(D,b),q=(q=Math.imul(D,w))+Math.imul(B,b)|0,G=Math.imul(B,w),H=H+Math.imul(I,k)|0,q=(q=q+Math.imul(I,A)|0)+Math.imul(R,k)|0,G=G+Math.imul(R,A)|0;P=(ee+(H+Math.imul(P,L)|0)|0)+((8191&(q=(q=q+Math.imul(P,O)|0)+Math.imul(C,L)|0))<<13)|0;ee=((G=G+Math.imul(C,O)|0)+(q>>>13)|0)+(P>>>26)|0,P&=67108863,H=Math.imul(D,k),q=(q=Math.imul(D,A))+Math.imul(B,k)|0,G=Math.imul(B,A);I=(ee+(H+Math.imul(I,L)|0)|0)+((8191&(q=(q=q+Math.imul(I,O)|0)+Math.imul(R,L)|0))<<13)|0;ee=((G=G+Math.imul(R,O)|0)+(q>>>13)|0)+(I>>>26)|0,I&=67108863;L=(ee+Math.imul(D,L)|0)+((8191&(q=(q=Math.imul(D,O))+Math.imul(B,L)|0))<<13)|0;return ee=((G=Math.imul(B,O))+(q>>>13)|0)+(L>>>26)|0,L&=67108863,o[0]=K,o[1]=Q,o[2]=a,o[3]=y,o[4]=T,o[5]=n,o[6]=i,o[7]=e,o[8]=t,o[9]=s,o[10]=c,o[11]=f,o[12]=g,o[13]=_,o[14]=S,o[15]=x,o[16]=P,o[17]=I,o[18]=L,0!=ee&&(o[19]=ee,r.length++),r};function c(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,a&=67108863}r.words[o]=s,i=a,a=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function m(e,t,r){return c(e,t,r)}Math.imul||(u=l),g.prototype.mulTo=function(e,t){var r=this.length+e.length,t=(10===this.length&&10===e.length?u:r<63?l:r<1024?c:m)(this,e,t);return t},g.prototype.mul=function(e){var t=new g(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},g.prototype.mulf=function(e){var t=new g(null);return t.words=new Array(this.length+e.length),m(this,e,t)},g.prototype.imul=function(e){return this.clone().mulTo(e,this)},g.prototype.imuln=function(e){var t=e<0;y("number"==typeof(e=t?-e:e)),y(e<67108864);for(var r=0,i=0;i>=26,r+=n/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},g.prototype.muln=function(e){return this.clone().imuln(e)},g.prototype.sqr=function(){return this.mul(this)},g.prototype.isqr=function(){return this.imul(this.clone())},g.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>r%26&1;return t}(e);if(0===t.length)return new g(1);for(var r=this,i=0;i>>26-t<<26-t;if(0!=t){for(var n=0,o=0;o>>26-t}n&&(this.words[o]=n,this.length++)}if(0!=r){for(o=this.length-1;0<=o;o--)this.words[o+r]=this.words[o];for(o=0;o>>n<o)for(this.length-=o,l=0;l>>n,u=c&a}return s&&0!==u&&(s.words[s.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},g.prototype.ishrn=function(e,t,r){return y(0===this.negative),this.iushrn(e,t,r)},g.prototype.shln=function(e){return this.clone().ishln(e)},g.prototype.ushln=function(e){return this.clone().iushln(e)},g.prototype.shrn=function(e){return this.clone().ishrn(e)},g.prototype.ushrn=function(e){return this.clone().iushrn(e)},g.prototype.testn=function(e){y("number"==typeof e&&0<=e);var t=e%26,e=(e-t)/26;return!(this.length<=e)&&!!(this.words[e]&1<>>t<>26)-(s/67108864|0);this.words[o+r]=67108863&a}for(;o>26,this.words[o+r]=67108863&a;if(0===n)return this._strip();for(y(-1===n),o=n=0;o>26,this.words[o]=67108863&a;return this.negative=1,this._strip()},g.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var a,s=i.length-n.length;if("mod"!==t){(a=new g(null)).length=1+s,a.words=new Array(a.length);for(var l=0;lthis.length||this.cmp(e)<0?{div:new g(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new g(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new g(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,n,o},g.prototype.div=function(e){return this.divmod(e,"div",!1).div},g.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},g.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},g.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),e=e.andln(1),i=r.cmp(i);return i<0||1===e&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},g.prototype.modrn=function(e){var t=e<0;y((e=t?-e:e)<=67108863);for(var r=(1<<26)%e,i=0,n=this.length-1;0<=n;n--)i=(r*i+(0|this.words[n]))%e;return t?-i:i},g.prototype.modn=function(e){return this.modrn(e)},g.prototype.idivn=function(e){var t=e<0;y((e=t?-e:e)<=67108863);for(var r=0,i=this.length-1;0<=i;i--){var n=(0|this.words[i])+67108864*r;this.words[i]=n/e|0,r=n%e}return this._strip(),t?this.ineg():this},g.prototype.divn=function(e){return this.clone().idivn(e)},g.prototype.egcd=function(e){y(0===e.negative),y(!e.isZero());for(var t=this,r=e.clone(),t=0!==t.negative?t.umod(e):t.clone(),i=new g(1),n=new g(0),o=new g(0),a=new g(1),s=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++s;for(var l=r.clone(),u=t.clone();!t.isZero();){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(0>>26;n&=67108863,this.words[i]=n}return 0!==r&&(this.words[i]=r,this.length++),this},g.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},g.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this._strip(),e=1e.length)return 1;if(this.lengththis.n;);e=t>>22,n=o}0===(e.words[i-10]=n>>>=22)&&10>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},g._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return b[e]=t},T.prototype._verify1=function(e){y(0===e.negative,"red works only with positives"),y(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){y(0==(e.negative|t.negative),"red works only with positives"),y(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(o(e,e.umod(this.m)._forceRed(this)),e)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);t=e.add(t);return 0<=t.cmp(this.m)&&t.isub(this.m),t._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);t=e.iadd(t);return 0<=t.cmp(this.m)&&t.isub(this.m),t},T.prototype.sub=function(e,t){this._verify2(e,t);t=e.sub(t);return t.cmpn(0)<0&&t.iadd(this.m),t._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);t=e.isub(t);return t.cmpn(0)<0&&t.iadd(this.m),t},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(y(t%2==1),3===t){t=this.m.add(new g(1)).iushrn(2);return this.pow(e,t)}for(var r=this.m.subn(1),i=0;!r.isZero()&&0===r.andln(1);)i++,r.iushrn(1);y(!r.isZero());for(var n=new g(1).toRed(this),o=n.redNeg(),a=this.m.subn(1).iushrn(1),s=new g(2*(s=this.m.bitLength())*s).toRed(this);0!==this.pow(s,a).cmp(o);)s.redIAdd(o);for(var l=this.pow(s,r),u=this.pow(e,r.addn(1).iushrn(1)),c=this.pow(e,r),h=i;0!==c.cmp(n);){for(var d=c,f=0;0!==d.cmp(n);f++)d=d.redSqr();y(f>u&1;n!==r[0]&&(n=this.sqr(n)),0!=c||0!==o?(o<<=1,o|=c,(4===++a||0===i&&0===u)&&(n=this.mul(n,r[o]),o=a=0)):a=0}s=26}return n},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){e=e.clone();return e.red=null,e},g.mont=function(e){return new x(e)},r(x,T),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){e=this.imod(e.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;e=e.imul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new g(0)._forceRed(this);e=e.mul(t),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),e=e.isub(t).iushrn(this.shift),t=e;return 0<=e.cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:19}],18:[function(e,t,r){var i;function n(e){this.rand=e}if(t.exports=function(e){return(i=i||new n(null)).generate(e)},(t.exports.Rand=n).prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>>24]^c[p>>>16&255]^h[y>>>8&255]^d[255&g]^t[m++],a=u[p>>>24]^c[y>>>16&255]^h[g>>>8&255]^d[255&f]^t[m++],s=u[y>>>24]^c[g>>>16&255]^h[f>>>8&255]^d[255&p]^t[m++],l=u[g>>>24]^c[f>>>16&255]^h[p>>>8&255]^d[255&y]^t[m++],f=o,p=a,y=s,g=l;return o=(i[f>>>24]<<24|i[p>>>16&255]<<16|i[y>>>8&255]<<8|i[255&g])^t[m++],a=(i[p>>>24]<<24|i[y>>>16&255]<<16|i[g>>>8&255]<<8|i[255&f])^t[m++],s=(i[y>>>24]<<24|i[g>>>16&255]<<16|i[f>>>8&255]<<8|i[255&p])^t[m++],l=(i[g>>>24]<<24|i[f>>>16&255]<<16|i[p>>>8&255]<<8|i[255&y])^t[m++],[o>>>=0,a>>>=0,s>>>=0,l>>>=0]}var h=[0,1,2,4,8,16,32,64,128,27,54],d=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,l=0;l<256;++l){var u=s^s<<1^s<<2^s<<3^s<<4;r[a]=u=u>>>8^255&u^99;var c=e[i[u]=a],h=e[c],d=e[h],f=257*e[u]^16843008*u;n[0][a]=f<<24|f>>>8,n[1][a]=f<<16|f>>>16,n[2][a]=f<<8|f>>>24,n[3][a]=f,o[0][u]=(f=16843009*d^65537*h^257*c^16843008*a)<<24|f>>>8,o[1][u]=f<<16|f>>>16,o[2][u]=f<<8|f>>>24,o[3][u]=f,0===a?a=s=1:(a=c^e[e[e[d^c]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function s(e){this._key=i(e),this._reset()}s.blockSize=16,s.keySize=32,s.prototype.blockSize=s.blockSize,s.prototype.keySize=s.keySize,s.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,i=4*(r+1),n=[],o=0;o>>24)>>>24]<<24|d.SBOX[a>>>16&255]<<16|d.SBOX[a>>>8&255]<<8|d.SBOX[255&a],a^=h[o/t|0]<<24):6>>24]<<24|d.SBOX[a>>>16&255]<<16|d.SBOX[a>>>8&255]<<8|d.SBOX[255&a]),n[o]=n[o-t]^a}for(var s=[],l=0;l>>24]]^d.INV_SUB_MIX[1][d.SBOX[c>>>16&255]]^d.INV_SUB_MIX[2][d.SBOX[c>>>8&255]]^d.INV_SUB_MIX[3][d.SBOX[255&c]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=s},s.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,d.SUB_MIX,d.SBOX,this._nRounds)},s.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),e=n.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[1],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[3],12),e},s.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;t=a(e,this._invKeySchedule,d.INV_SUB_MIX,d.INV_SBOX,this._nRounds),e=n.allocUnsafe(16);return e.writeUInt32BE(t[0],0),e.writeUInt32BE(t[3],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[1],12),e},s.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=s},{"safe-buffer":187}],21:[function(e,t,r){var o=e("./aes"),a=e("safe-buffer").Buffer,s=e("cipher-base"),i=e("inherits"),l=e("./ghash"),n=e("buffer-xor"),u=e("./incr32");function c(e,t,r,i){s.call(this);var n=a.alloc(4,0);this._cipher=new o.AES(t);n=this._cipher.encryptBlock(n);this._ghash=new l(n),r=function(e,t,r){if(12===t.length)return e._finID=a.concat([t,a.from([0,0,0,1])]),a.concat([t,a.from([0,0,0,2])]);var i=new l(r),n=t.length,r=n%16;return i.update(t),r&&i.update(a.alloc(r=16-r,0)),i.update(a.alloc(8,0)),r=8*n,(n=a.alloc(8)).writeUIntBE(r,0,8),i.update(n),e._finID=i.state,e=a.from(e._finID),u(e),e}(this,r,n),this._prev=a.from(r),this._cache=a.allocUnsafe(0),this._secCache=a.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}i(c,s),c.prototype._update=function(e){this._called||!this._alen||(t=16-this._alen%16)<16&&(t=a.alloc(t,0),this._ghash.update(t)),this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},c.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=n(this._ghash["final"](8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var i=Math.min(e.length,t.length),n=0;n>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function o(e){this.h=e,this.state=i.alloc(16,0),this.cache=i.allocUnsafe(0)}o.prototype.ghash=function(e){for(var t=-1;++t>>1|(1&i[t-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=a(n)},o.prototype.update=function(e){var t;for(this.cache=i.concat([this.cache,e]);16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},o.prototype["final"]=function(e,t){return this.cache.length&&this.ghash(i.concat([this.cache,n],16)),this.ghash(a([0,e,0,t])),this.state},t.exports=o},{"safe-buffer":187}],26:[function(e,t,r){t.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},{}],27:[function(e,t,r){var i=e("buffer-xor");r.encrypt=function(e,t){t=i(t,e._prev);return e._prev=e._cipher.encryptBlock(t),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;t=e._cipher.decryptBlock(t);return i(t,r)}},{"buffer-xor":63}],28:[function(e,t,r){var o=e("safe-buffer").Buffer,a=e("buffer-xor");function s(e,t,r){var i=t.length,n=a(t,e._cache);return e._cache=e._cache.slice(i),e._prev=o.concat([e._prev,r?t:n]),n}r.encrypt=function(e,t,r){for(var i,n=o.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=o.allocUnsafe(0)),!(e._cache.length<=t.length)){n=o.concat([n,s(e,t,r)]);break}i=e._cache.length,n=o.concat([n,s(e,t.slice(0,i),r)]),t=t.slice(i)}return n}},{"buffer-xor":63,"safe-buffer":187}],29:[function(e,t,r){var s=e("safe-buffer").Buffer;function a(e,t,r){for(var i,n,o=-1,a=0;++o<8;)a+=(128&(n=e._cipher.encryptBlock(e._prev)[0]^(i=t&1<<7-o?128:0)))>>o%8,e._prev=function(e,t){var r=e.length,i=-1,n=s.allocUnsafe(e.length);e=s.concat([e,s.from([t])]);for(;++i>7;return n}(e._prev,r?i:n);return a}r.encrypt=function(e,t,r){for(var i=t.length,n=s.allocUnsafe(i),o=-1;++o=t)throw new Error("invalid sig")}t.exports=function(e,t,r,i,n){if("ec"===(r=f(r)).type){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");return function(e,t,r){var i=p[r.data.algorithm.curve.join(".")];if(!i)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));i=new d(i),r=r.data.subjectPrivateKey.data;return i.verify(t,e,r)}(e,t,r)}if("dsa"===r.type){if("dsa"!==i)throw new Error("wrong public key type");return function(e,t,r){var i=r.data.p,n=r.data.q,o=r.data.g,a=r.data.pub_key,s=f.signature.decode(e,"der"),r=s.s,e=s.r;y(r,n),y(e,n);s=h.mont(i),r=r.invm(n);return 0===o.toRed(s).redPow(new h(t).mul(r).mod(n)).fromRed().mul(a.toRed(s).redPow(e.mul(r).mod(n)).fromRed()).mod(i).mod(n).cmp(e)}(e,t,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong public key type");t=c.concat([n,t]);for(var o=r.modulus.byteLength(),a=[1],s=0;t.length+a.length+2o.length)&&(s=o.length),t=o.substring(s-a.length,s)===a?"The ".concat(e," ").concat(i," ").concat(l(t,"type")):(n=(n="number"!=typeof n?0:n)+(s=".").length>(a=e).length||-1===a.indexOf(s,n)?"argument":"property",'The "'.concat(e,'" ').concat(n," ").concat(i," ").concat(l(t,"type"))),t+=". Received type ".concat(typeof r)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],48:[function(c,h,e){!function(u){!function(){"use strict";var e=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r};h.exports=a;var t=c("./_stream_readable"),r=c("./_stream_writable");c("inherits")(a,t);for(var i=e(r.prototype),n=0;nt.highWaterMark&&(t.highWaterMark=(E<=(r=e)?r=E:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function x(e){var t=e._readableState;y("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,U.nextTick(M,e))}function M(e){var t=e._readableState;y("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,R(e)}function k(e,t){t.readingMore||(t.readingMore=!0,U.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;y("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,U.nextTick(B,t,e))}function B(e,t){y("endReadableNT",e.endEmitted,e.length),e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"),!e.autoDestroy||(!(e=t._writableState)||e.autoDestroy&&e.finished)&&t.destroy())}function O(e,t){for(var r=0,i=e.length;r=t.highWaterMark:0>>0),o=this.head,a=0;o;)t=o.data,r=n,i=a,s.prototype.copy.call(t,r,i),a+=o.data.length,o=o.next;return n}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(o===n.length?i+=n:i+=n.slice(0,e),0===(e-=o)){o===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=n.slice(o);break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0===(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r).data=n.slice(o);break}++i}return this.length-=i,t}},{key:u,value:function(e,t){return l(this,n({},t,{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),i&&a(t,i),e}()},{buffer:64,util:19}],55:[function(e,t,r){!function(l){!function(){"use strict";function o(e,t){s(e,t),a(e)}function a(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,l.nextTick(s,this,e)):l.nextTick(s,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?l.nextTick(a,r):(r._writableState.errorEmitted=!0,l.nextTick(o,r,e)):l.nextTick(o,r,e):t?(l.nextTick(a,r),t(e)):l.nextTick(a,r)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,i=e._writableState;r&&r.autoDestroy||i&&i.autoDestroy?e.destroy(t):e.emit("error",t)}}}.call(this)}.call(this,e("_process"))},{_process:162}],56:[function(e,t,r){"use strict";var m=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function b(){}t.exports=function e(t,r,i){if("function"==typeof r)return e(t,null,r);var n,o;n=i||b,o=!1,i=function(){if(!o){o=!0;for(var e=arguments.length,t=new Array(e),r=0;r>>1;case"base64":return C(e).length;default:if(n)return i?-1:P(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var i,n,o,a=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((r=void 0===r||r>this.length?this.length:r)<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":return function(e,t,r){var i=e.length;(!t||t<0)&&(t=0);(!r||r<0||i=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=h.from(t,i)),h.isBuffer(t))return 0===t.length?-1:m(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(n?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):m(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function m(e,t,r,i,n){var o=1,a=e.length,s=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n)for(var u=-1,c=r;c>8,i=i%256,n.push(i),n.push(r);return n}(t,e.length-r),e,r,i)}function v(e,t,r){r=Math.min(e.length,r);for(var i=[],n=t;n>>10&1023|55296),c=56320|1023&c),i.push(c),n+=h}return function(e){var t=e.length;if(t<=w)return String.fromCharCode.apply(String,e);var r="",i=0;for(;it&&(e+=" ... "),""},h.prototype.compare=function(e,t,r,i,n){if(I(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),(t=void 0===t?0:t)<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(n<=i&&r<=t)return 0;if(n<=i)return-1;if(r<=t)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(i>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(i,n),u=e.slice(t,r),c=0;c>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-t;if((void 0===r||nthis.length)throw new RangeError("Attempt to write outside buffer bounds");i=i||"utf8";for(var o,a,s,l=!1;;)switch(i){case"hex":return function(e,t,r,i){r=Number(r)||0;var n=e.length-r;(!i||n<(i=Number(i)))&&(i=n),(n=t.length)/2e.length)throw new RangeError("Index out of range")}function T(e,t,r,i){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(e,t,r,i,n){return t=+t,r>>>=0,n||T(e,0,r,4),o.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,n){return t=+t,r>>>=0,n||T(e,0,r,8),o.write(e,t,r,i,52,8),r+8}h.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):r>>=0,t>>>=0,r||S(e,t,this.length);for(var i=this[e],n=1,o=0;++o>>=0,t>>>=0,r||S(e,t,this.length);for(var i=this[e+--t],n=1;0>>=0,t||S(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||S(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||S(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||S(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||S(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||S(e,t,this.length);for(var i=this[e],n=1,o=0;++o>>=0,t>>>=0,r||S(e,t,this.length);for(var i=t,n=1,o=this[e+--i];0>>=0,t||S(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||S(e,2,this.length);e=this[e]|this[e+1]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt16BE=function(e,t){e>>>=0,t||S(e,2,this.length);e=this[e+1]|this[e]<<8;return 32768&e?4294901760|e:e},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||S(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||S(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||S(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||S(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||S(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||S(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,r,i){e=+e,t>>>=0,r>>>=0,i||E(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,i||E(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[t+n]=255&e;0<=--n&&(o*=256);)this[t+n]=e/o&255;return t+r},h.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeIntLE=function(e,t,r,i){e=+e,t>>>=0,i||E(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var n=0,o=1,a=0;for(this[t]=255&e;++n>0)-a&255;return t+r},h.prototype.writeIntBE=function(e,t,r,i){e=+e,t>>>=0,i||E(this,e,t,r,(i=Math.pow(2,8*r-1))-1,-i);var n=r-1,o=1,a=0;for(this[t+n]=255&e;0<=--n&&(o*=256);)e<0&&0===a&&0!==this[t+n+1]&&(a=1),this[t+n]=(e/o>>0)-a&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||E(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},h.prototype.writeFloatLE=function(e,t,r){return x(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return x(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,i){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,i||0===i||(i=this.length),t>=e.length&&(t=e.length),(i=0=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length);var n=(i=e.length-t>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(o=t;o>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function C(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function A(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function I(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function R(e){return e!=e}},{"base64-js":16,ieee754:141}],65:[function(e,t,r){var i=e("safe-buffer").Buffer,n=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){n.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this["final"]=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,n),a.prototype.update=function(e,t,r){"string"==typeof e&&(e=i.from(e,t));e=this._update(e);return this.hashMode?this:r?this._toString(e,r):e},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,r){var i;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){i=e}finally{r(i)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||i.alloc(0);return t=e?this._toString(t,e,!0):t},a.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");e=this._decoder.write(e);return r&&(e+=this._decoder.end()),e},t.exports=a},{inherits:142,"safe-buffer":187,stream:197,string_decoder:198}],66:[function(e,t,r){!function(e){!function(){function t(e){return Object.prototype.toString.call(e)}r.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},r.isBoolean=function(e){return"boolean"==typeof e},r.isNull=function(e){return null===e},r.isNullOrUndefined=function(e){return null==e},r.isNumber=function(e){return"number"==typeof e},r.isString=function(e){return"string"==typeof e},r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=function(e){return void 0===e},r.isRegExp=function(e){return"[object RegExp]"===t(e)},r.isObject=function(e){return"object"==typeof e&&null!==e},r.isDate=function(e){return"[object Date]"===t(e)},r.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},r.isFunction=function(e){return"function"==typeof e},r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e.isBuffer}.call(this)}.call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":143}],67:[function(e,s,t){!function(a){!function(){var t=e("elliptic"),r=e("bn.js");s.exports=function(e){return new n(e)};var i={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function n(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function o(e,t,r){Array.isArray(e)||(e=e.toArray());e=new a(e);return r&&e.lengthr?t=("rmd160"===e?new l:u(e)).update(t).digest():t.length>>2]>>>24-o%4*8&255;t[i+o>>>2]|=a<<24-(i+o)%4*8}else for(o=0;o>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=o.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-i%8*4;return new c.init(r,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,i=[],n=0;n>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(e){for(var t=e.length,r=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-i%4*8;return new c.init(r,t)}},h=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=n.BufferedBlockAlgorithm=o.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=h.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,r=this._data,i=r.words,n=r.sigBytes,o=this.blockSize,a=n/(4*o),s=(a=e?u.ceil(a):u.max((0|a)-this._minBufferSize,0))*o,n=u.min(4*s,n);if(s){for(var l=0;l>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s>>6*(3-s)&63));var l=i.charAt(64);if(l)for(;n.length%4;)n.push(l);return n.join("")},parse:function(e){var t=e.length,r=this._map;if(!(i=this._reverseMap))for(var i=this._reverseMap=[],n=0;n>>6-o%4*2,s=a|s,i[n>>>2]|=s<<24-n%4*8,n++)}return l.create(i,n)}(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.enc.Base64},"object"==typeof r?t.exports=r=n(e("crypto-js/core")):"function"==typeof define&&define.amd?define(["crypto-js/core"],n):n(i.CryptoJS)},{"crypto-js/core":74}],76:[function(e,t,r){var i,n;i=this,n=function(e){return e.enc.Utf8},"object"==typeof r?t.exports=r=n(e("crypto-js/core")):"function"==typeof define&&define.amd?define(["crypto-js/core"],n):n(i.CryptoJS)},{"crypto-js/core":74}],77:[function(e,t,r){var i,n;i=this,n=function(e){return e.HmacSHA1},"object"==typeof r?t.exports=r=n(e("crypto-js/core"),e("crypto-js/sha1"),e("crypto-js/hmac")):"function"==typeof define&&define.amd?define(["crypto-js/core","crypto-js/sha1","crypto-js/hmac"],n):n(i.CryptoJS)},{"crypto-js/core":74,"crypto-js/hmac":78,"crypto-js/sha1":79}],78:[function(e,t,r){var i,n;i=this,n=function(e){var t,s;t=e.lib.Base,s=e.enc.Utf8,e.algo.HMAC=t.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));var r=e.blockSize,i=4*r;(t=t.sigBytes>i?e.finalize(t):t).clamp();for(var e=this._oKey=t.clone(),t=this._iKey=t.clone(),n=e.words,o=t.words,a=0;a>>31);var u=(i<<5|i>>>27)+s+c[l];u+=l<20?1518500249+(n&o|~n&a):l<40?1859775393+(n^o^a):l<60?(n&o|n&a|o&a)-1894007588:(n^o^a)-899497514,s=a,a=o,o=n<<30|n>>>2,n=i,i=u}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+a|0,r[4]=r[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),t[15+(64+i>>>9<<4)]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA1=n._createHelper(r),t.HmacSHA1=n._createHmacHelper(r),e.SHA1},"object"==typeof r?t.exports=r=n(e("crypto-js/core")):"function"==typeof define&&define.amd?define(["crypto-js/core"],n):n(i.CryptoJS)},{"crypto-js/core":74}],80:[function(e,t,r){"use strict";r.utils=e("./des/utils"),r.Cipher=e("./des/cipher"),r.DES=e("./des/des"),r.CBC=e("./des/cbc"),r.EDE=e("./des/ede")},{"./des/cbc":81,"./des/cipher":82,"./des/des":83,"./des/ede":84,"./des/utils":85}],81:[function(e,t,r){"use strict";var i=e("minimalistic-assert"),o=e("inherits"),a={};function n(e){i.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t>>1],r=c.r28shl(r,o),i=c.r28shl(i,o);c.pc2(r,i,e.keys,n)}},s.prototype._update=function(e,t,r,i){var n=this._desState,o=c.readUInt32BE(e,t),t=c.readUInt32BE(e,t+4);c.ip(o,t,n.tmp,0),o=n.tmp[0],t=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,t,n.tmp,0):this._decrypt(n,o,t,n.tmp,0),o=n.tmp[0],t=n.tmp[1],c.writeUInt32BE(r,o,i),c.writeUInt32BE(r,t,i+4)},s.prototype._pad=function(e,t){for(var r=e.length-t,i=t;i>>0,o=u}c.rip(a,o,i,n)},s.prototype._decrypt=function(e,t,r,i,n){for(var o=r,a=t,s=e.keys.length-2;0<=s;s-=2){var l=e.keys[s],u=e.keys[s+1];c.expand(o,e.tmp,0),l^=e.tmp[0],u^=e.tmp[1];l=c.substitute(l,u),u=o,o=(a^c.permute(l))>>>0,a=u}c.rip(o,a,i,n)}},{"./cipher":82,"./utils":85,inherits:142,"minimalistic-assert":148}],84:[function(e,t,r){"use strict";var n=e("minimalistic-assert"),i=e("inherits"),o=e("./cipher"),a=e("./des");function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),t=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:r}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:t})]:[a.create({type:"decrypt",key:t}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:r})]}function l(e){o.call(this,e);e=new s(this.type,this.options.key);this._edeState=e}i(l,o),(t.exports=l).create=function(e){return new l(e)},l.prototype._update=function(e,t,r,i){var n=this._edeState;n.ciphers[0]._update(e,t,r,i),n.ciphers[1]._update(r,i,r,i),n.ciphers[2]._update(r,i,r,i)},l.prototype._pad=a.prototype._pad,l.prototype._unpad=a.prototype._unpad},{"./cipher":82,"./des":83,inherits:142,"minimalistic-assert":148}],85:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,i){for(var n=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o<<=1,o|=t>>>s+a&1;for(s=1;s<=25;s+=8)o<<=1,o|=e>>>s+a&1}r[i+0]=n>>>0,r[i+1]=o>>>0},r.rip=function(e,t,r,i){for(var n=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)n<<=1,n|=t>>>s+a&1,n<<=1,n|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.pc1=function(e,t,r,i){for(var n=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(s=0;s<=24;s+=8)n<<=1,n|=e>>s+a&1}for(s=0;s<=24;s+=8)n<<=1,n|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.r28shl=function(e,t){return e<>>28-t};var l=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var n=0,o=0,a=l.length>>>1,s=0;s>>l[s]&1;for(s=a;s>>l[s]&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r.expand=function(e,t,r){for(var i=0,n=0,i=(1&e)<<5|e>>>27,o=23;15<=o;o-=4)i<<=6,i|=e>>>o&63;for(o=11;3<=o;o-=4)n|=e>>>o&63,n<<=6;n|=(31&e)<<1|e>>>31,t[r+0]=i>>>0,t[r+1]=n>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>i[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var i=e.toString(2);i.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(l),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(h).cmp(d);)r.iadd(p)}else for(;r.mod(a).cmp(f);)r.iadd(p);if(g(i=r.shrn(1))&&g(r)&&m(i)&&m(r)&&s.test(i)&&s.test(r))return r}}},{"bn.js":90,"miller-rabin":146,randombytes:170}],89:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],90:[function(e,t,r){arguments[4][15][0].apply(r,arguments)},{buffer:19,dup:15}],91:[function(e,t,r){"use strict";r.version=e("../package.json").version,r.utils=e("./elliptic/utils"),r.rand=e("brorand"),r.curve=e("./elliptic/curve"),r.curves=e("./elliptic/curves"),r.ec=e("./elliptic/ec"),r.eddsa=e("./elliptic/eddsa")},{"../package.json":107,"./elliptic/curve":94,"./elliptic/curves":97,"./elliptic/ec":98,"./elliptic/eddsa":101,"./elliptic/utils":105,brorand:18}],92:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../utils"),x=n.getNAF,M=n.getJSF,h=n.assert;function o(e,t){this.type=e,this.p=new i(t.p,16),this.red=t.prime?i.red(t.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=t.n&&new i(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;t=this.n&&this.p.div(this.n);!t||0>1]):a.mixedAdd(n[-u-1>>1].neg()):0>1]):a.add(n[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},o.prototype._wnafMulAdd=function(e,t,r,i,n){for(var o=this._wnafT1,a=this._wnafT2,s=this._wnafT3,l=0,u=0;u>1]:T<0&&(c=a[E][-T-1>>1].neg()),_="affine"===c.type?_.mixedAdd(c):_.add(c))}}for(u=0;u=Math.ceil((e.bitLength()+1)/t.step)},a.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n":""},u.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},u.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=(r=this.z.redSqr()).redIAdd(r),i=this.curve._mulA(e),n=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=i.redAdd(t),e=o.redSub(r),r=i.redSub(t),i=n.redMul(e),t=o.redMul(r),r=n.redMul(r),o=e.redMul(o);return this.curve.point(i,t,o,r)},u.prototype._projDbl=function(){var e,t,r,i,n,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),l=this.y.redSqr();return o=this.curve.twisted?(n=(i=this.curve._mulA(s)).redAdd(l),this.zOne?(e=a.redSub(s).redSub(l).redMul(n.redSub(this.curve.two)),t=n.redMul(i.redSub(l)),n.redSqr().redSub(n).redSub(n)):(r=this.z.redSqr(),o=n.redSub(r).redISub(r),e=a.redSub(s).redISub(l).redMul(o),t=n.redMul(i.redSub(l)),n.redMul(o))):(i=s.redAdd(l),r=this.curve._mulC(this.z).redSqr(),o=i.redSub(r).redSub(r),e=this.curve._mulC(a.redISub(i)).redMul(o),t=this.curve._mulC(i).redMul(s.redISub(l)),i.redMul(o)),this.curve.point(e,t,o)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},u.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),n=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),e=n.redSub(i),n=n.redAdd(i),i=r.redAdd(t),r=o.redMul(e),t=n.redMul(i),i=o.redMul(i),n=e.redMul(n);return this.curve.point(r,t,n,i)},u.prototype._projAdd=function(e){var t,r=this.z.redMul(e.z),i=r.redSqr(),n=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(n).redMul(o),s=i.redSub(a),a=i.redAdd(a),e=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(n).redISub(o),e=r.redMul(s).redMul(e),a=this.curve.twisted?(t=r.redMul(a).redMul(o.redSub(this.curve._mulA(n))),s.redMul(a)):(t=r.redMul(a).redMul(o.redSub(n)),this.curve._mulC(s).redMul(a));return this.curve.point(e,t,a)},u.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},u.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},u.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},u.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},u.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},u.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()},u.prototype.getY=function(){return this.normalize(),this.y.fromRed()},u.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},u.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}},u.prototype.toP=u.prototype.normalize,u.prototype.mixedAdd=u.prototype.add},{"../utils":105,"./base":92,"bn.js":106,inherits:142}],94:[function(e,t,r){"use strict";r.base=e("./base"),r["short"]=e("./short"),r.mont=e("./mont"),r.edwards=e("./edwards")},{"./base":92,"./edwards":93,"./mont":95,"./short":96}],95:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("inherits"),o=e("./base"),a=e("../utils");function s(e){o.call(this,"mont",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.i4=new i(4).toRed(this.red).redInvm(),this.two=new i(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new i(t,16),this.z=new i(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}n(s,o),(t.exports=s).prototype.validate=function(e){var t=e.normalize().x,e=t.redSqr(),t=e.redMul(t).redAdd(e.redMul(this.a)).redAdd(t);return 0===t.redSqrt().redSqr().cmp(t)},n(l,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new l(this,e,t)},s.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.prototype.inspect=function(){return this.isInfinity()?"":""},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),e=e.redMul(t),r=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(e,r)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=e.x.redAdd(e.z),r=e.x.redSub(e.z).redMul(r),n=n.redMul(i),i=t.z.redMul(r.redAdd(n).redSqr()),n=t.x.redMul(r.redISub(n).redSqr());return this.curve.point(i,n)},l.prototype.mul=function(e){for(var t=e.clone(),r=this,i=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var o=n.length-1;0<=o;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":105,"./base":92,"bn.js":106,inherits:142}],96:[function(e,t,r){"use strict";var i=e("../utils"),_=e("bn.js"),n=e("inherits"),o=e("./base"),a=i.assert;function s(e){o.call(this,"short",e),this.a=new _(e.a,16).toRed(this.red),this.b=new _(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function l(e,t,r,i){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new _(t,16),this.y=new _(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function u(e,t,r,i){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new _(0)):(this.x=new _(t,16),this.y=new _(r,16),this.z=new _(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}n(s,o),(t.exports=s).prototype._getEndomorphism=function(e){var t,r,i;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return r=(e.beta?new _(e.beta,16):r=(i=this._getEndoRoots(this.p))[0].cmp(i[1])<0?i[0]:i[1]).toRed(this.red),e.lambda?t=new _(e.lambda,16):(i=this._getEndoRoots(this.n),0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(r))?t=i[0]:(t=i[1],a(0===this.g.mul(t).x.cmp(this.g.x.redMul(r))))),{beta:r,lambda:t,basis:e.basis?e.basis.map(function(e){return{a:new _(e.a,16),b:new _(e.b,16)}}):this._getEndoBasis(t)}},s.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:_.mont(e),r=new _(2).toRed(t).redInvm(),e=r.redNeg(),r=new _(3).toRed(t).redNeg().redSqrt().redMul(r);return[e.redAdd(r).fromRed(),e.redSub(r).fromRed()]},s.prototype._getEndoBasis=function(e){for(var t,r,i,n,o,a=this.n.ushrn(Math.floor(this.n.bitLength()/2)),s=e,l=this.n.clone(),u=new _(1),c=new _(0),h=new _(0),d=new _(1),f=0;0!==s.cmpn(0);){var p=l.div(s),y=l.sub(p.mul(s)),g=h.sub(p.mul(u)),p=d.sub(p.mul(c));if(!i&&y.cmp(a)<0)t=o.neg(),r=u,i=y.neg(),n=g;else if(i&&2==++f)break;l=s,s=o=y,h=u,u=g,d=c,c=p}var m=y.neg(),b=g,e=i.sqr().add(n.sqr());return 0<=m.sqr().add(b.sqr()).cmp(e)&&(m=t,b=r),i.negative&&(i=i.neg(),n=n.neg()),m.negative&&(m=m.neg(),b=b.neg()),[{a:i,b:n},{a:m,b:b}]},s.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],i=t[1],n=i.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=n.mul(r.a),t=o.mul(i.a),r=n.mul(r.b),i=o.mul(i.b);return{k1:e.sub(a).sub(t),k2:r.add(i).neg()}},s.prototype.pointFromX=function(e,t){var r=(e=!(e=new _(e,16)).red?e.toRed(this.red):e).redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},s.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,e=this.a.redMul(t),e=t.redSqr().redMul(t).redIAdd(e).redIAdd(this.b);return 0===r.redSqr().redISub(e).cmpn(0)},s.prototype._endoWnafMulAdd=function(e,t,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},l.prototype.isInfinity=function(){return this.inf},l.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y),e=(t=0!==t.cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x),t=t.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},l.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),e=e.redInvm(),t=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(e),e=t.redSqr().redISub(this.x.redAdd(this.x)),t=t.redMul(this.x.redSub(e)).redISub(this.y);return this.curve.point(e,t)},l.prototype.getX=function(){return this.x.fromRed()},l.prototype.getY=function(){return this.y.fromRed()},l.prototype.mul=function(e){return e=new _(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},l.prototype.mulAdd=function(e,t,r){t=[this,t],r=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,r):this.curve._wnafMulAdd(1,t,r,2)},l.prototype.jmulAdd=function(e,t,r){t=[this,t],r=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(t,r,!0):this.curve._wnafMulAdd(1,t,r,2,!0)},l.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},l.prototype.neg=function(e){if(this.inf)return this;var t,r=this.curve.point(this.x,this.y.redNeg());return e&&this.precomputed&&(t=this.precomputed,e=function(e){return e.neg()},r.precomputed={naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(e)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(e)}}),r},l.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},n(u,o.BasePoint),s.prototype.jpoint=function(e,t,r){return new u(this,e,t,r)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),e=this.y.redMul(t).redMul(e);return this.curve.point(r,e)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(t),n=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),t=i.redSub(n),r=o.redSub(a);if(0===t.cmpn(0))return 0!==r.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();n=t.redSqr(),a=n.redMul(t),i=i.redMul(n),n=r.redSqr().redIAdd(a).redISub(i).redISub(i),a=r.redMul(i.redISub(n)).redISub(o.redMul(a)),t=this.z.redMul(e.z).redMul(t);return this.curve.jpoint(n,a,t)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,i=e.x.redMul(t),n=this.y,o=e.y.redMul(t).redMul(this.z),e=r.redSub(i),t=n.redSub(o);if(0===e.cmpn(0))return 0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();i=e.redSqr(),o=i.redMul(e),r=r.redMul(i),i=t.redSqr().redIAdd(o).redISub(r).redISub(r),o=t.redMul(r.redISub(i)).redISub(n.redMul(o)),e=this.z.redMul(e);return this.curve.jpoint(i,o,e)},u.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r":""},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":105,"./base":92,"bn.js":106,inherits:142}],97:[function(e,t,r){"use strict";var i,n=r,r=e("hash.js"),o=e("./curve"),a=e("./utils").assert;function s(e){"short"===e.type?this.curve=new o["short"](e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function l(t,r){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){var e=new s(r);return Object.defineProperty(n,t,{configurable:!0,enumerable:!0,value:e}),e}})}n.PresetCurve=s,l("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),l("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),l("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),l("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),l("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),l("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),l("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{i=e("./precomputed/secp256k1")}catch(e){i=void 0}l("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",i]})},{"./curve":94,"./precomputed/secp256k1":104,"./utils":105,"hash.js":128}],98:[function(e,t,r){"use strict";var d=e("bn.js"),f=e("hmac-drbg"),i=e("../utils"),n=e("../curves"),o=e("brorand"),s=i.assert,a=e("./key"),p=e("./signature");function l(e){if(!(this instanceof l))return new l(e);"string"==typeof e&&(s(Object.prototype.hasOwnProperty.call(n,e),"Unknown curve "+e),e=n[e]),e instanceof n.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=l).prototype.keyPair=function(e){return new a(this,e)},l.prototype.keyFromPrivate=function(e,t){return a.fromPrivate(this,e,t)},l.prototype.keyFromPublic=function(e,t){return a.fromPublic(this,e,t)},l.prototype.genKeyPair=function(e){for(var t=new f({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),i=this.n.sub(new d(2));;){var n=new d(t.generate(r));if(!(0>1;if(0<=a.cmp(this.curve.p.umod(this.curve.n))&&r)throw new Error("Unable to find sencond key candinate");a=r?this.curve.pointFromX(a.add(this.curve.n),e):this.curve.pointFromX(a,e),t=t.r.invm(n),o=n.sub(o).mul(t).umod(n),n=i.mul(t).umod(n);return this.g.mulAdd(o,a,n)},l.prototype.getKeyRecoveryParam=function(e,t,r,i){if(null!==(t=new p(t,i)).recoveryParam)return t.recoveryParam;for(var n,o=0;o<4;o++){try{n=this.recoverPubKey(e,t,o)}catch(e){continue}if(n.eq(r))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":97,"../utils":105,"./key":99,"./signature":100,"bn.js":106,brorand:18,"hmac-drbg":140}],99:[function(e,t,r){"use strict";var i=e("bn.js"),n=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?n(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||n(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||n(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return""}},{"../utils":105,"bn.js":106}],100:[function(e,t,r){"use strict";var n=e("bn.js"),o=e("../utils"),i=o.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(i(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function l(e,t){var r=e[t.place++];if(!(128&r))return r;var i=15&r;if(0==i||4>>=0;return!(n<=127)&&(t.place=a,n)}function u(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}(t.exports=a).prototype._importDER=function(e,t){e=o.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var i=l(e,r);if(!1===i)return!1;if(i+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;t=l(e,r);if(!1===t)return!1;i=e.slice(r.place,t+r.place);if(r.place+=t,2!==e[r.place++])return!1;t=l(e,r);if(!1===t)return!1;if(e.length!==t+r.place)return!1;r=e.slice(r.place,t+r.place);if(0===i[0]){if(!(128&i[1]))return!1;i=i.slice(1)}if(0===r[0]){if(!(128&r[1]))return!1;r=r.slice(1)}return this.r=new n(i),this.s=new n(r),!(this.recoveryParam=null)},a.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=u(t),r=u(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];c(i,t.length),(i=i.concat(t)).push(2),c(i,r.length);t=i.concat(r),i=[48];return c(i,t.length),i=i.concat(t),o.encode(i,e)}},{"../utils":105,"bn.js":106}],101:[function(e,t,r){"use strict";var i=e("hash.js"),n=e("../curves"),o=e("../utils"),a=o.assert,s=o.parseBytes,l=e("./key"),u=e("./signature");function c(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof c))return new c(e);e=n[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}(t.exports=c).prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),i=this.hashInt(r.messagePrefix(),e),n=this.g.mul(i),t=this.encodePoint(n),r=this.hashInt(t,r.pubBytes(),e).mul(r.priv()),r=i.add(r).umod(this.curve.n);return this.makeSignature({R:n,S:r,Rencoded:t})},c.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var i=this.keyFromPublic(r),r=this.hashInt(t.Rencoded(),i.pubBytes(),e),e=this.g.mul(t.S());return t.R().add(i.pub().mul(r)).eq(e)},c.prototype.hashInt=function(){for(var e=this.hash(),t=0;t>1)-1>1)-l:l):s=0,i[a]=s,o.iushrn(1)}return i},i.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var i,n=0,o=0;0i&&(o.warned=!0,(i=new Error("Possible EventEmitter memory leak detected. "+o.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.')).name="MaxListenersExceededWarning",i.emitter=e,i.type=t,i.count=o.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",i.name,i.message))):(o=n[t]=r,++e._eventsCount),e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;tt.offsetHeight){e.fastClickScrollParent=r=t;break}}while(t=t.parentElement)}r&&(r.fastClickLastScrollTop=r.scrollTop)},a.prototype.getTargetElementFromEventTarget=function(e){return e.nodeType===Node.TEXT_NODE?e.parentNode:e},a.prototype.onTouchStart=function(e){var t,r,i;if(1e||Math.abs(t.pageY-this.touchStartY)>e},a.prototype.onTouchMove=function(e){return this.trackingClick&&(this.targetElement===this.getTargetElementFromEventTarget(e.target)&&!this.touchHasMoved(e)||(this.trackingClick=!1,this.targetElement=null)),!0},a.prototype.findControl=function(e){return void 0!==e.control?e.control:e.htmlFor?document.getElementById(e.htmlFor):e.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},a.prototype.onTouchEnd=function(e){var t,r,i,n,o=this.targetElement;if(!this.trackingClick)return!0;if(e.timeStamp-this.lastClickTimethis.tapTimeout)return!0;if(this.cancelNextClick=!1,this.lastClickTime=e.timeStamp,t=this.trackingClickStart,this.trackingClick=!1,this.trackingClickStart=0,c&&(n=e.changedTouches[0],(o=document.elementFromPoint(n.pageX-window.pageXOffset,n.pageY-window.pageYOffset)||o).fastClickScrollParent=this.targetElement.fastClickScrollParent),"label"===(r=o.tagName.toLowerCase())){if(n=this.findControl(o)){if(this.focus(o),s)return!1;o=n}}else if(this.needsFocus(o))return 100=this._blockSize;){for(var n=this._blockOffset;n=this._delta8){t=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-t,this.endian);for(var r=0;r>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e}else for(i[n++]=255&e,i[n++]=e>>>8&255,i[n++]=e>>>16&255,i[n++]=e>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;othis.blockSize&&(e=(new this.Hash).update(e).digest()),n(e.length<=this.blockSize);for(var t=e.length;t>>3},r.g1_256=function(e){return i(e,17)^i(e,19)^e>>>10}},{"../utils":139}],139:[function(e,t,r){"use strict";var l=e("minimalistic-assert"),e=e("inherits");function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function i(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}r.inherits=e,r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r,i,n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a>6|192,n[o++]=63&s|128):(i=a,55296!=(64512&(r=e).charCodeAt(i))||i<0||i+1>=r.length||56320!=(64512&r.charCodeAt(i+1))?n[o++]=s>>12|224:(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),n[o++]=s>>18|240,n[o++]=s>>12&63|128),n[o++]=s>>6&63|128,n[o++]=63&s|128)}else for(a=0;a>>0}return n},r.split32=function(e,t){for(var r=new Array(4*e.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},r.rotr32=function(e,t){return e>>>t|e<<32-t},r.rotl32=function(e,t){return e<>>32-t},r.sum32=function(e,t){return e+t>>>0},r.sum32_3=function(e,t,r){return e+t+r>>>0},r.sum32_4=function(e,t,r,i){return e+t+r+i>>>0},r.sum32_5=function(e,t,r,i,n){return e+t+r+i+n>>>0},r.sum64=function(e,t,r,i){var n=e[t],o=i+e[t+1]>>>0;e[t]=(o>>0,e[t+1]=o},r.sum64_hi=function(e,t,r,i){return(t+i>>>0>>0},r.sum64_lo=function(e,t,r,i){return t+i>>>0},r.sum64_4_hi=function(e,t,r,i,n,o,a,s){var l=0,u=t;return l+=(u=u+i>>>0)>>0)>>0)>>0},r.sum64_4_lo=function(e,t,r,i,n,o,a,s){return t+i+o+s>>>0},r.sum64_5_hi=function(e,t,r,i,n,o,a,s,l,u){var c=0,h=t;return c+=(h=h+i>>>0)>>0)>>0)>>0)>>0},r.sum64_5_lo=function(e,t,r,i,n,o,a,s,l,u){return t+i+o+s+u>>>0},r.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},r.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},r.shr64_hi=function(e,t,r){return e>>>r},r.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},{inherits:142,"minimalistic-assert":148}],140:[function(e,t,r){"use strict";var i=e("hash.js"),o=e("minimalistic-crypto-utils"),n=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),r=o.toArray(e.nonce,e.nonceEnc||"hex"),e=o.toArray(e.pers,e.persEnc||"hex");n(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,e)}(t.exports=a).prototype._init=function(e,t,r){r=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},a.prototype.generate=function(e,t,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=r,r=t,t=null),r&&(r=o.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length>1,c=-7,h=r?n-1:0,d=r?-1:1,r=e[t+h];for(h+=d,o=r&(1<<-c)-1,r>>=-c,c+=s;0>=-c,c+=i;0>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,f=i?1:-1,o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-a))<1&&(a--,i*=2),2<=(t+=1<=a+c?h/i:h*Math.pow(2,1-c))*i&&(a++,i/=2),u<=a+c?(s=0,a=u):1<=a+c?(s=(t*i-1)*Math.pow(2,n),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,n),a=0));8<=n;e[r+d]=255&s,d+=f,s/=256,n-=8);for(a=a<>>32-t}function u(e,t,r,i,n,o,a){return l(e+(t&r|~t&i)+n+o|0,a)+t|0}function c(e,t,r,i,n,o,a){return l(e+(t&i|r&~i)+n+o|0,a)+t|0}function h(e,t,r,i,n,o,a){return l(e+(t^r^i)+n+o|0,a)+t|0}function d(e,t,r,i,n,o,a){return l(e+(r^(t|~i))+n+o|0,a)+t|0}i(s,n),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=u(r=this._a,o=this._b,n=this._c,i=this._d,e[0],3614090360,7),i=u(i,r,o,n,e[1],3905402710,12),n=u(n,i,r,o,e[2],606105819,17),o=u(o,n,i,r,e[3],3250441966,22);r=u(r,o,n,i,e[4],4118548399,7),i=u(i,r,o,n,e[5],1200080426,12),n=u(n,i,r,o,e[6],2821735955,17),o=u(o,n,i,r,e[7],4249261313,22),r=u(r,o,n,i,e[8],1770035416,7),i=u(i,r,o,n,e[9],2336552879,12),n=u(n,i,r,o,e[10],4294925233,17),o=u(o,n,i,r,e[11],2304563134,22),r=u(r,o,n,i,e[12],1804603682,7),i=u(i,r,o,n,e[13],4254626195,12),n=u(n,i,r,o,e[14],2792965006,17),r=c(r,o=u(o,n,i,r,e[15],1236535329,22),n,i,e[1],4129170786,5),i=c(i,r,o,n,e[6],3225465664,9),n=c(n,i,r,o,e[11],643717713,14),o=c(o,n,i,r,e[0],3921069994,20),r=c(r,o,n,i,e[5],3593408605,5),i=c(i,r,o,n,e[10],38016083,9),n=c(n,i,r,o,e[15],3634488961,14),o=c(o,n,i,r,e[4],3889429448,20),r=c(r,o,n,i,e[9],568446438,5),i=c(i,r,o,n,e[14],3275163606,9),n=c(n,i,r,o,e[3],4107603335,14),o=c(o,n,i,r,e[8],1163531501,20),r=c(r,o,n,i,e[13],2850285829,5),i=c(i,r,o,n,e[2],4243563512,9),n=c(n,i,r,o,e[7],1735328473,14),r=h(r,o=c(o,n,i,r,e[12],2368359562,20),n,i,e[5],4294588738,4),i=h(i,r,o,n,e[8],2272392833,11),n=h(n,i,r,o,e[11],1839030562,16),o=h(o,n,i,r,e[14],4259657740,23),r=h(r,o,n,i,e[1],2763975236,4),i=h(i,r,o,n,e[4],1272893353,11),n=h(n,i,r,o,e[7],4139469664,16),o=h(o,n,i,r,e[10],3200236656,23),r=h(r,o,n,i,e[13],681279174,4),i=h(i,r,o,n,e[0],3936430074,11),n=h(n,i,r,o,e[3],3572445317,16),o=h(o,n,i,r,e[6],76029189,23),r=h(r,o,n,i,e[9],3654602809,4),i=h(i,r,o,n,e[12],3873151461,11),n=h(n,i,r,o,e[15],530742520,16),r=d(r,o=h(o,n,i,r,e[2],3299628645,23),n,i,e[0],4096336452,6),i=d(i,r,o,n,e[7],1126891415,10),n=d(n,i,r,o,e[14],2878612391,15),o=d(o,n,i,r,e[5],4237533241,21),r=d(r,o,n,i,e[12],1700485571,6),i=d(i,r,o,n,e[3],2399980690,10),n=d(n,i,r,o,e[10],4293915773,15),o=d(o,n,i,r,e[1],2240044497,21),r=d(r,o,n,i,e[8],1873313359,6),i=d(i,r,o,n,e[15],4264355552,10),n=d(n,i,r,o,e[6],2734768916,15),o=d(o,n,i,r,e[13],1309151649,21),r=d(r,o,n,i,e[4],4149444226,6),i=d(i,r,o,n,e[11],3174756917,10),n=d(n,i,r,o,e[2],718787259,15),o=d(o,n,i,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+o|0,this._c=this._c+n|0,this._d=this._d+i|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56>8,n=255&n;o?r.push(o,n):r.push(n)}return r},r.zero2=i,r.toHex=n,r.encode=function(e,t){return"hex"===t?n(e):e}},{}],150:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],151:[function(e,t,r){"use strict";var i=e("asn1.js");r.certificate=e("./certificate");e=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("modulus")["int"](),this.key("publicExponent")["int"](),this.key("privateExponent")["int"](),this.key("prime1")["int"](),this.key("prime2")["int"](),this.key("exponent1")["int"](),this.key("exponent2")["int"](),this.key("coefficient")["int"]())});r.RSAPrivateKey=e;e=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus")["int"](),this.key("publicExponent")["int"]())});r.RSAPublicKey=e;e=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(n),this.key("subjectPublicKey").bitstr())});r.PublicKey=e;var n=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"]()).optional())}),e=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version")["int"](),this.key("algorithm").use(n),this.key("subjectPrivateKey").octstr())});r.PrivateKey=e;e=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters")["int"]())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=e;e=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("p")["int"](),this.key("q")["int"](),this.key("g")["int"](),this.key("pub_key")["int"](),this.key("priv_key")["int"]())});r.DSAPrivateKey=e,r.DSAparam=i.define("DSAparam",function(){this["int"]()});e=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version")["int"](),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(o),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=e;var o=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=i.define("signature",function(){this.seq().obj(this.key("r")["int"](),this.key("s")["int"]())})},{"./certificate":152,"asn1.js":1}],152:[function(e,t,r){"use strict";var e=e("asn1.js"),i=e.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),n=e.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),o=e.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=e.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())}),s=e.define("RelativeDistinguishedName",function(){this.setof(n)}),l=e.define("RDNSequence",function(){this.seqof(s)}),u=e.define("Name",function(){this.choice({rdnSequence:this.use(l)})}),c=e.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),h=e.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=e.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0)["int"]().optional(),this.key("serialNumber")["int"](),this.key("signature").use(o),this.key("issuer").use(u),this.key("validity").use(c),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}),e=e.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())});t.exports=e},{"asn1.js":1}],153:[function(e,t,r){var s=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,l=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,u=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,c=e("evp_bytestokey"),h=e("browserify-aes"),d=e("safe-buffer").Buffer;t.exports=function(e,t){var r,i,n,o=e.toString(),a=o.match(s);return n=a?(r="aes"+a[1],i=d.from(a[2],"hex"),e=d.from(a[3].replace(/[\r\n]/g,""),"base64"),t=c(t,i.slice(0,8),parseInt(a[1],10)).key,a=[],i=h.createDecipheriv(r,t,i),a.push(i.update(e)),a.push(i["final"]()),d.concat(a)):(n=o.match(u),d.from(n[2].replace(/[\r\n]/g,""),"base64")),{tag:o.match(l)[1],data:n}}},{"browserify-aes":22,evp_bytestokey:109,"safe-buffer":187}],154:[function(e,t,r){var f=e("./asn1"),p=e("./aesid.json"),y=e("./fixProc"),g=e("browserify-aes"),m=e("pbkdf2"),b=e("safe-buffer").Buffer;function i(e){var t;"object"!=typeof e||b.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=b.from(e));var r,i,n,o,a,s,l,u,c,e=y(e,t),h=e.tag,d=e.data;switch(h){case"CERTIFICATE":i=f.certificate.decode(d,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(r=(i=i||f.PublicKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=f.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":d=f.EncryptedPrivateKey.decode(d,"der"),o=t,a=(n=d).algorithm.decrypt.kde.kdeparams.salt,s=parseInt(n.algorithm.decrypt.kde.kdeparams.iters.toString(),10),l=p[n.algorithm.decrypt.cipher.algo.join(".")],u=n.algorithm.decrypt.cipher.iv,c=n.subjectPrivateKey,n=parseInt(l.split("-")[1],10)/8,n=m.pbkdf2Sync(o,a,s,n,"sha1"),n=g.createDecipheriv(l,n,u),(u=[]).push(n.update(c)),u.push(n["final"]()),d=b.concat(u);case"PRIVATE KEY":switch(r=(i=f.PrivateKey.decode(d,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return f.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:f.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=f.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return f.RSAPublicKey.decode(d,"der");case"RSA PRIVATE KEY":return f.RSAPrivateKey.decode(d,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:f.DSAPrivateKey.decode(d,"der")};case"EC PRIVATE KEY":return{curve:(d=f.ECPrivateKey.decode(d,"der")).parameters.value,privateKey:d.privateKey};default:throw new Error("unknown key type "+h)}}(t.exports=i).signature=f.signature},{"./aesid.json":150,"./asn1":151,"./fixProc":153,"browserify-aes":22,pbkdf2:155,"safe-buffer":187}],155:[function(e,t,r){r.pbkdf2=e("./lib/async"),r.pbkdf2Sync=e("./lib/sync")},{"./lib/async":156,"./lib/sync":159}],156:[function(t,r,e){!function(v){!function(){var u,e,c=t("safe-buffer").Buffer,h=t("./precondition"),d=t("./default-encoding"),f=t("./sync"),p=t("./to-buffer"),y=v.crypto&&v.crypto.subtle,g={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},m=[];function b(){return e=e||(v.process&&v.process.nextTick?v.process.nextTick:v.queueMicrotask||v.setImmediate||v.setTimeout)}function _(e,t,r,i,n){return y.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then(function(e){return y.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:n}},e,i<<3)}).then(function(e){return c.from(e)})}r.exports=function(t,r,i,n,o,a){"function"==typeof o&&(a=o,o=void 0);var e,s,l=g[(o=o||"sha1").toLowerCase()];if(l&&"function"==typeof v.Promise){if(h(i,n),t=p(t,d,"Password"),r=p(r,d,"Salt"),"function"!=typeof a)throw new Error("No callback provided to pbkdf2");e=function(e){if(v.process&&!v.process.browser)return Promise.resolve(!1);if(!y||!y.importKey||!y.deriveBits)return Promise.resolve(!1);if(void 0!==m[e])return m[e];var t=_(u=u||c.alloc(8),u,10,128,e).then(function(){return!0})["catch"](function(){return!1});return m[e]=t}(l).then(function(e){return e?_(t,r,i,n,l):f(t,r,i,n,o)}),s=a,e.then(function(e){b()(function(){s(null,e)})},function(e){b()(function(){s(e)})})}else b()(function(){var e;try{e=f(t,r,i,n,o)}catch(e){return a(e)}a(null,e)})}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":157,"./precondition":158,"./sync":159,"./to-buffer":160,"safe-buffer":187}],157:[function(e,i,t){!function(t,r){!function(){var e;e=r.process&&r.process.browser||!r.process||!r.process.version||6<=parseInt(t.version.split(".")[0].slice(1),10)?"utf-8":"binary",i.exports=e}.call(this)}.call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:162}],158:[function(e,t,r){var i=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||io?t=n(t):t.lengtho||0<=new u(t).cmp(n.modulus))throw new Error("decryption error");e=r?d(new u(t),n):c(t,n),t=f.alloc(o-e.length);if(e=f.concat([t,e],o),4===i)return function(e,t){var r=e.modulus.byteLength(),i=h("sha1").update(f.alloc(0)).digest(),n=i.length;if(0!==t[0])throw new Error("decryption error");var e=t.slice(1,n+1),t=t.slice(n+1),e=l(e,s(t,n)),o=l(t,s(e,r-n-1));if(function(e,t){e=f.from(e),t=f.from(t);var r=0,i=e.length;e.length!==t.length&&(r++,i=Math.min(e.length,t.length));var n=-1;for(;++n=e.length){n++;break}var o=e.slice(2,i-1);("0002"!==r.toString("hex")&&!t||"0001"!==r.toString("hex")&&t)&&n++;o.length<8&&n++;if(n)throw new Error("decryption error");return e.slice(i)}(e,r);if(3===i)return e;throw new Error("unknown padding")}},{"./mgf":164,"./withPublic":168,"./xor":169,"bn.js":165,"browserify-rsa":40,"create-hash":69,"parse-asn1":154,"safe-buffer":187}],167:[function(e,t,r){var o=e("parse-asn1"),s=e("randombytes"),l=e("create-hash"),u=e("./mgf"),c=e("./xor"),h=e("bn.js"),a=e("./withPublic"),d=e("browserify-rsa"),f=e("safe-buffer").Buffer;t.exports=function(e,t,r){var i,n=e.padding||(r?1:4),e=o(e);if(4===n)i=function(e,t){var r=e.modulus.byteLength(),i=t.length,n=l("sha1").update(f.alloc(0)).digest(),o=n.length,a=2*o;if(r-a-2t.highWaterMark&&(t.highWaterMark=(f<=(r=e)?r=f:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function _(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(b("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(v,e):v(e))}function v(e){b("emit readable"),e.emit("readable"),x(e)}function w(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var i;eo.length?o.length:e;if(a===o.length?n+=o:n+=o.slice(0,e),0===(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(a);break}++i}return t.length-=i,n}:function(e,t){var r=c.allocUnsafe(e),i=t.head,n=1;i.data.copy(r),e-=i.data.length;for(;i=i.next;){var o=i.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++n,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i).data=o.slice(a);break}++n}return t.length-=n,r})(e,t);return i}(e,t.buffer,t.decoder),r);var r}function k(e){var t=e._readableState;if(0=t.highWaterMark||t.ended))return b("read: emitReadable",t.length,t.ended),(0===t.length&&t.ended?k:_)(this),null;if(0===(e=p(e,t))&&t.ended)return 0===t.length&&k(this),null;var i=t.needReadable;return b("need readable",i),(0===t.length||t.length-e>>0),o=this.head,a=0;o;)t=o.data,r=n,i=a,t.copy(r,i),a+=o.data.length,o=o.next;return n},n),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":187,util:19}],179:[function(e,t,r){"use strict";var o=e("process-nextick-args");function a(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||o.nextTick(a,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(o.nextTick(a,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":161}],180:[function(e,t,r){arguments[4][60][0].apply(r,arguments)},{dup:60,events:108}],181:[function(e,t,r){"use strict";var i=e("safe-buffer").Buffer,n=i.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(i.isEncoding===n||!n(e)))throw new Error("Unknown encoding: "+e);return t||e}function a(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=l,t=4;break;case"base64":this.text=h,this.end=d,t=3;break;default:return this.write=f,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function l(e){var t,r,i=this.lastTotal-this.lastNeed,t=(t=this,128!=(192&(r=e)[0])?(t.lastNeed=0,"\ufffd"):1>>32-t}function T(e,t,r,i,n,o,a,s){return E(e+(t^r^i)+o+a|0,s)+n|0}function x(e,t,r,i,n,o,a,s){return E(e+(t&r|~t&i)+o+a|0,s)+n|0}function M(e,t,r,i,n,o,a,s){return E(e+((t|~r)^i)+o+a|0,s)+n|0}function k(e,t,r,i,n,o,a,s){return E(e+(t&i|r&~i)+o+a|0,s)+n|0}function P(e,t,r,i,n,o,a,s){return E(e+(t^(r|~i))+o+a|0,s)+n|0}n(a,o),a.prototype._update=function(){for(var e=g,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,l=0|this._b,u=0|this._c,c=0|this._d,h=0|this._e,d=0;d<80;d+=1)var f,p=d<16?(f=T(r,i,n,o,a,e[m[d]],w[0],_[d]),P(s,l,u,c,h,e[b[d]],S[0],v[d])):d<32?(f=x(r,i,n,o,a,e[m[d]],w[1],_[d]),k(s,l,u,c,h,e[b[d]],S[1],v[d])):d<48?(f=M(r,i,n,o,a,e[m[d]],w[2],_[d]),M(s,l,u,c,h,e[b[d]],S[2],v[d])):d<64?(f=k(r,i,n,o,a,e[m[d]],w[3],_[d]),x(s,l,u,c,h,e[b[d]],S[3],v[d])):(f=P(r,i,n,o,a,e[m[d]],w[4],_[d]),T(s,l,u,c,h,e[b[d]],S[4],v[d])),r=a,a=o,o=E(n,10),n=i,i=f,s=h,h=c,c=E(u,10),u=l,l=p;var y=this._b+n+c|0;this._b=this._c+o+h|0,this._c=this._d+a+s|0,this._d=this._e+r+l|0,this._e=this._a+i+u|0,this._a=y},a.prototype._digest=function(){this._block[this._blockOffset++]=128,56=this._finalSize&&(this._update(this._block),this._block.fill(0));t=8*this._len;t<=4294967295?this._block.writeUInt32BE(t,this._blockSize-4):(this._block.writeUInt32BE((t-(r=(4294967295&t)>>>0))/4294967296,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)),this._update(this._block);var r=this._hash();return e?r.toString(e):r},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":187}],190:[function(e,t,r){(r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t}).sha=e("./sha"),r.sha1=e("crypto-js/sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":191,"crypto-js/sha1":192,"./sha224":193,"./sha256":194,"./sha384":195,"./sha512":196}],191:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,p=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var l,u,c,h=0;h<80;++h)var d=~~(h/20),f=0|((c=r)<<5|c>>>27)+(l=i,u=n,f=o,0===(c=d)?l&u|~l&f:2===c?l&u|l&f|u&f:l^u^f)+a+t[h]+p[d],a=o,o=n,n=(d=i)<<30|d>>>2,i=r,r=f;this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":189,inherits:142,"safe-buffer":187}],192:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,y=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,l=0;l<16;++l)r[l]=e.readInt32BE(4*l);for(;l<80;++l)r[l]=(t=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|t>>>31;for(var u,c,h,d=0;d<80;++d)var f=~~(d/20),p=0|((h=i)<<5|h>>>27)+(u=n,c=o,p=a,0===(h=f)?u&c|~u&p:2===h?u&c|u&p|c&p:u^c^p)+s+r[d]+y[f],s=a,a=o,o=(f=n)<<30|f>>>2,n=i,i=p;this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=s},{"./hash":189,inherits:142,"safe-buffer":187}],193:[function(e,t,r){var i=e("inherits"),n=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function l(){this.init(),this._w=s,o.call(this,64,56)}i(l,n),l.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},l.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=l},{"./hash":189,"./sha256":194,inherits:142,"safe-buffer":187}],194:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function s(){this.init(),this._w=a,n.call(this,64,56)}i(s,n),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(e){for(var t,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,a=0|this._d,s=0|this._e,l=0|this._f,u=0|this._g,c=0|this._h,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<64;++h)r[h]=0|(((t=r[h-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[h-7]+(((t=r[h-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+r[h-16];for(var d,f=0;f<64;++f)var p=c+(((y=s)>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|y<<7))+((d=u)^s&(l^d))+g[f]+r[f]|0,y=0|(((y=i)>>>2|y<<30)^(y>>>13|y<<19)^(y>>>22|y<<10))+((d=i)&(y=n)|o&(d|y)),c=u,u=l,l=s,s=a+p|0,a=o,o=n,n=i,i=p+y|0;this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=l+this._f|0,this._g=u+this._g|0,this._h=c+this._h|0},s.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=s},{"./hash":189,inherits:142,"safe-buffer":187}],195:[function(e,t,r){var i=e("inherits"),n=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function l(){this.init(),this._w=s,o.call(this,128,112)}i(l,n),l.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},l.prototype._hash=function(){var i=a.allocUnsafe(48);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),i},t.exports=l},{"./hash":189,"./sha512":196,inherits:142,"safe-buffer":187}],196:[function(e,t,r){var i=e("inherits"),n=e("./hash"),o=e("safe-buffer").Buffer,H=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function s(){this.init(),this._w=a,n.call(this,128,112)}function j(e,t,r){return r^e&(t^r)}function F(e,t,r){return e&t|r&(e|t)}function q(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function V(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function z(e,t){return e>>>0>>0?1:0}i(s,n),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(e){for(var t=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,l=0|this._gh,u=0|this._hh,c=0|this._al,h=0|this._bl,d=0|this._cl,f=0|this._dl,p=0|this._el,y=0|this._fl,g=0|this._gl,m=0|this._hl,b=0;b<32;b+=2)t[b]=e.readInt32BE(4*b),t[b+1]=e.readInt32BE(4*b+4);for(;b<160;b+=2){var _=t[b-30],v=t[b-30+1],w=((M=_)>>>1|(T=v)<<31)^(M>>>8|T<<24)^M>>>7,S=((E=v)>>>1|(x=_)<<31)^(E>>>8|x<<24)^(E>>>7|x<<25),_=t[b-4],v=t[b-4+1],E=((T=_)>>>19|(M=v)<<13)^(M>>>29|T<<3)^T>>>6,T=((x=v)>>>19|(M=_)<<13)^(M>>>29|x<<3)^(x>>>6|M<<26),v=t[b-14],_=t[b-14+1],x=t[b-32],M=t[b-32+1],k=S+_|0,P=w+v+z(k,S)|0;P=(P=P+E+z(k=k+T|0,T)|0)+x+z(k=k+M|0,M)|0,t[b]=P,t[b+1]=k}for(var C=0;C<160;C+=2){P=t[C],k=t[C+1];var A=F(r,i,n),I=F(c,h,d),R=q(r,c),L=q(c,r),D=V(a,p),B=V(p,a),O=H[C+1],U=j(a,s,l),N=j(p,y,g),B=m+B|0,D=u+D+z(B,m)|0;D=(D=(D=D+U+z(B=B+N|0,N)|0)+H[C]+z(B=B+O|0,O)|0)+P+z(B=B+k|0,k)|0;I=L+I|0,L=R+A+z(I,L)|0,u=l,m=g,l=s,g=y,s=a,y=p,a=o+D+z(p=f+B|0,f)|0,o=n,f=d,n=i,d=h,i=r,h=c,r=D+L+z(c=B+I|0,B)|0}this._al=this._al+c|0,this._bl=this._bl+h|0,this._cl=this._cl+d|0,this._dl=this._dl+f|0,this._el=this._el+p|0,this._fl=this._fl+y|0,this._gl=this._gl+g|0,this._hl=this._hl+m|0,this._ah=this._ah+r+z(this._al,c)|0,this._bh=this._bh+i+z(this._bl,h)|0,this._ch=this._ch+n+z(this._cl,d)|0,this._dh=this._dh+o+z(this._dl,f)|0,this._eh=this._eh+a+z(this._el,p)|0,this._fh=this._fh+s+z(this._fl,y)|0,this._gh=this._gh+l+z(this._gl,g)|0,this._hh=this._hh+u+z(this._hl,m)|0},s.prototype._hash=function(){var i=o.allocUnsafe(64);function e(e,t,r){i.writeInt32BE(e,r),i.writeInt32BE(t,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),i},t.exports=s},{"./hash":189,inherits:142,"safe-buffer":187}],197:[function(e,t,r){t.exports=i;var c=e("events").EventEmitter;function i(){c.call(this)}e("inherits")(i,c),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),(i.Stream=i).prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function n(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",n),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,t.end())}function s(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(e){if(u(),0===c.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",l),t.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),t.removeListener("close",u)}return r.on("error",l),t.on("error",l),r.on("end",u),r.on("close",u),t.on("close",u),t.emit("pipe",r),t}},{events:108,inherits:142,"readable-stream/duplex.js":172,"readable-stream/passthrough.js":182,"readable-stream/readable.js":183,"readable-stream/transform.js":184,"readable-stream/writable.js":185}],198:[function(e,t,r){arguments[4][181][0].apply(r,arguments)},{dup:181,"safe-buffer":199}],199:[function(e,t,r){arguments[4][62][0].apply(r,arguments)},{buffer:64,dup:62}],200:[function(l,e,u){!function(r,s){!function(){var i=l("process/browser.js").nextTick,e=Function.prototype.apply,n=Array.prototype.slice,o={},a=0;function t(e,t){this._id=e,this._clearFn=t}u.setTimeout=function(){return new t(e.call(setTimeout,window,arguments),clearTimeout)},u.setInterval=function(){return new t(e.call(setInterval,window,arguments),clearInterval)},u.clearTimeout=u.clearInterval=function(e){e.close()},t.prototype.unref=t.prototype.ref=function(){},t.prototype.close=function(){this._clearFn.call(window,this._id)},u.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},u.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},u._unrefActive=u.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},u.setImmediate="function"==typeof r?r:function(e){var t=a++,r=!(arguments.length<2)&&n.call(arguments,1);return o[t]=!0,i(function(){o[t]&&(r?e.apply(null,r):e.call(null),u.clearImmediate(t))}),t},u.clearImmediate="function"==typeof s?s:function(e){delete o[e]}}.call(this)}.call(this,l("timers").setImmediate,l("timers").clearImmediate)},{"process/browser.js":162,timers:200}],201:[function(e,r,t){!function(t){!function(){function i(e){try{if(!t.localStorage)return}catch(e){return}e=t.localStorage[e];return null!=e&&"true"===String(e).toLowerCase()}r.exports=function(e,t){if(i("noDeprecation"))return e;var r=!1;return function(){if(!r){if(i("throwDeprecation"))throw new Error(t);i("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}.call(this)}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],202:[function(e,t,r){var i=e("../ui/component"),n=(e("../lib/util"),e("../lib/dom")),o=e("../lib/event"),a=(e("../lib/ua"),e("../lang/index")),s=e("../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this.className=t.className||"prism-auto-stream-selector",this.addClass(this.className)},createEl:function(){var e=i.prototype.createEl.call(this,"div");return e.innerHTML="

",e},bindEvent:function(){var i=this;i._player.on(s.Private.AutoStreamShow,function(e){var t,r=document.querySelector("#"+i.getId()+" .tip-text");!i._player._getLowerQualityLevel||(t=i._player._getLowerQualityLevel())&&(i._switchUrl=t,r.innerText=a.get("Auto_Stream_Tip_Text").replace("$$",t.item.desc),n.css(i.el(),"display","block"))}),i._player.on(s.Private.AutoStreamHide,function(e){document.querySelector("#"+i.getId()+" .tip-text");n.css(i.el(),"display","none")});var e=document.querySelector("#"+i.getId()+" .prism-button-ok");o.on(e,"click",function(){i._player._changeStream&&i._switchUrl&&i._player._changeStream(i._switchUrl.index,a.get("Quality_Change_Text")),n.css(i.el(),"display","none")});e=document.querySelector("#"+i.getId()+" .prism-button-cancel");o.on(e,"click",function(){n.css(i.el(),"display","none")})}});t.exports=e},{"../lang/index":212,"../lib/dom":219,"../lib/event":220,"../lib/ua":232,"../lib/util":234,"../player/base/event/eventtype":244,"../ui/component":296}],203:[function(e,t,r){var i=e("../ui/component"),a=e("../lib/dom"),n=e("../lib/event"),o=e("../lib/ua"),s=e("../lib/function"),l=(e("../lang/index"),e("../lib/util")),u=e("../config"),c=e("../lib/playerutil"),h=e("../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this.className=t.className||"prism-liveshift-progress",this.addClass(this.className),this._liveshiftService=e._liveshiftService},createEl:function(){var e=i.prototype.createEl.call(this);return e.innerHTML='

00:00:00
',e},bindEvent:function(){var t=this;this.loadedNode=document.querySelector("#"+this.id()+" .prism-progress-loaded"),this.playedNode=document.querySelector("#"+this.id()+" .prism-progress-played"),this.cursorNode=document.querySelector("#"+this.id()+" .prism-progress-cursor"),this.timeNode=document.querySelector("#"+this.id()+" .prism-progress-time"),this.controlNode=document.querySelector("#"+this._player._options.id+" .prism-controlbar"),this.seperatorNode=document.querySelector("#"+this.id()+" .prism-liveshift-seperator"),this.progressNode=document.querySelector("#"+this.id()+" .prism-enable-liveshift");var e=document.querySelector("#"+this.id()+" .prism-progress-cursor img"),r="//"+u.domain+"/de/prismplayer/"+u.h5Version+"/skins/default/img/dragcursor.png";u.domain?-1e&&(sec=e),sec},_onMouseClick:function(e){var t=this,r=this._getSeconds(e),i=this._liveshiftService.availableLiveShiftTime-r;this._player.trigger(h.Private.SeekStart,{fromTime:this._getCurrentTime()});var n=this._liveshiftService.getSourceUrl(i),e=t._player._options.source,i=c.isHls(t._player._options.source);i&&n==e?t._player.seek(r):t._player._loadByUrlInner(n,r,!0),t._player.trigger(h.Private.Play_Btn_Hide),t._liveshiftService.seekTime=r,t._player.trigger(h.Private.EndStart,{toTime:r}),t._updateCursorPosition(r),i&&setTimeout(function(){t._player.play()})},_onMouseDown:function(e){var t=this;e.preventDefault(),this._player.trigger(h.Private.SeekStart,{fromTime:this._getCurrentTime()}),n.on(this.controlNode,"mousemove",function(e){t._onMouseMove(e)}),n.on(this.controlNode,"touchmove",function(e){t._onMouseMove(e)}),n.on(this.controlNode,"mouseup",function(e){t._onMouseUp(e)}),n.on(this.controlNode,"touchend",function(e){t._onMouseUp(e)})},_onMouseUp:function(e){e.preventDefault(),n.off(this.controlNode,"mousemove"),n.off(this.controlNode,"touchmove"),n.off(this._player.tag,"mouseup"),n.off(this._player.tag,"touchend"),n.off(this.controlNode,"mouseup"),n.off(this.controlNode,"touchend");e=this._liveshiftService.availableLiveShiftTime,e=this.playedNode.offsetWidth/this.el().offsetWidth*e;this._player.seek(e),this._player.trigger(h.Private.Play_Btn_Hide),this._liveshiftService.seekTime=e,this._player.trigger(h.Private.EndStart,{toTime:e})},_onMouseMove:function(e){e.preventDefault();e=this._getSeconds(e);this._updateProgressBar(this.playedNode,e),this._updateCursorPosition(e)},_onTimeupdate:function(e){this._updateProgressBar(this.playedNode,this._getCurrentTime()),this._updateCursorPosition(this._getCurrentTime()),this._player.trigger(h.Private.UpdateProgressBar,{time:this._getCurrentTime()})},_getCurrentTime:function(){var e=this._liveshiftService.seekTime;return-1==e&&(e=0),this._player.getCurrentTime()+e},_onProgress:function(e){this._player.getDuration()&&1<=this._player.getBuffered().length&&this._updateProgressBar(this.loadedNode,this._player.getBuffered().end(this._player.getBuffered().length-1))},_updateProgressBar:function(e,t){var r,i;1!=this._player._switchSourcing&&(i=0,-1==this._liveshiftService.seekTime?i=1:1<(i=(r=this._liveshiftService.availableLiveShiftTime)?t/r:0)&&(this._liveshiftService.seekTime=-(i=1)),this.liveShiftStartDisplay,e&&a.css(e,"width",100*i+"%"))},_updateCursorPosition:function(e){var t,r,i,n;!this._player.el()||1==this._player._switchSourcing||0==e&&0==this._player.tag.readyState||(r=0,n=1,i=this._player.el().clientWidth,-1==this._liveshiftService.seekTime?r=1:1<(r=(t=this._liveshiftService.availableLiveShiftTime)?e/t:0)&&(this._liveshiftService.seekTime=-1),0!=i&&(n=1-(i=18/i),r-=i),this.cursorNode&&(nt.seekTime&&-1!=t.seekTime?(e=i._liveshiftService.getBaseTime(),e=n.formatTime(e+i._player.getCurrentTime()),r.innerText=e):t.currentTimeDisplay&&(r.innerText=t.currentTimeDisplay)}),this._player.on(o.Private.LiveShiftQueryCompleted,function(){i.updateTime()})},updateTime:function(){document.querySelector("#"+this.id()+" .end-time").innerText=this._liveshiftService.liveTimeRange.endDisplay,document.querySelector("#"+this.id()+" .live-time").innerText=this._liveshiftService.currentTimeDisplay}});t.exports=e},{"../lib/util":234,"../player/base/event/eventtype":244,"../ui/component":296}],205:[function(e,t,r){t.exports={domain:"g.alicdn.com",flashVersion:"2.8.2",h5Version:"2.9.7",rtsVersion:"1.2.4",cityBrain:!0,logDuration:10,logCount:100,logReportTo:"/"}},{}],206:[function(e,t,r){e("./lang/index").load();var i=e("./player/adaptivePlayer"),n=e("./lib/componentutil"),o=e("./config"),e=function(e,t){return i.create(e,t)};e.getVersion=function(){return o.h5Version},n.register(e);var a=window.Aliplayer=e;e.players={},"function"==typeof define&&define.amd?define([],function(){return a}):"object"==typeof r&&"object"==typeof t&&(t.exports=a),"undefined"!=typeof Uint8Array&&(Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:Array.prototype.slice}))},{"./config":205,"./lang/index":212,"./lib/componentutil":215,"./player/adaptivePlayer":241}],207:[function(e,t,r){var i=e("../lib/oo"),n=e("../lang/index"),i=i.extend({init:function(e,t){this._player=e,this._options=e.options()}});i.prototype.handle=function(e){var t,r;this._options.autoPlayDelay&&(t=(t=this._options.autoPlayDelayDisplayText)||n.get("AutoPlayDelayDisplayText").replace("$$",this._options.autoPlayDelay),this._player.trigger("info_show",t),this._player.trigger("h5_loading_hide"),this._player.trigger("play_btn_hide"),(r=this)._timeHandler=setTimeout(function(){r._player.trigger("info_hide"),r._options.autoPlayDelay=0,e&&e()},1e3*this._options.autoPlayDelay),this._player.on("play",function(){o(r)}),this._player.on("pause",function(){o(r)}))},i.prototype.dispose=function(){o(this),this._player=null};var o=function(e){e._timeHandler&&(clearTimeout(e._timeHandler),e._timeHandler=null)};t.exports=i},{"../lang/index":212,"../lib/oo":228}],208:[function(e,t,r){var i=e("../lib/event"),n=e("../lib/data"),o=e("../player/base/event/eventtype"),a=n.guid(),n={};function s(e){var t=this._options.keyFastForwardStep,r=this._options.isLive;switch(e&&e.keyCode){case 39:if(r)return;e.preventDefault();var i=this.getDuration(),n=this.getCurrentTime()+t;this.seek(n=iinstall plugin, or check if disable Flash plugin"}},{}],211:[function(e,t,r){t.exports=t.exports={OD:"\u539f\u753b",FD:"\u6d41\u7545",LD:"\u6807\u6e05",SD:"\u9ad8\u6e05",HD:"\u8d85\u6e05","2K":"2K","4K":"4K",FHD:"\u5168\u9ad8\u6e05",XLD:"\u6781\u901f",SQ:"\u666e\u901a\u97f3\u8d28",HQ:"\u9ad8\u97f3\u8d28",Forbidden_Text:"\u5185\u90e8\u4fe1\u606f\uff0c\u4e25\u7981\u5916\u4f20",Refresh:"\u5237\u65b0",Diagnosis:"\u8bca\u65ad",Live_Finished:"\u76f4\u64ad\u5df2\u7ed3\u675f,\u8c22\u8c22\u89c2\u770b",Play:"\u64ad\u653e",Pause:"\u6682\u505c",Snapshot:"\u622a\u56fe",Replay:"\u91cd\u64ad",Live:"\u76f4\u64ad",Encrypt:"\u52a0\u5bc6",Sound:"\u58f0\u97f3",Fullscreen:"\u5168\u5c4f",Exist_Fullscreen:"\u9000\u51fa\u5168\u5c4f",Resolution:"\u6e05\u6670\u5ea6",Next:"\u4e0b\u4e00\u96c6",Brightness:"\u4eae\u5ea6",Default:"\u9ed8\u8ba4",Contrast:"\u5bf9\u6bd4\u5ea6",Titles_Credits:"\u7247\u5934\u7247\u5c3e",Skip_Titles:"\u8df3\u8fc7\u7247\u5934",Skip_Credits:"\u8df3\u8fc7\u7247\u5c3e",Not_Support_Out_Site:"\u8be5\u89c6\u9891\u6682\u4e0d\u652f\u6301\u7ad9\u5916\u64ad\u653e\uff0c\u8bf7\u5230\u6dd8TV\u89c2\u770b",Watch_Now:"\u7acb\u5373\u89c2\u770b",Network_Error:"\u7f51\u7edc\u65e0\u6cd5\u8fde\u63a5\uff0c\u8bf7\u5c1d\u8bd5\u68c0\u67e5\u7f51\u7edc\u540e\u5237\u65b0\u8bd5\u8bd5",Video_Error:"\u89c6\u9891\u64ad\u653e\u5f02\u5e38\uff0c\u8bf7\u5237\u65b0\u8bd5\u8bd5",Decode_Error:"\u64ad\u653e\u6570\u636e\u89e3\u7801\u9519\u8bef",Live_Not_Start:"\u4eb2\uff0c\u76f4\u64ad\u8fd8\u672a\u5f00\u59cb\u54e6\uff0c\u656c\u8bf7\u671f\u5f85",Live_Loading:"\u76f4\u64ad\u4fe1\u606f\u52a0\u8f7d\u4e2d\uff0c\u8bf7\u5237\u65b0\u8bd5\u8bd5",Live_End:"\u4eb2\uff0c\u76f4\u64ad\u5df2\u7ed3\u675f",Live_Abrot:"\u5f53\u524d\u76f4\u64ad\u4fe1\u53f7\u4e2d\u65ad\uff0c\u8bf7\u5237\u65b0\u540e\u91cd\u8bd5",Corss_Domain_Error:"\u8bf7\u786e\u8ba4\u60a8\u7684\u57df\u540d\u5df2\u5b8c\u6210\u5907\u6848\u548cCNAME\u7ed1\u5b9a\uff0c\r\n\u5e76\u5904\u4e8e\u542f\u7528\u72b6\u6001\uff0c\u6216\u8d44\u6e90\u5141\u8bb8\u8de8\u8d8a\u8bbf\u95ee",Url_Timeout_Error:"\u60a8\u6240\u89c2\u770b\u7684\u89c6\u9891\u5730\u5740\u8fde\u63a5\u8d85\u65f6\uff0c\u8bf7\u5237\u65b0\u540e\u91cd\u8bd5",Connetction_Error:"\u62b1\u6b49,\u8be5\u89c6\u9891\u7531\u4e8e\u8fde\u63a5\u9519\u8bef\u6682\u65f6\u4e0d\u80fd\u64ad\u653e,\u8bf7\u89c2\u770b\u5176\u5b83\u89c6\u9891",Fetch_MTS_Error:"\u83b7\u53d6\u89c6\u9891\u5217\u8868\u5931\u8d25\uff0c\u8bf7\u786e\u8ba4",Token_Expired_Error:"\u8bf7\u6c42\u63a5\u53e3\u5931\u8d25\uff0c\u8bf7\u786e\u8ba4Token\u662f\u5426\u8fc7\u671f",Video_Lists_Empty_Error:"\u83b7\u53d6\u89c6\u9891\u5217\u8868\u4e3a\u7a7a\uff0c\u8bf7\u786e\u8ba4\u64ad\u653e\u6570\u636e\u4e0e\u683c\u5f0f",Encrypted_Failed_Error:"\u83b7\u53d6\u89c6\u9891\u52a0\u5bc6\u79d8\u94a5\u9519\u8bef\uff0c\u8bf7\u786e\u8ba4\u64ad\u653e\u6743\u9650",Fetch_Failed_Permission_Error:"\u83b7\u53d6\u89c6\u9891\u5217\u8868\u5931\u8d25\uff0c\u8bf7\u786e\u8ba4\u64ad\u653e\u6743\u9650",Invalidate_Param_Error:"\u65e0\u8f93\u5165\u89c6\u9891\uff0c\u8bf7\u786e\u8ba4\u8f93\u5165\u53c2\u6570",AutoPlayDelayDisplayText:"$$\u79d2\u4ee5\u540e\u5f00\u59cb\u64ad\u653e",Fetch_MTS_NOT_NotStream_Error:"\u6b64vid\u6ca1\u6709\u53ef\u64ad\u653e\u89c6\u9891",Cancel_Text:"\u53d6\u6d88",OK_Text:"\u786e\u8ba4",Auto_Stream_Tip_Text:"\u7f51\u7edc\u4e0d\u7ed9\u529b\uff0c\u662f\u5426\u5207\u6362\u5230$$",Fetch_Playauth_Error:"\u83b7\u53d6\u64ad\u653e\u51ed\u8bc1\u51fa\u9519\u5566\uff0c\u8bf7\u5c1d\u8bd5\u9000\u51fa\u91cd\u8bd5\u6216\u5237\u65b0",Open_Html_By_File:"\u4e0d\u80fd\u76f4\u63a5\u5728\u6d4f\u89c8\u5668\u6253\u5f00html\u6587\u4ef6\uff0c\u8bf7\u90e8\u7f72\u5230\u670d\u52a1\u7aef",Cant_Use_Flash_On_Mobile:"\u79fb\u52a8\u7aef\u4e0d\u652f\u6301Flash\u64ad\u653e\u5668\uff0c\u8bf7\u4f7f\u7528h5\u64ad\u653e\u5668",Flash_Not_Ready:"Flash Player\u63d2\u4ef6\u672a\u5b89\u88c5\u5b89\u88c5\u63d2\u4ef6\uff0c\u5982\u679c\u5df2\u7ecf\u5b89\u88c5\u8bf7\u68c0\u67e5\u662f\u5426\u88ab\u7981\u7528"}},{}],212:[function(o,e,t){function n(){var e;return void 0!==window[s]&&window[s]||(e=(e=(navigator.language||navigator.browserLanguage).toLowerCase())&&-1>4,l[s++]=(15&r)<<4|i>>2,l[s++]=(3&i)<<6|63&n;return o},encode:function(e){for(var t=new Uint8Array(e),r=t.length,i="",n=0;n>2],i+=o[(3&t[n])<<4|t[n+1]>>4],i+=o[(15&t[n+1])<<2|t[n+2]>>6],i+=o[63&t[n+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i},unpackPlayReady:unpackPlayReady}},{}],215:[function(e,t,r){var i=e("./oo"),n=e("../player/base/event/eventtype");t.exports.stopPropagation=function(e){window.event?window.event.cancelBubble=!0:e.stopPropagation()},t.exports.register=function(e){e.util={stopPropagation:t.exports.stopPropagation},e.Component=i.extend,e.EventType=n.Player}},{"../player/base/event/eventtype":244,"./oo":228}],216:[function(e,t,r){var i=e("../lang/index");t.exports.LOAD_START="loadstart",t.exports.LOADED_METADATA="loadedmetadata",t.exports.LOADED_DATA="loadeddata",t.exports.PROGRESS="progress",t.exports.CAN_PLAY="canplay",t.exports.CAN_PLYA_THROUGH="canplaythrough",t.exports.PLAY="play",t.exports.PAUSE="pause",t.exports.ENDED="ended",t.exports.PLAYING="playing",t.exports.WAITING="waiting",t.exports.ERROR="error",t.exports.SUSPEND="suspend",t.exports.STALLED="stalled",t.exports.AuthKeyExpiredEvent="authkeyexpired",t.exports.DRMKeySystem={4:"com.microsoft.playready",5:"com.widevine.alpha"},t.exports.EncryptionType={Private:1,Standard:2,ChinaDRM:3,PlayReady:4,Widevine:5},t.exports.VodEncryptionType={AliyunVoDEncryption:1,HLSEncryption:2,Widevine:5,"Widevine-FairPlay":5},t.exports.DRMType={Widevine:"Widevine",PlayReady:"PlayReady"},t.exports.ErrorCode={InvalidParameter:4001,AuthKeyExpired:4002,InvalidSourceURL:4003,NotFoundSourceURL:4004,StartLoadData:4005,LoadedMetadata:4006,PlayingError:4007,LoadingTimeout:4008,RequestDataError:4009,EncrptyVideoNotSupport:4010,FormatNotSupport:4011,PlayauthDecode:4012,PlayDataDecode:4013,NetworkUnavaiable:4014,UserAbort:4015,NetworkError:4016,URLsIsEmpty:4017,CrossDomain:4027,OtherError:4400,ServerAPIError:4500,FlashNotInstalled:4600,RequestHttpError:4100,PlayFailedError:4200,NotSupportWebRtc:4110,BrowserNotSupport:4111,BrowserVersionTooLow:4112,NotSupportH264:4113,CreateOfferError:4114,AutoPLayFaild:4115,PlayUrlError:4116,SubscribeNonthing:4117,HtmlElementError:4118,HtmlElementNotMatch:4119},t.exports.AuthKeyExpired=7200,t.exports.AuthKeyRefreshExpired=7e3,t.exports.AuthInfoExpired=100,t.exports.VideoErrorCode={1:4015,2:4016,3:4013,4:4400},t.exports.IconType={FontClass:"fontclass",Symbol:"symbol",Sprite:"Sprite"},t.exports.SelectedStreamLevel="selectedStreamLevel",t.exports.SelectedCC="selectedCC",t.exports.WidthMapToLevel={0:"OD",640:"FD",960:"LD",1280:"SD",1920:"HD",2580:"2K",3840:"4K"};e=function(){t.exports.VideoErrorCodeText={1:i.get("Error_Load_Abort_Text"),2:i.get("Error_Network_Text"),3:i.get("Error_Decode_Text"),4:i.get("Error_Server_Network_NotSupport_Text")},t.exports.VideoLevels={0:i.get("OD"),640:i.get("FD"),960:i.get("LD"),1280:i.get("SD"),1920:i.get("HD"),2580:i.get("2K"),3840:i.get("4K")},t.exports.QualityLevels={OD:i.get("OD"),LD:i.get("LD"),FD:i.get("FD"),SD:i.get("SD"),HD:i.get("HD"),"2K":i.get("2K"),"4K":i.get("4K"),XLD:i.get("XLD"),FHD:i.get("FHD"),SQ:i.get("SQ"),HQ:i.get("HQ")},t.exports.SpeedLevels=[{key:.5,text:i.get("Speed_05X_Text")},{key:1,text:i.get("Speed_1X_Text")},{key:1.25,text:i.get("Speed_125X_Text")},{key:1.5,text:i.get("Speed_15X_Text")},{key:2,text:i.get("Speed_2X_Text")}]};e(),t.exports.updateByLanguage=e},{"../lang/index":212}],217:[function(e,t,r){t.exports.get=function(e){for(var t=e+"",r=document.cookie.split(";"),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},hexadecimalInteger:function(e){if(this[e]){for(var t=(1&(t=(this[e]||"0x").slice(2)).length?"0":"")+t,r=new Uint8Array(t.length/2),i=0;iNumber.MAX_SAFE_INTEGER?1/0:e},decimalFloatingPoint:function(e){return parseFloat(this[e])},enumeratedString:function(e){return this[e]},decimalResolution:function(e){e=n.exec(this[e]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},parseAttrList:function(e){var t,r={};for(o.lastIndex=0;null!==(t=o.exec(e));){var i=t[2];0===i.indexOf('"')&&i.lastIndexOf('"')===i.length-1&&(i=i.slice(1,-1)),r[t[1]]=i}return r}},t.exports=i},{}],224:[function(e,t,r){function S(){this.method=null,this.key=null,this.iv=null,this._uri=null}function E(){this._url=null,this._byteRange=null,this._decryptdata=null,this.tagList=[]}var T=e("./attrlist"),i=e("../io"),n=e("./URLToolkit"),u=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,l=/#EXT-X-MEDIA:(.*)/g,x=new RegExp([/#EXTINF:(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)(\S+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),M=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)(.*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/;E.prototype.getUrl=function(){return!this._url&&this.relurl&&(this._url=n.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},E.prototype.Seturl=function(e){this._url=e},E.prototype.getProgramDateTime=function(){return!this._programDateTime&&this.rawProgramDateTime&&(this._programDateTime=new Date(Date.parse(this.rawProgramDateTime))),this._programDateTime},E.prototype.GetbyteRange=function(){var e,t,r;return this._byteRange||(e=this._byteRange=[],this.rawByteRange&&(1===(t=this.rawByteRange.split("@",2)).length?(r=this.lastByteRangeEndOffset,e[0]=r||0):e[0]=parseInt(t[1]),e[1]=parseInt(t[0])+e[0])),this._byteRange},E.prototype.getByteRangeStartOffset=function(){return this.byteRange[0]},E.prototype.getByteRangeEndOffset=function(){return this.byteRange[1]};E.prototype.getDecryptdata=function(){return this._decryptdata||(this._decryptdata=this.fragmentDecryptdataFromLevelkey(this.levelkey,this.sn)),this._decryptdata};e=function(){this.loaders={}};e.prototype={parseMasterPlaylist:function(e,t){var r=[];for(u.lastIndex=0;null!=(o=u.exec(e));){var i={},n=i.attrs=new T(o[1]);i.url=this.resolve(o[2],t);var o=n.decimalResolution("RESOLUTION");if(o&&(i.width=o.width,i.height=o.height),i.bitrate=n.decimalInteger("AVERAGE-BANDWIDTH")||n.decimalInteger("BANDWIDTH"),i.name=n.NAME,a=n.CODECS)for(var a=a.split(/[ ,]+/),s=0;s",quot:'"',"#x27":"'","#x60":"`"}[t.toLowerCase()]||e})}},{}],228:[function(e,t,r){var n=e("./object"),o=function(){};(o=function(){}).extend=function(e){var t,r,i=(e=e||{}).init||e.init||this.prototype.init||this.prototype.init||function(){};for(r in(((t=function(){i.apply(this,arguments)}).prototype=n.create(this.prototype)).constructor=t).extend=o.extend,t.create=o.create,e)e.hasOwnProperty(r)&&(t.prototype[r]=e[r]);return t},o.create=function(){var e=n.create(this.prototype);return this.apply(e,arguments),e},t.exports=o},{"./object":227}],229:[function(e,p,t){var y=e("./object"),r=e("../config"),i=e("./dom"),n=e("./cookie"),o=e("./constants"),a=e("../lang/index"),s=e("./ua"),g=e("../player/base/plugin/defaultemptycomponent"),m={preload:!0,autoplay:!0,useNativeControls:!1,width:"100%",height:"300px",cover:"",from:"",trackLog:!0,logBatched:!0,isLive:!1,playsinline:!0,showBarTime:5e3,rePlay:!1,liveRetry:5,liveRetryInterval:1,liveRetryStep:0,keyShortCuts:!1,keyFastForwardStep:10,isVBR:!1,vodRetry:3,format:"",definition:"",defaultDefinition:"",loadDataTimeout:20,waitingTimeout:60,waitingBufferedTime:3,delayLoadingShow:1,controlBarForOver:!1,controlBarVisibility:"hover",enableSystemMenu:!1,qualitySort:"asc",x5_video_position:"normal",x5_type:"",x5_fullscreen:!1,x5_orientation:"landscape|portrait",x5LandscapeAsFullScreen:!0,autoPlayDelay:0,autoPlayDelayDisplayText:"",useHlsPluginForSafari:!1,enableMSEForAndroid:!0,encryptType:0,language:"zh-cn",languageTexts:{},mediaType:"video",outputType:"",playConfig:{},reAuthInfo:{},components:[],liveTimeShiftUrl:"",liveShiftSource:"",liveShiftTime:"",videoHeight:"100%",videoWidth:"100%",enableWorker:!0,authTimeout:"",enableMockFullscreen:!1,region:"cn-shanghai",debug:!1,progressMarkers:[],snapshotWatermark:{left:"500",top:"100",text:"",font:"16px \u5b8b\u4f53",fillColor:"#FFFFFF",strokeColor:"#FFFFFF"},liveStartTime:"",liveOverTime:"",enableStashBufferForFlv:!0,stashInitialSizeForFlv:32,flvOption:{},hlsOption:{stopLoadAsPaused:!1},hlsLoadingTimeOut:2e4,useHlsPlugOnMobile:!0,nudgeMaxRetry:5,tracks:[],recreatePlayer:function(){},diagnosisButtonVisible:!0,_native:!0,hlsUriToken:"",thumbnailUrl:"",skinRes:"//"+r.domain+"/de/prismplayer-flash/"+r.flashVersion+"/atlas/defaultSkin"};p.exports.defaultH5Layout=[{name:"bigPlayButton",align:"blabs",x:30,y:80},{name:"H5Loading",align:"cc"},{name:"errorDisplay",align:"tlabs",x:0,y:0},{name:"infoDisplay"},{name:"tooltip",align:"blabs",x:0,y:50},{name:"thumbnail"},{name:"controlBar",align:"blabs",x:0,y:0,children:[{name:"progress",align:"blabs",x:0,y:44},{name:"playButton",align:"tl",x:15,y:12},{name:"timeDisplay",align:"tl",x:10,y:5},{name:"fullScreenButton",align:"tr",x:10,y:12},{name:"subtitle",align:"tr",x:15,y:12},{name:"setting",align:"tr",x:15,y:12},{name:"volume",align:"tr",x:5,y:10}]}],p.exports.defaultAudioLayout=[{name:"controlBar",align:"blabs",x:0,y:0,children:[{name:"progress",align:"blabs",x:0,y:44},{name:"playButton",align:"tl",x:15,y:12},{name:"timeDisplay",align:"tl",x:10,y:5},{name:"volume",align:"tr",x:5,y:10}]}],p.exports.defaultFlashLayout=[{name:"bigPlayButton",align:"blabs",x:30,y:80},{name:"controlBar",align:"blabs",x:0,y:0,children:[{name:"progress",align:"tlabs",x:0,y:0},{name:"playButton",align:"tl",x:15,y:26},{name:"nextButton",align:"tl",x:10,y:26},{name:"timeDisplay",align:"tl",x:10,y:24},{name:"fullScreenButton",align:"tr",x:10,y:25},{name:"streamButton",align:"tr",x:10,y:23},{name:"volume",align:"tr",x:10,y:25}]},{name:"fullControlBar",align:"tlabs",x:0,y:0,children:[{name:"fullTitle",align:"tl",x:25,y:6},{name:"fullNormalScreenButton",align:"tr",x:24,y:13},{name:"fullTimeDisplay",align:"tr",x:10,y:12},{name:"fullZoom",align:"cc"}]}],p.exports.canPlayType=function(e){var t=document.createElement("video");return t.canPlayType?t.canPlayType(e):""},p.exports.canPlayHls=function(){return""!=p.exports.canPlayType("application/x-mpegURL")},p.exports.isUsedHlsPluginOnMobile=function(e){return!!(s.IS_MOBILE&&(s.IS_CHROME||s.IS_FIREFOX||s.IS_X5)&&p.exports.isSupportHls())},p.exports.isSafariUsedHlsPlugin=function(e){return!!(s.os.pc&&s.browser.safari&&e)},p.exports.hasUIComponent=function(e,t){if(void 0===e||!e||0==e.length)return!1;for(var r=0,i=e.length;rx'}).firstChild.href:e},t.exports.parseUrl=function(e){var t,r=["protocol","hostname","port","pathname","search","hash","host"],i=s.createEl("a",{href:e}),n=""===i.host&&"file:"!==i.protocol;n&&((t=s.createEl("div")).innerHTML='',i=t.firstChild,t.setAttribute("style","display:none; position:absolute;"),document.body.appendChild(t));for(var o={},a=0;a/g,">").replace(/\&/g,"&").replace(/"/g,""").replace(/'/g,"'")},r.exports.toBinary=function(e){if(!window.atob)return"";for(var t=atob(e),r=t.length,i=new Uint8Array(r),n=0;n>>0).toString()}var s=e("./vttparse");t.exports={parse:function(e,t,r){var i,e=e.trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),n=[],o=new s;o.oncue=function(e){e.id=a(e.startTime)+a(e.endTime)+a(e.text),e.text=decodeURIComponent(escape(e.text)),e.isBig=!1;var t=e.text.split("#xywh=");2==t.length&&(t=t[1].split(","),e.x=t[0],e.y=t[1],e.w=t[2],e.h=t[3],e.isBig=!0),0/gi,"\n");ethis._uploadCount||"4001"==e.e||"2002"==e.e)&&this._report()},i.prototype.dispose=function(){this._report(),this._disposed=!0},i.prototype._start=function(){this._disposed=!1;this._retry=0,this._report()},i.prototype._report=function(t){var e,r,i;this._tickHandler&&(clearTimeout(this._tickHandler),this._tickHandler=null),0<(t=t||this._logs.splice(0,this._uploadCount)).length?(i={"Content-Type":"application/json;charset=UTF-8","x-log-apiversion":"0.6.0","x-log-bodyrawsize":(e=JSON.stringify({__logs__:t,__source__:""})).length},n.postWithHeader((r=this)._logReportTo,e,i,function(e){r._tick()},function(e){0==r._retry?(r._retry=1,r._report(t)):r._tick()})):this._tick()},i.prototype._tick=function(){var e;this._disposed||(this._retry=0,(e=this)._logs.length>this._uploadCount?e._report():this._tickHandler=setTimeout(function(){e._report()},1e3*this._uploadDuration))},t.exports=i},{"../lib/io":225,"../lib/storage":231}],239:[function(e,t,r){var i=e("../lib/oo"),a=e("../lib/object"),f=e("../lib/data"),s=e("../lib/io"),p=e("../lib/ua"),y=e("../config"),n=e("../player/base/event/eventtype"),g=e("./util"),m=e("./log"),o=0,l={STARTFETCHDATA:1003,COMPLETEFETCHDATA:1004,PREPARE:1101,PREPAREEND:1102,STARTPLAY:2e3,PLAY:2001,STOP:2002,PAUSE:2003,SEEK:2004,FULLSREEM:2005,QUITFULLSCREEM:2006,RESOLUTION:2007,RESOLUTION_DONE:2008,RECOVER:2010,SEEK_END:2011,FETCHEDIP:2020,CDNDETECT:2021,DETECT:2022,UNDERLOAD:3002,LOADED:3001,HEARTBEAT:9001,ERROR:4001,ERRORRETRY:4002,SNAPSHOT:2027,ROTATE:2028,IMAGE:2029,THUMBNAILSTART:2031,THUMBNAILCOMPLETE:2032,CCSTART:2033,CCCOMPLETE:2034,AUDIOTRACKSTART:2033,AUDIOTRACKCOMPLETE:2034},i=i.extend({init:function(e,t,r){this.trackLog=r=void 0===r?!0:r,this.player=e,this.requestId="",this.sessionId=f.guid(),this.playId=0,this.firstPlay=!0,this.osName=p.os.name,this.osVersion=p.os.version||"",this.exName=p.browser.name,this.exVersion=p.browser.version||"",this._logService="",t.logBatched&&(this._logService=new m(y));var i=this.player.getOptions(),n=t.from||"",o=(i.isLive,i.isLive?"live":"vod"),a="pc";p.IS_IPAD?a="pad":p.os.phone&&(a="phone");var s=this.encodeURL(p.getReferer()),l=p.getHref(),u=this.encodeURL(l),c="";l&&(c=p.getHost(l));var h=y.h5Version,d=g.getUuid(),r=i.source?this.encodeURL(i.source):"",e=p.getHost(i.source),t=i.userId?i.userId+"":"0",l=this.sessionId,i=(new Date).getTime();this._userNetInfo={cdnIp:"",localIp:""};this.opt={APIVersion:"0.6.0",t:i,ll:"info",lv:"1.0",pd:"player",md:"saas_player",ui:"saas_player",sm:"play",os:this.osName,ov:this.osVersion,et:this.exName,ev:this.exVersion,uat:p.USER_AGENT,hn:"0.0.0.0",bi:n,ri:l,e:"0",args:"0",vt:o,tt:a,dm:"h5",av:h,uuid:d,vu:r,vd:e,ua:t,dn:"custom",cdn_ip:"0.0.0.0",app_n:c,r:s,pu:u},this.bindEvent()},updateVideoInfo:function(e){e=e.from||"";this.opt.bi=e+"",this.updateSourceInfo()},updateSourceInfo:function(){var e,t=this.player.getOptions();t&&(e=t.source?this.encodeURL(t.source):"",t=p.getHost(t.source),this.opt.vu=e,this.opt.vd=t)},replay:function(){this.reset(),this.player.trigger(n.Video.LoadStart),this.player.trigger(n.Video.LoadedMetadata),this.player.trigger(n.Video.LoadedData)},bindEvent:function(){var t=this;this.player.on(n.Player.Init,function(){t._onPlayerInit()}),this.player.on(n.Video.LoadStart,function(){t._onPlayerloadstart()}),this.player.on(n.Video.LoadedMetadata,function(){t._onPlayerLoadMetadata()}),this.player.on(n.Video.LoadedData,function(){t._onPlayerLoaddata()}),this.player.on(n.Video.Play,function(){t._onPlayerPlay()}),this.player.on(n.Video.Playing,function(){t._onPlayerReady()}),this.player.on(n.Video.Ended,function(){t._onPlayerFinish()}),this.player.on(n.Video.Pause,function(){t._onPlayerPause()}),this.player.on(n.Private.SeekStart,function(e){t._onPlayerSeekStart(e)}),this.player.on(n.Private.EndStart,function(e){t._seekEndData=e.paramData}),this.player.on(n.Player.Waiting,function(){t._waitingDelayLoadingShowHandle&&(clearTimeout(t._waitingDelayLoadingShowHandle),t._waitingDelayLoadingShowHandle=null),t._waitingDelayLoadingShowHandle=setTimeout(function(){t._onPlayerLoaded()},1e3*t.player._options.delayLoadingShow)}),this.player.on(n.Video.CanPlayThrough,function(){}),this.player.on(n.Video.CanPlay,function(){t._waitingDelayLoadingShowHandle&&(clearTimeout(t._waitingDelayLoadingShowHandle),t._waitingDelayLoadingShowHandle=null),t._onPlayerUnderload(),t._onPlayerCanplay()}),this.player.on(n.Video.TimeUpdate,function(){t._waitingDelayLoadingShowHandle&&(clearTimeout(t._waitingDelayLoadingShowHandle),t._waitingDelayLoadingShowHandle=null),t._seekEndData&&t.player._seeking&&t._onPlayerSeekEnd()}),this.player.on(n.Player.Error,function(){t._onPlayerError()}),this.player.on(n.Player.RequestFullScreen,function(){t._onFullscreenChange(1)}),this.player.on(n.Player.CancelFullScreen,function(){t._onFullscreenChange(0)}),this.player.on(n.Private.PREPARE,function(e){t._prepareTime=(new Date).getTime(),t._log("PREPARE",{dn:e.paramData})}),this.player.on(n.Player.Snapshoted,function(){t._log("SNAPSHOT")}),setInterval(function(){var e;t.player.getCurrentTime()&&(e=Math.floor(1e3*t.player.getCurrentTime()),t.player.paused()||30<=++o&&(t._log("HEARTBEAT",{vt:e,interval:1e3*o}),o=0))},1e3)},removeEvent:function(){this.player.off("init"),this.player.off("ready"),this.player.off("ended"),this.player.off("play"),this.player.off("pause"),this.player.off("seekStart"),this.player.off("seekEnd"),this.player.off("canplaythrough"),this.player.off("playing"),this.player.off("timeupdate"),this.player.off("error"),this.player.off("fullscreenchange"),this.player.off(n.Private.PREPARE),this._logService&&this._logService.dispose()},reset:function(){this.startTimePlay=0,this.buffer_flag=0,this.firstPlay=!1,this.playId=0,this.loadstarted=0,this._LoadedData=0,this._canPlay=0},encodeURL:function(e){if(!e)return"";var t=this.player.getOptions();return t&&!t.logBatched?encodeURIComponent(e):e},_onFullscreenChange:function(e){e?this._log("FULLSREEM",{}):this._log("QUITFULLSCREEM",{})},_onPlayerloadstart:function(){this.loadstartTime=(new Date).getTime(),this.playId=f.guid(),!this.loadstarted&&this.player._isPreload()&&(this.loadstarted=1,this._log("STARTPLAY",{vt:(new Date).getTime()}))},_onPlayerLoadMetadata:function(){this.loadMetaDataCost=(new Date).getTime()-this.loadstartTime},_onPlayerLoaddata:function(){var e,t;this._LoadedData||this.buffer_flag||(t=e=0,this.player.tag&&(e=this.player.tag.videoWidth,t=this.player.tag.videoHeight),this._log("PREPAREEND",{tc:(new Date).getTime()-this._prepareTime,cc:(new Date).getTime()-this.loadstartTime,md:this.loadMetaDataCost,mi:JSON.stringify({type:"video",definition:e+"*"+t})})),this._LoadedData=1},_onPlayerCanplay:function(){this._canPlay=1,this._reportPlay()},_onPlayerInit:function(){this.buffer_flag=0,this.pause_flag=0,this.startTimePlay=0,this.loadstarted=0,this._LoadedData=0,this._canPlay=0},_onPlayerReady:function(){this.startTimePlay||(this.startTimePlay=(new Date).getTime())},_onPlayerFinish:function(){this._log("STOP",{vt:Math.floor(1e3*this.player.getCurrentTime())}),this.reset()},_reportPlay:function(){return!(this.buffer_flag||!this._LoadedData||!this.playstartTime)&&(this.first_play_time=(new Date).getTime(),this._log("PLAY",{dsm:"fix",tc:this.first_play_time-this.loadstartTime,fc:this.first_play_time-this.playstartTime}),this.buffer_flag=1,!0)},_onPlayerPlay:function(){this.playstartTime=(new Date).getTime(),0==this.playId&&(this.playId=f.guid()),this.firstPlay||0!=this.pause_flag||this.player._seeking||(this.sessionId=f.guid()),this.player._isPreload()||(this._log("STARTPLAY",{vt:(new Date).getTime()}),this.loadstartTime=(new Date).getTime()),this._canPlay&&this._reportPlay()||this.buffer_flag&&this.pause_flag&&(this.pause_flag=0,this.pauseEndTime=(new Date).getTime(),this._log("RECOVER",{vt:Math.floor(1e3*this.player.getCurrentTime()),cost:this.pauseEndTime-this.pauseTime}))},_onPlayerPause:function(){this.buffer_flag&&this.startTimePlay&&(this.player._seeking||(this.pause_flag=1,this.pauseTime=(new Date).getTime(),this._log("PAUSE",{vt:Math.floor(1e3*this.player.getCurrentTime())})))},_onPlayerSeekStart:function(e){this.seekStartTime=e.paramData.fromTime,this.startTimePlay=0,this.seekStartStamp=(new Date).getTime()},_onPlayerSeekEnd:function(){this.seekEndStamp=(new Date).getTime(),this._log("SEEK",{drag_from_timestamp:Math.floor(1e3*this.seekStartTime),drag_to_timestamp:Math.floor(1e3*this._seekEndData.toTime)}),this._log("SEEK_END",{vt:Math.floor(1e3*this.player.getCurrentTime()),cost:this.seekEndStamp-this.seekStartStamp}),this._seekEndData=null},_onPlayerLoaded:function(){var e;this.buffer_flag&&this.startTimePlay&&(this.stucking||this.player._seeking||(this.stuckStartTime=(new Date).getTime(),this.stuckStartTime-this.startTimePlay<=1e3||(this.stucking=!0,e=this._getbwEstimator(),this._log("UNDERLOAD",{vt:Math.floor(1e3*this.player.getCurrentTime()),bw:e}),this.stuckStartTime=(new Date).getTime())))},_onPlayerUnderload:function(){var e,t,r;!this.buffer_flag&&this.player._options&&this.player._options.autoplay||this.stucking&&!this.player._seeking&&(e=Math.floor(1e3*this.player.getCurrentTime()),r=this.stuckStartTime||(new Date).getTime(),0<(t=Math.floor((new Date).getTime()-r))&&(r=this._getbwEstimator(),this._log("LOADED",{vt:e,cost:t,bw:r})),this.stucking=!1)},_onPlayerHeartBeat:function(){var e,t;this.player._seeking||(e=Math.floor(1e3*this.player.getCurrentTime()),(t=this).timer||(this.timer=setTimeout(function(){this.player._seeking||t._log("HEARTBEAT",{progress:e}),clearTimeout(t.timer),t.timer=null},6e4)))},_onPlayerError:function(){this.playId=0,this._LoadedData=1,this.buffer_flag||this._reportPlay()},_getbwEstimator:function(){var e=NaN;try{e=this.player._getbwEstimator&&this.player._getbwEstimator()}catch(e){}return e},_log:function(e,t){if(this.trackLog){this.updateSourceInfo();var r=a.copy(this.opt);this.requestId=f.guid();var i=y.logReportTo;r.e=l[e]+"",r.ri=this.sessionId,r.t=(new Date).getTime()+"",r.cdn_ip=this._userNetInfo.cdnIp,r.hn=this._userNetInfo.localIp;e=this.player.getCurrentQuality();""!=e&&(r.definition=e.definition);var n=[];a.each(t,function(e,t){n.push(e+"="+t)});var o,e="",t=this.player.getOptions();t&&t.vid&&(e=t.vid),n.push("vid="+e);try{Aliplayer&&Aliplayer.__logCallback__&&(r.args=n,Aliplayer.__logCallback__(r))}catch(e){console.log(e)}return n=n.join("&"),r.args=this.encodeURL(n=""==n?"0":n),this._logService?this._logService.add(r):(o=[],a.each(r,function(e,t){o.push(e+"="+t)}),o=o.join("&"),s.jsonp(i+"?"+o,function(){},function(){})),this.sessionId}}});t.exports=i},{"../config":205,"../lib/data":218,"../lib/io":225,"../lib/object":227,"../lib/oo":228,"../lib/ua":232,"../player/base/event/eventtype":244,"./log":238,"./util":240}],240:[function(e,t,r){var i=e("../lib/cookie"),n=e("../lib/data"),o=e("../lib/ua");t.exports.getUuid=function(){var e=i.get("p_h5_u");return e||(e=n.guid(),i.set("p_h5_u",e,730)),e},t.exports.getTerminalType=function(){var e="pc";return o.IS_IPAD?e="pad":o.IS_ANDROID?e="android":o.IS_IOS&&(e="iphone"),e},t.exports.returnUTCDate=function(e){var t=e.getUTCFullYear(),r=e.getUTCMonth(),i=e.getUTCDate(),n=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),e=e.getUTCMilliseconds();return Date.UTC(t,r,i,n,o,a,e)},t.exports.getRfc822=function(e){return e.toUTCString().replace("UTC","GMT")}},{"../lib/cookie":217,"../lib/data":218,"../lib/ua":232}],241:[function(e,t,r){var o=e("./base/player"),a=e("./flash/flashplayer"),s=e("./saas/mtsplayer"),l=e("./saas/vodplayer"),u=e("./audio/audioplayer"),c=e("./hls/hlsplayer"),h=e("./flv/flvplayer"),d=e("./rts/rtsplayer"),f=e("./drm/drmplayer"),p=e("../lib/ua"),y=e("../lib/playerutil"),g=(e("../lib/dom"),e("../lib/io"),e("../lang/index"));t.exports.create=function(e,t){navigator&&navigator.userAgent&&-1t._liveRetryCount?t._reloadAndPlayForM3u8():(t._liveRetryCount=0,t.trigger(s.Player.LiveStreamStop),t._liveErrorHandle=setTimeout(function(){var e={mediaId:"ISLIVE",error_code:i,error_msg:u.get("Error_Play_Text")+"\uff0c"+u.get("Error_Retry_Text")};t.logError(e),t.trigger("error",e)}));else if(!t._reloadForVod()){var a=u.get("Error_Play_Text"),e=!1;if(r<4){if(3==r&&t._firstDecodeError){n=t.getCurrentTime()+1;return t._loadByUrlInner(t._options.source,n,!0),void(t._firstDecodeError=!1)}a=l.VideoErrorCodeText[r]}else t._eventState==l.SUSPEND?(a=u.get("Error_Load_Abort_Text"),i=l.ErrorCode.RequestDataError):t._eventState==l.LOAD_START?(a=u.get("Error_Network_Text"),0"+(100*e).toFixed()+"%";this._player.trigger(S.Private.Info_Show,{text:e,duration:1e3,align:"lb"})},e.prototype._setInnerVolume=function(e){this.tag.volume=e,this.trigger(S.Private.VolumnChanged,e)},e.prototype.hideProgress=function(){this.trigger(S.Private.HideProgress)},e.prototype.cancelHideProgress=function(){this.trigger(S.Private.CancelHideProgress)},e.prototype.setPlayerSize=function(e,t){this._el&&(this._el.style.width=e,this._el.style.height=t)},e.prototype.getBuffered=function(){return this.tag.buffered},e.prototype.setRotate=function(e){this.tag&&(this._rotate=e,this._setTransform(),this.log("ROTATE",{rotation:e}))},e.prototype.getRotate=function(e){return void 0===this._rotate?0:this._rotate},e.prototype.setImage=function(e){this.tag&&(this._image=e,this._setTransform(),this.log("IMAGE",{mirror:"horizon"==e?2:1,text:e}))},e.prototype.getImage=function(){return this._image},e.prototype.cancelImage=function(){this.tag&&(this._image="",this._setTransform(),this.log("IMAGE",{mirror:0}))},e.prototype.setCover=function(e){var t=document.querySelector("#"+this.id()+" .prism-cover");t&&e&&(t.style.backgroundImage="url("+e+")",this._options.cover=e,this.trigger(S.Private.Cover_Show))},e.prototype._setTransform=function(){this._transformProp||(this._transformProp=a.getTransformName(this.tag));var e=" translate(-50%, -50%)";this._rotate&&(e+=" rotate("+this._rotate+"deg)"),this._image&&("vertical"==this._image?e+=" scaleY(-1)":"horizon"==this._image&&(e+=" scaleX(-1)")),this.tag.style[this._transformProp]=e},e.prototype._startPlay=function(){this.tag.paused&&this.tag.play()},e.prototype._initPlayBehavior=function(e,t){if(this._checkSupportVideoType())return!1;if(f.validateSource(t))return void 0===e&&(e=!1),this._created||(this._created=!0,this.trigger(S.Private.Created)),this.loaded||this.trigger(S.Player.Init),this._options.autoplay||this._options._autoplay||this._options.preload||e?(this._options._preload=!0,this._initLoad(t),(this._options.autoplay||this._options._autoplay)&&this._startPlay()):this.trigger(S.Private.Play_Btn_Show),!0;t={mediaId:this._options.vid||"",error_code:h.ErrorCode.InvalidSourceURL,error_msg:"InvalidSourceURL"};return t.display_msg=g.get("Error_Invalidate_Source"),this.trigger(S.Player.Error,t),!1},e.prototype._isPreload=function(){return this._options.autoplay||this._options.preload||this._options._preload},e.prototype._initLoad=function(e){this.getMetaData(),e&&(this._isPreload()&&!c.IS_MOBILE?this.trigger(S.Private.H5_Loading_Show):(this.trigger(S.Private.H5_Loading_Hide),this.trigger(S.Private.Play_Btn_Show)),this.tag.setAttribute("src",e),this.loaded=!0)},e.prototype._clearLiveErrorHandle=function(){this._liveErrorHandle&&(clearTimeout(this._liveErrorHandle),this._liveErrorHandle=null)},e.prototype._reloadAndPlayForM3u8=function(){0==this._liveRetryCount&&this.trigger(S.Player.OnM3u8Retry);var e=this._options,e=e.liveRetryInterval+e.liveRetryStep*this._liveRetryCount;d.sleep(1e3*e),this._liveRetryCount++,this.tag.load(this._options.source),this.tag.play()},e.prototype._checkSupportVideoType=function(){if(!this.tag.canPlayType||!this._options.source||!c.IS_MOBILE)return"";var e=this._options.source,t="";return 0=this._options.playConfig.PreviewTime},e.prototype.isPreview=function(){var e=this._options.playConfig.PreviewTime,t=this._vodDuration||this.tag.duration;return 0'},_getPlayer:function(e){return-1!=navigator.appName.indexOf("Microsoft")?document.getElementById(e):document[e]},_getLowerQualityLevel:function(){var e=this._getVideoUrls();if(!e)return"";var t=e.Urls,e=e.index;return!(t&&0==t.length||-1==e)&&0s._liveRetryCount?(0==s._liveRetryCount&&s.trigger(y.Player.OnM3u8Retry),t=o.liveRetryInterval+o.liveRetryStep*s._liveRetryCount,s._liveRetryCount++,setTimeout(function(){s._loadByUrlInner(o.source)},1e3*t)):(s._liveErrorHandle&&clearTimeout(s._liveErrorHandle),s.trigger(y.Player.LiveStreamStop),s._liveErrorHandle=setTimeout(a,500)):s._reloadForVod()||a()})})}},{"../../config":205,"../../lang/index":212,"../../lib/constants":216,"../../lib/dom":219,"../../lib/io":225,"../../lib/playerutil":230,"../../lib/ua":232,"../../lib/util":234,"../base/event/eventtype":244,"../base/player":263}],273:[function(e,t,r){var i=e("../base/player"),n=e("./flvinjector"),o=i.extend({init:function(e,t){n.inject(this,o,i,t,function(e){}),t._native=!1,i.call(this,e,t)}});t.exports=o},{"../base/player":263,"./flvinjector":272}],274:[function(e,t,r){var u=e("../../lib/io"),c=e("../../config"),h=e("../../lib/constants"),d=e("../../lib/util"),f=e("../../lib/playerutil"),p=(e("../../lib/dom"),e("../../lib/ua")),y=e("../../lang/index"),g=e("../base/event/eventtype");e("../base/player");t.exports.inject=function(e,t,r,i,o,n){var a,s=i.source,l=i.useHlsPluginForSafari,i=i.useHlsPlugOnMobile;(o||n||(n=s,l=l,i=i,!e._hls&&f.isHls(n)&&(!f.canPlayHls()||f.isSafariUsedHlsPlugin(l)||i&&f.isUsedHlsPluginOnMobile())))&&(e._Type=t,e._superType=r,e._superPt=r.prototype,e._disposed=!1,t.prototype._checkHlsReady=function(){if(null==e._hls)throw new Error("please invoke this method after ready event")},e._isHls=!0,e._hls=null,e._isLoadedHls=!1,e._stopLoadAsPaused=!0,t.prototype.play=function(e){this._checkHlsReady(),this._isManualPlay=e||!1;return this.trigger(g.Private.Cover_Hide),this._options.autoplay||this._options.preload||this._loadSourced||(this._loadSourced=!0,this._options._autoplay=!0,this._hls.loadSource(this._options.source)),this.tag.ended||this._ended?this.replay():this.tag.paused&&(this.tag.play(),this._stopLoadAsPaused&&(e=this.getCurrentTime(),this._hls.startLoad(e))),this},t.prototype.replay=function(){return this._monitor&&this._monitor.replay(),this._hls.startLoad(0),this.tag.play(),this},t.prototype.pause=function(e){return this.tag&&(this._checkHlsReady(),this.tag.pause(),this._stopLoadAsPaused&&this._hls.stopLoad()),this._isManualPause=e||!1,this},t.prototype.stop=function(){return this._checkHlsReady(),this.tag.setAttribute("src",null),this._hls.stopLoad(),this},t.prototype.seek=function(e){this._checkHlsReady();try{this._superPt.seek.call(this,e),this.tag.paused&&this._stopLoadAsPaused&&this._hls.startLoad(e)}catch(e){console.log(e)}return this},t.prototype.getProgramDateTime=function(){if(this._checkHlsReady(),-1==this._hls.currentLevel)return"";var e=this._hls.currentLevel,e=this._hls.levels[e].details;if(e){e=e.programDateTime;if(console.log("ProgramDateTime="+e),e)return new Date(e).valueOf()}return 0},t.prototype.getCurrentPDT=function(){if(this._checkHlsReady(),-1==this._hls.currentLevel)return"";var e=this._hls.streamController.fragPlaying||{},t=e.pdt;if(!t)return 0;e=1e3*e.startPTS;return t+(1e3*this.getCurrentTime()-e)},t.prototype._reloadAndPlayForM3u8=function(){0==this._liveRetryCount&&this.trigger(g.Player.OnM3u8Retry),this._liveRetryCount++},t.prototype._switchLevel=function(e){this.trigger(g.Player.LevelSwitch);for(var t=this._hls.levels,r=!0,i=0;is._liveRetryCount?(0==s._liveRetryCount&&s.trigger(g.Player.OnM3u8Retry),a=a.liveRetryInterval+a.liveRetryStep*s._liveRetryCount,s._liveRetryCount++,setTimeout(function(){i&&s._loadByUrlInner(s._options.source,0,!0)},1e3*a)):(s._liveErrorHandle&&clearTimeout(s._liveErrorHandle),s.trigger(g.Player.LiveStreamStop),s._liveErrorHandle=setTimeout(o,500)):s._reloadForVod()||o())})})}},{"../../config":205,"../../lang/index":212,"../../lib/constants":216,"../../lib/dom":219,"../../lib/io":225,"../../lib/playerutil":230,"../../lib/ua":232,"../../lib/util":234,"../base/event/eventtype":244,"../base/player":263}],275:[function(e,t,r){var i=e("../base/player"),n=e("./hlsinjector"),o=i.extend({init:function(e,t){t._native=!1,n.inject(this,o,i,t),i.call(this,e,t)}});t.exports=o},{"../base/player":263,"./hlsinjector":274}],276:[function(e,t,r){var a=e("../../lib/io"),s=e("../../config"),u=e("../../lib/constants"),c=(e("../../lib/util"),e("../../lib/playerutil"),e("../../lib/dom"),e("../../lib/ua"),e("../../lang/index")),h=e("../base/event/eventtype");e("../base/player");t.exports.inject=function(e,t,r,i,n,o){e._Type=t,e._superType=r,e._superPt=r.prototype,e._disposed=!1,t.prototype._checkRtsReady=function(){if(null==e._rts)throw new Error("please invoke this method after ready event")},e._isRts=!0,e._rts=null,e._isLoadedRts=!1,e._originalUrl="",t.prototype.play=function(e){this._checkRtsReady(),this._isManualPlay=e||!1;return this.trigger(h.Private.Cover_Hide),this._options.autoplay||this._options.preload||this._loadSourced||(this._loadSourced=!0,this._options._autoplay=!0,this._rts.startLiveStream(this._options.source,this.tag)),this.tag.paused&&(this.tag.play(),this._initPlayBehavior(!0)),this},t.prototype.seek=function(e){},t.prototype.setSpeed=function(e){},t.prototype.pause=function(e){return this._checkRtsReady(),this.tag.pause(),this},t.prototype.stop=function(){return this._rts&&this._rts.stopLiveStream(),this},t.prototype.dispose=function(){this._disposed||(this._disposed=!0,this._superPt&&this._superPt.dispose.call(this),this._destroyRts(),this._superPt&&(t.prototype.play=this._superPt.play,t.prototype.pause=this._superPt.pause,t.prototype.initPlay=this._superPt.initPlay,t.prototype.stop=this._superPt.stop,t.prototype.dispose=this._superPt.dispose,t.prototype.seek=this._superPt.seek,t.prototype.setSpeed=this._superPt.setSpeed))},t.prototype._destroyRts=function(){this._rts&&this.stop(),this._rts=null},t.prototype._destroyRts=function(){this._rts&&this.stop(),this._rts=null},t.prototype.initPlay=function(e){function t(r,i){var n=null,o=null,a=!r._rts;r._destroyRts();var e=r._options.customTag||"",t=r._options.trackLog||!1,s=r._options.playTimeOut||5e3;r._originalUrl=r._options.source,r._rts=new AliRTS({customTag:e,trackLog:t,playConfig:{playTimeOut:s}}),r._rts.isSupport({isReceiveVideo:!0}).then(function(e){console.log(e),l(r,r._rts),r._initPlayBehavior(i),r._rts.startLiveStream(r._options.source,r.tag).then(function(){})["catch"](function(e){10202==e.code?(n=u.ErrorCode.PlayUrlError,o=c.get("Play_Url_Error")):10203==e.code?(n=u.ErrorCode.SubscribeNonthing,o=c.get("Subscribe_Nonthing")):10204==e.code&&(n=u.ErrorCode.HtmlElementError,o=c.get("Html_Element_Error"));e={error_code:n,error_msg:o};null!==e.error_code&&null!==e.error_msg&&r.trigger(h.Player.Error,e)});var t=document.querySelector(".volume-icon");t&&t.addEventListener("click",function(e){r._rts.muteLiveStream(!1),t.setAttribute("class","volume-icon")}),a&&r._executeReadyCallback()})["catch"](function(e){return 10011==e.errorCode?(n=u.ErrorCode.BrowserNotSupport,o=c.get("Browser_Not_Support")):10010==e.errorCode&&(n=u.ErrorCode.NotSupportWebRtc,o=c.get("Not_Support_Webrtc")),r.trigger(h.Player.Error,{error_code:n,error_msg:o}),!1})}(that=this)._isLoadedRts?t(this,e):(this.trigger(h.Private.H5_Loading_Show),function(e,t){var r=this._options.rtsVersion||s.rtsVersion,i=this;a.loadJS("https://g.alicdn.com/AliRTC/H5RTSSdk/"+r+"/aliyun-rts-sdk.js",function(){e.apply(i)})}.call(that,function(){this._isLoadedRts=!0,t(this,e)},this._options.debug))};var l=function(i,e){function n(e,t){i.pause(),setTimeout(function(){i.trigger(h.Private.Play_Btn_Hide)}),i.checkOnline()&&(i.logError(t={error_code:e,error_msg:t}),i.trigger(h.Player.Error,t))}function o(e,t){var r;i._options&&i._options.isLive?(r=i._options).liveRetry>i._liveRetryCount?(0==i._liveRetryCount&&i.trigger(h.Player.OnM3u8Retry),r=r.liveRetryInterval+r.liveRetryStep*i._liveRetryCount,i._liveRetryCount++,setTimeout(function(){i._loadByUrlInner(i._options.source,0,!0)},1e3*r)):(i._liveErrorHandle&&clearTimeout(i._liveErrorHandle),i.trigger(h.Player.LiveStreamStop),i._liveErrorHandle=setTimeout(n(e,t),500)):i._reloadForVod()||n(e,t)}e.on("onError",function(e){var t=null,r=null;10001==e.errorCode?(t=u.ErrorCode.RequestHttpError,r=c.get("Http_Request_Error"),o(t,r)):10010==e.errorCode?(t=u.ErrorCode.NotSupportWebRtc,r=c.get("Not_Support_Webrtc"),n(t,r)):10012==e.errorCode?(t=u.ErrorCode.BrowserVersionTooLow,r=c.get("Browser_Version_Too_Low"),n(t,r)):10013==e.errorCode?(t=u.ErrorCode.NotSupportH264,r=c.get("Not_Support_H264"),n(t,r)):10014==e.errorCode?(t=u.ErrorCode.CreateOfferError,r=c.get("Create_Offer_Error"),n(t,r)):10002==e.errorCode&&(t=u.ErrorCode.PlayFailedError,r=c.get("ERROR_PLAY_FAILED"),o(t,r))});var t="canplay",r="waiting",a="playing",s="media",l=!1;e.on("onPlayEvent",function(e){e.event===t||e.event===r||e.event===a||e.event===s&&e.data&&(0===e.data.audio.bytesReceivedPerSecond&&0===e.data.video.bytesReceivedPerSecond?0==e.data.audio.bytesReceivedPerSecond&&0==e.data.video.bytesReceivedPerSecond&&l&&(errorCode=u.ErrorCode.PlayFailedError,errorMsg=c.get("ERROR_PLAY_FAILED"),o(errorCode,errorMsg),l=!1):l=!0)})}}},{"../../config":205,"../../lang/index":212,"../../lib/constants":216,"../../lib/dom":219,"../../lib/io":225,"../../lib/playerutil":230,"../../lib/ua":232,"../../lib/util":234,"../base/event/eventtype":244,"../base/player":263}],277:[function(e,t,r){var i=e("../base/player"),n=e("./rtsinjector"),o=i.extend({init:function(e,t){t.isLive&&(t._native=!1,n.inject(this,o,i,t),i.call(this,e,t))}});t.exports=o},{"../base/player":263,"./rtsinjector":276}],278:[function(e,t,r){var i=e("../../lib/constants"),e=e("../../lib/oo").extend({init:function(e){this.player=e,this.tickhandle=null}});e.prototype.tick=function(e,t){var r=this;this.tickhandle=setTimeout(function(){r.player&&r.player.trigger(i.AuthKeyExpiredEvent),t&&t()},1e3*e)},e.prototype.clearTick=function(e){this.tickhandle&&clearTimeout(this.tickhandle)},t.exports=e},{"../../lib/constants":216,"../../lib/oo":228}],279:[function(e,t,r){var o=e("../../lib/io"),l=(e("../../lib/ua"),e("../../lib/bufferbase64")),u=e("../../lib/constants"),c=e("./signature"),a=e("./util"),h=e("../../lib/url"),d=e("../../lib/playerutil"),s=e("../../lang/index"),f=function(e,t,r){var i=c.randomUUID(),n="https://mts."+e.domainRegion+".aliyuncs.com/?",i={AccessKeyId:e.accessId,Action:"GetLicense",MediaId:e.vid,LicenseUrl:n,data:e.data,SecurityToken:e.stsToken,Format:"JSON",Type:e.encryptionType,Version:"2014-06-18",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:i};e.header&&(i.Header=e.header);e=n+("Signature="+c.AliyunEncodeURI(c.makeChangeSiga(i,e.accessSecret,"POST"))),i=c.makeUTF8sort(i,"=","&");o.post(e,i,function(e){e?(e=JSON.parse(e),t&&(e=e.License,t(e))):r&&r(a.createError("MPS\u83b7\u53d6License\u5931\u8d25"))},function(e){if(r){var t={Code:"",Message:s.get("Error_MTS_Fetch_Urls_Text")};try{t=JSON.parse(e)}catch(e){}r({Code:u.ErrorCode.ServerAPIError,Message:t.Code+"|"+t.Message,sri:t.requestId||""})}})};function p(e){window.console.error("A video playback error occurred")}function y(e){window.console.error("The license request failed.")}function g(e){window.console.error("A decryption key error was encountered")}function m(e){window.console.log("Decryption key was added to session.")}function b(e,t,r){r.addEventListener(e,function(){t(arguments[0])},!1)}t.exports.requestLicenseKey=function(e){var s=e;return s._options.vid&&(s.__vid=s._options.vid),function(e,t){var r,i,n,o=s._options,a=s._getDRMEncryptItem();a&&(r={vid:s.__vid,accessId:o.accId,accessSecret:o.accSecret,stsToken:o.stsToken,domainRegion:o.domainRegion,authInfo:o.authInfo,encryptionType:a.encryptionType},a.encryptionType==u.EncryptionType.Widevine?r.data=l.encode(e.message):a.encryptionType==u.EncryptionType.PlayReady&&(i=l.unpackPlayReady(e.message),r.data=i.changange,i.header&&(r.header=JSON.stringify(i.header))),console.log(r.data),i=s.__licenseKeys,n=s.__vid+a.Url,i&&i[n],f(r,function(e){s.__licenseKeys||(s.__licenseKeys={}),10"===e.substr(0,5)&&""===e.substr(-6)&&(e=e.slice(5,-6));e=c.base64DecodeUint8Array(e);t.session.update(e)}.bind(this),!1),n.addEventListener("error",y,!1);var r=btoa("spc="+c.base64EncodeUint8Array(i)+"&assetId="+encodeURIComponent(r.contentId)),o={Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",Timestamp:c.ISODateString(new Date),SignatureNonce:c.randomUUID(),AccessKeyId:t._options.accessKeyId,SecurityToken:t._options.securityToken,CertId:t._options.certId};t._options.isLive?(o.RegionId=t._options.region,o.Action="DescribeDRMLicense",o.Version="2016-11-01",o.CdmData=r,o.Type="fairplay",o.Domain=h.parseUrl(t._options.source).hostname):(o.region=t._options.region,o.Action="GetDRMLicense",o.Version="2017-03-21",o.VideoId=t._options.vid,o.CDMData=r,o.DRMType="FairPlay");var a,s,r="Signature="+c.AliyunEncodeURI(c.makeChangeSiga(o,t._options.accessKeySecret,"POST"));r=t._options.isLive?"https://"+d.getLiveHostByRegion(t._options.region)+"/?"+r:"https://vod."+t._options.region+".aliyuncs.com/?"+r;for(s in n.open("POST",r,!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o){var l;o.hasOwnProperty(s)&&(l=o[s],a=a?a+"&"+c.AliyunEncodeURI(s)+"="+c.AliyunEncodeURI(l):c.AliyunEncodeURI(s)+"="+c.AliyunEncodeURI(l))}n.send(a)}.bind(this),i),b("webkitkeyadded",m,i),b("webkitkeyerror",g,i)}.call(r,e,i)},!1),this.tag.addEventListener("error",p,!1),this.tag.src=this._options.source}.bind(e),!1),t.addEventListener("error",function(e){window.console.error("Failed to retrieve the server certificate.")}.bind(e),!1);var r={Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",Timestamp:c.ISODateString(new Date),SignatureNonce:c.randomUUID(),AccessKeyId:e._options.accessKeyId,SecurityToken:e._options.securityToken,CertId:e._options.certId};e._options.isLive?(r.RegionId=e._options.region,r.Action="DescribeDRMCertificate",r.Version="2016-11-01"):(r.region=e._options.region,r.Action="GetDRMCertInfo",r.Version="2017-03-21",r.VideoId=e._options.vid);var i,n,o,a="Signature="+c.AliyunEncodeURI(c.makeChangeSiga(r,e._options.accessKeySecret,"POST")),a=e._options.isLive?"https://"+d.getLiveHostByRegion(e._options.region)+"/?"+a:"https://vod."+e._options.region+".aliyuncs.com/?"+a;for(i in t.open("POST",a,!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),r)r.hasOwnProperty(i)&&(n=r[i],o=o?o+"&"+c.AliyunEncodeURI(i)+"="+c.AliyunEncodeURI(n):c.AliyunEncodeURI(i)+"="+c.AliyunEncodeURI(n),console.log(n));t.send(o)},t.exports.getRequestUrl=function(e,t){var r={AccessKeyId:t._options.accessKeyId,Format:"JSON",Version:"2016-11-01",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",Timestamp:c.ISODateString(new Date),SignatureNonce:c.randomUUID(),CertId:t._options.certId,SecurityToken:t._options.securityToken,RegionId:t._options.region,Action:"DescribeDRMLicense",Type:"widevine",CdmData:e,Domain:h.parseUrl(t._options.source).hostname},e="Signature="+c.AliyunEncodeURI(c.makeChangeSiga(r,t._options.accessKeySecret,"POST"));return{url:"https://"+d.getLiveHostByRegion(t._options.region)+"/?"+e,data:c.makeUTF8sort(r,"=","&"),jsonData:c.makeUTF8sort(r,"=","&","json")}},t.exports.postData=function(e,t){var r=c.randomUUID(),r={AccessKeyId:t._options.accessKeyId,VideoId:t._options.vid,Format:"JSON",Version:"2017-03-21",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:r,CertId:t._options.certId,SecurityToken:t._options.securityToken,region:t._options.region,Action:"GetDRMLicense",DRMType:"Widevine",CDMData:e},e="Signature="+c.AliyunEncodeURI(c.makeChangeSiga(r,t._options.accessKeySecret,"POST"));return{url:"https://vod."+t._options.region+".aliyuncs.com/?"+e,data:c.makeUTF8sort(r,"=","&"),jsonData:c.makeUTF8sort(r,"=","&","json")}}},{"../../lang/index":212,"../../lib/bufferbase64":214,"../../lib/constants":216,"../../lib/io":225,"../../lib/playerutil":230,"../../lib/ua":232,"../../lib/url":233,"./signature":283,"./util":285}],280:[function(e,t,r){var i=e("../../lib/io"),l=e("../../lib/constants"),s=e("./signature"),u=e("./util"),c=e("../../lang/index"),h=e("../../lib/ua");var d=function(e,r){var t="";e.sort(function(e,t){e=parseInt(e.bitrate),t=parseInt(t.bitrate);return"desc"==r?te&&(this.loadByUrl(this._urls[e].Url,this.getCurrentTime()),this._currentPlayIndex=e,this.trigger(v.Private.QualityChange,t||m.get("Quality_Change_Fail_Switch_Text")))},w.prototype._getLowerQualityLevel=function(){if(0==this._urls.length||-1==this._currentPlayIndex)return"";if("asc"==this.options().qualitySort){if(0"+o,i.trigger("error",n),console.log("PrismPlayer Error: "+r+"! error_msg :"+o+";")},t.exports=w},{"../../config":205,"../../lang/index":212,"../../lib/constants":216,"../../lib/cookie":217,"../../lib/event":220,"../../lib/io":225,"../../lib/playerutil":230,"../../lib/ua":232,"../audio/audioplayer":242,"../base/event/eventtype":244,"../base/player":263,"../drm/drminjector":269,"../flv/flvinjector":272,"../hls/hlsinjector":274,"./authkeyexpiredhandle":278,"./signature":283}],283:[function(e,c,t){var n=e("crypto-js/hmac-sha1"),o=e("crypto-js/enc-base64"),r=e("crypto-js/enc-utf8");c.exports.randomUUID=function(){for(var e=[],t="0123456789abcdef",r=0;r<36;r++)e[r]=t.substr(Math.floor(16*Math.random()),1);return e[14]="4",e[19]=t.substr(3&e[19]|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")},c.exports.returnUTCDate=function(){var e=new Date,t=e.getUTCFullYear(),r=e.getUTCMonth(),i=e.getUTCDate(),n=e.getUTCHours(),o=e.getUTCMinutes(),a=e.getUTCSeconds(),e=e.getUTCMilliseconds();return Date.UTC(t,r,i,n,o,a,e)},c.exports.AliyunEncodeURI=function(e){e=encodeURIComponent(e);return e=(e=(e=e.replace("+","%2B")).replace("*","%2A")).replace("%7E","~")},c.exports.makesort=function(e,t,r){if(!e)throw new Error("PrismPlayer Error: vid should not be null!");var i=[];for(s in e)i.push(s);for(var n=i.sort(),o="",a=n.length,s=0;s>2,n=(3&a)<<4|(t=u>4,o=(15&t)<<2|(r=u>6,a=63&r,isNaN(t)?o=a=64:isNaN(r)&&(a=64),l+=s.charAt(i)+s.charAt(n)+s.charAt(o)+s.charAt(a);return l}},{"crypto-js/enc-base64":75,"crypto-js/enc-utf8":76,"crypto-js/hmac-sha1":77}],284:[function(e,t,r){var o=e("../../lib/io"),a=e("../../lib/constants"),s=e("./signature"),l=e("./util"),u=e("../../lang/index");t.exports.getPlayAuth=function(e,t,r,i){s.randomUUID();var n=s.randomUUID(),n={AccessKeyId:e.accessKeyId,Action:"GetVideoPlayAuth",VideoId:e.vid,AuthTimeout:a.AuthInfoExpired,SecurityToken:e.securityToken,Format:"JSON",Version:"2017-03-21",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:n},n=s.makeUTF8sort(n,"=","&")+"&Signature="+s.AliyunEncodeURI(s.makeChangeSiga(n,e.accessKeySecret)),n="https://vod."+e.region+".aliyuncs.com/?"+n;o.get(n,function(e){e?(e=JSON.parse(e),t&&t(e.PlayAuth)):r&&r(l.createError("\u83b7\u53d6\u89c6\u9891\u64ad\u653e\u51ed\u8bc1\u5931\u8d25"))},function(e){if(r){var t={Code:"",Message:u.get("Fetch_Playauth_Error")};try{(t=JSON.parse(e)).Code}catch(e){}r({Code:a.ErrorCode.ServerAPIError,Message:t.Code+"|"+t.Message,sri:t.requestId,display_msg:u.get("Fetch_Playauth_Error",i)})}})}},{"../../lang/index":212,"../../lib/constants":216,"../../lib/io":225,"./signature":283,"./util":285}],285:[function(e,t,r){t.exports.createError=function(e,t){return{requestId:"",code:t||"",message:e}}},{}],286:[function(e,t,r){var i=e("../../lib/io"),h=e("../../lib/constants"),n=e("./signature"),d=e("./util"),o=e("../../config"),a=e("../../lang/index");function f(e,t){for(var r=[],i=[],n=[],o=[],a=e.length-1;0<=a;a--){var s=e[a],l=(l=void 0,(l={}).width=(s=s).Width,l.height=s.Height,l.definition=s.Definition,l.Url=s.PlayURL,l.format=s.Format,l.desc=h.QualityLevels[l.definition],l.encryptionType=h.VodEncryptionType[s.EncryptType],l.plaintext=s.Plaintext,l.rand=s.Rand,l.encrypt=s.Encrypt,l.duration=s.Duration,l.bitrate=s.Bitrate,l);("mp4"==l.format?i:"mp3"==l.format?n:"m3u8"==l.format?r:o).push(l)}var u=[],u=0=this.liveTimeRange.end)},e.prototype.switchToLive=function(){var e=this._player._options.recreatePlayer;e&&this._isLiveShift&&(this._player.dispose(),setTimeout(function(){e()},1e3),this._isLiveShift=!1)},e.prototype.getBaseTime=function(){this.liveShiftStartDisplay;return-1==this.seekTime?i.parseTime(this.currentTimeDisplay):i.parseTime(this.liveShiftStartDisplay)+this.seekTime},e.prototype.getSourceUrl=function(e,t){var r=this._originalPlayUrl;return this.availableLiveShiftTime<=e?r:(this._isLiveShift=!0,(e=parseInt(e))<=5&&(e=5),r=-1==(r=(r=this._switchLiveShiftPlayer(t))&&r.replace("lhs_offset_unix_s_0","z")).indexOf("?")?r+"?lhs_offset_unix_s_0="+e:r+"&lhs_offset_unix_s_0="+e)},e.prototype._switchLiveShiftPlayer=function(e){var t=this._originalPlayUrl,r=this._player._options.liveShiftSource,i=this._player._options.source;if(s.isHls(i))t=i;else if(s.isFlv(t)&&r&&s.isHls(r)){this._player._flv&&this._player._destroyFlv();var n=this._player._superType,i=this._player._Type;return this._player._options._autoplay=!0,u.inject(this._player,i,n,this._player._options,"",!0),r}return t},e.prototype.getTimeline=function(t,i){if(this._player.trigger(h.Private.LiveShiftQueryCompleted),!this._liveShiftUrl)return o(this,(new Date).valueOf()/1e3),void(t&&t());var r=this;this.queryLiveShift(this._liveShiftUrl,function(e){e?0==(e=e).retCode?(o(r,e.content.current),t&&t()):i({Code:c.ErrorCode.ServerAPIError,Message:e.retCode+"|"+e.description+"|"+e.content}):console.log("\u83b7\u53d6\u76f4\u64ad\u65f6\u79fb\u6570\u636e\u5931\u8d25")},function(e){if(i&&e){var t={};if(e){if(-1"+u.get("Retry")+""+u.get("Detection_Text")+"

code\uff1a

vid:

uuid:

requestId:

"+u.get("Play_DateTime")+"\uff1a

",e},bindEvent:function(){var r=this;r._player.on(a.Private.Error_Show,function(e){var t=null;r._player.getMonitorInfo&&(t=r._player.getMonitorInfo()),r._show(e,t)}),r._player.on(a.Private.Error_Hide,function(){r._hide()});var e=document.querySelector("#"+r.id()+" .prism-button-refresh");n.on(e,"click",function(){location.reload(!0)}),o.IS_MOBILE&&(e=document.querySelector("#"+r.id()+" .prism-detect-info"),l.addClass(e,"prism-width90"));e=document.querySelector("#"+r.id()+" .prism-button-retry");n.on(e,"click",function(){var e=r._player.getCurrentTime(),t=r._player._options.source;r._player._setDefaultCC=!0,r._player._loadByUrlInner(t,e,!0)})},_show:function(e,t){var r=e.paramData,i="",n="";r.mediaId&&(i=r.mediaId);var o,a,e=document.querySelector("#"+this.id()+" .prism-button-orange");e&&(t&&this._player._options.diagnosisButtonVisible?(t.vu?n=decodeURIComponent(t.vu):l.css(e,"display","none"),t="//player.alicdn.com/detection.html?from=h5&vid="+i+"&source="+(n?encodeURIComponent(n):"")+"&uuid="+t.uuid+"&lang="+u.getCurrentLanguage(),e&&(e.href=t)):l.css(e,"display","none"),e=r.display_msg||r.error_msg,document.querySelector("#"+this.id()+" .prism-error-content p").innerHTML=e,document.querySelector("#"+this.id()+" .errorCode .info-content").innerText=r.error_code,e=document.querySelector("#"+this.id()+" .vid"),r.mediaId?(l.css(e,"display","block"),document.querySelector("#"+this.id()+" .vid .info-content").innerText=r.mediaId):l.css(e,"display","none"),r.uuid?document.querySelector("#"+this.id()+" .uuid .info-content").innerText=r.uuid:(e=document.querySelector("#"+this.id()+" .uuid"),l.css(e,"display","none")),r.requestId?document.querySelector("#"+this.id()+" .requestId .info-content").innerText=r.requestId:(o=document.querySelector("#"+this.id()+" .requestId"),l.css(o,"display","none")),document.querySelector("#"+this.id()+" .dateTime .info-content").innerText=s.formatDate(new Date,"yyyy-MM-dd HH:mm:ss"),o=document.querySelector("#"+this.id()),l.css(o,"display","block"),(a=this).playHideHandler&&clearTimeout(a.playHideHandler),a.playHideHandler=setTimeout(function(){a._player.trigger("play_btn_hide")}))},_hide:function(){var e=document.querySelector("#"+this.id());l.css(e,"display","none")},disposeUI:function(){this.playHideHandler&&(clearTimeout(this.playHideHandler),this.playHideHandler=null)}});t.exports=e},{"../../lang/index":212,"../../lib/dom":219,"../../lib/event":220,"../../lib/ua":232,"../../lib/util":234,"../../player/base/event/eventtype":244,"../component":296}],302:[function(e,t,r){var i=e("../component"),n=e("../../player/base/event/eventtype"),o=(e("../../lib/event"),e("../../lib/ua")),a=e("../../lang/index"),s=e("./util"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-fullscreen-btn")},bindEvent:function(){var e=this;this._player.on(n.Player.RequestFullScreen,function(){o.IS_IOS||e.addClass("fullscreen")}),this._player.on(n.Player.CancelFullScreen,function(){e.removeClass("fullscreen")}),s.registerTooltipEvent.call(this,this.el(),function(){return e._player.fullscreenService.getIsFullScreen()?a.get("ExistFullScreen"):a.get("Fullscreen")}),this.on("click",function(){e._player.fullscreenService.getIsFullScreen()?e._player.fullscreenService.cancelFullScreen():e._player.fullscreenService.requestFullScreen(),e._player.trigger(n.Private.MarkerTextHide)})}});t.exports=e},{"../../lang/index":212,"../../lib/event":220,"../../lib/ua":232,"../../player/base/event/eventtype":244,"../component":296,"./util":323}],303:[function(e,t,r){"use strict";var i=e("../component"),n=e("../../lib/dom"),o=e("../../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-hide")},createEl:function(){var e=i.prototype.createEl.call(this,"div");return e.innerHTML='
',e},_loading_hide:function(e){var t=document.querySelector("#"+this.id()+" .prism-loading");t&&(n.removeClass(t,"prism-loading"),n.addClass(t,"prism-hide"))},_loading_show:function(e){var t=document.querySelector("#"+this.id()+" .prism-hide");t&&(n.removeClass(t,"prism-hide"),n.addClass(t,"prism-loading"))},bindEvent:function(){this._player.on(o.Private.H5_Loading_Show,this._loading_show),this._player.on(o.Private.H5_Loading_Hide,this._loading_hide)}});t.exports=e},{"../../lib/dom":219,"../../player/base/event/eventtype":244,"../component":296}],304:[function(e,t,r){var i=e("../component"),n=(e("../../lib/util"),e("../../lib/dom")),o=(e("../../lib/event"),e("../../lib/ua"),e("../../lang/index"),e("../../player/base/event/eventtype")),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-info-display")},createEl:function(){return i.prototype.createEl.call(this,"p")},bindEvent:function(){var r=this;r._player.on(o.Private.Info_Show,function(e){var t=document.querySelector("#"+r.id()),e=e.paramData;e&&(void 0!==e.text&&e.text?(t.innerHTML=e.text,void 0!==e.duration&&e.duration&&(r.handler&&clearTimeout(r.handler),r.handler=setTimeout(function(){n.css(t,"display","none")},e.duration)),"lb"==e.align?(n.addClass(t,"prism-info-left-bottom"),n.removeClass(t,"prism-info-top-center")):"tc"==e.align?(n.addClass(t,"prism-info-top-center"),n.removeClass(t,"prism-info-left-bottom")):(n.removeClass(t,"prism-info-left-bottom"),n.removeClass(t,"prism-info-top-center")),e.isBlack?n.addClass(t,"prism-info-black"):n.removeClass(t,"prism-info-black")):t.innerHTML=e,n.css(t,"display","block"))}),r._player.on(o.Private.Info_Hide,function(e){var t=document.querySelector("#"+r.id());n.css(t,"display","none")})},disposeUI:function(){this.handler&&(clearTimeout(this.handler),this.handler=null)}});t.exports=e},{"../../lang/index":212,"../../lib/dom":219,"../../lib/event":220,"../../lib/ua":232,"../../lib/util":234,"../../player/base/event/eventtype":244,"../component":296}],305:[function(e,t,r){var i=e("../component"),n=e("./util"),o=(e("../../lib/util"),e("../../lib/dom")),a=e("../../lib/event"),s=e("../../lib/playerUtil"),l=e("../../lang/index"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-live-display")},createEl:function(){var e=i.prototype.createEl.call(this,"p");return e.innerText="LIVE",s.isLiveShift(this._player._options)&&o.addClass(e,"live-shift-display"),e},bindEvent:function(){var e=document.querySelector("#"+this.id()),t=this;s.isLiveShift(this._player._options)&&(a.on(e,"click",function(){t._player._liveshiftService.switchToLive()}),n.registerTooltipEvent.call(this,this.el(),l.get("SwitchToLive")))}});t.exports=e},{"../../lang/index":212,"../../lib/dom":219,"../../lib/event":220,"../../lib/playerUtil":229,"../../lib/util":234,"../component":296,"./util":323}],306:[function(e,t,r){var i=e("../component"),n=(e("../../lib/dom"),e("../../lib/event"),e("../../player/base/event/eventtype")),o=e("../../player/base/plugin/status"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-animation")},bindEvent:function(){var t=this;this._player.on(n.Player.Play,function(){t._player._isManualPlay&&(t.removeClass("prism-pause-animation"),t.addClass("prism-play-animation"),t.removeClass("play-apply-animation"),t.playHandler&&clearTimeout(t.playHandler),t.playHandler=setTimeout(function(){t.addClass("play-apply-animation")}))}),this._player.on(n.Player.Pause,function(){var e=t._player._status;e!=o.ended&&e!=o.error&&t._player._isManualPause&&(t.removeClass("prism-play-animation"),t.addClass("prism-pause-animation"),t.removeClass("play-apply-animation"),t.pauseHandler&&clearTimeout(t.pauseHandler),t.pauseHandler=setTimeout(function(){t.addClass("play-apply-animation")}))})},disposeUI:function(){this.playHandler&&(clearTimeout(this.playHandler),this.playHandler=null),this.pauseHandler&&(clearTimeout(this.pauseHandler),this.pauseHandler=null)}});t.exports=e},{"../../lib/dom":219,"../../lib/event":220,"../../player/base/event/eventtype":244,"../../player/base/plugin/status":267,"../component":296}],307:[function(e,t,r){var i=e("../component"),n=e("../../player/base/event/eventtype"),o=e("./util"),a=e("../../lang/index"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-play-btn")},bindEvent:function(){var t=this;this._player.on(n.Player.Play,function(){t.addClass("playing")}),this._player.on(n.Player.Pause,function(){t.removeClass("playing")}),this.on(n.Private.PlayClick,function(){var e;t._player.paused()?(e=t._player.getCurrentTime(),(t._player.getDuration()<=e||t._player._ended||t._player.exceedPreviewTime(e))&&t._player.seek(0),t._player.play(!0),t.addClass("playing")):(t._player.pause(!0),t.removeClass("playing")),t._player.trigger(n.Private.MarkerTextHide)}),o.registerTooltipEvent.call(this,this.el(),function(){return t._player.paused()?a.get("Play"):a.get("Pause")})}});t.exports=e},{"../../lang/index":212,"../../player/base/event/eventtype":244,"../component":296,"./util":323}],308:[function(e,t,r){var i=e("../component"),o=e("../../lib/dom"),a=(e("../../lib/constants"),e("../../lib/event")),s=e("../../lib/ua"),l=e("../../lib/function"),n=e("../../lang/index"),u=e("../../config"),c=e("../../lib/util"),h=e("../../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this._seekTime=-1,this.addClass("prism-progress")},createEl:function(){var e=i.prototype.createEl.call(this);return e.innerHTML='

',e},bindEvent:function(){var t=this;this.loadedNode=document.querySelector("#"+this.id()+" .prism-progress-loaded"),this.playedNode=document.querySelector("#"+this.id()+" .prism-progress-played"),this.cursorNode=document.querySelector("#"+this.id()+" .prism-progress-cursor"),this.timeNode=document.querySelector("#"+this.id()+" .prism-progress-time"),this.timeNode=document.querySelector("#"+this._player._options.id+" .prism-progress-time"),this.thumbnailNode=document.querySelector(".prism-thumbnail");var r=document.querySelector("#"+this.id()),e=document.querySelector("#"+this.id()+" .prism-progress-cursor img"),i="",i=u.domain?"https://"+u.domain+"/de/prismplayer/"+u.h5Version+"/skins/default/img/dragcursor.png":"/build/skins/default/img/dragcursor.png";e.src=i,a.on(this.cursorNode,"mousedown",function(e){t._onMouseDown(e)}),a.on(this.cursorNode,"touchstart",function(e){t._onMouseDown(e)}),a.on(r,"mousemove",function(e){t._progressMove(e)}),a.on(r,"touchmove",function(e){t._progressMove(e)});function n(e){t._progressDown=e}a.on(r,"mousedown",function(e){n(!0)}),a.on(r,"touchstart",function(e){n(!0)}),a.on(r,"mouseup",function(e){n(!1)}),a.on(r,"touchend",function(e){n(!1)}),a.on(this._el,"click",function(e){t._onMouseClick(e)}),this._player.on(h.Private.HideProgress,function(e){t._hideProgress(e)}),this._player.on(h.Private.CancelHideProgress,function(e){t._cancelHideProgress(e)}),a.on(r,h.Private.MouseOver,function(e){t._onMouseOver(e)}),a.on(r,h.Private.MouseOut,function(e){t._onMouseOut(e)}),a.on(this.controlNode,h.Private.MouseLeave,function(e){t._offMouseUp()}),s.IS_PC?(a.on(r,"mouseover",function(){o.addClass(r,"prism-progress-hover"),o.addClass(t.cursorNode,"cursor-hover")}),a.on(r,"mouseout",function(e){o.removeClass(r,"prism-progress-hover"),o.removeClass(t.cursorNode,"cursor-hover"),t._progressDown=!1})):(o.addClass(r,"prism-progress-hover"),o.addClass(t.cursorNode,"cursor-hover")),this.bindTimeupdate=l.bind(this,this._onTimeupdate),this._player.on(h.Player.TimeUpdate,this.bindTimeupdate),s.IS_IPAD?this.interval=setInterval(function(){t._onProgress()},500):this._player.on(h.Video.Progress,function(){t._onProgress()}),this._player.on(h.Private.UpdateProgress,function(e){t._updateProgressBar(t.playedNode,e.paramData.targetTime)}),this._player.on(h.Private.UpdateCursorPosition,function(e){t._updateCursorPosition(e.paramData.targetTime)})},_progressMove:function(e){e.preventDefault();var t,r,i=this._getSeconds(e);i!=1/0&&(t=c.formatTime(i),r=this._getDistance(e),this.cursorNode&&(this._player.trigger(h.Private.ThumbnailShow,{time:i,formatTime:t,left:r,progressWidth:this.el().offsetWidth}),this._progressDown&&this._onMouseMove(e)))},_hideProgress:function(e){a.off(this.cursorNode,"mousedown"),a.off(this.cursorNode,"touchstart")},_cancelHideProgress:function(e){var t=this;a.on(this.cursorNode,"mousedown",function(e){t._onMouseDown(e)}),a.on(this.cursorNode,"touchstart",function(e){t._onMouseDown(e)})},_canSeekable:function(e){var t=!0;return t="function"==typeof this._player.canSeekable?this._player.canSeekable(e):t},_onMouseOver:function(e){this._cursorHideHandler&&(clearTimeout(this._cursorHideHandler),this._cursorHideHandler=null),this._mouseInProgress||this._updateCursorPosition(this._player.getCurrentTime()),this._mouseInProgress=!0},_onMouseOut:function(e){var t=this;this._cursorHideHandler&&clearTimeout(this._cursorHideHandler),this._cursorHideHandler=setTimeout(function(){t._player.trigger(h.Private.ThumbnailHide),t._mouseInProgress=!1})},_getSeconds:function(e){var t=this._getDistance(e),e=this.el().offsetWidth,e=this._player.getDuration()?t/e*this._player.getDuration():0;return e=(e=e<0?0:e)>this._player.getDuration()?this._player.getDuration():e},_getDistance:function(e){for(var t=this.el().offsetLeft,r=this.el();r=r.offsetParent;){var i=o.getTranslateX(r);t+=r.offsetLeft+i}e=(e.touches?e.touches[0]:e).pageX;return Math.abs(e-t)},_onMouseClick:function(e){var t=this,r=t._getSeconds(e);t._canSeekable(r)?(t._player.exceedPreviewTime(r)&&(r=t._player.getPreviewTime()),this._seekTime=r,t._updateProgressBar(this.playedNode,r),t._updateCursorPosition(r),this._mouseClickTimeHandle&&clearTimeout(this._mouseClickTimeHandle),this._mouseClickTimeHandle=setTimeout(function(){t._player._seeking=!0,t._mouseDown&&!s.IS_MOBILE||t._player.trigger(h.Private.SeekStart,{fromTime:t._player.getCurrentTime()}),t._player.seek(r),t._mouseDown=!1,t._player.trigger(h.Private.EndStart,{toTime:r}),t._mouseClickTimeHandle=null,t._inWaitingSeek=!1},0),this._inWaitingSeek=!0):t._player.trigger(h.Private.Info_Show,{text:n.get("Can_Not_Seekable"),duration:2e3})},_onMouseDown:function(e){var t=this;e.preventDefault(),this._mouseDown=!0,this._player.trigger(h.Private.SeekStart,{fromTime:this._player.getCurrentTime()}),a.on(this.controlNode,"mousemove",function(e){t._onMouseMove(e)}),a.on(this.controlNode,"touchmove",function(e){t._onMouseMove(e)}),a.on(this.controlNode,"mouseup",function(e){t._onControlBarMouseUp(e)}),a.on(this.controlNode,"touchend",function(e){t._onControlBarMouseUp(e)});e=t._getSeconds(e);t._canSeekable(e)?(t._player.exceedPreviewTime(e)&&(e=t._player.getPreviewTime()),s.IS_MOBILE&&this._player.trigger(h.Private.EndStart,{toTime:e})):t._player.trigger(h.Private.Info_Show,{text:n.get("Can_Not_Seekable"),duration:2e3})},_onMouseUp:function(e){this._onMouseUpIntern(e)},_onControlBarMouseUp:function(e){this._onMouseUpIntern(e)},_onPlayerMouseUp:function(e){this._onMouseUpIntern(e)},_offMouseUp:function(){a.off(this.controlNode,"mousemove"),a.off(this.controlNode,"touchmove"),a.off(this.controlNode,"mouseup"),a.off(this.controlNode,"touchend")},_onMouseUpIntern:function(e){e.preventDefault(),this._offMouseUp();e=this.playedNode.offsetWidth/this.el().offsetWidth*this._player.getDuration(),this._player.getDuration();isNaN(e)||this._player.seek(e),this._player.trigger(h.Private.EndStart,{toTime:e}),this._mouseDown=!1},_onMouseMove:function(e){e.preventDefault();e=this._getSeconds(e);this._player.exceedPreviewTime(e)&&(e=this._player.getPreviewTime()),this._player.seek(e),this._updateProgressBar(this.playedNode,e),this._updateCursorPosition(e)},_onTimeupdate:function(e){var t=this._player.tag.currentSrc.split("."),r=!(!t||"mp4"!==t[t.length-1]),t=!1;this.thumbnailNode&&(this.thumbnailNode.style.display="none"),r&&(s.IS_MAC_SAFARI&&(t=!0),s.IS_IOS&&(t=!0),s.IS_IE11&&(t=!0)),"audio"==this._player._options.mediaType&&s.IS_IOS&&(this._player._seeking=!1),(this._inWaitingSeek||this._player._seeking&&!s.IS_EDGE||this._progressDown)&&!t||(this._updateProgressBar(this.playedNode,this._player.getCurrentTime()),this._updateCursorPosition(this._player.getCurrentTime()),this._player.trigger(h.Private.UpdateProgressBar,{time:this._player.getCurrentTime()}))},_onProgress:function(e){this._player.getDuration()&&1<=this._player.getBuffered().length&&this._updateProgressBar(this.loadedNode,this._player.getBuffered().end(this._player.getBuffered().length-1))},_updateProgressBar:function(e,t){var r=this._player.getDuration();1!=this._player._switchSourcing&&r&&(-1!=this._seekTime&&(this._player.getCurrentTime()>=this._seekTime||!this._player._seeking?this._seekTime=-1:t=this._seekTime),1<(r=t/r+.005)&&(r=1),e&&o.css(e,"width",100*r+"%"))},_updateCursorPosition:function(e){var t,r,i,n=this._player.getDuration();1!=this._player._switchSourcing&&n&&(t=1,i=10/(r=this._player.el().clientWidth),0!=r&&(t=1-i),i=(i=e/n-i)<0?0:i,this.cursorNode&&(te?(n.css(i.el(),"right","0px"),n.css(i.el(),"left","auto")):(left-=width/2,left=left<0?0:left,n.css(i.el(),"right","auto"),n.css(i.el(),"left",left+"px")))},30))}),i._player.on(a.Private.MarkerTextHide,function(e){i._player.trigger(a.Player.MarkerDotOut),i._player.trigger(a.Private.LifeCycleChanged,{type:a.Player.MarkerDotOut,data:""}),i._thumbnailShowHanlde&&clearTimeout(i._thumbnailShowHanlde),n.css(i.el(),"display","none")}),o.on(i._player.tag,"click",function(e){e&&e.target==e.currentTarget&&i._player.trigger(a.Private.MarkerTextHide)}),o.on(i._player.tag,"touchstart",function(e){e&&e.target==e.currentTarget&&i._player.trigger(a.Private.MarkerTextHide)})},disposeUI:function(){this._thumbnailShowHanlde&&(clearTimeout(this._thumbnailShowHanlde),this._thumbnailShowHanlde=null)}});t.exports=e},{"../../lib/dom":219,"../../lib/event":220,"../../lib/util":234,"../../player/base/event/eventtype":244,"../component":296}],310:[function(e,t,r){var i=e("./selector"),s=e("../../../lib/object"),u=(e("../../../lib/util"),e("../../../lib/cookie")),l=e("../../../lib/dom"),c=(e("../../../lib/event"),e("../../../lib/constants")),h=e("../../../lang/index"),a=e("../../../player/base/event/eventtype"),e=i.extend({init:function(e,t){this.Name=h.get("Quality"),this.Type="quality",this.Tooltip=h.get("Quality_Switch_To"),i.call(this,e,t),this._isMasterLevel=!1},showTip:function(e,t){this._player.trigger(a.Private.Info_Show,{text:e,duration:t,align:"lb"})},bindEvent:function(){this.bindCommonEvent();var o=this;this._player.on(a.Private.QualityChange,function(e){var t,r,i,n=0
{value}
",r=t.replace(/{type}/g,"speed").replace("{value}",h.get("Speed")),i=t.replace(/{type}/g,"cc").replace("{value}",h.get("Subtitle")),n=t.replace(/{type}/g,"audio").replace("{value}",h.get("AudioTrack")),t=t.replace(/{type}/g,"quality").replace("{value}",h.get("Quality"));return e.innerHTML=r+i+n+t,e},bindEvent:function(){document.querySelector("#"+this.id()+" .prism-setting-speed .current-setting").innerText=h.get("Speed_1X_Text");function t(){i._player.trigger(l.Private.SettingListHide),i.isOpened=!1}function r(e){e&&e.text&&(document.querySelector("#"+i.id()+" .prism-setting-"+e.type+" .current-setting").innerText=e.text)}var i=this;this._player.on(l.Private.SettingListShow,function(e){i.isOpened=!0;e=e.paramData;r(e),n.css(i.el(),"display","block")}),this._player.on(l.Private.UpdateToSettingList,function(e){e=e.paramData;r(e)}),this._player.on(l.Private.SelectorUpdateList,function(e){e=e.paramData;r(e),i._player.trigger(l.Private.SelectorValueChange,e)}),this._player.on(l.Private.SettingListHide,function(){i.isOpened=!1,n.css(i.el(),"display","none")}),s.on(this.el(),"click",function(e){i._player.trigger(l.Private.SettingListHide);e=e.srcElement||e.target;(e=c.findItemElementForList(e))&&(e=e.getAttribute("type"),i._player.trigger(l.Private.SelectorShow,{type:e}))});var e=a.IS_MOBILE?"touchleave":"mouseleave";s.on(this.el(),e,function(){t()}),s.on(this._player.tag,"click",function(e){e&&e.target==e.currentTarget&&t()}),s.on(this._player.tag,"touchstart",function(e){e&&e.target==e.currentTarget&&t()}),this._player.on(l.Private.QualityChange,function(e){var t,r=e.paramData;r.levelSwitch&&(t=document.querySelector("#"+i.id()+" .prism-setting-quality .current-setting"),e=h.get("Auto"),-1
    ',e},bindEvent:function(){this.bindCommonEvent()},bindCommonEvent:function(){var o=this,e=document.querySelector("#"+o.id()+" .selector-list"),t=document.querySelector("#"+o.id()+" .header");this._player.on(u.Private.ChangeURL,function(){o._hasGeneratedList=!1}),s.on(t,"click",function(){o._player.trigger(u.Private.SelectorHide),o._player.trigger(u.Private.SettingListShow,{type:o.Type,text:o._previousSelection?o._previousSelection.text:""})}),s.on(e,"click",function(e){var t=e.srcElement||e.target,r=t.key,e=t.text;void 0!==e&&(o._previousSelection&&a.removeClass(o._previousSelection,"current"),o._previousSelection=l.findliElementForSelector(t),a.addClass(o._previousSelection,"current"),o.execute&&o.execute(r),e=o.Tooltip+""+e+"",o._player.trigger(u.Private.Info_Show,{text:e,duration:1e3,align:"lb"}))}),o._player.on(u.Private.SelectorHide,function(){r()}),o._player.on(u.Private.SelectorValueChange,function(e){var t=e.paramData;if(t&&t.type==o.Type){var r=document.querySelectorAll("#"+o.id()+" .selector-list li");if(r){var i=r.length;0==i&&(o._backupSelector=t.text);for(var n=0;nn.progressWidth?n.left-i:(r=n.left-i/2)<0?0:r,s.css(a.el(),"left",r+"px"))},30)}),a._player.on(o.Private.ThumbnailHide,function(e){a._thumbnailShowHanlde&&clearTimeout(a._thumbnailShowHanlde),s.css(a.el(),"display","none")})},_createSamllThumbnail:function(){},disposeUI:function(){this._thumbnailShowHanlde&&(clearTimeout(this._thumbnailShowHanlde),this._thumbnailShowHanlde=null)}});t.exports=e},{"../../lang/index":212,"../../lib/dom":219,"../../lib/event":220,"../../lib/ua":232,"../../lib/util":234,"../../player/base/event/eventtype":244,"../component":296}],321:[function(e,t,r){var i=e("../component"),n=e("../../lib/util"),o=e("../../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-time-display")},createEl:function(){var e=i.prototype.createEl.call(this,"div");return e.innerHTML='00:00 / 00:00',e},bindEvent:function(){var t=this;this._player.on(o.Video.DurationChange,function(){var e=n.formatTime(t._player.getDisplayDuration());e?(document.querySelector("#"+t.id()+" .time-bound").style.display="inline",document.querySelector("#"+t.id()+" .duration").style.display="inline",document.querySelector("#"+t.id()+" .duration").innerText=e):(document.querySelector("#"+t.id()+" .duration").style.display="none",document.querySelector("#"+t.id()+" .time-bound").style.display="none")}),this._player.on(o.Video.TimeUpdate,function(){var e=t._player.getCurrentTime(),e=n.formatTime(e);document.querySelector("#"+t.id()+" .current-time")&&(e?(document.querySelector("#"+t.id()+" .current-time").style.display="inline",document.querySelector("#"+t.id()+" .current-time").innerText=e):document.querySelector("#"+t.id()+" .current-time").style.display="none")})}});t.exports=e},{"../../lib/util":234,"../../player/base/event/eventtype":244,"../component":296}],322:[function(e,t,r){var i=e("../component"),o=e("../../lib/dom"),a=e("../../player/base/event/eventtype"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-tooltip")},createEl:function(){var e=i.prototype.createEl.call(this,"p");return e.innerText="\u63d0\u793a\u4fe1\u606f",e},bindEvent:function(){var n=this;n._player.on(a.Private.TooltipShow,function(e){var t=document.querySelector("#"+n.id()),r=e.paramData;t.innerText=r.text,o.css(t,"display","block");var i=t.offsetWidth,e=document.querySelector("#"+n._player.id()+" .prism-controlbar");e&&(e=e.offsetWidth,r.left+i>e?o.css(t,"left",e-i+"px"):o.css(t,"left",r.left-(i-r.width)/2+"px"))}),n._player.on(a.Private.TooltipHide,function(e){var t=document.querySelector("#"+n.id());o.css(t,"display","none")})}});t.exports=e},{"../../lib/dom":219,"../../player/base/event/eventtype":244,"../component":296}],323:[function(e,t,r){var i=e("../../lib/event"),s=e("../../player/base/event/eventtype");t.exports.registerTooltipEvent=function(e,n){function o(){a._controlbarTooltipHandler&&(clearTimeout(a._controlbarTooltipHandler),a._controlbarTooltipHandler=null)}var a=this;i.on(this.el(),"mouseover",function(e){o(),a._controlbarTooltipHandler=setTimeout(function(){a._player.trigger(s.Private.TooltipHide)},4e3);var t=a.el().offsetLeft,r=a.el().offsetWidth,i=n;"function"==typeof i&&(i=n.call(this)),a._player.trigger(s.Private.TooltipShow,{left:t,width:r,text:i})}),i.on(this.el(),"mouseout",function(){o(),a._player.trigger(s.Private.TooltipHide)})},t.exports.throttle=function(r,i){var n=Date.now();return function(){var e=arguments,t=Date.now();i<=t-n&&(r(e),n=t)}}},{"../../lib/event":220,"../../player/base/event/eventtype":244}],324:[function(e,t,r){var i=e("../component"),n=e("../../lib/dom"),o=e("../../lib/event"),a=e("../../player/base/event/eventtype"),s=e("./util"),l=e("../../lang/index"),u=e("./volumecontrol"),e=i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-volume");var r=new u(e,t);e.addChild(r,t)},createEl:function(){var e=i.prototype.createEl.call(this,"div");return e.innerHTML='
    ',e},bindEvent:function(){var r=this;this.icon=document.querySelector("#"+r.id()+" .volume-icon"),s.registerTooltipEvent.call(this,this.el(),function(){return r._player.muted()||0==r._player.getVolume()?l.get("Muted"):l.get("Volume")}),o.on(this.icon,"click",function(e){var t=r.el().offsetLeft;r._player.trigger(a.Private.SettingListHide),r._player.trigger(a.Private.SelectorHide),r._player.trigger(a.Private.VolumeVisibilityChange,t),r._player.trigger(a.Private.MarkerTextHide)});var e=document.querySelector("#"+r.id()+" .long-horizontal"),t=document.querySelector("#"+r.id()+" .short-horizontal");o.on(this.el(),"mouseover",function(){n.removeClass(e,"volume-hover-animation"),setTimeout(function(){n.addClass(e,"volume-hover-animation")}),setTimeout(function(){n.removeClass(e,"volume-hover-animation"),n.addClass(t,"volume-hover-animation"),setTimeout(function(){n.removeClass(t,"volume-hover-animation"),n.addClass(e,"volume-hover-animation")},300)},300)})}});t.exports=e},{"../../lang/index":212,"../../lib/dom":219,"../../lib/event":220,"../../player/base/event/eventtype":244,"../component":296,"./util":323,"./volumecontrol":325}],325:[function(e,t,r){var i=e("../component"),n=e("../../lib/dom"),o=e("../../lib/event"),a=e("../../player/base/event/eventtype"),e=(e("./util"),e("../../lang/index"),i.extend({init:function(e,t){i.call(this,e,t),this.addClass("prism-volume-control"),this._shown=!1},createEl:function(){var e=i.prototype.createEl.call(this,"div");return e.innerHTML='
    ',e},bindEvent:function(){var r=this;this.icon=document.querySelector("#"+r._player.id()+" .volume-icon"),this.control=document.querySelector("#"+r.id()),this.volumnValue=document.querySelector("#"+r.id()+" .volume-value"),this.volumnRange=document.querySelector("#"+r.id()+" .volume-range"),this.volumnCursor=document.querySelector("#"+r.id()+" .volume-cursor"),this._player.on(a.Private.VolumeVisibilityChange,function(e){var t=e.paramData;!r._shown&&t?(e=r._player.getVolume(),r._setVolumnUI(e),n.css(r.control,"display","block"),t&&n.css(r.control,"left",t-5+"px"),r._shown=!0):(n.css(r.control,"display","none"),r._shown=!1)}),o.on(this.volumnRange,"click",function(e){e=n.getPointerPosition(r.volumnRange,e).y;e<0||1