@hysc/meeting 1.6.30 → 1.6.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/umd/index.js CHANGED
@@ -28,7 +28,7 @@ var r=i(275),n=i(276),o=i(133);function s(){return u.TYPED_ARRAY_SUPPORT?2147483
28
28
  THE SOFTWARE.
29
29
 
30
30
  */
31
- var i="\\x"+("0"+"~".charCodeAt(0).toString(16)).slice(-2),r="\\"+i,n=new RegExp(i,"g"),o=new RegExp(r,"g"),s=new RegExp("(?:^|([^\\\\]))"+r),a=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},u=String;function c(e,t,i){return t instanceof Array?function(e,t,i){for(var r=0,n=t.length;r<n;r++)t[r]=c(e,t[r],i);return t}(e,t,i):t instanceof u?t.length?i.hasOwnProperty(t)?i[t]:i[t]=function(e,t){for(var i=0,r=t.length;i<r;e=e[t[i++].replace(o,"~")]);return e}(e,t.split("~")):e:t instanceof Object?function(e,t,i){for(var r in t)t.hasOwnProperty(r)&&(t[r]=c(e,t[r],i));return t}(e,t,i):t}var h={stringify:function(e,t,o,s){return h.parser.stringify(e,function(e,t,o){var s,u,c=!1,h=!!t,d=[],l=[e],f=[e],p=[o?"~":"[Circular]"],m=e,v=1;return h&&(u="object"==typeof t?function(e,i){return""!==e&&t.indexOf(e)<0?void 0:i}:t),function(e,t){return h&&(t=u.call(this,e,t)),c?(m!==this&&(s=v-a.call(l,this)-1,v-=s,l.splice(v,l.length),d.splice(v-1,d.length),m=this),"object"==typeof t&&t?(a.call(l,t)<0&&l.push(m=t),v=l.length,(s=a.call(f,t))<0?(s=f.push(t)-1,o?(d.push((""+e).replace(n,i)),p[s]="~"+d.join("~")):p[s]=p[0]):t=p[s]):"string"==typeof t&&o&&(t=t.replace(i,r).replace("~",i))):c=!0,t}}(e,t,!s),o)},parse:function(e,t){return h.parser.parse(e,function(e){return function(t,n){var o="string"==typeof n;return o&&"~"===n.charAt(0)?new u(n.slice(1)):(""===t&&(n=c(n,n,{})),o&&(n=n.replace(s,"$1~").replace(r,i)),e?e.call(this,t,n):n)}}(t))},parser:JSON};e.exports=h},function(e,t,i){var r=i(248);e.exports={string:function(e){for(var t="abcdefghijklmnopqrstuvwxyz012345".length,i=r.randomBytes(e),n=[],o=0;o<e;o++)n.push("abcdefghijklmnopqrstuvwxyz012345".substr(i[o]%t,1));return n.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(new Array(t+1).join("0")+this.number(e)).slice(-t)}}},function(e,t,i){var r=i(0),n=i(12),o=i(120);function s(e,t,i,r){o.call(this,e,t,function(e){return function(t,i,r){var o={};"string"==typeof i&&(o.headers={"Content-type":"text/plain"});var s=n.addPath(t,"/xhr_send"),a=new e("POST",s,i,o);return a.once("finish",(function(e){if(a=null,200!==e&&204!==e)return r(new Error("http status "+e));r()})),function(){a.close(),a=null;var e=new Error("Aborted");e.code=1e3,r(e)}}}(r),i,r)}r(s,o),e.exports=s},function(e,t,i){(function(t,r){var n=i(2).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var i=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s<e;s+=65536)o.getRandomValues(i.slice(s,s+65536));else o.getRandomValues(i);return"function"==typeof t?r.nextTick((function(){t(null,i)})):i}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,i(1),i(4))},function(e,t,i){var r={};function n(e,t,i){i||(i=Error);var n=function(e){var i,r;function n(i,r,n){return e.call(this,function(e,i,r){return"string"==typeof t?t:t(e,i,r)}(i,r,n))||this}return r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map((function(e){return String(e)})),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s;if("string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var a=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+".".length>e.length)&&-1!==e.indexOf(".",i)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(o(t,"type"))}return s+". Received type ".concat(typeof i)}),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"),e.exports.codes=r},function(e,t,i){(function(t){var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=c;var n=i(135),o=i(139);i(0)(c,n);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,i(4))},function(e,t,i){var r=i(2).Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%n,c=Math.min(o-a,n-u),h=0;h<c;h++)i[u+h]=e[a+h];a+=c,(s+=c)%n==0&&this._update(i)}return this._len+=o,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=n},function(e,t,i){var r={};function n(e,t,i){i||(i=Error);var n=function(e){var i,r;function n(i,r,n){return e.call(this,function(e,i,r){return"string"==typeof t?t:t(e,i,r)}(i,r,n))||this}return r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map((function(e){return String(e)})),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s;if("string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var a=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+".".length>e.length)&&-1!==e.indexOf(".",i)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(o(t,"type"))}return s+". Received type ".concat(typeof i)}),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"),e.exports.codes=r},function(e,t,i){(function(t){var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=c;var n=i(166),o=i(170);i(0)(c,n);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,i(4))},function(e,t,i){var r=i(378),n=i(379);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return n.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(c),d=["%","/","?",";","#"].concat(h),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=i(380);function b(e,t,i){if(e&&n.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,i),r}o.prototype.parse=function(e,t,i){if(!n.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!i&&1===e.split("#").length){var _=u.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(i||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||w&&v[w]||(b=b.substr(2),this.slashes=!0)}if(!v[w]&&(E||w&&!g[w])){for(var T,M,I=-1,k=0;k<l.length;k++)-1!==(R=b.indexOf(l[k]))&&(-1===I||R<I)&&(I=R);for(-1!==(M=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(T=b.slice(0,M),b=b.slice(M+1),this.auth=decodeURIComponent(T)),I=-1,k=0;k<d.length;k++){var R;-1!==(R=b.indexOf(d[k]))&&(-1===I||R<I)&&(I=R)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var C=this.hostname.split(/\./),x=(k=0,C.length);k<x;k++){var O=C[k];if(O&&!O.match(f)){for(var P="",L=0,D=O.length;L<D;L++)O.charCodeAt(L)>127?P+="x":P+=O[L];if(!P.match(f)){var N=C.slice(0,k),U=C.slice(k+1),B=O.match(p);B&&(N.push(B[1]),U.unshift(B[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+j,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(k=0,x=h.length;k<x;k++){var F=h[k];if(-1!==b.indexOf(F)){var $=encodeURIComponent(F);$===F&&($=escape(F)),b=b.split(F).join($)}}var q=b.indexOf("#");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var W=b.indexOf("?");if(-1!==W?(this.search=b.substr(W),this.query=b.substr(W+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,W)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var H=this.search||"";this.path=j+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(i=i.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(n.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var i=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];i[a]=this[a]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var h=u[c];"protocol"!==h&&(i[h]=e[h])}return g[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!g[e.protocol]){for(var d=Object.keys(e),l=0;l<d.length;l++){var f=d[l];i[f]=e[f]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||v[e.protocol])i.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),i.pathname=p.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",y=i.search||"";i.path=m+y}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var b=i.pathname&&"/"===i.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||i.host&&e.pathname,S=w,E=i.pathname&&i.pathname.split("/")||[],T=(p=e.pathname&&e.pathname.split("/")||[],i.protocol&&!g[i.protocol]);if(T&&(i.hostname="",i.port=null,i.host&&(""===E[0]?E[0]=i.host:E.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===E[0])),_)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),i.search=e.search,i.query=e.query;else if(!n.isNullOrUndefined(e.search))return T&&(i.hostname=i.host=E.shift(),(A=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=A.shift(),i.host=i.hostname=A.shift())),i.search=e.search,i.query=e.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i;if(!E.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var M=E.slice(-1)[0],I=(i.host||e.host||E.length>1)&&("."===M||".."===M)||""===M,k=0,R=E.length;R>=0;R--)"."===(M=E[R])?E.splice(R,1):".."===M?(E.splice(R,1),k++):k&&(E.splice(R,1),k--);if(!w&&!S)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),I&&"/"!==E.join("/").substr(-1)&&E.push("");var A,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);return T&&(i.hostname=i.host=C?"":E.length?E.shift():"",(A=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=A.shift(),i.host=i.hostname=A.shift())),(w=w||i.host&&E.length)&&!C&&E.unshift(""),E.length?i.pathname=E.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){var r=i(5),n=r.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){var r=i(0),n=i(121);function o(e,t,i){n.call(this,e,t,i,{noCredentials:!0})}r(o,n),o.enabled=n.enabled,e.exports=o},function(e,t,i){(function(t){e.exports={isOpera:function(){return t.navigator&&/opera/i.test(t.navigator.userAgent)},isKonqueror:function(){return t.navigator&&/konqueror/i.test(t.navigator.userAgent)},hasDomain:function(){if(!t.document)return!0;try{return!!t.document.domain}catch(e){return!1}}}}).call(this,i(1))},function(e,t,i){(function(t){var r=i(19),n=i(17),o=i(38);e.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in t||(t[e.exports.WPrefix]={})},postMessage:function(i,r){t.parent!==t&&t.parent.postMessage(n.stringify({windowId:e.exports.currentWindowId,type:i,data:r||""}),"*")},createIframe:function(e,i){var n,o,s=t.document.createElement("iframe"),a=function(){clearTimeout(n);try{s.onload=null}catch(e){}s.onerror=null},u=function(){s&&(a(),setTimeout((function(){s&&s.parentNode.removeChild(s),s=null}),0),r.unloadDel(o))},c=function(e){s&&(u(),i(e))};return s.src=e,s.style.display="none",s.style.position="absolute",s.onerror=function(){c("onerror")},s.onload=function(){clearTimeout(n),n=setTimeout((function(){c("onload timeout")}),2e3)},t.document.body.appendChild(s),n=setTimeout((function(){c("timeout")}),15e3),o=r.unloadAdd(u),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:u,loaded:a}},createHtmlfile:function(i,n){var o,s,a,u=["Active"].concat("Object").join("X"),c=new t[u]("htmlfile"),h=function(){clearTimeout(o),a.onerror=null},d=function(){c&&(h(),r.unloadDel(s),a.parentNode.removeChild(a),a=c=null,CollectGarbage())},l=function(e){c&&(d(),n(e))};c.open(),c.write('<html><script>document.domain="'+t.document.domain+'";<\/script></html>'),c.close(),c.parentWindow[e.exports.WPrefix]=t[e.exports.WPrefix];var f=c.createElement("div");return c.body.appendChild(f),a=c.createElement("iframe"),f.appendChild(a),a.src=i,a.onerror=function(){l("onerror")},o=setTimeout((function(){l("timeout")}),15e3),s=r.unloadAdd(d),{post:function(e,t){try{setTimeout((function(){a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:d,loaded:h}}},e.exports.iframeEnabled=!1,t.document&&(e.exports.iframeEnabled=("function"==typeof t.postMessage||"object"==typeof t.postMessage)&&!o.isKonqueror())}).call(this,i(1))},function(e,t,i){var r=i(273);t.RLWebSocket=r},function(e,t,i){var r=i(0),n=i(73),o=i(76),s=i(77),a=i(20);function u(e){a.call(this,"digest"),this._hash=e}r(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},function(e,t,i){(t=e.exports=i(144)).Stream=t,t.Readable=t,t.Writable=i(79),t.Duplex=i(25),t.Transform=i(147),t.PassThrough=i(294)},function(e,t,i){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=i(5).Buffer.isBuffer},function(e,t,i){(function(t){e.exports=function(e,i){for(var r=Math.min(e.length,i.length),n=new t(r),o=0;o<r;++o)n[o]=e[o]^i[o];return n}}).call(this,i(5).Buffer)},function(e,t,i){var r=i(16),n=i(13);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r}},function(e,t,i){const r=i(0),n=i(92).Reporter,o=i(90).Buffer;function s(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),t.DecoderBuffer=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.isEncoderBuffer=function(e){return e instanceof a||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={userAgent:function(){var t=void 0;try{t=i(!function(){var e=new Error("Cannot find module 'react-native'");throw e.code="MODULE_NOT_FOUND",e}()).Platform}catch(e){}var r="none";return e.exports?t?"ios"===t.OS?r="ios":"android"===t.OS&&(r="android"):r="fake":r=window.navigator.userAgent,r},isMobile:function(){var t=void 0;try{t=i(!function(){var e=new Error("Cannot find module 'react-native'");throw e.code="MODULE_NOT_FOUND",e}()).Platform}catch(e){}var r=!1;return e.exports&&t&&("ios"===t.OS||"android"===t.OS)&&(r=!0),r},isElectron:function(){return!1}};t.default=r},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"RTPStats",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"WebRtcPeerRecvonly",{enumerable:!0,get:function(){return o.WebRtcPeerRecvonly}}),Object.defineProperty(t,"WebRtcPeerSendonly",{enumerable:!0,get:function(){return o.WebRtcPeerSendonly}}),Object.defineProperty(t,"WebRtcPeerSendrecv",{enumerable:!0,get:function(){return o.WebRtcPeerSendrecv}}),Object.defineProperty(t,"addExternParam",{enumerable:!0,get:function(){return n.addExternParam}}),Object.defineProperty(t,"addLegacySimulcast",{enumerable:!0,get:function(){return n.addLegacySimulcast}}),Object.defineProperty(t,"bufferizeCandidates",{enumerable:!0,get:function(){return o.bufferizeCandidates}}),Object.defineProperty(t,"filterStats",{enumerable:!0,get:function(){return n.filterStats}}),Object.defineProperty(t,"iosSafariAdapter",{enumerable:!0,get:function(){return n.iosSafariAdapter}}),Object.defineProperty(t,"maybePreferCodec",{enumerable:!0,get:function(){return n.maybePreferCodec}}),Object.defineProperty(t,"maybeSetAudioSendBitRate",{enumerable:!0,get:function(){return n.maybeSetAudioSendBitRate}}),Object.defineProperty(t,"maybeSetVideoSendBitRate",{enumerable:!0,get:function(){return n.maybeSetVideoSendBitRate}}),Object.defineProperty(t,"maybeSetVideoSendInitialBitRate",{enumerable:!0,get:function(){return n.maybeSetVideoSendInitialBitRate}}),Object.defineProperty(t,"parseMSMS",{enumerable:!0,get:function(){return n.parseMSMS}}),Object.defineProperty(t,"preferAudioNack",{enumerable:!0,get:function(){return n.preferAudioNack}}),Object.defineProperty(t,"preferBitRate",{enumerable:!0,get:function(){return n.preferBitRate}}),Object.defineProperty(t,"preferVideoRrtr",{enumerable:!0,get:function(){return n.preferVideoRrtr}}),Object.defineProperty(t,"removeMidExtension",{enumerable:!0,get:function(){return n.removeMidExtension}}),Object.defineProperty(t,"removeSSRC",{enumerable:!0,get:function(){return n.removeSSRC}}),Object.defineProperty(t,"renegotiateSdp",{enumerable:!0,get:function(){return n.renegotiateSdp}}),Object.defineProperty(t,"setCodecParam",{enumerable:!0,get:function(){return n.setCodecParam}}),Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return n.setDirection}}),Object.defineProperty(t,"shrinkSdp",{enumerable:!0,get:function(){return n.shrinkSdp}});var n=i(203),o=i(104),s=r(i(7)),a=r(i(224))},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.os=t.default=void 0;var n=r(i(105)),o=window&&window.navigator?window.navigator.userAgent:"",s=new n.default(o),a=s.getBrowser(),u=s.getOS();t.os=u;var c=a;t.default=c},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={ERR_NOT_INSTALLED:1,ERR_NOT_FOUND:10,ERR_TIMEOUT:11,ERR_STATS:12,ERR_NO_SERVICE:13,ERR_AUTH:14,ERR_INVALID_REQUEST:15,ERR_METHOD:16,ERR_NOT_STARTUP:17,ERR_CUSTOM_AUTH_FAILED:18,ERR_USER_LIMIT:19,ERR_QDTLS:20,ERR_OVEVLOAD:21,ERR_EVICTED:22,ERR_PERMISSION:23,ERR_SENSITIVE_WORD:24,ERR_NOT_AT_ROOM:25,ERR_MEDIA_PIPELINE:26,ERR_NO_STREAM:27,ERR_LOCKED:28,ERR_UNKNOWN:33}},function(e,t,i){var r=i(0),n=i(8).EventEmitter;function o(e,t){n.call(this);var i=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){i._chunkHandler(e,t),i.xo=null;var r=200===e?"network":"permanent";i.emit("close",null,r),i._cleanup()}))}r(o,n),o.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var i=-1;;this.bufferPosition+=i+1){var r=t.slice(this.bufferPosition);if(-1===(i=r.indexOf("\n")))break;var n=r.slice(0,i);n&&this.emit("message",n)}},o.prototype._cleanup=function(){this.removeAllListeners()},o.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=o},function(e,t,i){var r=i(0),n=i(121);function o(e,t,i,r){n.call(this,e,t,i,r)}r(o,n),o.enabled=n.enabled&&n.supportsCORS,e.exports=o},function(e,t,i){(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,i,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,i)}));case 3:return t.nextTick((function(){e.call(null,i,r)}));case 4:return t.nextTick((function(){e.call(null,i,r,n)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,i(4))},function(e,t,i){var r=i(2).Buffer;function n(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,i=new Array(t),n=0;n<t;n++)i[n]=e.readUInt32BE(4*n);return i}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,i,r,n){for(var o,s,a,u,c=i[0],h=i[1],d=i[2],l=i[3],f=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],v=e[3]^t[3],g=4,y=1;y<n;y++)o=c[f>>>24]^h[p>>>16&255]^d[m>>>8&255]^l[255&v]^t[g++],s=c[p>>>24]^h[m>>>16&255]^d[v>>>8&255]^l[255&f]^t[g++],a=c[m>>>24]^h[v>>>16&255]^d[f>>>8&255]^l[255&p]^t[g++],u=c[v>>>24]^h[f>>>16&255]^d[p>>>8&255]^l[255&m]^t[g++],f=o,p=s,m=a,v=u;return o=(r[f>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&v])^t[g++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[v>>>8&255]<<8|r[255&f])^t[g++],a=(r[m>>>24]<<24|r[v>>>16&255]<<16|r[f>>>8&255]<<8|r[255&p])^t[g++],u=(r[v>>>24]<<24|r[f>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[g++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,i[s]=c,r[c]=s;var h=e[s],d=e[h],l=e[d],f=257*e[c]^16843008*c;n[0][s]=f<<24|f>>>8,n[1][s]=f<<16|f>>>16,n[2][s]=f<<8|f>>>24,n[3][s]=f,f=16843009*l^65537*d^257*h^16843008*s,o[0][c]=f<<24|f>>>8,o[1][c]=f<<16|f>>>16,o[2][c]=f<<8|f>>>24,o[3][c]=f,0===s?s=a=1:(s=h^e[e[e[l^h]]],a^=e[e[a]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function c(e){this._key=n(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<r;o++){var s=n[o-1];o%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),n[o]=n[o-t]^s}for(var c=[],h=0;h<r;h++){var d=r-h,l=n[d-(h%4?0:4)];c[h]=h<4||d<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},c.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,i){var r=i(2).Buffer,n=i(73);e.exports=function(e,t,i,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,a=r.alloc(s),u=r.alloc(o||0),c=r.alloc(0);s>0||o>0;){var h=new n;h.update(c),h.update(e),t&&h.update(t),c=h.digest();var d=0;if(s>0){var l=a.length-s;d=Math.min(s,c.length),c.copy(a,l,0,d),s-=d}if(d<c.length&&o>0){var f=u.length-o,p=Math.min(o,c.length-d);c.copy(u,f,d,d+p),o-=p}}return c.fill(0),{key:a,iv:u}}},function(e,t,i){var r=i(18),n=i(14),o=n.getNAF,s=n.getJSF,a=n.assert;function u(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(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;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var i=e._getDoubles(),r=o(t,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var s,u,c=[];for(s=0;s<r.length;s+=i.step){u=0;for(var h=s+i.step-1;h>=s;h--)u=(u<<1)+r[h];c.push(u)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=n;f>0;f--){for(s=0;s<c.length;s++)(u=c[s])===f?l=l.mixedAdd(i.points[s]):u===-f&&(l=l.mixedAdd(i.points[s].neg()));d=d.add(l)}return d.toP()},u.prototype._wnafMul=function(e,t){var i=4,r=e._getNAFPoints(i);i=r.wnd;for(var n=r.points,s=o(t,i,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var h=0;c>=0&&0===s[c];c--)h++;if(c>=0&&h++,u=u.dblp(h),c<0)break;var d=s[c];a(0!==d),u="affine"===e.type?d>0?u.mixedAdd(n[d-1>>1]):u.mixedAdd(n[-d-1>>1].neg()):d>0?u.add(n[d-1>>1]):u.add(n[-d-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,i,r,n){var a,u,c,h=this._wnafT1,d=this._wnafT2,l=this._wnafT3,f=0;for(a=0;a<r;a++){var p=(c=t[a])._getNAFPoints(e);h[a]=p.wnd,d[a]=p.points}for(a=r-1;a>=1;a-=2){var m=a-1,v=a;if(1===h[m]&&1===h[v]){var g=[t[m],null,null,t[v]];0===t[m].y.cmp(t[v].y)?(g[1]=t[m].add(t[v]),g[2]=t[m].toJ().mixedAdd(t[v].neg())):0===t[m].y.cmp(t[v].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[v]),g[2]=t[m].add(t[v].neg())):(g[1]=t[m].toJ().mixedAdd(t[v]),g[2]=t[m].toJ().mixedAdd(t[v].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[m],i[v]);for(f=Math.max(b[0].length,f),l[m]=new Array(f),l[v]=new Array(f),u=0;u<f;u++){var _=0|b[0][u],w=0|b[1][u];l[m][u]=y[3*(_+1)+(w+1)],l[v][u]=0,d[m]=g}}else l[m]=o(i[m],h[m],this._bitLength),l[v]=o(i[v],h[v],this._bitLength),f=Math.max(l[m].length,f),f=Math.max(l[v].length,f)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(a=f;a>=0;a--){for(var T=0;a>=0;){var M=!0;for(u=0;u<r;u++)E[u]=0|l[u][a],0!==E[u]&&(M=!1);if(!M)break;T++,a--}if(a>=0&&T++,S=S.dblp(T),a<0)break;for(u=0;u<r;u++){var I=E[u];0!==I&&(I>0?c=d[u][I-1>>1]:I<0&&(c=d[u][-I-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(a=0;a<r;a++)d[a]=null;return n?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)r=r.dbl();i.push(r)}return{step:e,points:i}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(r);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},function(e,t,i){var r=i(354),n=i(362),o=i(363),s=i(81),a=i(151),u=i(2).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var i,c,h=o(e,t),d=h.tag,l=h.data;switch(d){case"CERTIFICATE":c=r.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(l,"der")),i=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":l=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,h=e.subjectPrivateKey,d=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(t,i,r,d,"sha1"),f=s.createDecipheriv(o,l,c),p=[];return p.push(f.update(h)),p.push(f.final()),u.concat(p)}(l=r.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(i=(c=r.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=r.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=c,c.signature=r.signature},function(e,t,i){(function(t){const r=i(36),n=i(383),o=i(384),s=i(97),a=r.Buffer,u=a.from([0,0,255,255]),c=a.from([0]),h=Symbol("write-in-progress"),d=Symbol("pending-close"),l=Symbol("total-length"),f=Symbol("callback"),p=Symbol("buffers"),m=Symbol("error"),v=Symbol("owner");let g;function y(e){this[p].push(e),this[l]+=e.length}function b(e){this[l]+=e.length,this[v]._maxPayload<1||this[l]<=this[v]._maxPayload?this[p].push(e):(this[m]=new RangeError("Max payload size exceeded"),this[m].closeCode=1009,this.removeListener("data",b),this.reset())}function _(e){this[v]._inflate=null,this[f](e)}e.exports=class{constructor(e,t,i){if(this._maxPayload=0|i,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!g){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;g=new n({concurrency:e})}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){this._inflate&&(this._inflate[h]?this._inflate[d]=!0:(this._inflate.close(),this._inflate=null)),this._deflate&&(this._deflate[h]?this._deflate[d]=!0:(this._deflate.close(),this._deflate=null))}acceptAsServer(e){const t=this._options,i=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(i.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?i.client_max_window_bits=t.clientMaxWindowBits:!0!==i.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete i.client_max_window_bits,i}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{var i=e[t];if(i.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(i=i[0],"client_max_window_bits"===t){if(!0!==i){const e=+i;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${i}`)}else if("server_max_window_bits"===t){const e=+i;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==i)throw new TypeError(`Invalid value for parameter "${t}": ${i}`)}e[t]=i}))})),e}decompress(e,t,i){g.push((r=>{this._decompress(e,t,((e,t)=>{r(),i(e,t)}))}))}compress(e,t,i){g.push((r=>{this._compress(e,t,((e,t)=>{r(),i(e,t)}))}))}_decompress(e,t,i){const r=this._isServer?"client":"server";if(!this._inflate){const e=r+"_max_window_bits",t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=o.createInflateRaw(Object.assign({},this._options.zlibInflateOptions,{windowBits:t})),this._inflate[l]=0,this._inflate[p]=[],this._inflate[v]=this,this._inflate.on("error",_),this._inflate.on("data",b)}this._inflate[f]=i,this._inflate[h]=!0,this._inflate.write(e),t&&this._inflate.write(u),this._inflate.flush((()=>{const e=this._inflate[m];if(e)return this._inflate.close(),this._inflate=null,void i(e);const n=s.concat(this._inflate[p],this._inflate[l]);t&&this.params[r+"_no_context_takeover"]||this._inflate[d]?(this._inflate.close(),this._inflate=null):(this._inflate[h]=!1,this._inflate[l]=0,this._inflate[p]=[]),i(null,n)}))}_compress(e,i,r){if(!e||0===e.length)return void t.nextTick(r,null,c);const n=this._isServer?"server":"client";if(!this._deflate){const e=n+"_max_window_bits",t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=o.createDeflateRaw(Object.assign({memLevel:this._options.memLevel,level:this._options.level},this._options.zlibDeflateOptions,{windowBits:t})),this._deflate[l]=0,this._deflate[p]=[],this._deflate.on("data",y)}this._deflate[h]=!0,this._deflate.write(e),this._deflate.flush(o.Z_SYNC_FLUSH,(()=>{var e=s.concat(this._deflate[p],this._deflate[l]);i&&(e=e.slice(0,e.length-4)),i&&this.params[n+"_no_context_takeover"]||this._deflate[d]?(this._deflate.close(),this._deflate=null):(this._deflate[h]=!1,this._deflate[l]=0,this._deflate[p]=[]),r(null,e)}))}}}).call(this,i(4))},function(e,t,i){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var r in i)n(i,r)&&(e[r]=i[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,i,r,n){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+r),n);else for(var o=0;o<r;o++)e[n+o]=t[i+o]},flattenChunks:function(e){var t,i,r,n,o,s;for(r=0,t=0,i=e.length;t<i;t++)r+=e[t].length;for(s=new Uint8Array(r),n=0,t=0,i=e.length;t<i;t++)o=e[t],s.set(o,n),n+=o.length;return s}},s={arraySet:function(e,t,i,r,n){for(var o=0;o<r;o++)e[n+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},function(e,t,i){const r=i(36).Buffer;t.BINARY_TYPES=["nodebuffer","arraybuffer","fragments"],t.GUID="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",t.EMPTY_BUFFER=r.alloc(0),t.NOOP=()=>{}},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(7)),o=r(i(47)),s=r(i(62)),a=r(i(63)),u=function(){var e="none";return null!==o.default.userAgent().match("fake")?e="fake":null!==o.default.userAgent().match("ios")?e="ios":null!==o.default.userAgent().match("android")?e="android":null!==o.default.userAgent().match("Firefox")?e="mozilla":null!==o.default.userAgent().match("Chrome")?(e="chrome-stable",null!==o.default.userAgent().match("Electron")&&(e="electron")):(null!==o.default.userAgent().match("Safari")||null!==o.default.userAgent().match("AppleWebKit"))&&(e="safari"),e},c={GetUserMedia:function(e){return new Promise((function(t,i){!function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=s.default.mediaDevices(),a=function(e,t,i){o.getUserMedia(e).then(t).catch(i)},c=function(){switch(n.default.debug("Screen access requested"),u()){case"electron":n.default.debug("Screen sharing in Electron"),(t={}).video=e.video||{},t.video.mandatory=e.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r);break;case"mozilla":case"mozilla":n.default.debug("Screen sharing in Firefox"),t={},void 0!==e.video?(t.video=e.video,t.video.mediaSource||(t.video.mediaSource="window")):t={audio:e.audio,video:{mediaSource:"window"}},a(t,i,r);break;case"chrome-stable":n.default.debug("Screen sharing in Chrome"),t={},e.desktopStreamId&&(t.video=e.video||{mandatory:{}},t.video.mandatory=t.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r));break;case"chrome-stable":if(n.default.debug("Screen sharing in Chrome"),t={},e.desktopStreamId)t.video=e.video||{mandatory:{}},t.video.mandatory=t.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r);else{var o="jbglfdfehfdcpnbhfnciaiokkfocjcjk";e.extensionId&&(n.default.debug("extensionId supplied, using ".concat(e.extensionId)),o=e.extensionId),n.default.debug("Screen access on chrome stable, looking for extension");try{chrome.runtime.sendMessage(o,{getStream:!0},(function(o){if(void 0!==o){var s=o.streamId;void 0!==e.video.mandatory?(t.video=e.video||{mandatory:{}},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=s):t={video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:s}}},a(t,i,r)}else n.default.error("Access to screen denied"),r({code:"Access to screen denied"})}))}catch(e){n.default.debug("Screensharing plugin is not accessible "),r({code:"no_plugin_present"})}}break;default:n.default.error("This browser does not support ScreenSharing")}};e.screen?c():(n.default.debug("Calling getUserMedia with config",e),a(e,i,r))}(e,(function(i){(new a.default).isReactNative()&&t(i),e.fps&&i.clone?t(function(e,t){if(!t)return e;var i=e.getVideoTracks()[0];if(!i)return e;if("function"!=typeof i.getCapabilities)return e;var r=i.getConstraints(),n=e.clone();return(i=n.getVideoTracks()[0])?(e.getTracks().forEach((function(e){return e.stop()})),r.width,r.height,r.frameRate=t||r.frameRate,i.applyConstraints(r),n):(n.getTracks().forEach((function(e){return e.stop()})),e)}(i,e.fps)):t(i)}),(function(e){i(e)}))}))},getBrowser:u,getUserAgent:function(){return window.navigator.userAgent}};t.default=c},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={mediaDevices:function(){var e=void 0;try{e=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(t){e=navigator.mediaDevices}return e},PRTCPeerConnection:function(){var e=void 0;try{e=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).RTCPeerConnection}catch(t){e=RTCPeerConnection}return e}};t.default=r},function(e,t,i){var r=i(3),n=i(11);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(i(201)),s=r(i(9)),a=r(i(10)),u=r(i(102)),c=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var i=h(void 0);if(i&&i.has(e))return i.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,i&&i.set(e,r),r}(i(202));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}var d={Chrome:c.CHROME,Chromium:c.CHROME,Opera:c.OPERA,Firefox:c.FIREFOX,"Internet Explorer":c.INTERNET_EXPLORER,Safari:c.SAFARI,WeChat:c.WECHAT},l=navigator.userAgent;function f(){var e=l;if(e.match(/Electron/)){var t=e.match(/Electron\/([\d.]+)/)[1];return{name:c.ELECTRON,version:t}}}function p(){var e=l;if(e.match(/JitsiMeetNW/)){var t=e.match(/JitsiMeetNW\/([\d.]+)/)[1];return{name:c.NWJS,version:t}}}function m(){var e=l;if(e.match(/MicroMessenger/)){var t=e.match(/MicroMessenger\/([\d.]+)/)[1];return{name:c.WECHAT,version:t}}}function v(){var e,t=l.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i);if(t||"ReactNative"===navigator.product)return t&&t.length>2&&(e=t[2]),e||(e="unknown"),{name:c.REACT_NATIVE,version:e}}navigator.userAgent||(l=navigator.product);var g=function(){function e(t){var i,r;if((0,s.default)(this,e),this.browsers=c,this._bowser=u.default.getParser(l),void 0===t){var n=function(e){for(var t,i=[v,f,p,m],r=0;r<i.length;r++)if(t=i[r]())return t;var n=e.getBrowserName();return n in d?{name:d[n],version:e.getBrowserVersion()}:(t=function(){var e=l,t={name:c.UNKNOWN,version:void 0};if(e.match(/Chrome/)&&!e.match(/Edge/))if(e.match(/Edg/)){var i=e.match(/Edg\/([\d.]+)/)[1];Number.parseInt(i,10)>72&&(t.name=c.CHROME,t.version=i)}else t.name=c.CHROME,t.version=e.match(/Chrome\/([\d.]+)/)[1];return t}())||{name:c.UNKNOWN,version:void 0}}(this._bowser);i=n.name,r=n.version}else t.name in d?(i=d[t.name],r=t.version):(i=c.UNKNOWN,r=void 0);this._name=i,this._version=r}return(0,a.default)(e,[{key:"getName",value:function(){return this._name}},{key:"isChrome",value:function(){return this._name===c.CHROME}},{key:"isOpera",value:function(){return this._name===c.OPERA}},{key:"isFirefox",value:function(){return this._name===c.FIREFOX}},{key:"isIExplorer",value:function(){return this._name===c.INTERNET_EXPLORER}},{key:"isSafari",value:function(){return this._name===c.SAFARI}},{key:"isNWJS",value:function(){return this._name===c.NWJS}},{key:"isElectron",value:function(){return this._name===c.ELECTRON}},{key:"isReactNative",value:function(){return this._name===c.REACT_NATIVE}},{key:"getVersion",value:function(){return this._version}},{key:"_checkCondition",value:function(e){if(this._version)return this._bowser.satisfies(e)}},{key:"isVersionGreaterThan",value:function(e){return this._checkCondition((0,o.default)({},this._name,">".concat(e)))}},{key:"isVersionLessThan",value:function(e){return this._checkCondition((0,o.default)({},this._name,"<".concat(e)))}},{key:"isVersionEqualTo",value:function(e){return this._checkCondition((0,o.default)({},this._name,"~".concat(e)))}}]),e}();t.default=g},function(e,t,i){var r=i(204),n=i(205),o=i(206),s=i(208);e.exports=function(e,t){return r(e)||n(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(109)),o=r(i(11)),s=r(i(110)),a=r(i(9)),u=r(i(10)),c=r(i(102)),h=r(i(7)),d=r(i(47)),l=r(i(63)),f=r(i(61)),p=r(i(50));function m(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return v(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function g(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:15;if(!t||!i)return e;var n=e.getVideoTracks()[0];if(!n)return e;if("function"!=typeof n.getCapabilities)return e;var o=n.getConstraints(),s=n.getCapabilities(),a=s.width.max,u=s.height.max;if((a<=t||u<=i)&&!r)return e;var c=e.clone();if(!(n=c.getVideoTracks()[0]))return c.getTracks().forEach((function(e){return e.stop()})),e;e.getTracks().forEach((function(e){return e.stop()}));var h=t,d=i,l=1*a/u,f=1*t/i;return l>f?d=Math.floor(1*u/a*t):h=Math.floor(l*i),d>1080&&(d=1080,h=1080*f),h%2&&(h-=1),d%2&&(d-=1),n.applyConstraints({width:{min:0,ideal:h},height:{min:0,ideal:d},frameRate:r||o.frameRate}).catch((function(e){console.log("track.applyConstraints error")})),c}var y,b=function(){function e(){(0,a.default)(this,e),this._stream=null,this.avaliable=!0}return(0,u.default)(e,[{key:"check",value:function(){return new Promise((function(e,t){chrome.runtime.sendMessage({check:!0},(function(i){""!=i.id&&null!=i.id?e(i.id):t("not plugin")}))}))}},{key:"detect",value:function(e){return new Promise((function(t,i){var r=document.createElement("img");r.src="chrome-extension://"+e+"/icon.png",r.onload=function(){t()},r.onerror=function(){i({code:p.default.ERR_NOT_INSTALLED,error:"not-installed"})}}))}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,i=e.extensionId||"jbglfdfehfdcpnbhfnciaiokkfocjcjk";return this.detect(i).then((function(){return new Promise((function(r,n){chrome.runtime.sendMessage(i,{getStream:!0},(function(i){if(void 0!==i){var o=t._toConstraints(e,i.streamId);f.default.GetUserMedia(o).then((function(i){t._stream=g(i,e.width,e.height,e.fps),r(t._stream)})).catch((function(e){n(e)}))}else h.default.error("Access to screen denied"),error({code:"Access to screen denied"})}))}))})).catch((function(e){h.default.warn("onerror plugin"),reject(e)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return this.avaliable}},{key:"needExtension",value:function(){return!this.avaliable}},{key:"_toConstraints",value:function(e,t){var i={video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t},optional:[{googTemporalLayeredScreencast:!0}]},audio:!1};return isFinite(e.width)&&(i.video.mandatory.maxWidth=e.width,i.video.mandatory.minWidth=e.width),isFinite(e.height)&&(i.video.mandatory.maxHeight=e.height,i.video.mandatory.minHeight=e.height),isFinite(e.frameRate)&&(i.video.mandatory.maxFrameRate=e.frameRate,i.video.mandatory.minFrameRate=e.frameRate),i}}]),e}(),_=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t),r=navigator.mediaDevices;return r.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return{video:{frameRate:e.fps},audio:e.audio||!1}}}]),e}(),w=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this._toConstraints(t),n=void 0;try{n=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(e){n=navigator.mediaDevices}return n.getUserMedia(r).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){var t={video:{mediaSource:"window"},audio:!1};return"mediaSource"in e&&(t.video.mediaSource=e.mediaSource),isFinite(e.width)&&(t.video.width={min:e.width,max:e.width}),isFinite(e.height)&&(t.video.height={min:e.height,max:e.height}),isFinite(e.frameRate)&&(t.video.frameRate={min:e.frameRate,max:e.frameRate}),t}}]),e}(),S=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t);return navigator.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(){return{video:!0}}}]),e}(),E=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};console.log(t.width),console.log(t.height),console.log(t.source_name),console.log(t.isRecord);var i,r=this._toConstraints(t),a="boolean"==typeof t.audio&&t.audio,u="boolean"==typeof t.isRecord&&t.isRecord,c=("boolean"==typeof t.isLocalProjection&&t.isLocalProjection,window.require("electron")),h={types:["window","screen"]};if(c)i=c.desktopCapturer?c.desktopCapturer.getSources(h):c.ipcRenderer.invoke("desktopCapturer:getSources",h);else{var d=window.electronAPI.desktopCapturerGetSources(h);i=d}return i.then(function(){var i=(0,s.default)(n.default.mark((function i(s){var c,h,d,l;return n.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:console.log("---share name selected:"+t.source_name),c=m(s),i.prev=2,d=function(){var i=h.value;if(u||t.source_name===i.name){try{return a?{v:navigator.mediaDevices.getUserMedia({audio:{mandatory:{chromeMediaSource:"desktop",echoCancellation:!0}},video:{mandatory:{chromeMediaSource:"desktop"}}}).then((function(t){return console.log(i.id),e._stream=t,t}))}:{v:navigator.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:i.id,minWidth:r.video.mandatory.minWidth,maxWidth:r.video.mandatory.maxWidth,minHeight:r.video.mandatory.minHeight,maxHeight:r.video.mandatory.maxHeight,minFrameRate:r.video.mandatory.minFrameRate,maxFrameRate:r.video.mandatory.maxFrameRate}}}).then((function(t){return console.log("ElectronScreenShare:",i.id),e._stream=t,t}))}}catch(e){console.log("ElectronScreenShare.start.error:",e)}return"break"}},c.s();case 5:if((h=c.n()).done){i.next=13;break}if("break"!==(l=d())){i.next=9;break}return i.abrupt("break",13);case 9:if("object"!==(0,o.default)(l)){i.next=11;break}return i.abrupt("return",l.v);case 11:i.next=5;break;case 13:i.next=18;break;case 15:i.prev=15,i.t0=i.catch(2),c.e(i.t0);case 18:return i.prev=18,c.f(),i.finish(18);case 21:return i.abrupt("return",null);case 22:case"end":return i.stop()}}),i,null,[[2,15,18,21]])})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){return console.error("ElectronScreenShare:error",e),Promise.reject(e)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){var t={video:{frameRate:e.fps,mandatory:{maxWidth:e.width,minWidth:e.width,maxHeight:e.height,minHeight:e.height}},audio:!1};return h.default.log("====fps:",e.fps),isFinite(e.width)&&(t.video.mandatory.maxWidth=e.width,t.video.mandatory.minWidth=e.width),isFinite(e.height)&&(t.video.mandatory.minHeight=e.height,t.video.mandatory.maxHeight=e.height),isFinite(e.fps)&&(t.video.mandatory.minFrameRate=e.fps,t.video.mandatory.maxFrameRate=e.fps),void 0===e.width&&(t.video.mandatory.maxWidth=1920,t.video.mandatory.minWidth=1920),void 0===e.height&&(t.video.mandatory.maxHeight=1080,t.video.mandatory.minHeight=1080),void 0===e.fps&&(t.video.mandatory.minFrameRate=15,t.video.mandatory.maxFrameRate=15),t}}]),e}(),T=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this._toConstraints(t),n=void 0;try{n=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(e){n=navigator.mediaDevices}return n.getDisplayMedia(r).then((function(t){return e._stream=t,Promise.resolve(t)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return!1===e.audio||"object"!=(0,o.default)(e.audio)?{videoscreen:{frameRate:e.fps,width:e.width,height:e.height}}:{videoscreen:{frameRate:e.fps,width:e.width,height:e.height},audio:e.audio}}}]),e}(),M=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t),r=navigator.mediaDevices;return r.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps||15),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return{video:{frameRate:e.fps||15}}}}]),e}(),I=function(){function e(){(0,a.default)(this,e)}return(0,u.default)(e,[{key:"isScreenShareAvailable",value:function(){return!1}},{key:"needExtension",value:function(){return!1}}]),e}(),k=function(){function e(){(0,a.default)(this,e)}return(0,u.default)(e,null,[{key:"create",value:function(){if(y)return y;var e=d.default.isMobile()?d.default.userAgent():navigator.userAgent,t=c.default.getParser(e),i=t.getEngine(),r=void 0;try{r=i.name.toLowerCase()}catch(e){}var n=new l.default;if(n.isElectron())return console.log("===========Client============="),y=new E;if(n.isReactNative())return console.log("===========APP============="),y=new T;if(console.log("===========Browser============="),t.satisfies({chrome:">=72",chromium:">=72"}))y=new _;else if(t.satisfies({chrome:">=55",chromium:">=55"}))y=new b;else if(t.satisfies({firefox:">=60"}))y=new w;else if(t.satisfies({"microsoft edge":"~11"}))y=new S;else if("blink"===r){h.default.debug("best effort Chromium based browser detection");var o=e.match(/(?:(?:Chrome|Chromium))[ /](\w+)/i);if(o){var s=Number(o[1]);y=s>=72?new _:new b}else y=new b}else y=t.satisfies({safari:">=13"})&&"undefined"!=typeof RTCRtpTransceiver?new M:(t.satisfies({safari:">=11"}),new I);return y}}]),e}();t.default=k},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(9)),o=r(i(10)),s=i(104),a=r(i(7)),u=function(){function e(t){var i=this;(0,n.default)(this,e),this.config=t||{},this.queue=[],this.eventMap={},this.status=3,t.tag=t.tag||"DataChannel",t.onLogMessage=t.onLogMessage||function(){},t.onErrorMessage=t.onErrorMessage||function(){},t.maxRetries=null!=t.maxRetries?t.maxRetries:2e3,this.handshake(!1,{onopen:this.onopen.bind(this),onclose:this.onclose.bind(this),onerror:this.onerror.bind(this)}),this.onnetworkchange=function(){i.wp&&!i.onnetworkchangeTimeout&&(i.onnetworkchangeTimeout=setTimeout((function(){i.reconnecting(i.config.maxRetries,1),i.onnetworkchangeTimeout=null}),2e3))}}return(0,o.default)(e,[{key:"isConnected",value:function(){return 1===this.status}},{key:"handshake",value:function(e,t){var i=this;this.wp&&(this.wp.dispose(),this.wp=void 0);var r={configuration:{iceServers:[],rtcpMuxPolicy:"require"},dataChannels:!0,dataChannelConfig:{onopen:t.onopen,onclose:t.onclose,onerror:t.onerror,onmessage:this.onmessage.bind(this),options:{ordered:!1,maxRetransmits:this.config.maxRetries}},mediaConstraints:{audio:!1,video:!1}};this.wp=new s.WebRtcPeerSendonly(r,(function(){i.config.maxRetries&&(i.wp.peerConnection.oniceconnectionstatechange=function(e){i.disconnectTimer&&(clearTimeout(i.disconnectTimer),i.disconnectTimer=null),"disconnected"===i.wp.peerConnection.iceConnectionState?i.disconnectTimer=setTimeout((function(){i.disconnectTimer=null,i.reconnecting(i.config.maxRetries,1)}),5e3):"failed"===i.wp.peerConnection.iceConnectionState&&i.reconnecting(i.config.maxRetries,1)}),i.wp.generateOffer().then((function(e){return a.default.info("DataChannelWS offer "+JSON.stringify(e)),new Promise((function(t,r){var n=0;!function o(){n++,fetch(i.config.uri,{cache:"no-cache",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",mode:"cors",redirect:"follow",referrer:"no-referrer",body:JSON.stringify({sdp:e,type:"offer"})}).then((function(e){t(e.json())}),(function(e){n<3?setTimeout((function(){o()}),1e3):r(e)}))}()}))})).then((function(e){return e.sdp})).then((function(e){return a.default.info("DataChannelWS answer "+e),i.wp.processAnswer(e)})).catch((function(e){i.status=3,i.config.ondisconnect&&i.config.ondisconnect()}))})),e||(this.status=0)}},{key:"reconnecting",value:function(e,t){if(this.config.onLogMessage("reconnecting"),1===t){if(4===this.status)return void this.config.onLogMessage("Trying to reconnect when reconnecting... Ignoring this reconnection.");this.status=4,this.config.onreconnecting&&this.config.onreconnecting()}this.reconnect(e,t)}},{key:"reconnect",value:function(e,t){var i=this;this.config.onLogMessage("Trying to reconnect "+t+" times"),2!==this.status?this.handshake(!0,{onopen:function(){i.config.onLogMessage("Reconnected in "+t+" retries..."),i.wp.dataChannel.onclose=i.onclose.bind(i),i.onopen()},onerror:function(r){i.config.onErrorMessage("Reconnection error: "),2!==i.status?t===e?i.config.ondisconnect&&i.config.ondisconnect():(i.closeErrorTimer&&clearTimeout(i.closeErrorTimer),i.closeErrorTimer=setTimeout((function(){i.reconnecting(e,t+1)}),3e3)):i.config.onLogMessage("closing connection ")},onclose:function(){}}):this.config.onLogMessage("closing connection ")}},{key:"onopen",value:function(){for(this.config.onLogMessage("DataChannelWS connected"),4===this.status?this.config.onreconnected&&this.config.onreconnected():this.config.onconnected&&this.config.onconnected();this.queue.length>0;)"open"==this.wp.dataChannel.readyState&&this.wp.send(this.queue.shift());this.status=1,this.fire("open")}},{key:"onclose",value:function(){"closed"===this.wp.dataChannel.readyState?2===this.status?(this.config.onLogMessage("Connection Closed by user"),this.status=3,this.wp=null):this.config.maxRetries?(this.config.onLogMessage("Connection closed unexpectecly. Reconnecting..."),this.reconnecting(this.config.maxRetries,1)):(this.config.onLogMessage("Connection Closed by server"),this.close(),this.status=3,this.wp=null,this.config.ondisconnect&&this.config.ondisconnect()):this.config.onLogMessage("Close callback from previous DataChannelWS. Ignoring it"),console.warn("onclose 事件触发"),console.trace(),this.fire("close")}},{key:"onerror",value:function(e){this.config.onErrorMessage(e),this.config.onerror&&this.config.onerror(),this.fire("error",e)}},{key:"onmessage",value:function(e){this.fire("message",e),a.default.debug(this.config.tag,"/Receive: ",e.data)}},{key:"send",value:function(e){"open"!=this.wp.dataChannel.readyState?this.queue.push(e):this.wp.send(e),a.default.debug(this.config.tag,"/Send: ",e)}},{key:"close",value:function(){this.status=2,this.wp&&this.wp.dispose()}},{key:"fire",value:function(e,t){if(this.eventMap[e])for(var i=0;i<this.eventMap[e].length;i++)this.eventMap[e][i](t)}},{key:"addEventListener",value:function(e,t){"function"==typeof t?this.eventMap[e]?this.eventMap[e].push(t):this.eventMap[e]=[t]:this.config.onLogMessage("addEventListener callback is not a function")}},{key:"removeEventListener",value:function(e,t){if(this.eventMap[e])if("function"==typeof t){for(var i=0;i<this.eventMap[e].length;i++)if(this.eventMap[e][i]===t){this.eventMap[e].splice(i,1);break}}else delete this.eventMap[e]}},{key:"reconnectWs",value:function(){this.reconnecting(this.config.maxRetries,1)}}]),e}();t.default=u},function(e,t,i){(function(t){var r=i(8).EventEmitter,n=i(0),o=i(19),s=i(38),a=i(12);function u(e,t,i){var n=this;r.call(this),setTimeout((function(){n._start(e,t,i)}),0)}n(u,r),u.prototype._start=function(e,i,r){var n=this,s=new t.XDomainRequest;i=a.addQuery(i,"t="+ +new Date),s.onerror=function(){n._error()},s.ontimeout=function(){n._error()},s.onprogress=function(){s.responseText,n.emit("chunk",200,s.responseText)},s.onload=function(){n.emit("finish",200,s.responseText),n._cleanup(!1)},this.xdr=s,this.unloadRef=o.unloadAdd((function(){n._cleanup(!0)}));try{this.xdr.open(e,i),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(r)}catch(e){this._error()}},u.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},u.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},u.prototype.close=function(){this._cleanup(!0)},u.enabled=!(!t.XDomainRequest||!s.hasDomain()),e.exports=u}).call(this,i(1))},function(e,t,i){(function(t){var r=i(0),n=i(125),o=i(70);e.exports=function(e){function i(t,i){n.call(this,e.transportName,t,i)}return r(i,n),i.enabled=function(i,r){if(!t.document)return!1;var s=o.extend({},r);return s.sameOrigin=!0,e.enabled(s)&&n.enabled()},i.transportName="iframe-"+e.transportName,i.needBody=!0,i.roundTrips=n.roundTrips+e.roundTrips-1,i.facadeTransport=e,i}}).call(this,i(1))},function(e,t,i){e.exports={isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,i,r=1,n=arguments.length;r<n;r++)for(i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}}},function(e,t,i){function r(e){this.type=e}r.prototype.initEvent=function(e,t,i){return this.type=e,this.bubbles=t,this.cancelable=i,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,e.exports=r},function(e,t,i){t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=i(29),t.createHash=t.Hash=i(41),t.createHmac=t.Hmac=i(148);var r=i(300),n=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);t.getHashes=function(){return o};var s=i(151);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=i(302);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=i(317);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=i(324);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=i(365);var h=i(368);t.publicEncrypt=h.publicEncrypt,t.privateEncrypt=h.privateEncrypt,t.publicDecrypt=h.publicDecrypt,t.privateDecrypt=h.privateDecrypt;var d=i(372);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,i){var r=i(0),n=i(134),o=i(2).Buffer,s=new Array(16);function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,i,r,n,o,s){return u(e+(t&i|~t&r)+n+o|0,s)+t|0}function h(e,t,i,r,n,o,s){return u(e+(t&r|i&~r)+n+o|0,s)+t|0}function d(e,t,i,r,n,o,s){return u(e+(t^i^r)+n+o|0,s)+t|0}function l(e,t,i,r,n,o,s){return u(e+(i^(t|~r))+n+o|0,s)+t|0}r(a,n),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,o=this._d;i=c(i,r,n,o,e[0],3614090360,7),o=c(o,i,r,n,e[1],3905402710,12),n=c(n,o,i,r,e[2],606105819,17),r=c(r,n,o,i,e[3],3250441966,22),i=c(i,r,n,o,e[4],4118548399,7),o=c(o,i,r,n,e[5],1200080426,12),n=c(n,o,i,r,e[6],2821735955,17),r=c(r,n,o,i,e[7],4249261313,22),i=c(i,r,n,o,e[8],1770035416,7),o=c(o,i,r,n,e[9],2336552879,12),n=c(n,o,i,r,e[10],4294925233,17),r=c(r,n,o,i,e[11],2304563134,22),i=c(i,r,n,o,e[12],1804603682,7),o=c(o,i,r,n,e[13],4254626195,12),n=c(n,o,i,r,e[14],2792965006,17),i=h(i,r=c(r,n,o,i,e[15],1236535329,22),n,o,e[1],4129170786,5),o=h(o,i,r,n,e[6],3225465664,9),n=h(n,o,i,r,e[11],643717713,14),r=h(r,n,o,i,e[0],3921069994,20),i=h(i,r,n,o,e[5],3593408605,5),o=h(o,i,r,n,e[10],38016083,9),n=h(n,o,i,r,e[15],3634488961,14),r=h(r,n,o,i,e[4],3889429448,20),i=h(i,r,n,o,e[9],568446438,5),o=h(o,i,r,n,e[14],3275163606,9),n=h(n,o,i,r,e[3],4107603335,14),r=h(r,n,o,i,e[8],1163531501,20),i=h(i,r,n,o,e[13],2850285829,5),o=h(o,i,r,n,e[2],4243563512,9),n=h(n,o,i,r,e[7],1735328473,14),i=d(i,r=h(r,n,o,i,e[12],2368359562,20),n,o,e[5],4294588738,4),o=d(o,i,r,n,e[8],2272392833,11),n=d(n,o,i,r,e[11],1839030562,16),r=d(r,n,o,i,e[14],4259657740,23),i=d(i,r,n,o,e[1],2763975236,4),o=d(o,i,r,n,e[4],1272893353,11),n=d(n,o,i,r,e[7],4139469664,16),r=d(r,n,o,i,e[10],3200236656,23),i=d(i,r,n,o,e[13],681279174,4),o=d(o,i,r,n,e[0],3936430074,11),n=d(n,o,i,r,e[3],3572445317,16),r=d(r,n,o,i,e[6],76029189,23),i=d(i,r,n,o,e[9],3654602809,4),o=d(o,i,r,n,e[12],3873151461,11),n=d(n,o,i,r,e[15],530742520,16),i=l(i,r=d(r,n,o,i,e[2],3299628645,23),n,o,e[0],4096336452,6),o=l(o,i,r,n,e[7],1126891415,10),n=l(n,o,i,r,e[14],2878612391,15),r=l(r,n,o,i,e[5],4237533241,21),i=l(i,r,n,o,e[12],1700485571,6),o=l(o,i,r,n,e[3],2399980690,10),n=l(n,o,i,r,e[10],4293915773,15),r=l(r,n,o,i,e[1],2240044497,21),i=l(i,r,n,o,e[8],1873313359,6),o=l(o,i,r,n,e[15],4264355552,10),n=l(n,o,i,r,e[6],2734768916,15),r=l(r,n,o,i,e[13],1309151649,21),i=l(i,r,n,o,e[4],4149444226,6),o=l(o,i,r,n,e[11],3174756917,10),n=l(n,o,i,r,e[2],718787259,15),r=l(r,n,o,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,i){(function(t){function i(e){try{if(!t.localStorage)return!1}catch(e){return!1}var i=t.localStorage[e];return null!=i&&"true"===String(i).toLowerCase()}e.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,i(1))},function(e,t,i){var r=i(30).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];e.apply(this,r)}}}(o||n);var s=i.readable||!1!==i.readable&&t.readable,a=i.writable||!1!==i.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){a=!1,c=!0,s||o.call(t)},d=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,d=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!d?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},m=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",l),t.on("finish",h),!1!==i.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t,i){var r=i(5).Buffer,n=i(0),o=i(134),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,i,r,n,o,s,a){return p(e+(t^i^r)+o+s|0,a)+n|0}function v(e,t,i,r,n,o,s,a){return p(e+(t&i|~t&r)+o+s|0,a)+n|0}function g(e,t,i,r,n,o,s,a){return p(e+((t|~i)^r)+o+s|0,a)+n|0}function y(e,t,i,r,n,o,s,a){return p(e+(t&r|i&~r)+o+s|0,a)+n|0}function b(e,t,i,r,n,o,s,a){return p(e+(t^(i|~r))+o+s|0,a)+n|0}n(f,o),f.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,f=0|this._e,_=0|this._a,w=0|this._b,S=0|this._c,E=0|this._d,T=0|this._e,M=0;M<80;M+=1){var I,k;M<16?(I=m(i,r,n,o,f,e[a[M]],d[0],c[M]),k=b(_,w,S,E,T,e[u[M]],l[0],h[M])):M<32?(I=v(i,r,n,o,f,e[a[M]],d[1],c[M]),k=y(_,w,S,E,T,e[u[M]],l[1],h[M])):M<48?(I=g(i,r,n,o,f,e[a[M]],d[2],c[M]),k=g(_,w,S,E,T,e[u[M]],l[2],h[M])):M<64?(I=y(i,r,n,o,f,e[a[M]],d[3],c[M]),k=v(_,w,S,E,T,e[u[M]],l[3],h[M])):(I=b(i,r,n,o,f,e[a[M]],d[4],c[M]),k=m(_,w,S,E,T,e[u[M]],l[4],h[M])),i=f,f=o,o=p(n,10),n=r,r=I,_=T,T=E,E=p(S,10),S=w,w=k}var R=this._b+n+E|0;this._b=this._c+o+T|0,this._c=this._d+f+_|0,this._d=this._e+i+w|0,this._e=this._a+r+S|0,this._a=R},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},function(e,t,i){(t=e.exports=function(e){e=e.toLowerCase();var i=t[e];if(!i)throw new Error(e+" is not supported (we accept pull requests)");return new i}).sha=i(285),t.sha1=i(286),t.sha224=i(287),t.sha256=i(141),t.sha384=i(288),t.sha512=i(142)},function(e,t,i){var r=i(5),n=r.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){(function(t,r,n){var o=i(53);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=g;var c=Object.create(i(43));c.inherits=i(0);var h,d={deprecate:i(74)},l=i(145),f=i(78).Buffer,p=n.Uint8Array||function(){},m=i(146);function v(){}function g(e,t){a=a||i(25),e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(c||0===c)?c:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(o.nextTick(n,r),o.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,i,r,t,n);else{var s=S(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?u(_,e,i,s,n):_(e,i,s,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||i(25),!(h.call(y,this)||this instanceof a))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,i,r,n,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function _(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),o=t.corkedRequestsFree;o.entry=i;for(var a=0,u=!0;i;)n[a]=i,i.isBuf||(u=!1),i=i.next,a+=1;n.allBuffers=u,b(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,h=i.encoding,d=i.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,h,d),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var i=S(t);return i&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}c.inherits(y,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&e&&e._writableState instanceof g}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,a=!n.objectMode&&(r=e,f.isBuffer(r)||r instanceof p);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(i=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=v),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),o.nextTick(t,i)}(this,i):(a||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,o){if(!i){var s=function(e,t,i){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,i)),t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,r,n,o);return u}(this,n,a,e,t,i)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,T(e,t),i&&(t.finished?o.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,i(4),i(292).setImmediate,i(1))},function(e,t,i){var r=i(13);function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<i;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=i,i},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,i=0,r=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,i),i+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,i=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,i){var r=i(307),n=i(315),o=i(160);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,i){var r={ECB:i(308),CBC:i(309),CFB:i(310),CFB8:i(311),CFB1:i(312),OFB:i(313),CTR:i(158),GCM:i(158)},n=i(160);for(var o in n)n[o].module=r[n[o].mode];e.exports=n},function(e,t,i){var r;function n(e){this.rand=e}if(e.exports=function(e){return r||(r=new n(null)),r.generate(e)},e.exports.Rand=n,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),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=i(321);if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t,i){var r=i(33).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];e.apply(this,r)}}}(o||n);var s=i.readable||!1!==i.readable&&t.readable,a=i.writable||!1!==i.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){a=!1,c=!0,s||o.call(t)},d=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,d=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!d?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},m=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",l),t.on("finish",h),!1!==i.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t,i){(function(t){var r=i(86),n=i(29);function o(e){var t,i=e.modulus.byteLength();do{t=new r(n(i))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,i){var n=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(i),s=i.modulus.byteLength(),a=new r(e).mul(n.blinder).umod(i.modulus),u=a.toRed(r.mont(i.prime1)),c=a.toRed(r.mont(i.prime2)),h=i.coefficient,d=i.prime1,l=i.prime2,f=u.redPow(i.exponent1).fromRed(),p=c.redPow(i.exponent2).fromRed(),m=f.isub(p).imul(h).umod(d).imul(l);return p.iadd(m).imul(n.unblinder).umod(i.modulus).toArrayLike(t,"be",s)}s.getr=o,e.exports=s}).call(this,i(5).Buffer)},function(e,t,i){(function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(334).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+e)}function u(e,t,i){var r=a(e,i);return i-1>=t&&(r|=a(e,i-1)<<4),r}function c(e,t,i,n){for(var o=0,s=0,a=Math.min(e.length,i),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=n,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<n,"Invalid character"),o+=s}return o}function h(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var o=e.length-i,s=o%r,a=Math.min(o,o-s)+i,u=0,h=i;h<a;h+=r)u=c(e,h,h+r,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=c(e,h,e.length,t),h=0;h<s;h++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){h(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","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 m(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;i.words[0]=a;for(var c=1;c<r;c++){for(var h=u>>>26,d=67108863&u,l=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=l;f++){var p=c-f|0;h+=(s=(n=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}i.words[c]=0|d,u=0|h}return 0!==u?i.words[c]=0|u:i.length--,i._strip()}o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);i=0!=(o=a>>>24-n&16777215)||s!==this.length-1?l[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=p[e];i="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(h).toString(e);i=(d=d.idivn(h)).isZero()?m+i:l[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},o.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;e[i++]=255&s,i<e.length&&(e[i++]=s>>8&255),i<e.length&&(e[i++]=s>>16&255),6===o?(i<e.length&&(e[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<e.length)for(e[i++]=r;i<e.length;)e[i++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;e[i--]=255&s,i>=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===o?(i>=0&&(e[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},o.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,o=0;o<r.length;o++)t=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<i.length;o++)t=(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var v=function(e,t,i){var r,n,o,s=e.words,a=t.words,u=i.words,c=0,h=0|s[0],d=8191&h,l=h>>>13,f=0|s[1],p=8191&f,m=f>>>13,v=0|s[2],g=8191&v,y=v>>>13,b=0|s[3],_=8191&b,w=b>>>13,S=0|s[4],E=8191&S,T=S>>>13,M=0|s[5],I=8191&M,k=M>>>13,R=0|s[6],A=8191&R,C=R>>>13,x=0|s[7],O=8191&x,P=x>>>13,L=0|s[8],D=8191&L,N=L>>>13,U=0|s[9],B=8191&U,j=U>>>13,V=0|a[0],F=8191&V,$=V>>>13,q=0|a[1],W=8191&q,H=q>>>13,G=0|a[2],z=8191&G,J=G>>>13,K=0|a[3],Y=8191&K,Z=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ie=8191&te,re=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,le=he>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ve=(c+(r=Math.imul(d,F))|0)+((8191&(n=(n=Math.imul(d,$))+Math.imul(l,F)|0))<<13)|0;c=((o=Math.imul(l,$))+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),n=(n=Math.imul(p,$))+Math.imul(m,F)|0,o=Math.imul(m,$);var ge=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,F),n=(n=Math.imul(g,$))+Math.imul(y,F)|0,o=Math.imul(y,$),r=r+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0;var ye=(c+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(l,z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(_,F),n=(n=Math.imul(_,$))+Math.imul(w,F)|0,o=Math.imul(w,$),r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,H)|0,r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,J)|0;var be=(c+(r=r+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(l,Y)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,$))+Math.imul(T,F)|0,o=Math.imul(T,$),r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,H)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,H)|0,r=r+Math.imul(g,z)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var _e=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,$))+Math.imul(k,F)|0,o=Math.imul(k,$),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,J)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,J)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(n=(n=n+Math.imul(d,re)|0)+Math.imul(l,ie)|0))<<13)|0;c=((o=o+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,F),n=(n=Math.imul(A,$))+Math.imul(C,F)|0,o=Math.imul(C,$),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(E,z)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(n=(n=n+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,$))+Math.imul(P,F)|0,o=Math.imul(P,$),r=r+Math.imul(A,W)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(y,ie)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(c+(r=r+Math.imul(d,ue)|0)|0)+((8191&(n=(n=n+Math.imul(d,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,F),n=(n=Math.imul(D,$))+Math.imul(N,F)|0,o=Math.imul(N,$),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(A,z)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Te=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,F),n=(n=Math.imul(B,$))+Math.imul(j,F)|0,o=Math.imul(j,$),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,H)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(O,z)|0,n=(n=n+Math.imul(O,J)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(_,oe)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Me=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(n=(n=n+Math.imul(d,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,W),n=(n=Math.imul(B,H))+Math.imul(j,W)|0,o=Math.imul(j,H),r=r+Math.imul(D,z)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(k,ie)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(E,oe)|0,n=(n=n+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(_,ue)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(g,de)|0,n=(n=n+Math.imul(g,le)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,le)|0;var Ie=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,z),n=(n=Math.imul(B,J))+Math.imul(j,z)|0,o=Math.imul(j,J),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,r=r+Math.imul(E,ue)|0,n=(n=n+Math.imul(E,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(_,de)|0,n=(n=n+Math.imul(_,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var ke=(c+(r=r+Math.imul(g,pe)|0)|0)+((8191&(n=(n=n+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,Y),n=(n=Math.imul(B,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(P,ie)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(E,de)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Re=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,Q),n=(n=Math.imul(B,ee))+Math.imul(j,Q)|0,o=Math.imul(j,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(N,ie)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(O,oe)|0,n=(n=n+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,r=r+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(I,de)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(n=(n=n+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ie),n=(n=Math.imul(B,re))+Math.imul(j,ie)|0,o=Math.imul(j,re),r=r+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(O,ue)|0,n=(n=n+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(A,de)|0,n=(n=n+Math.imul(A,le)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0;var Ce=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,oe),n=(n=Math.imul(B,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),r=r+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(O,de)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var xe=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,ue),n=(n=Math.imul(B,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),r=r+Math.imul(D,de)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,le)|0;var Oe=(c+(r=r+Math.imul(O,pe)|0)|0)+((8191&(n=(n=n+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,de),n=(n=Math.imul(B,le))+Math.imul(j,de)|0,o=Math.imul(j,le);var Pe=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(c+(r=Math.imul(B,pe))|0)+((8191&(n=(n=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,me))+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=ve,u[1]=ge,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=Te,u[9]=Me,u[10]=Ie,u[11]=ke,u[12]=Re,u[13]=Ae,u[14]=Ce,u[15]=xe,u[16]=Oe,u[17]=Pe,u[18]=Le,0!==c&&(u[19]=c,i.length++),i};function g(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var a=67108863&r,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,d=(0|e.words[h])*(0|t.words[c]),l=67108863&d;a=67108863&(l=l+a|0),n+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function y(e,t,i){return g(e,t,i)}Math.imul||(v=m),o.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):i<63?m(this,e,t):i<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,s=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=e.words[r]>>>n&1}return t}(e);if(0===t.length)return new o(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr())0!==t[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=n);c--){var d=0|this.words[c];this.words[c]=h<<26-o|d>>>o,h=d&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!=(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var a,u=r.length-n.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=r.clone()._ishlnsubmul(n,1,u);0===h.negative&&(r=h,a&&(a.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(n,l,d);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=l)}return a&&a._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/e|0,i=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(h),s.isub(d)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(d)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(a),s.isub(u)):(i.isub(t),a.isub(n),u.isub(s))}return{a:a,b:u,gcd:i.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,l=1;0==(i.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var o=t;t=i,i=o}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},n(w,_),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r<i;r++)t.words[r]=e.words[r];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,_),n(E,_),n(T,_),T.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new S;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return b[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(h(e,e.umod(this.m)._forceRed(this)),e)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,n),l=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=s;0!==f.cmp(a);){for(var m=f,v=0;0!==m.cmp(a);v++)m=m.redSqr();r(v<p);var g=this.pow(d,new o(1).iushln(p-v-1));l=l.redMul(g),d=g.redSqr(),f=f.redMul(d),p=v}return l},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var n=i[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],h=u-1;h>=0;h--){var d=c>>h&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[s]),a=0,s=0)):a=0}u=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},n(I,M),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,i(15)(e))},function(e,t,i){var r=t;r.version=i(335).version,r.utils=i(14),r.rand=i(83),r.curve=i(173),r.curves=i(88),r.ec=i(347),r.eddsa=i(351)},function(e,t,i){var r,n=t,o=i(89),s=i(173),a=i(14).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.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 c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new u(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=u,c("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:o.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"]}),c("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:o.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=i(346)}catch(e){r=void 0}c("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,i){var r=t;r.utils=i(16),r.common=i(45),r.sha=i(340),r.ripemd=i(344),r.hmac=i(345),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,i){(function(t){var r,n=i(5),o=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var a=s.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(a[r]=o[r]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,i)}),a.alloc||(a.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,i(4))},function(e,t,i){const r=i(92).Reporter,n=i(46).EncoderBuffer,o=i(46).DecoderBuffer,s=i(13),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,i){const r={};this._baseState=r,r.name=i,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};h.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,a=null;if(null!==i.key&&(a=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new o(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,i.key,n),n},c.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},c.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=e.save(),a=i.choice[o];try{const i=a._decode(e,t);if(e.isError(i))return!1;r={type:o,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},c.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},c.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,a=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),a=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?o=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),a=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(e,a,i,s))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,i){const r=i(0);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=n,n.prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof o;if(t=r?e:new o(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,i){function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,i){(function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(370).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function u(e,t,i){var r=a(e,i);return i-1>=t&&(r|=a(e,i-1)<<4),r}function c(e,t,i,r){for(var n=0,o=Math.min(e.length,i),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=r,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var o=e.length-i,s=o%r,a=Math.min(o,o-s)+i,u=0,h=i;h<a;h+=r)u=c(e,h,h+r,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=c(e,h,e.length,t),h=0;h<s;h++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","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"],d=[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],l=[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 f(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;i.words[0]=a;for(var c=1;c<r;c++){for(var h=u>>>26,d=67108863&u,l=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=l;f++){var p=c-f|0;h+=(s=(n=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}i.words[c]=0|d,u=0|h}return 0!==u?i.words[c]=0|u:i.length--,i.strip()}o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);i=0!=(o=a>>>24-n&16777215)||s!==this.length-1?h[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);i=(p=p.idivn(f)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,c=new e(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-n;a++)c[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,o=0;o<r.length;o++)t=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<i.length;o++)t=(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,i){var r,n,o,s=e.words,a=t.words,u=i.words,c=0,h=0|s[0],d=8191&h,l=h>>>13,f=0|s[1],p=8191&f,m=f>>>13,v=0|s[2],g=8191&v,y=v>>>13,b=0|s[3],_=8191&b,w=b>>>13,S=0|s[4],E=8191&S,T=S>>>13,M=0|s[5],I=8191&M,k=M>>>13,R=0|s[6],A=8191&R,C=R>>>13,x=0|s[7],O=8191&x,P=x>>>13,L=0|s[8],D=8191&L,N=L>>>13,U=0|s[9],B=8191&U,j=U>>>13,V=0|a[0],F=8191&V,$=V>>>13,q=0|a[1],W=8191&q,H=q>>>13,G=0|a[2],z=8191&G,J=G>>>13,K=0|a[3],Y=8191&K,Z=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ie=8191&te,re=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,le=he>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ve=(c+(r=Math.imul(d,F))|0)+((8191&(n=(n=Math.imul(d,$))+Math.imul(l,F)|0))<<13)|0;c=((o=Math.imul(l,$))+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),n=(n=Math.imul(p,$))+Math.imul(m,F)|0,o=Math.imul(m,$);var ge=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,F),n=(n=Math.imul(g,$))+Math.imul(y,F)|0,o=Math.imul(y,$),r=r+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0;var ye=(c+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(l,z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(_,F),n=(n=Math.imul(_,$))+Math.imul(w,F)|0,o=Math.imul(w,$),r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,H)|0,r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,J)|0;var be=(c+(r=r+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(l,Y)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,$))+Math.imul(T,F)|0,o=Math.imul(T,$),r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,H)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,H)|0,r=r+Math.imul(g,z)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var _e=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,$))+Math.imul(k,F)|0,o=Math.imul(k,$),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,J)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,J)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(n=(n=n+Math.imul(d,re)|0)+Math.imul(l,ie)|0))<<13)|0;c=((o=o+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,F),n=(n=Math.imul(A,$))+Math.imul(C,F)|0,o=Math.imul(C,$),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(E,z)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(n=(n=n+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,$))+Math.imul(P,F)|0,o=Math.imul(P,$),r=r+Math.imul(A,W)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(y,ie)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(c+(r=r+Math.imul(d,ue)|0)|0)+((8191&(n=(n=n+Math.imul(d,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,F),n=(n=Math.imul(D,$))+Math.imul(N,F)|0,o=Math.imul(N,$),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(A,z)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Te=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,F),n=(n=Math.imul(B,$))+Math.imul(j,F)|0,o=Math.imul(j,$),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,H)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(O,z)|0,n=(n=n+Math.imul(O,J)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(_,oe)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Me=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(n=(n=n+Math.imul(d,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,W),n=(n=Math.imul(B,H))+Math.imul(j,W)|0,o=Math.imul(j,H),r=r+Math.imul(D,z)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(k,ie)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(E,oe)|0,n=(n=n+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(_,ue)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(g,de)|0,n=(n=n+Math.imul(g,le)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,le)|0;var Ie=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,z),n=(n=Math.imul(B,J))+Math.imul(j,z)|0,o=Math.imul(j,J),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,r=r+Math.imul(E,ue)|0,n=(n=n+Math.imul(E,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(_,de)|0,n=(n=n+Math.imul(_,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var ke=(c+(r=r+Math.imul(g,pe)|0)|0)+((8191&(n=(n=n+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,Y),n=(n=Math.imul(B,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(P,ie)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(E,de)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Re=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,Q),n=(n=Math.imul(B,ee))+Math.imul(j,Q)|0,o=Math.imul(j,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(N,ie)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(O,oe)|0,n=(n=n+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,r=r+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(I,de)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(n=(n=n+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ie),n=(n=Math.imul(B,re))+Math.imul(j,ie)|0,o=Math.imul(j,re),r=r+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(O,ue)|0,n=(n=n+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(A,de)|0,n=(n=n+Math.imul(A,le)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0;var Ce=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,oe),n=(n=Math.imul(B,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),r=r+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(O,de)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var xe=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,ue),n=(n=Math.imul(B,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),r=r+Math.imul(D,de)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,le)|0;var Oe=(c+(r=r+Math.imul(O,pe)|0)|0)+((8191&(n=(n=n+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,de),n=(n=Math.imul(B,le))+Math.imul(j,de)|0,o=Math.imul(j,le);var Pe=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(c+(r=Math.imul(B,pe))|0)+((8191&(n=(n=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,me))+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=ve,u[1]=ge,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=Te,u[9]=Me,u[10]=Ie,u[11]=ke,u[12]=Re,u[13]=Ae,u[14]=Ce,u[15]=xe,u[16]=Oe,u[17]=Pe,u[18]=Le,0!==c&&(u[19]=c,i.length++),i};function m(e,t,i){return(new v).mulp(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=f),o.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var a=67108863&r,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,d=(0|e.words[h])*(0|t.words[c]),l=67108863&d;a=67108863&(l=l+a|0),n+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,i,e);return t},v.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++)r|=(1&e)<<t-n-1,e>>=1;return r},v.prototype.permute=function(e,t,i,r,n,o){for(var s=0;s<o;s++)r[s]=t[e[s]],n[s]=i[e[s]]},v.prototype.transform=function(e,t,i,r,n,o){this.permute(o,e,t,i,r,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<n;h+=a)for(var d=u,l=c,f=0;f<s;f++){var p=i[h+f],m=r[h+f],v=i[h+f+s],g=r[h+f+s],y=d*v-l*g;g=d*g+l*v,v=y,i[h+f]=p+v,r[h+f]=m+g,i[h+f+s]=p-v,r[h+f+s]=m-g,f!==a&&(y=u*d-c*l,l=u*l+c*d,d=y)}},v.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},v.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n}},v.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0}return e},v.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},v.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=new Array(r),l=i.words;l.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,c,r),this.transform(s,o,a,u,r,n),this.transform(c,o,h,d,r,n);for(var f=0;f<r;f++){var p=a[f]*h[f]-u[f]*d[f];u[f]=a[f]*d[f]+u[f]*h[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,l,o,r,n),this.conjugate(l,o,r),this.normalize13b(l,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr())0!==t[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=n);c--){var d=0|this.words[c];this.words[c]=h<<26-o|d>>>o,h=d&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!=(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var a,u=r.length-n.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=r.clone()._ishlnsubmul(n,1,u);0===h.negative&&(r=h,a&&(a.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(n,l,d);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=l)}return a&&a.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(h),s.isub(d)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(d)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(a),s.isub(u)):(i.isub(t),a.isub(n),u.isub(s))}return{a:a,b:u,gcd:i.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,l=1;0==(i.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var o=t;t=i,i=o}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(b,y),b.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r<i;r++)t.words[r]=e.words[r];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(_,y),n(w,y),n(S,y),S.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return g[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,n),l=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=s;0!==f.cmp(a);){for(var m=f,v=0;0!==m.cmp(a);v++)m=m.redSqr();r(v<p);var g=this.pow(d,new o(1).iushln(p-v-1));l=l.redMul(g),d=g.redSqr(),f=f.redMul(d),p=v}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var n=i[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],h=u-1;h>=0;h--){var d=c>>h&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[s]),a=0,s=0)):a=0}u=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},n(T,E),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,i(15)(e))},function(e,t,i){(function(e){var r=i(374),n=i(188),o=i(376),s=i(377),a=i(35),u=t;u.request=function(t,i){t="string"==typeof t?a.parse(t):o(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||n,u=t.hostname||t.host,c=t.port,h=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(c?":"+c:"")+h,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return i&&d.on("response",i),d},u.get=function(e,t){var i=u.request(e,t);return i.end(),i},u.ClientRequest=r,u.IncomingMessage=n.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,i(1))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}},function(e,t,i){const r=i(36).Buffer,n=(e,t)=>{const i=r.allocUnsafe(t);for(var n=0,o=0;o<e.length;o++){const t=e[o];t.copy(i,n),n+=t.length}return i};try{const t=i(!function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}());e.exports=Object.assign({concat:n},t.BufferUtil||t)}catch(t){const i=(e,t,i,r,n)=>{for(var o=0;o<n;o++)i[r+o]=e[o]^t[3&o]},r=(e,t)=>{const i=e.length;for(var r=0;r<i;r++)e[r]^=t[3&r]};e.exports={concat:n,mask:i,unmask:r}}},function(e,t,i){var r;i.r(t),i.d(t,"v1",(function(){return m})),i.d(t,"v3",(function(){return M})),i.d(t,"v4",(function(){return I})),i.d(t,"v5",(function(){return A})),i.d(t,"NIL",(function(){return C})),i.d(t,"version",(function(){return x})),i.d(t,"validate",(function(){return a})),i.d(t,"stringify",(function(){return l})),i.d(t,"parse",(function(){return v}));var n=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}for(var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var h,d,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!a(i))throw TypeError("Stringified UUID is invalid");return i},f=0,p=0,m=function(e,t,i){var r=t&&i||0,n=t||new Array(16),s=(e=e||{}).node||h,a=void 0!==e.clockseq?e.clockseq:d;if(null==s||null==a){var u=e.random||(e.rng||o)();null==s&&(s=h=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=d=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:p+1,v=c-f+(m-p)/1e4;if(v<0&&void 0===e.clockseq&&(a=a+1&16383),(v<0||c>f)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,p=m,d=a;var g=(1e4*(268435455&(c+=122192928e5))+m)%4294967296;n[r++]=g>>>24&255,n[r++]=g>>>16&255,n[r++]=g>>>8&255,n[r++]=255&g;var y=c/4294967296*1e4&268435455;n[r++]=y>>>8&255,n[r++]=255&y,n[r++]=y>>>24&15|16,n[r++]=y>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var b=0;b<6;++b)n[r+b]=s[b];return t||l(n)},v=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i},g=function(e,t,i){function r(e,r,n,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],i=0;i<e.length;++i)t.push(e.charCodeAt(i));return t}(e)),"string"==typeof r&&(r=v(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=i(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,n){o=o||0;for(var a=0;a<16;++a)n[o+a]=s[a];return n}return l(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function y(e){return 14+(e+64>>>9<<4)+1}function b(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function _(e,t,i,r,n,o){return b((s=b(b(t,e),b(r,o)))<<(a=n)|s>>>32-a,i);var s,a}function w(e,t,i,r,n,o,s){return _(t&i|~t&r,e,t,n,o,s)}function S(e,t,i,r,n,o,s){return _(t&r|i&~r,e,t,n,o,s)}function E(e,t,i,r,n,o,s){return _(t^i^r,e,t,n,o,s)}function T(e,t,i,r,n,o,s){return _(i^(t|~r),e,t,n,o,s)}var M=g("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i<t.length;++i)e[i]=t.charCodeAt(i)}return function(e){for(var t=[],i=32*e.length,r=0;r<i;r+=8){var n=e[r>>5]>>>r%32&255,o=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[y(t)-1]=t;for(var i=1732584193,r=-271733879,n=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=i,u=r,c=n,h=o;i=w(i,r,n,o,e[s],7,-680876936),o=w(o,i,r,n,e[s+1],12,-389564586),n=w(n,o,i,r,e[s+2],17,606105819),r=w(r,n,o,i,e[s+3],22,-1044525330),i=w(i,r,n,o,e[s+4],7,-176418897),o=w(o,i,r,n,e[s+5],12,1200080426),n=w(n,o,i,r,e[s+6],17,-1473231341),r=w(r,n,o,i,e[s+7],22,-45705983),i=w(i,r,n,o,e[s+8],7,1770035416),o=w(o,i,r,n,e[s+9],12,-1958414417),n=w(n,o,i,r,e[s+10],17,-42063),r=w(r,n,o,i,e[s+11],22,-1990404162),i=w(i,r,n,o,e[s+12],7,1804603682),o=w(o,i,r,n,e[s+13],12,-40341101),n=w(n,o,i,r,e[s+14],17,-1502002290),i=S(i,r=w(r,n,o,i,e[s+15],22,1236535329),n,o,e[s+1],5,-165796510),o=S(o,i,r,n,e[s+6],9,-1069501632),n=S(n,o,i,r,e[s+11],14,643717713),r=S(r,n,o,i,e[s],20,-373897302),i=S(i,r,n,o,e[s+5],5,-701558691),o=S(o,i,r,n,e[s+10],9,38016083),n=S(n,o,i,r,e[s+15],14,-660478335),r=S(r,n,o,i,e[s+4],20,-405537848),i=S(i,r,n,o,e[s+9],5,568446438),o=S(o,i,r,n,e[s+14],9,-1019803690),n=S(n,o,i,r,e[s+3],14,-187363961),r=S(r,n,o,i,e[s+8],20,1163531501),i=S(i,r,n,o,e[s+13],5,-1444681467),o=S(o,i,r,n,e[s+2],9,-51403784),n=S(n,o,i,r,e[s+7],14,1735328473),i=E(i,r=S(r,n,o,i,e[s+12],20,-1926607734),n,o,e[s+5],4,-378558),o=E(o,i,r,n,e[s+8],11,-2022574463),n=E(n,o,i,r,e[s+11],16,1839030562),r=E(r,n,o,i,e[s+14],23,-35309556),i=E(i,r,n,o,e[s+1],4,-1530992060),o=E(o,i,r,n,e[s+4],11,1272893353),n=E(n,o,i,r,e[s+7],16,-155497632),r=E(r,n,o,i,e[s+10],23,-1094730640),i=E(i,r,n,o,e[s+13],4,681279174),o=E(o,i,r,n,e[s],11,-358537222),n=E(n,o,i,r,e[s+3],16,-722521979),r=E(r,n,o,i,e[s+6],23,76029189),i=E(i,r,n,o,e[s+9],4,-640364487),o=E(o,i,r,n,e[s+12],11,-421815835),n=E(n,o,i,r,e[s+15],16,530742520),i=T(i,r=E(r,n,o,i,e[s+2],23,-995338651),n,o,e[s],6,-198630844),o=T(o,i,r,n,e[s+7],10,1126891415),n=T(n,o,i,r,e[s+14],15,-1416354905),r=T(r,n,o,i,e[s+5],21,-57434055),i=T(i,r,n,o,e[s+12],6,1700485571),o=T(o,i,r,n,e[s+3],10,-1894986606),n=T(n,o,i,r,e[s+10],15,-1051523),r=T(r,n,o,i,e[s+1],21,-2054922799),i=T(i,r,n,o,e[s+8],6,1873313359),o=T(o,i,r,n,e[s+15],10,-30611744),n=T(n,o,i,r,e[s+6],15,-1560198380),r=T(r,n,o,i,e[s+13],21,1309151649),i=T(i,r,n,o,e[s+4],6,-145523070),o=T(o,i,r,n,e[s+11],10,-1120210379),n=T(n,o,i,r,e[s+2],15,718787259),r=T(r,n,o,i,e[s+9],21,-343485551),i=b(i,a),r=b(r,u),n=b(n,c),o=b(o,h)}return[i,r,n,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,i=new Uint32Array(y(t)),r=0;r<t;r+=8)i[r>>5]|=(255&e[r/8])<<r%32;return i}(e),8*e.length))})),I=function(e,t,i){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){i=i||0;for(var n=0;n<16;++n)t[i+n]=r[n];return t}return l(r)};function k(e,t,i,r){switch(e){case 0:return t&i^~t&r;case 1:case 3:return t^i^r;case 2:return t&i^t&r^i&r}}function R(e,t){return e<<t|e>>>32-t}var A=g("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var n=0;n<r.length;++n)e.push(r.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),h=0;h<16;++h)c[h]=e[64*u+4*h]<<24|e[64*u+4*h+1]<<16|e[64*u+4*h+2]<<8|e[64*u+4*h+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var l=new Uint32Array(80),f=0;f<16;++f)l[f]=a[d][f];for(var p=16;p<80;++p)l[p]=R(l[p-3]^l[p-8]^l[p-14]^l[p-16],1);for(var m=i[0],v=i[1],g=i[2],y=i[3],b=i[4],_=0;_<80;++_){var w=Math.floor(_/20),S=R(m,5)+k(w,v,g,y)+b+t[w]+l[_]>>>0;b=y,y=g,g=R(v,30)>>>0,v=m,m=S}i[0]=i[0]+m>>>0,i[1]=i[1]+v>>>0,i[2]=i[2]+g>>>0,i[3]=i[3]+y>>>0,i[4]=i[4]+b>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]})),C="00000000-0000-0000-0000-000000000000",x=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(7)),o=r(i(100)),s=r(i(200));t.default=function e(t,i,r,a){if(!(this instanceof e))return new e(t,i,r,a);var u=this,c=r;u.params=a;var h=a.permission;!h&&a.info&&(h=a.info.permission),h||(h=s.default.default),u.permission=new s.default(h);var d={},l={};n.default.log("New "+(i?"local ":"remote ")+"participant "+c),this.setID=function(e){c=e},this.getID=function(){return c},this.getPermission=function(){return u.permission},this.update=function(e){e.permission&&u.permission.set(e.permission),u.params=o.default.defaults(e,u.params)},this.getNickName=function(){return void 0!==u.params.nickname?u.params.nickname:void 0!==u.params.info&&void 0!==u.params.info.nickname?u.params.info.nickname:""},this.getUserInfo=function(){return void 0!==u.params.userinfo?u.params.userinfo:void 0!==u.params.info&&void 0!==u.params.info.userinfo?u.params.info.userinfo:{}},this.getStreams=function(){return d},this.getSubStreams=function(){return l},this.getStream=function(e){return d[e]},this.getSubStream=function(e){return l[e]},this.addSubStream=function(e){if(l[e.getID()]=e,e.isSimulcast()){var t=e.getRef(),i=u.getStream(t);i&&e.setRefStream(i)}},this.removeSubStream=function(e){var t=l[e];t&&(t.dispose(null,!0),t.setRefStream(void 0),delete l[e])},this.addStream=function(e){if(d[e.getID()]=e,e.isSimulcast()){var t=e.getRef(),i=u.getSubStream(t);i&&e.setRefStream(i)}},this.removeStream=function(e){var t=d[e];t&&(t.dispose(null,!0),t.setRefStream(void 0),delete d[e])},this.dispose=function(){Object.entries(d).map((function(e){e[1].dispose(null,!0)})),Object.entries(l).map((function(e){e[1].dispose(null,!0)})),l=[],d=[]}}},function(e,t,i){(function(e,r){var n;
31
+ var i="\\x"+("0"+"~".charCodeAt(0).toString(16)).slice(-2),r="\\"+i,n=new RegExp(i,"g"),o=new RegExp(r,"g"),s=new RegExp("(?:^|([^\\\\]))"+r),a=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},u=String;function c(e,t,i){return t instanceof Array?function(e,t,i){for(var r=0,n=t.length;r<n;r++)t[r]=c(e,t[r],i);return t}(e,t,i):t instanceof u?t.length?i.hasOwnProperty(t)?i[t]:i[t]=function(e,t){for(var i=0,r=t.length;i<r;e=e[t[i++].replace(o,"~")]);return e}(e,t.split("~")):e:t instanceof Object?function(e,t,i){for(var r in t)t.hasOwnProperty(r)&&(t[r]=c(e,t[r],i));return t}(e,t,i):t}var h={stringify:function(e,t,o,s){return h.parser.stringify(e,function(e,t,o){var s,u,c=!1,h=!!t,d=[],l=[e],f=[e],p=[o?"~":"[Circular]"],m=e,v=1;return h&&(u="object"==typeof t?function(e,i){return""!==e&&t.indexOf(e)<0?void 0:i}:t),function(e,t){return h&&(t=u.call(this,e,t)),c?(m!==this&&(s=v-a.call(l,this)-1,v-=s,l.splice(v,l.length),d.splice(v-1,d.length),m=this),"object"==typeof t&&t?(a.call(l,t)<0&&l.push(m=t),v=l.length,(s=a.call(f,t))<0?(s=f.push(t)-1,o?(d.push((""+e).replace(n,i)),p[s]="~"+d.join("~")):p[s]=p[0]):t=p[s]):"string"==typeof t&&o&&(t=t.replace(i,r).replace("~",i))):c=!0,t}}(e,t,!s),o)},parse:function(e,t){return h.parser.parse(e,function(e){return function(t,n){var o="string"==typeof n;return o&&"~"===n.charAt(0)?new u(n.slice(1)):(""===t&&(n=c(n,n,{})),o&&(n=n.replace(s,"$1~").replace(r,i)),e?e.call(this,t,n):n)}}(t))},parser:JSON};e.exports=h},function(e,t,i){var r=i(248);e.exports={string:function(e){for(var t="abcdefghijklmnopqrstuvwxyz012345".length,i=r.randomBytes(e),n=[],o=0;o<e;o++)n.push("abcdefghijklmnopqrstuvwxyz012345".substr(i[o]%t,1));return n.join("")},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(""+(e-1)).length;return(new Array(t+1).join("0")+this.number(e)).slice(-t)}}},function(e,t,i){var r=i(0),n=i(12),o=i(120);function s(e,t,i,r){o.call(this,e,t,function(e){return function(t,i,r){var o={};"string"==typeof i&&(o.headers={"Content-type":"text/plain"});var s=n.addPath(t,"/xhr_send"),a=new e("POST",s,i,o);return a.once("finish",(function(e){if(a=null,200!==e&&204!==e)return r(new Error("http status "+e));r()})),function(){a.close(),a=null;var e=new Error("Aborted");e.code=1e3,r(e)}}}(r),i,r)}r(s,o),e.exports=s},function(e,t,i){(function(t,r){var n=i(2).Buffer,o=t.crypto||t.msCrypto;o&&o.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var i=n.allocUnsafe(e);if(e>0)if(e>65536)for(var s=0;s<e;s+=65536)o.getRandomValues(i.slice(s,s+65536));else o.getRandomValues(i);return"function"==typeof t?r.nextTick((function(){t(null,i)})):i}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,i(1),i(4))},function(e,t,i){var r={};function n(e,t,i){i||(i=Error);var n=function(e){var i,r;function n(i,r,n){return e.call(this,function(e,i,r){return"string"==typeof t?t:t(e,i,r)}(i,r,n))||this}return r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map((function(e){return String(e)})),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s;if("string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var a=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+".".length>e.length)&&-1!==e.indexOf(".",i)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(o(t,"type"))}return s+". Received type ".concat(typeof i)}),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"),e.exports.codes=r},function(e,t,i){(function(t){var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=c;var n=i(135),o=i(139);i(0)(c,n);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,i(4))},function(e,t,i){var r=i(2).Buffer;function n(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}n.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=r.from(e,t));for(var i=this._block,n=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%n,c=Math.min(o-a,n-u),h=0;h<c;h++)i[u+h]=e[a+h];a+=c,(s+=c)%n==0&&this._update(i)}return this._len+=o,this},n.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var i=8*this._len;if(i<=4294967295)this._block.writeUInt32BE(i,this._blockSize-4);else{var r=(4294967295&i)>>>0,n=(i-r)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=n},function(e,t,i){var r={};function n(e,t,i){i||(i=Error);var n=function(e){var i,r;function n(i,r,n){return e.call(this,function(e,i,r){return"string"==typeof t?t:t(e,i,r)}(i,r,n))||this}return r=e,(i=n).prototype=Object.create(r.prototype),i.prototype.constructor=i,i.__proto__=r,n}(i);n.prototype.name=i.name,n.prototype.code=e,r[e]=n}function o(e,t){if(Array.isArray(e)){var i=e.length;return e=e.map((function(e){return String(e)})),i>2?"one of ".concat(t," ").concat(e.slice(0,i-1).join(", "),", or ")+e[i-1]:2===i?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,i){var r,n,s;if("string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,i){return(void 0===i||i>e.length)&&(i=e.length),e.substring(i-t.length,i)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(o(t,"type"));else{var a=function(e,t,i){return"number"!=typeof i&&(i=0),!(i+".".length>e.length)&&-1!==e.indexOf(".",i)}(e)?"property":"argument";s='The "'.concat(e,'" ').concat(a," ").concat(r," ").concat(o(t,"type"))}return s+". Received type ".concat(typeof i)}),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"),e.exports.codes=r},function(e,t,i){(function(t){var r=Object.keys||function(e){var t=[];for(var i in e)t.push(i);return t};e.exports=c;var n=i(166),o=i(170);i(0)(c,n);for(var s=r(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);n.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||t.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,i(4))},function(e,t,i){var r=i(378),n=i(379);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=b,t.resolve=function(e,t){return b(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?b(e,!1,!0).resolveObject(t):t},t.format=function(e){return n.isString(e)&&(e=b(e)),e instanceof o?e.format():o.prototype.format.call(e)},t.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(c),d=["%","/","?",";","#"].concat(h),l=["/","?","#"],f=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=i(380);function b(e,t,i){if(e&&n.isObject(e)&&e instanceof o)return e;var r=new o;return r.parse(e,t,i),r}o.prototype.parse=function(e,t,i){if(!n.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var o=e.indexOf("?"),a=-1!==o&&o<e.indexOf("#")?"?":"#",c=e.split(a);c[0]=c[0].replace(/\\/g,"/");var b=e=c.join(a);if(b=b.trim(),!i&&1===e.split("#").length){var _=u.exec(b);if(_)return this.path=b,this.href=b,this.pathname=_[1],_[2]?(this.search=_[2],this.query=t?y.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=s.exec(b);if(w){var S=(w=w[0]).toLowerCase();this.protocol=S,b=b.substr(w.length)}if(i||w||b.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===b.substr(0,2);!E||w&&v[w]||(b=b.substr(2),this.slashes=!0)}if(!v[w]&&(E||w&&!g[w])){for(var T,M,I=-1,k=0;k<l.length;k++)-1!==(R=b.indexOf(l[k]))&&(-1===I||R<I)&&(I=R);for(-1!==(M=-1===I?b.lastIndexOf("@"):b.lastIndexOf("@",I))&&(T=b.slice(0,M),b=b.slice(M+1),this.auth=decodeURIComponent(T)),I=-1,k=0;k<d.length;k++){var R;-1!==(R=b.indexOf(d[k]))&&(-1===I||R<I)&&(I=R)}-1===I&&(I=b.length),this.host=b.slice(0,I),b=b.slice(I),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var C=this.hostname.split(/\./),x=(k=0,C.length);k<x;k++){var O=C[k];if(O&&!O.match(f)){for(var P="",L=0,D=O.length;L<D;L++)O.charCodeAt(L)>127?P+="x":P+=O[L];if(!P.match(f)){var N=C.slice(0,k),U=C.slice(k+1),B=O.match(p);B&&(N.push(B[1]),U.unshift(B[2])),U.length&&(b="/"+U.join(".")+b),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=r.toASCII(this.hostname));var j=this.port?":"+this.port:"",V=this.hostname||"";this.host=V+j,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!m[S])for(k=0,x=h.length;k<x;k++){var F=h[k];if(-1!==b.indexOf(F)){var $=encodeURIComponent(F);$===F&&($=escape(F)),b=b.split(F).join($)}}var q=b.indexOf("#");-1!==q&&(this.hash=b.substr(q),b=b.slice(0,q));var W=b.indexOf("?");if(-1!==W?(this.search=b.substr(W),this.query=b.substr(W+1),t&&(this.query=y.parse(this.query)),b=b.slice(0,W)):t&&(this.search="",this.query={}),b&&(this.pathname=b),g[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var H=this.search||"";this.path=j+H}return this.href=this.format(),this},o.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=y.stringify(this.query));var a=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==o?(o="//"+(o||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(i=i.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(a=a.replace("#","%23"))+r},o.prototype.resolve=function(e){return this.resolveObject(b(e,!1,!0)).format()},o.prototype.resolveObject=function(e){if(n.isString(e)){var t=new o;t.parse(e,!1,!0),e=t}for(var i=new o,r=Object.keys(this),s=0;s<r.length;s++){var a=r[s];i[a]=this[a]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),c=0;c<u.length;c++){var h=u[c];"protocol"!==h&&(i[h]=e[h])}return g[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!g[e.protocol]){for(var d=Object.keys(e),l=0;l<d.length;l++){var f=d[l];i[f]=e[f]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||v[e.protocol])i.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),i.pathname=p.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",y=i.search||"";i.path=m+y}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var b=i.pathname&&"/"===i.pathname.charAt(0),_=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=_||b||i.host&&e.pathname,S=w,E=i.pathname&&i.pathname.split("/")||[],T=(p=e.pathname&&e.pathname.split("/")||[],i.protocol&&!g[i.protocol]);if(T&&(i.hostname="",i.port=null,i.host&&(""===E[0]?E[0]=i.host:E.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===E[0])),_)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),i.search=e.search,i.query=e.query;else if(!n.isNullOrUndefined(e.search))return T&&(i.hostname=i.host=E.shift(),(A=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=A.shift(),i.host=i.hostname=A.shift())),i.search=e.search,i.query=e.query,n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i;if(!E.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var M=E.slice(-1)[0],I=(i.host||e.host||E.length>1)&&("."===M||".."===M)||""===M,k=0,R=E.length;R>=0;R--)"."===(M=E[R])?E.splice(R,1):".."===M?(E.splice(R,1),k++):k&&(E.splice(R,1),k--);if(!w&&!S)for(;k--;k)E.unshift("..");!w||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),I&&"/"!==E.join("/").substr(-1)&&E.push("");var A,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);return T&&(i.hostname=i.host=C?"":E.length?E.shift():"",(A=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=A.shift(),i.host=i.hostname=A.shift())),(w=w||i.host&&E.length)&&!C&&E.unshift(""),E.length?i.pathname=E.join("/"):(i.pathname=null,i.path=null),n.isNull(i.pathname)&&n.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},o.prototype.parseHost=function(){var e=this.host,t=a.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){var r=i(5),n=r.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){var r=i(0),n=i(121);function o(e,t,i){n.call(this,e,t,i,{noCredentials:!0})}r(o,n),o.enabled=n.enabled,e.exports=o},function(e,t,i){(function(t){e.exports={isOpera:function(){return t.navigator&&/opera/i.test(t.navigator.userAgent)},isKonqueror:function(){return t.navigator&&/konqueror/i.test(t.navigator.userAgent)},hasDomain:function(){if(!t.document)return!0;try{return!!t.document.domain}catch(e){return!1}}}}).call(this,i(1))},function(e,t,i){(function(t){var r=i(19),n=i(17),o=i(38);e.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in t||(t[e.exports.WPrefix]={})},postMessage:function(i,r){t.parent!==t&&t.parent.postMessage(n.stringify({windowId:e.exports.currentWindowId,type:i,data:r||""}),"*")},createIframe:function(e,i){var n,o,s=t.document.createElement("iframe"),a=function(){clearTimeout(n);try{s.onload=null}catch(e){}s.onerror=null},u=function(){s&&(a(),setTimeout((function(){s&&s.parentNode.removeChild(s),s=null}),0),r.unloadDel(o))},c=function(e){s&&(u(),i(e))};return s.src=e,s.style.display="none",s.style.position="absolute",s.onerror=function(){c("onerror")},s.onload=function(){clearTimeout(n),n=setTimeout((function(){c("onload timeout")}),2e3)},t.document.body.appendChild(s),n=setTimeout((function(){c("timeout")}),15e3),o=r.unloadAdd(u),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:u,loaded:a}},createHtmlfile:function(i,n){var o,s,a,u=["Active"].concat("Object").join("X"),c=new t[u]("htmlfile"),h=function(){clearTimeout(o),a.onerror=null},d=function(){c&&(h(),r.unloadDel(s),a.parentNode.removeChild(a),a=c=null,CollectGarbage())},l=function(e){c&&(d(),n(e))};c.open(),c.write('<html><script>document.domain="'+t.document.domain+'";<\/script></html>'),c.close(),c.parentWindow[e.exports.WPrefix]=t[e.exports.WPrefix];var f=c.createElement("div");return c.body.appendChild(f),a=c.createElement("iframe"),f.appendChild(a),a.src=i,a.onerror=function(){l("onerror")},o=setTimeout((function(){l("timeout")}),15e3),s=r.unloadAdd(d),{post:function(e,t){try{setTimeout((function(){a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:d,loaded:h}}},e.exports.iframeEnabled=!1,t.document&&(e.exports.iframeEnabled=("function"==typeof t.postMessage||"object"==typeof t.postMessage)&&!o.isKonqueror())}).call(this,i(1))},function(e,t,i){var r=i(273);t.RLWebSocket=r},function(e,t,i){var r=i(0),n=i(73),o=i(76),s=i(77),a=i(20);function u(e){a.call(this,"digest"),this._hash=e}r(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new n:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},function(e,t,i){(t=e.exports=i(144)).Stream=t,t.Readable=t,t.Writable=i(79),t.Duplex=i(25),t.Transform=i(147),t.PassThrough=i(294)},function(e,t,i){function r(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===r(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===r(e)},t.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=i(5).Buffer.isBuffer},function(e,t,i){(function(t){e.exports=function(e,i){for(var r=Math.min(e.length,i.length),n=new t(r),o=0;o<r;++o)n[o]=e[o]^i[o];return n}}).call(this,i(5).Buffer)},function(e,t,i){var r=i(16),n=i(13);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var i=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-i,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),n(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,i=t-(e+this.padLength)%t,r=new Array(i+this.padLength);r[0]=128;for(var n=1;n<i;n++)r[n]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[n++]=0;r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=e>>>24&255,r[n++]=e>>>16&255,r[n++]=e>>>8&255,r[n++]=255&e}else for(r[n++]=255&e,r[n++]=e>>>8&255,r[n++]=e>>>16&255,r[n++]=e>>>24&255,r[n++]=0,r[n++]=0,r[n++]=0,r[n++]=0,o=8;o<this.padLength;o++)r[n++]=0;return r}},function(e,t,i){const r=i(0),n=i(92).Reporter,o=i(90).Buffer;function s(e,t){n.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return a.isEncoderBuffer(e)||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(s,n),t.DecoderBuffer=s,s.isDecoderBuffer=function(e){return e instanceof s||"object"==typeof e&&o.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:n.prototype.save.call(this)}},s.prototype.restore=function(e){const t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,n.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const i=new s(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=a,a.isEncoderBuffer=function(e){return e instanceof a||"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},a.prototype.join=function(e,t){return e||(e=o.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(i){i.join(e,t),t+=i.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={userAgent:function(){var t=void 0;try{t=i(!function(){var e=new Error("Cannot find module 'react-native'");throw e.code="MODULE_NOT_FOUND",e}()).Platform}catch(e){}var r="none";return e.exports?t?"ios"===t.OS?r="ios":"android"===t.OS&&(r="android"):r="fake":r=window.navigator.userAgent,r},isMobile:function(){var t=void 0;try{t=i(!function(){var e=new Error("Cannot find module 'react-native'");throw e.code="MODULE_NOT_FOUND",e}()).Platform}catch(e){}var r=!1;return e.exports&&t&&("ios"===t.OS||"android"===t.OS)&&(r=!0),r},isElectron:function(){return!1}};t.default=r},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Logger",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"RTPStats",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"WebRtcPeerRecvonly",{enumerable:!0,get:function(){return o.WebRtcPeerRecvonly}}),Object.defineProperty(t,"WebRtcPeerSendonly",{enumerable:!0,get:function(){return o.WebRtcPeerSendonly}}),Object.defineProperty(t,"WebRtcPeerSendrecv",{enumerable:!0,get:function(){return o.WebRtcPeerSendrecv}}),Object.defineProperty(t,"addExternParam",{enumerable:!0,get:function(){return n.addExternParam}}),Object.defineProperty(t,"addLegacySimulcast",{enumerable:!0,get:function(){return n.addLegacySimulcast}}),Object.defineProperty(t,"bufferizeCandidates",{enumerable:!0,get:function(){return o.bufferizeCandidates}}),Object.defineProperty(t,"filterStats",{enumerable:!0,get:function(){return n.filterStats}}),Object.defineProperty(t,"iosSafariAdapter",{enumerable:!0,get:function(){return n.iosSafariAdapter}}),Object.defineProperty(t,"maybePreferCodec",{enumerable:!0,get:function(){return n.maybePreferCodec}}),Object.defineProperty(t,"maybeSetAudioSendBitRate",{enumerable:!0,get:function(){return n.maybeSetAudioSendBitRate}}),Object.defineProperty(t,"maybeSetVideoSendBitRate",{enumerable:!0,get:function(){return n.maybeSetVideoSendBitRate}}),Object.defineProperty(t,"maybeSetVideoSendInitialBitRate",{enumerable:!0,get:function(){return n.maybeSetVideoSendInitialBitRate}}),Object.defineProperty(t,"parseMSMS",{enumerable:!0,get:function(){return n.parseMSMS}}),Object.defineProperty(t,"preferAudioNack",{enumerable:!0,get:function(){return n.preferAudioNack}}),Object.defineProperty(t,"preferBitRate",{enumerable:!0,get:function(){return n.preferBitRate}}),Object.defineProperty(t,"preferVideoRrtr",{enumerable:!0,get:function(){return n.preferVideoRrtr}}),Object.defineProperty(t,"removeMidExtension",{enumerable:!0,get:function(){return n.removeMidExtension}}),Object.defineProperty(t,"removeSSRC",{enumerable:!0,get:function(){return n.removeSSRC}}),Object.defineProperty(t,"renegotiateSdp",{enumerable:!0,get:function(){return n.renegotiateSdp}}),Object.defineProperty(t,"setCodecParam",{enumerable:!0,get:function(){return n.setCodecParam}}),Object.defineProperty(t,"setDirection",{enumerable:!0,get:function(){return n.setDirection}}),Object.defineProperty(t,"shrinkSdp",{enumerable:!0,get:function(){return n.shrinkSdp}});var n=i(203),o=i(104),s=r(i(7)),a=r(i(224))},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.os=t.default=void 0;var n=r(i(105)),o=window&&window.navigator?window.navigator.userAgent:"",s=new n.default(o),a=s.getBrowser(),u=s.getOS();t.os=u;var c=a;t.default=c},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={ERR_NOT_INSTALLED:1,ERR_NOT_FOUND:10,ERR_TIMEOUT:11,ERR_STATS:12,ERR_NO_SERVICE:13,ERR_AUTH:14,ERR_INVALID_REQUEST:15,ERR_METHOD:16,ERR_NOT_STARTUP:17,ERR_CUSTOM_AUTH_FAILED:18,ERR_USER_LIMIT:19,ERR_QDTLS:20,ERR_OVEVLOAD:21,ERR_EVICTED:22,ERR_PERMISSION:23,ERR_SENSITIVE_WORD:24,ERR_NOT_AT_ROOM:25,ERR_MEDIA_PIPELINE:26,ERR_NO_STREAM:27,ERR_LOCKED:28,ERR_UNKNOWN:33}},function(e,t,i){var r=i(0),n=i(8).EventEmitter;function o(e,t){n.call(this);var i=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",(function(e,t){i._chunkHandler(e,t),i.xo=null;var r=200===e?"network":"permanent";i.emit("close",null,r),i._cleanup()}))}r(o,n),o.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var i=-1;;this.bufferPosition+=i+1){var r=t.slice(this.bufferPosition);if(-1===(i=r.indexOf("\n")))break;var n=r.slice(0,i);n&&this.emit("message",n)}},o.prototype._cleanup=function(){this.removeAllListeners()},o.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit("close",null,"user"),this.xo=null),this._cleanup()},e.exports=o},function(e,t,i){var r=i(0),n=i(121);function o(e,t,i,r){n.call(this,e,t,i,r)}r(o,n),o.enabled=n.enabled&&n.supportsCORS,e.exports=o},function(e,t,i){(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,i,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,i)}));case 3:return t.nextTick((function(){e.call(null,i,r)}));case 4:return t.nextTick((function(){e.call(null,i,r,n)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick((function(){e.apply(null,o)}))}}}:e.exports=t}).call(this,i(4))},function(e,t,i){var r=i(2).Buffer;function n(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,i=new Array(t),n=0;n<t;n++)i[n]=e.readUInt32BE(4*n);return i}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,i,r,n){for(var o,s,a,u,c=i[0],h=i[1],d=i[2],l=i[3],f=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],v=e[3]^t[3],g=4,y=1;y<n;y++)o=c[f>>>24]^h[p>>>16&255]^d[m>>>8&255]^l[255&v]^t[g++],s=c[p>>>24]^h[m>>>16&255]^d[v>>>8&255]^l[255&f]^t[g++],a=c[m>>>24]^h[v>>>16&255]^d[f>>>8&255]^l[255&p]^t[g++],u=c[v>>>24]^h[f>>>16&255]^d[p>>>8&255]^l[255&m]^t[g++],f=o,p=s,m=a,v=u;return o=(r[f>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&v])^t[g++],s=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[v>>>8&255]<<8|r[255&f])^t[g++],a=(r[m>>>24]<<24|r[v>>>16&255]<<16|r[f>>>8&255]<<8|r[255&p])^t[g++],u=(r[v>>>24]<<24|r[f>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[g++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var i=[],r=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,i[s]=c,r[c]=s;var h=e[s],d=e[h],l=e[d],f=257*e[c]^16843008*c;n[0][s]=f<<24|f>>>8,n[1][s]=f<<16|f>>>16,n[2][s]=f<<8|f>>>24,n[3][s]=f,f=16843009*l^65537*d^257*h^16843008*s,o[0][c]=f<<24|f>>>8,o[1][c]=f<<16|f>>>16,o[2][c]=f<<8|f>>>24,o[3][c]=f,0===s?s=a=1:(s=h^e[e[e[l^h]]],a^=e[e[a]])}return{SBOX:i,INV_SBOX:r,SUB_MIX:n,INV_SUB_MIX:o}}();function c(e){this._key=n(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,i=t+6,r=4*(i+1),n=[],o=0;o<t;o++)n[o]=e[o];for(o=t;o<r;o++){var s=n[o-1];o%t==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),n[o]=n[o-t]^s}for(var c=[],h=0;h<r;h++){var d=r-h,l=n[d-(h%4?0:4)];c[h]=h<4||d<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=i,this._keySchedule=n,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=n(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),i=r.allocUnsafe(16);return i.writeUInt32BE(t[0],0),i.writeUInt32BE(t[1],4),i.writeUInt32BE(t[2],8),i.writeUInt32BE(t[3],12),i},c.prototype.decryptBlock=function(e){var t=(e=n(e))[1];e[1]=e[3],e[3]=t;var i=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(i[0],0),o.writeUInt32BE(i[3],4),o.writeUInt32BE(i[2],8),o.writeUInt32BE(i[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},function(e,t,i){var r=i(2).Buffer,n=i(73);e.exports=function(e,t,i,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=i/8,a=r.alloc(s),u=r.alloc(o||0),c=r.alloc(0);s>0||o>0;){var h=new n;h.update(c),h.update(e),t&&h.update(t),c=h.digest();var d=0;if(s>0){var l=a.length-s;d=Math.min(s,c.length),c.copy(a,l,0,d),s-=d}if(d<c.length&&o>0){var f=u.length-o,p=Math.min(o,c.length-d);c.copy(u,f,d,d+p),o-=p}}return c.fill(0),{key:a,iv:u}}},function(e,t,i){var r=i(18),n=i(14),o=n.getNAF,s=n.getJSF,a=n.assert;function u(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(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;var i=this.n&&this.p.div(this.n);!i||i.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var i=e._getDoubles(),r=o(t,1,this._bitLength),n=(1<<i.step+1)-(i.step%2==0?2:1);n/=3;var s,u,c=[];for(s=0;s<r.length;s+=i.step){u=0;for(var h=s+i.step-1;h>=s;h--)u=(u<<1)+r[h];c.push(u)}for(var d=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=n;f>0;f--){for(s=0;s<c.length;s++)(u=c[s])===f?l=l.mixedAdd(i.points[s]):u===-f&&(l=l.mixedAdd(i.points[s].neg()));d=d.add(l)}return d.toP()},u.prototype._wnafMul=function(e,t){var i=4,r=e._getNAFPoints(i);i=r.wnd;for(var n=r.points,s=o(t,i,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var h=0;c>=0&&0===s[c];c--)h++;if(c>=0&&h++,u=u.dblp(h),c<0)break;var d=s[c];a(0!==d),u="affine"===e.type?d>0?u.mixedAdd(n[d-1>>1]):u.mixedAdd(n[-d-1>>1].neg()):d>0?u.add(n[d-1>>1]):u.add(n[-d-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,i,r,n){var a,u,c,h=this._wnafT1,d=this._wnafT2,l=this._wnafT3,f=0;for(a=0;a<r;a++){var p=(c=t[a])._getNAFPoints(e);h[a]=p.wnd,d[a]=p.points}for(a=r-1;a>=1;a-=2){var m=a-1,v=a;if(1===h[m]&&1===h[v]){var g=[t[m],null,null,t[v]];0===t[m].y.cmp(t[v].y)?(g[1]=t[m].add(t[v]),g[2]=t[m].toJ().mixedAdd(t[v].neg())):0===t[m].y.cmp(t[v].y.redNeg())?(g[1]=t[m].toJ().mixedAdd(t[v]),g[2]=t[m].add(t[v].neg())):(g[1]=t[m].toJ().mixedAdd(t[v]),g[2]=t[m].toJ().mixedAdd(t[v].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[m],i[v]);for(f=Math.max(b[0].length,f),l[m]=new Array(f),l[v]=new Array(f),u=0;u<f;u++){var _=0|b[0][u],w=0|b[1][u];l[m][u]=y[3*(_+1)+(w+1)],l[v][u]=0,d[m]=g}}else l[m]=o(i[m],h[m],this._bitLength),l[v]=o(i[v],h[v],this._bitLength),f=Math.max(l[m].length,f),f=Math.max(l[v].length,f)}var S=this.jpoint(null,null,null),E=this._wnafT4;for(a=f;a>=0;a--){for(var T=0;a>=0;){var M=!0;for(u=0;u<r;u++)E[u]=0|l[u][a],0!==E[u]&&(M=!1);if(!M)break;T++,a--}if(a>=0&&T++,S=S.dblp(T),a<0)break;for(u=0;u<r;u++){var I=E[u];0!==I&&(I>0?c=d[u][I-1>>1]:I<0&&(c=d[u][-I-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(a=0;a<r;a++)d[a]=null;return n?S:S.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=n.toArray(e,t);var i=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*i)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));if((2===e[0]||3===e[0])&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),i=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return n.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],r=this,n=0;n<t;n+=e){for(var o=0;o<e;o++)r=r.dbl();i.push(r)}return{step:e,points:i}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],i=(1<<e)-1,r=1===i?null:this.dbl(),n=1;n<i;n++)t[n]=t[n-1].add(r);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},function(e,t,i){var r=i(354),n=i(362),o=i(363),s=i(81),a=i(151),u=i(2).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var i,c,h=o(e,t),d=h.tag,l=h.data;switch(d){case"CERTIFICATE":c=r.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(l,"der")),i=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"ENCRYPTED PRIVATE KEY":l=function(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=n[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,h=e.subjectPrivateKey,d=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(t,i,r,d,"sha1"),f=s.createDecipheriv(o,l,c),p=[];return p.push(f.update(h)),p.push(f.final()),u.concat(p)}(l=r.EncryptedPrivateKey.decode(l,"der"),t);case"PRIVATE KEY":switch(i=(c=r.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+i)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=r.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=c,c.signature=r.signature},function(e,t,i){(function(t){const r=i(36),n=i(383),o=i(384),s=i(97),a=r.Buffer,u=a.from([0,0,255,255]),c=a.from([0]),h=Symbol("write-in-progress"),d=Symbol("pending-close"),l=Symbol("total-length"),f=Symbol("callback"),p=Symbol("buffers"),m=Symbol("error"),v=Symbol("owner");let g;function y(e){this[p].push(e),this[l]+=e.length}function b(e){this[l]+=e.length,this[v]._maxPayload<1||this[l]<=this[v]._maxPayload?this[p].push(e):(this[m]=new RangeError("Max payload size exceeded"),this[m].closeCode=1009,this.removeListener("data",b),this.reset())}function _(e){this[v]._inflate=null,this[f](e)}e.exports=class{constructor(e,t,i){if(this._maxPayload=0|i,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!g){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;g=new n({concurrency:e})}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){this._inflate&&(this._inflate[h]?this._inflate[d]=!0:(this._inflate.close(),this._inflate=null)),this._deflate&&(this._deflate[h]?this._deflate[d]=!0:(this._deflate.close(),this._deflate=null))}acceptAsServer(e){const t=this._options,i=e.find((e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits)));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(i.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?i.client_max_window_bits=t.clientMaxWindowBits:!0!==i.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete i.client_max_window_bits,i}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach((e=>{Object.keys(e).forEach((t=>{var i=e[t];if(i.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(i=i[0],"client_max_window_bits"===t){if(!0!==i){const e=+i;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${i}`)}else if("server_max_window_bits"===t){const e=+i;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==i)throw new TypeError(`Invalid value for parameter "${t}": ${i}`)}e[t]=i}))})),e}decompress(e,t,i){g.push((r=>{this._decompress(e,t,((e,t)=>{r(),i(e,t)}))}))}compress(e,t,i){g.push((r=>{this._compress(e,t,((e,t)=>{r(),i(e,t)}))}))}_decompress(e,t,i){const r=this._isServer?"client":"server";if(!this._inflate){const e=r+"_max_window_bits",t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=o.createInflateRaw(Object.assign({},this._options.zlibInflateOptions,{windowBits:t})),this._inflate[l]=0,this._inflate[p]=[],this._inflate[v]=this,this._inflate.on("error",_),this._inflate.on("data",b)}this._inflate[f]=i,this._inflate[h]=!0,this._inflate.write(e),t&&this._inflate.write(u),this._inflate.flush((()=>{const e=this._inflate[m];if(e)return this._inflate.close(),this._inflate=null,void i(e);const n=s.concat(this._inflate[p],this._inflate[l]);t&&this.params[r+"_no_context_takeover"]||this._inflate[d]?(this._inflate.close(),this._inflate=null):(this._inflate[h]=!1,this._inflate[l]=0,this._inflate[p]=[]),i(null,n)}))}_compress(e,i,r){if(!e||0===e.length)return void t.nextTick(r,null,c);const n=this._isServer?"server":"client";if(!this._deflate){const e=n+"_max_window_bits",t="number"!=typeof this.params[e]?o.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=o.createDeflateRaw(Object.assign({memLevel:this._options.memLevel,level:this._options.level},this._options.zlibDeflateOptions,{windowBits:t})),this._deflate[l]=0,this._deflate[p]=[],this._deflate.on("data",y)}this._deflate[h]=!0,this._deflate.write(e),this._deflate.flush(o.Z_SYNC_FLUSH,(()=>{var e=s.concat(this._deflate[p],this._deflate[l]);i&&(e=e.slice(0,e.length-4)),i&&this.params[n+"_no_context_takeover"]||this._deflate[d]?(this._deflate.close(),this._deflate=null):(this._deflate[h]=!1,this._deflate[l]=0,this._deflate[p]=[]),r(null,e)}))}}}).call(this,i(4))},function(e,t,i){var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var r in i)n(i,r)&&(e[r]=i[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,i,r,n){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+r),n);else for(var o=0;o<r;o++)e[n+o]=t[i+o]},flattenChunks:function(e){var t,i,r,n,o,s;for(r=0,t=0,i=e.length;t<i;t++)r+=e[t].length;for(s=new Uint8Array(r),n=0,t=0,i=e.length;t<i;t++)o=e[t],s.set(o,n),n+=o.length;return s}},s={arraySet:function(e,t,i,r,n){for(var o=0;o<r;o++)e[n+o]=t[i+o]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,o)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,s))},t.setTyped(r)},function(e,t,i){const r=i(36).Buffer;t.BINARY_TYPES=["nodebuffer","arraybuffer","fragments"],t.GUID="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",t.EMPTY_BUFFER=r.alloc(0),t.NOOP=()=>{}},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(7)),o=r(i(47)),s=r(i(62)),a=r(i(63)),u=function(){var e="none";return null!==o.default.userAgent().match("fake")?e="fake":null!==o.default.userAgent().match("ios")?e="ios":null!==o.default.userAgent().match("android")?e="android":null!==o.default.userAgent().match("Firefox")?e="mozilla":null!==o.default.userAgent().match("Chrome")?(e="chrome-stable",null!==o.default.userAgent().match("Electron")&&(e="electron")):(null!==o.default.userAgent().match("Safari")||null!==o.default.userAgent().match("AppleWebKit"))&&(e="safari"),e},c={GetUserMedia:function(e){return new Promise((function(t,i){!function(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=s.default.mediaDevices(),a=function(e,t,i){o.getUserMedia(e).then(t).catch(i)},c=function(){switch(n.default.debug("Screen access requested"),u()){case"electron":n.default.debug("Screen sharing in Electron"),(t={}).video=e.video||{},t.video.mandatory=e.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r);break;case"mozilla":case"mozilla":n.default.debug("Screen sharing in Firefox"),t={},void 0!==e.video?(t.video=e.video,t.video.mediaSource||(t.video.mediaSource="window")):t={audio:e.audio,video:{mediaSource:"window"}},a(t,i,r);break;case"chrome-stable":n.default.debug("Screen sharing in Chrome"),t={},e.desktopStreamId&&(t.video=e.video||{mandatory:{}},t.video.mandatory=t.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r));break;case"chrome-stable":if(n.default.debug("Screen sharing in Chrome"),t={},e.desktopStreamId)t.video=e.video||{mandatory:{}},t.video.mandatory=t.video.mandatory||{},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=e.desktopStreamId,a(t,i,r);else{var o="jbglfdfehfdcpnbhfnciaiokkfocjcjk";e.extensionId&&(n.default.debug("extensionId supplied, using ".concat(e.extensionId)),o=e.extensionId),n.default.debug("Screen access on chrome stable, looking for extension");try{chrome.runtime.sendMessage(o,{getStream:!0},(function(o){if(void 0!==o){var s=o.streamId;void 0!==e.video.mandatory?(t.video=e.video||{mandatory:{}},t.video.mandatory.chromeMediaSource="desktop",t.video.mandatory.chromeMediaSourceId=s):t={video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:s}}},a(t,i,r)}else n.default.error("Access to screen denied"),r({code:"Access to screen denied"})}))}catch(e){n.default.debug("Screensharing plugin is not accessible "),r({code:"no_plugin_present"})}}break;default:n.default.error("This browser does not support ScreenSharing")}};e.screen?c():(n.default.debug("Calling getUserMedia with config",e),a(e,i,r))}(e,(function(i){(new a.default).isReactNative()&&t(i),e.fps&&i.clone?t(function(e,t){if(!t)return e;var i=e.getVideoTracks()[0];if(!i)return e;if("function"!=typeof i.getCapabilities)return e;var r=i.getConstraints(),n=e.clone();return(i=n.getVideoTracks()[0])?(e.getTracks().forEach((function(e){return e.stop()})),r.width,r.height,r.frameRate=t||r.frameRate,i.applyConstraints(r),n):(n.getTracks().forEach((function(e){return e.stop()})),e)}(i,e.fps)):t(i)}),(function(e){i(e)}))}))},getBrowser:u,getUserAgent:function(){return window.navigator.userAgent}};t.default=c},function(e,t,i){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={mediaDevices:function(){var e=void 0;try{e=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(t){e=navigator.mediaDevices}return e},PRTCPeerConnection:function(){var e=void 0;try{e=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).RTCPeerConnection}catch(t){e=RTCPeerConnection}return e}};t.default=r},function(e,t,i){var r=i(3),n=i(11);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(i(201)),s=r(i(9)),a=r(i(10)),u=r(i(102)),c=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==n(e)&&"function"!=typeof e)return{default:e};var i=h(void 0);if(i&&i.has(e))return i.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,i&&i.set(e,r),r}(i(202));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(h=function(e){return e?i:t})(e)}var d={Chrome:c.CHROME,Chromium:c.CHROME,Opera:c.OPERA,Firefox:c.FIREFOX,"Internet Explorer":c.INTERNET_EXPLORER,Safari:c.SAFARI,WeChat:c.WECHAT},l=navigator.userAgent;function f(){var e=l;if(e.match(/Electron/)){var t=e.match(/Electron\/([\d.]+)/)[1];return{name:c.ELECTRON,version:t}}}function p(){var e=l;if(e.match(/JitsiMeetNW/)){var t=e.match(/JitsiMeetNW\/([\d.]+)/)[1];return{name:c.NWJS,version:t}}}function m(){var e=l;if(e.match(/MicroMessenger/)){var t=e.match(/MicroMessenger\/([\d.]+)/)[1];return{name:c.WECHAT,version:t}}}function v(){var e,t=l.match(/\b(react[ \t_-]*native)(?:\/(\S+))?/i);if(t||"ReactNative"===navigator.product)return t&&t.length>2&&(e=t[2]),e||(e="unknown"),{name:c.REACT_NATIVE,version:e}}navigator.userAgent||(l=navigator.product);var g=function(){function e(t){var i,r;if((0,s.default)(this,e),this.browsers=c,this._bowser=u.default.getParser(l),void 0===t){var n=function(e){for(var t,i=[v,f,p,m],r=0;r<i.length;r++)if(t=i[r]())return t;var n=e.getBrowserName();return n in d?{name:d[n],version:e.getBrowserVersion()}:(t=function(){var e=l,t={name:c.UNKNOWN,version:void 0};if(e.match(/Chrome/)&&!e.match(/Edge/))if(e.match(/Edg/)){var i=e.match(/Edg\/([\d.]+)/)[1];Number.parseInt(i,10)>72&&(t.name=c.CHROME,t.version=i)}else t.name=c.CHROME,t.version=e.match(/Chrome\/([\d.]+)/)[1];return t}())||{name:c.UNKNOWN,version:void 0}}(this._bowser);i=n.name,r=n.version}else t.name in d?(i=d[t.name],r=t.version):(i=c.UNKNOWN,r=void 0);this._name=i,this._version=r}return(0,a.default)(e,[{key:"getName",value:function(){return this._name}},{key:"isChrome",value:function(){return this._name===c.CHROME}},{key:"isOpera",value:function(){return this._name===c.OPERA}},{key:"isFirefox",value:function(){return this._name===c.FIREFOX}},{key:"isIExplorer",value:function(){return this._name===c.INTERNET_EXPLORER}},{key:"isSafari",value:function(){return this._name===c.SAFARI}},{key:"isNWJS",value:function(){return this._name===c.NWJS}},{key:"isElectron",value:function(){return this._name===c.ELECTRON}},{key:"isReactNative",value:function(){return this._name===c.REACT_NATIVE}},{key:"getVersion",value:function(){return this._version}},{key:"_checkCondition",value:function(e){if(this._version)return this._bowser.satisfies(e)}},{key:"isVersionGreaterThan",value:function(e){return this._checkCondition((0,o.default)({},this._name,">".concat(e)))}},{key:"isVersionLessThan",value:function(e){return this._checkCondition((0,o.default)({},this._name,"<".concat(e)))}},{key:"isVersionEqualTo",value:function(e){return this._checkCondition((0,o.default)({},this._name,"~".concat(e)))}}]),e}();t.default=g},function(e,t,i){var r=i(204),n=i(205),o=i(206),s=i(208);e.exports=function(e,t){return r(e)||n(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(109)),o=r(i(11)),s=r(i(110)),a=r(i(9)),u=r(i(10)),c=r(i(102)),h=r(i(7)),d=r(i(47)),l=r(i(63)),f=r(i(61)),p=r(i(50));function m(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(e){if("string"==typeof e)return v(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=new Array(t);i<t;i++)r[i]=e[i];return r}function g(e,t,i){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:15;if(!t||!i)return e;var n=e.getVideoTracks()[0];if(!n)return e;if("function"!=typeof n.getCapabilities)return e;var o=n.getConstraints(),s=n.getCapabilities(),a=s.width.max,u=s.height.max;if((a<=t||u<=i)&&!r)return e;var c=e.clone();if(!(n=c.getVideoTracks()[0]))return c.getTracks().forEach((function(e){return e.stop()})),e;e.getTracks().forEach((function(e){return e.stop()}));var h=t,d=i,l=1*a/u,f=1*t/i;return l>f?d=Math.floor(1*u/a*t):h=Math.floor(l*i),d>1080&&(d=1080,h=1080*f),h%2&&(h-=1),d%2&&(d-=1),n.applyConstraints({width:{min:0,ideal:h},height:{min:0,ideal:d},frameRate:r||o.frameRate}).catch((function(e){console.log("track.applyConstraints error")})),c}var y,b=function(){function e(){(0,a.default)(this,e),this._stream=null,this.avaliable=!0}return(0,u.default)(e,[{key:"check",value:function(){return new Promise((function(e,t){chrome.runtime.sendMessage({check:!0},(function(i){""!=i.id&&null!=i.id?e(i.id):t("not plugin")}))}))}},{key:"detect",value:function(e){return new Promise((function(t,i){var r=document.createElement("img");r.src="chrome-extension://"+e+"/icon.png",r.onload=function(){t()},r.onerror=function(){i({code:p.default.ERR_NOT_INSTALLED,error:"not-installed"})}}))}},{key:"start",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,i=e.extensionId||"jbglfdfehfdcpnbhfnciaiokkfocjcjk";return this.detect(i).then((function(){return new Promise((function(r,n){chrome.runtime.sendMessage(i,{getStream:!0},(function(i){if(void 0!==i){var o=t._toConstraints(e,i.streamId);f.default.GetUserMedia(o).then((function(i){t._stream=g(i,e.width,e.height,e.fps),r(t._stream)})).catch((function(e){n(e)}))}else h.default.error("Access to screen denied"),error({code:"Access to screen denied"})}))}))})).catch((function(e){h.default.warn("onerror plugin"),reject(e)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return this.avaliable}},{key:"needExtension",value:function(){return!this.avaliable}},{key:"_toConstraints",value:function(e,t){var i={video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t},optional:[{googTemporalLayeredScreencast:!0}]},audio:!1};return isFinite(e.width)&&(i.video.mandatory.maxWidth=e.width,i.video.mandatory.minWidth=e.width),isFinite(e.height)&&(i.video.mandatory.maxHeight=e.height,i.video.mandatory.minHeight=e.height),isFinite(e.frameRate)&&(i.video.mandatory.maxFrameRate=e.frameRate,i.video.mandatory.minFrameRate=e.frameRate),i}}]),e}(),_=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t),r=navigator.mediaDevices;return r.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return{video:{frameRate:e.fps},audio:e.audio||!1}}}]),e}(),w=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this._toConstraints(t),n=void 0;try{n=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(e){n=navigator.mediaDevices}return n.getUserMedia(r).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){var t={video:{mediaSource:"window"},audio:!1};return"mediaSource"in e&&(t.video.mediaSource=e.mediaSource),isFinite(e.width)&&(t.video.width={min:e.width,max:e.width}),isFinite(e.height)&&(t.video.height={min:e.height,max:e.height}),isFinite(e.frameRate)&&(t.video.frameRate={min:e.frameRate,max:e.frameRate}),t}}]),e}(),S=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t);return navigator.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(){return{video:!0}}}]),e}(),E=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};console.log(t.width),console.log(t.height),console.log(t.source_name),console.log(t.isRecord);var i=this._toConstraints(t),r="boolean"==typeof t.audio&&t.audio,a="boolean"==typeof t.isRecord&&t.isRecord,u=("boolean"==typeof t.isLocalProjection&&t.isLocalProjection,window.require("electron")),c={types:["window","screen"]};return(u?u.desktopCapturer?u.desktopCapturer.getSources(c):u.ipcRenderer.invoke("desktopCapturer:getSources",c):window.electronAPI?window.electronAPI.desktopCapturerGetSources(c):window.parent.electronAPI.desktopCapturerGetSources(c)).then(function(){var u=(0,s.default)(n.default.mark((function s(u){var c,h,d,l;return n.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:console.log("---share name selected:"+t.source_name),c=m(u),n.prev=2,d=function(){var n=h.value;if(a||t.source_name===n.name){try{return r?{v:navigator.mediaDevices.getUserMedia({audio:{mandatory:{chromeMediaSource:"desktop",echoCancellation:!0}},video:{mandatory:{chromeMediaSource:"desktop"}}}).then((function(t){return console.log(n.id),e._stream=t,t}))}:{v:navigator.mediaDevices.getUserMedia({audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:n.id,minWidth:i.video.mandatory.minWidth,maxWidth:i.video.mandatory.maxWidth,minHeight:i.video.mandatory.minHeight,maxHeight:i.video.mandatory.maxHeight,minFrameRate:i.video.mandatory.minFrameRate,maxFrameRate:i.video.mandatory.maxFrameRate}}}).then((function(t){return console.log("ElectronScreenShare:",n.id),e._stream=t,t}))}}catch(e){console.log("ElectronScreenShare.start.error:",e)}return"break"}},c.s();case 5:if((h=c.n()).done){n.next=13;break}if("break"!==(l=d())){n.next=9;break}return n.abrupt("break",13);case 9:if("object"!==(0,o.default)(l)){n.next=11;break}return n.abrupt("return",l.v);case 11:n.next=5;break;case 13:n.next=18;break;case 15:n.prev=15,n.t0=n.catch(2),c.e(n.t0);case 18:return n.prev=18,c.f(),n.finish(18);case 21:return n.abrupt("return",null);case 22:case"end":return n.stop()}}),s,null,[[2,15,18,21]])})));return function(e){return u.apply(this,arguments)}}()).catch((function(e){return console.error("ElectronScreenShare:error",e),Promise.reject(e)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){var t={video:{frameRate:e.fps,mandatory:{maxWidth:e.width,minWidth:e.width,maxHeight:e.height,minHeight:e.height}},audio:!1};return h.default.log("====fps:",e.fps),isFinite(e.width)&&(t.video.mandatory.maxWidth=e.width,t.video.mandatory.minWidth=e.width),isFinite(e.height)&&(t.video.mandatory.minHeight=e.height,t.video.mandatory.maxHeight=e.height),isFinite(e.fps)&&(t.video.mandatory.minFrameRate=e.fps,t.video.mandatory.maxFrameRate=e.fps),void 0===e.width&&(t.video.mandatory.maxWidth=1920,t.video.mandatory.minWidth=1920),void 0===e.height&&(t.video.mandatory.maxHeight=1080,t.video.mandatory.minHeight=1080),void 0===e.fps&&(t.video.mandatory.minFrameRate=15,t.video.mandatory.maxFrameRate=15),t}}]),e}(),T=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=this._toConstraints(t),n=void 0;try{n=i(!function(){var e=new Error("Cannot find module 'react-native-webrtc'");throw e.code="MODULE_NOT_FOUND",e}()).mediaDevices}catch(e){n=navigator.mediaDevices}return n.getDisplayMedia(r).then((function(t){return e._stream=t,Promise.resolve(t)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return!1===e.audio||"object"!=(0,o.default)(e.audio)?{videoscreen:{frameRate:e.fps,width:e.width,height:e.height}}:{videoscreen:{frameRate:e.fps,width:e.width,height:e.height},audio:e.audio}}}]),e}(),M=function(){function e(){(0,a.default)(this,e),this._stream=null}return(0,u.default)(e,[{key:"start",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._toConstraints(t),r=navigator.mediaDevices;return r.getDisplayMedia(i).then((function(i){return e._stream=g(i,t.width,t.height,t.fps||15),Promise.resolve(e._stream)}))}},{key:"stop",value:function(){this._stream instanceof MediaStream!=0&&(this._stream.getTracks().forEach((function(e){return e.stop()})),this._stream=null)}},{key:"isScreenShareAvailable",value:function(){return!0}},{key:"needExtension",value:function(){return!1}},{key:"_toConstraints",value:function(e){return{video:{frameRate:e.fps||15}}}}]),e}(),I=function(){function e(){(0,a.default)(this,e)}return(0,u.default)(e,[{key:"isScreenShareAvailable",value:function(){return!1}},{key:"needExtension",value:function(){return!1}}]),e}(),k=function(){function e(){(0,a.default)(this,e)}return(0,u.default)(e,null,[{key:"create",value:function(){if(y)return y;var e=d.default.isMobile()?d.default.userAgent():navigator.userAgent,t=c.default.getParser(e),i=t.getEngine(),r=void 0;try{r=i.name.toLowerCase()}catch(e){}var n=new l.default;if(n.isElectron())return console.log("===========Client============="),y=new E;if(n.isReactNative())return console.log("===========APP============="),y=new T;if(console.log("===========Browser============="),t.satisfies({chrome:">=72",chromium:">=72"}))y=new _;else if(t.satisfies({chrome:">=55",chromium:">=55"}))y=new b;else if(t.satisfies({firefox:">=60"}))y=new w;else if(t.satisfies({"microsoft edge":"~11"}))y=new S;else if("blink"===r){h.default.debug("best effort Chromium based browser detection");var o=e.match(/(?:(?:Chrome|Chromium))[ /](\w+)/i);if(o){var s=Number(o[1]);y=s>=72?new _:new b}else y=new b}else y=t.satisfies({safari:">=13"})&&"undefined"!=typeof RTCRtpTransceiver?new M:(t.satisfies({safari:">=11"}),new I);return y}}]),e}();t.default=k},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(9)),o=r(i(10)),s=i(104),a=r(i(7)),u=function(){function e(t){var i=this;(0,n.default)(this,e),this.config=t||{},this.queue=[],this.eventMap={},this.status=3,t.tag=t.tag||"DataChannel",t.onLogMessage=t.onLogMessage||function(){},t.onErrorMessage=t.onErrorMessage||function(){},t.maxRetries=null!=t.maxRetries?t.maxRetries:2e3,this.handshake(!1,{onopen:this.onopen.bind(this),onclose:this.onclose.bind(this),onerror:this.onerror.bind(this)}),this.onnetworkchange=function(){i.wp&&!i.onnetworkchangeTimeout&&(i.onnetworkchangeTimeout=setTimeout((function(){i.reconnecting(i.config.maxRetries,1),i.onnetworkchangeTimeout=null}),2e3))}}return(0,o.default)(e,[{key:"isConnected",value:function(){return 1===this.status}},{key:"handshake",value:function(e,t){var i=this;this.wp&&(this.wp.dispose(),this.wp=void 0);var r={configuration:{iceServers:[],rtcpMuxPolicy:"require"},dataChannels:!0,dataChannelConfig:{onopen:t.onopen,onclose:t.onclose,onerror:t.onerror,onmessage:this.onmessage.bind(this),options:{ordered:!1,maxRetransmits:this.config.maxRetries}},mediaConstraints:{audio:!1,video:!1}};this.wp=new s.WebRtcPeerSendonly(r,(function(){i.config.maxRetries&&(i.wp.peerConnection.oniceconnectionstatechange=function(e){i.disconnectTimer&&(clearTimeout(i.disconnectTimer),i.disconnectTimer=null),"disconnected"===i.wp.peerConnection.iceConnectionState?i.disconnectTimer=setTimeout((function(){i.disconnectTimer=null,i.reconnecting(i.config.maxRetries,1)}),5e3):"failed"===i.wp.peerConnection.iceConnectionState&&i.reconnecting(i.config.maxRetries,1)}),i.wp.generateOffer().then((function(e){return a.default.info("DataChannelWS offer "+JSON.stringify(e)),new Promise((function(t,r){var n=0;!function o(){n++,fetch(i.config.uri,{cache:"no-cache",credentials:"same-origin",headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST",mode:"cors",redirect:"follow",referrer:"no-referrer",body:JSON.stringify({sdp:e,type:"offer"})}).then((function(e){t(e.json())}),(function(e){n<3?setTimeout((function(){o()}),1e3):r(e)}))}()}))})).then((function(e){return e.sdp})).then((function(e){return a.default.info("DataChannelWS answer "+e),i.wp.processAnswer(e)})).catch((function(e){i.status=3,i.config.ondisconnect&&i.config.ondisconnect()}))})),e||(this.status=0)}},{key:"reconnecting",value:function(e,t){if(this.config.onLogMessage("reconnecting"),1===t){if(4===this.status)return void this.config.onLogMessage("Trying to reconnect when reconnecting... Ignoring this reconnection.");this.status=4,this.config.onreconnecting&&this.config.onreconnecting()}this.reconnect(e,t)}},{key:"reconnect",value:function(e,t){var i=this;this.config.onLogMessage("Trying to reconnect "+t+" times"),2!==this.status?this.handshake(!0,{onopen:function(){i.config.onLogMessage("Reconnected in "+t+" retries..."),i.wp.dataChannel.onclose=i.onclose.bind(i),i.onopen()},onerror:function(r){i.config.onErrorMessage("Reconnection error: "),2!==i.status?t===e?i.config.ondisconnect&&i.config.ondisconnect():(i.closeErrorTimer&&clearTimeout(i.closeErrorTimer),i.closeErrorTimer=setTimeout((function(){i.reconnecting(e,t+1)}),3e3)):i.config.onLogMessage("closing connection ")},onclose:function(){}}):this.config.onLogMessage("closing connection ")}},{key:"onopen",value:function(){for(this.config.onLogMessage("DataChannelWS connected"),4===this.status?this.config.onreconnected&&this.config.onreconnected():this.config.onconnected&&this.config.onconnected();this.queue.length>0;)"open"==this.wp.dataChannel.readyState&&this.wp.send(this.queue.shift());this.status=1,this.fire("open")}},{key:"onclose",value:function(){"closed"===this.wp.dataChannel.readyState?2===this.status?(this.config.onLogMessage("Connection Closed by user"),this.status=3,this.wp=null):this.config.maxRetries?(this.config.onLogMessage("Connection closed unexpectecly. Reconnecting..."),this.reconnecting(this.config.maxRetries,1)):(this.config.onLogMessage("Connection Closed by server"),this.close(),this.status=3,this.wp=null,this.config.ondisconnect&&this.config.ondisconnect()):this.config.onLogMessage("Close callback from previous DataChannelWS. Ignoring it"),console.warn("onclose 事件触发"),console.trace(),this.fire("close")}},{key:"onerror",value:function(e){this.config.onErrorMessage(e),this.config.onerror&&this.config.onerror(),this.fire("error",e)}},{key:"onmessage",value:function(e){this.fire("message",e),a.default.debug(this.config.tag,"/Receive: ",e.data)}},{key:"send",value:function(e){"open"!=this.wp.dataChannel.readyState?this.queue.push(e):this.wp.send(e),a.default.debug(this.config.tag,"/Send: ",e)}},{key:"close",value:function(){this.status=2,this.wp&&this.wp.dispose()}},{key:"fire",value:function(e,t){if(this.eventMap[e])for(var i=0;i<this.eventMap[e].length;i++)this.eventMap[e][i](t)}},{key:"addEventListener",value:function(e,t){"function"==typeof t?this.eventMap[e]?this.eventMap[e].push(t):this.eventMap[e]=[t]:this.config.onLogMessage("addEventListener callback is not a function")}},{key:"removeEventListener",value:function(e,t){if(this.eventMap[e])if("function"==typeof t){for(var i=0;i<this.eventMap[e].length;i++)if(this.eventMap[e][i]===t){this.eventMap[e].splice(i,1);break}}else delete this.eventMap[e]}},{key:"reconnectWs",value:function(){this.reconnecting(this.config.maxRetries,1)}}]),e}();t.default=u},function(e,t,i){(function(t){var r=i(8).EventEmitter,n=i(0),o=i(19),s=i(38),a=i(12);function u(e,t,i){var n=this;r.call(this),setTimeout((function(){n._start(e,t,i)}),0)}n(u,r),u.prototype._start=function(e,i,r){var n=this,s=new t.XDomainRequest;i=a.addQuery(i,"t="+ +new Date),s.onerror=function(){n._error()},s.ontimeout=function(){n._error()},s.onprogress=function(){s.responseText,n.emit("chunk",200,s.responseText)},s.onload=function(){n.emit("finish",200,s.responseText),n._cleanup(!1)},this.xdr=s,this.unloadRef=o.unloadAdd((function(){n._cleanup(!0)}));try{this.xdr.open(e,i),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(r)}catch(e){this._error()}},u.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},u.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},u.prototype.close=function(){this._cleanup(!0)},u.enabled=!(!t.XDomainRequest||!s.hasDomain()),e.exports=u}).call(this,i(1))},function(e,t,i){(function(t){var r=i(0),n=i(125),o=i(70);e.exports=function(e){function i(t,i){n.call(this,e.transportName,t,i)}return r(i,n),i.enabled=function(i,r){if(!t.document)return!1;var s=o.extend({},r);return s.sameOrigin=!0,e.enabled(s)&&n.enabled()},i.transportName="iframe-"+e.transportName,i.needBody=!0,i.roundTrips=n.roundTrips+e.roundTrips-1,i.facadeTransport=e,i}}).call(this,i(1))},function(e,t,i){e.exports={isObject:function(e){var t=typeof e;return"function"===t||"object"===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,i,r=1,n=arguments.length;r<n;r++)for(i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}}},function(e,t,i){function r(e){this.type=e}r.prototype.initEvent=function(e,t,i){return this.type=e,this.bubbles=t,this.cancelable=i,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,e.exports=r},function(e,t,i){t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=i(29),t.createHash=t.Hash=i(41),t.createHmac=t.Hmac=i(148);var r=i(300),n=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(n);t.getHashes=function(){return o};var s=i(151);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=i(302);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=i(317);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=i(324);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=i(365);var h=i(368);t.publicEncrypt=h.publicEncrypt,t.privateEncrypt=h.privateEncrypt,t.publicDecrypt=h.publicDecrypt,t.privateDecrypt=h.privateDecrypt;var d=i(372);t.randomFill=d.randomFill,t.randomFillSync=d.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,i){var r=i(0),n=i(134),o=i(2).Buffer,s=new Array(16);function a(){n.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,i,r,n,o,s){return u(e+(t&i|~t&r)+n+o|0,s)+t|0}function h(e,t,i,r,n,o,s){return u(e+(t&r|i&~r)+n+o|0,s)+t|0}function d(e,t,i,r,n,o,s){return u(e+(t^i^r)+n+o|0,s)+t|0}function l(e,t,i,r,n,o,s){return u(e+(i^(t|~r))+n+o|0,s)+t|0}r(a,n),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var i=this._a,r=this._b,n=this._c,o=this._d;i=c(i,r,n,o,e[0],3614090360,7),o=c(o,i,r,n,e[1],3905402710,12),n=c(n,o,i,r,e[2],606105819,17),r=c(r,n,o,i,e[3],3250441966,22),i=c(i,r,n,o,e[4],4118548399,7),o=c(o,i,r,n,e[5],1200080426,12),n=c(n,o,i,r,e[6],2821735955,17),r=c(r,n,o,i,e[7],4249261313,22),i=c(i,r,n,o,e[8],1770035416,7),o=c(o,i,r,n,e[9],2336552879,12),n=c(n,o,i,r,e[10],4294925233,17),r=c(r,n,o,i,e[11],2304563134,22),i=c(i,r,n,o,e[12],1804603682,7),o=c(o,i,r,n,e[13],4254626195,12),n=c(n,o,i,r,e[14],2792965006,17),i=h(i,r=c(r,n,o,i,e[15],1236535329,22),n,o,e[1],4129170786,5),o=h(o,i,r,n,e[6],3225465664,9),n=h(n,o,i,r,e[11],643717713,14),r=h(r,n,o,i,e[0],3921069994,20),i=h(i,r,n,o,e[5],3593408605,5),o=h(o,i,r,n,e[10],38016083,9),n=h(n,o,i,r,e[15],3634488961,14),r=h(r,n,o,i,e[4],3889429448,20),i=h(i,r,n,o,e[9],568446438,5),o=h(o,i,r,n,e[14],3275163606,9),n=h(n,o,i,r,e[3],4107603335,14),r=h(r,n,o,i,e[8],1163531501,20),i=h(i,r,n,o,e[13],2850285829,5),o=h(o,i,r,n,e[2],4243563512,9),n=h(n,o,i,r,e[7],1735328473,14),i=d(i,r=h(r,n,o,i,e[12],2368359562,20),n,o,e[5],4294588738,4),o=d(o,i,r,n,e[8],2272392833,11),n=d(n,o,i,r,e[11],1839030562,16),r=d(r,n,o,i,e[14],4259657740,23),i=d(i,r,n,o,e[1],2763975236,4),o=d(o,i,r,n,e[4],1272893353,11),n=d(n,o,i,r,e[7],4139469664,16),r=d(r,n,o,i,e[10],3200236656,23),i=d(i,r,n,o,e[13],681279174,4),o=d(o,i,r,n,e[0],3936430074,11),n=d(n,o,i,r,e[3],3572445317,16),r=d(r,n,o,i,e[6],76029189,23),i=d(i,r,n,o,e[9],3654602809,4),o=d(o,i,r,n,e[12],3873151461,11),n=d(n,o,i,r,e[15],530742520,16),i=l(i,r=d(r,n,o,i,e[2],3299628645,23),n,o,e[0],4096336452,6),o=l(o,i,r,n,e[7],1126891415,10),n=l(n,o,i,r,e[14],2878612391,15),r=l(r,n,o,i,e[5],4237533241,21),i=l(i,r,n,o,e[12],1700485571,6),o=l(o,i,r,n,e[3],2399980690,10),n=l(n,o,i,r,e[10],4293915773,15),r=l(r,n,o,i,e[1],2240044497,21),i=l(i,r,n,o,e[8],1873313359,6),o=l(o,i,r,n,e[15],4264355552,10),n=l(n,o,i,r,e[6],2734768916,15),r=l(r,n,o,i,e[13],1309151649,21),i=l(i,r,n,o,e[4],4149444226,6),o=l(o,i,r,n,e[11],3174756917,10),n=l(n,o,i,r,e[2],718787259,15),r=l(r,n,o,i,e[9],3951481745,21),this._a=this._a+i|0,this._b=this._b+r|0,this._c=this._c+n|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},function(e,t,i){(function(t){function i(e){try{if(!t.localStorage)return!1}catch(e){return!1}var i=t.localStorage[e];return null!=i&&"true"===String(i).toLowerCase()}e.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,i(1))},function(e,t,i){var r=i(30).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];e.apply(this,r)}}}(o||n);var s=i.readable||!1!==i.readable&&t.readable,a=i.writable||!1!==i.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){a=!1,c=!0,s||o.call(t)},d=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,d=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!d?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},m=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",l),t.on("finish",h),!1!==i.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t,i){var r=i(5).Buffer,n=i(0),o=i(134),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],h=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function f(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,i,r,n,o,s,a){return p(e+(t^i^r)+o+s|0,a)+n|0}function v(e,t,i,r,n,o,s,a){return p(e+(t&i|~t&r)+o+s|0,a)+n|0}function g(e,t,i,r,n,o,s,a){return p(e+((t|~i)^r)+o+s|0,a)+n|0}function y(e,t,i,r,n,o,s,a){return p(e+(t&r|i&~r)+o+s|0,a)+n|0}function b(e,t,i,r,n,o,s,a){return p(e+(t^(i|~r))+o+s|0,a)+n|0}n(f,o),f.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var i=0|this._a,r=0|this._b,n=0|this._c,o=0|this._d,f=0|this._e,_=0|this._a,w=0|this._b,S=0|this._c,E=0|this._d,T=0|this._e,M=0;M<80;M+=1){var I,k;M<16?(I=m(i,r,n,o,f,e[a[M]],d[0],c[M]),k=b(_,w,S,E,T,e[u[M]],l[0],h[M])):M<32?(I=v(i,r,n,o,f,e[a[M]],d[1],c[M]),k=y(_,w,S,E,T,e[u[M]],l[1],h[M])):M<48?(I=g(i,r,n,o,f,e[a[M]],d[2],c[M]),k=g(_,w,S,E,T,e[u[M]],l[2],h[M])):M<64?(I=y(i,r,n,o,f,e[a[M]],d[3],c[M]),k=v(_,w,S,E,T,e[u[M]],l[3],h[M])):(I=b(i,r,n,o,f,e[a[M]],d[4],c[M]),k=m(_,w,S,E,T,e[u[M]],l[4],h[M])),i=f,f=o,o=p(n,10),n=r,r=I,_=T,T=E,E=p(S,10),S=w,w=k}var R=this._b+n+E|0;this._b=this._c+o+T|0,this._c=this._d+f+_|0,this._d=this._e+i+w|0,this._e=this._a+r+S|0,this._a=R},f.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=f},function(e,t,i){(t=e.exports=function(e){e=e.toLowerCase();var i=t[e];if(!i)throw new Error(e+" is not supported (we accept pull requests)");return new i}).sha=i(285),t.sha1=i(286),t.sha224=i(287),t.sha256=i(141),t.sha384=i(288),t.sha512=i(142)},function(e,t,i){var r=i(5),n=r.Buffer;function o(e,t){for(var i in e)t[i]=e[i]}function s(e,t,i){return n(e,t,i)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=s),o(n,s),s.from=function(e,t,i){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,i)},s.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=n(e);return void 0!==t?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,i){(function(t,r,n){var o=i(53);function s(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,i){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=y;var a,u=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?r:o.nextTick;y.WritableState=g;var c=Object.create(i(43));c.inherits=i(0);var h,d={deprecate:i(74)},l=i(145),f=i(78).Buffer,p=n.Uint8Array||function(){},m=i(146);function v(){}function g(e,t){a=a||i(25),e=e||{};var r=t instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,c=e.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:r&&(c||0===c)?c:h,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var i=e._writableState,r=i.sync,n=i.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(i),t)!function(e,t,i,r,n){--t.pendingcb,i?(o.nextTick(n,r),o.nextTick(T,e,t),e._writableState.errorEmitted=!0,e.emit("error",r)):(n(r),e._writableState.errorEmitted=!0,e.emit("error",r),T(e,t))}(e,i,r,t,n);else{var s=S(i);s||i.corked||i.bufferProcessing||!i.bufferedRequest||w(e,i),r?u(_,e,i,s,n):_(e,i,s,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(e){if(a=a||i(25),!(h.call(y,this)||this instanceof a))return new y(e);this._writableState=new g(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function b(e,t,i,r,n,o,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,i?e._writev(n,t.onwrite):e._write(n,o,t.onwrite),t.sync=!1}function _(e,t,i,r){i||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),T(e,t)}function w(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var r=t.bufferedRequestCount,n=new Array(r),o=t.corkedRequestsFree;o.entry=i;for(var a=0,u=!0;i;)n[a]=i,i.isBuf||(u=!1),i=i.next,a+=1;n.allBuffers=u,b(e,t,!0,t.length,n,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new s(t),t.bufferedRequestCount=0}else{for(;i;){var c=i.chunk,h=i.encoding,d=i.callback;if(b(e,t,!1,t.objectMode?1:c.length,c,h,d),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function S(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function E(e,t){e._final((function(i){t.pendingcb--,i&&e.emit("error",i),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var i=S(t);return i&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,o.nextTick(E,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}c.inherits(y,l),g.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(g.prototype,"buffer",{get:d.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(h=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!h.call(this,e)||this===y&&e&&e._writableState instanceof g}})):h=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,i){var r,n=this._writableState,s=!1,a=!n.objectMode&&(r=e,f.isBuffer(r)||r instanceof p);return a&&!f.isBuffer(e)&&(e=function(e){return f.from(e)}(e)),"function"==typeof t&&(i=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof i&&(i=v),n.ended?function(e,t){var i=new Error("write after end");e.emit("error",i),o.nextTick(t,i)}(this,i):(a||function(e,t,i,r){var n=!0,s=!1;return null===i?s=new TypeError("May not write null values to stream"):"string"==typeof i||void 0===i||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),o.nextTick(r,s),n=!1),n}(this,n,e,i))&&(n.pendingcb++,s=function(e,t,i,r,n,o){if(!i){var s=function(e,t,i){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=f.from(t,i)),t}(t,r,n);r!==s&&(i=!0,n="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:n,isBuf:i,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else b(e,t,!1,a,r,n,o);return u}(this,n,a,e,t,i)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,i){i(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,i){var r=this._writableState;"function"==typeof e?(i=e,e=null,t=null):"function"==typeof t&&(i=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,i){t.ending=!0,T(e,t),i&&(t.finished?o.nextTick(i):e.once("finish",i)),t.ended=!0,e.writable=!1}(this,r,i)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=m.destroy,y.prototype._undestroy=m.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,i(4),i(292).setImmediate,i(1))},function(e,t,i){var r=i(13);function n(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=n,n.prototype._init=function(){},n.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},n.prototype._buffer=function(e,t){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<i;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=i,i},n.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},n.prototype._updateEncrypt=function(e){var t=0,i=0,r=(this.bufferOff+e.length)/this.blockSize|0,n=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(n,i)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,n,i),i+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return n},n.prototype._updateDecrypt=function(e){for(var t=0,i=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,n=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),i+=this._flushBuffer(n,i);return t+=this._buffer(e,t),n},n.prototype.final=function(e){var t,i;return e&&(t=this.update(e)),i="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(i):i},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},n.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},n.prototype._unpad=function(e){return e},n.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,i){var r=i(307),n=i(315),o=i(160);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=n.createDecipher,t.createDecipheriv=t.Decipheriv=n.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},function(e,t,i){var r={ECB:i(308),CBC:i(309),CFB:i(310),CFB8:i(311),CFB1:i(312),OFB:i(313),CTR:i(158),GCM:i(158)},n=i(160);for(var o in n)n[o].module=r[n[o].mode];e.exports=n},function(e,t,i){var r;function n(e){this.rand=e}if(e.exports=function(e){return r||(r=new n(null)),r.generate(e)},e.exports.Rand=n,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),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?n.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(n.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=i(321);if("function"!=typeof o.randomBytes)throw new Error("Not supported");n.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},function(e,t,i){var r=i(33).codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}e.exports=function e(t,i,o){if("function"==typeof i)return e(t,null,i);i||(i={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];e.apply(this,r)}}}(o||n);var s=i.readable||!1!==i.readable&&t.readable,a=i.writable||!1!==i.writable&&t.writable,u=function(){t.writable||h()},c=t._writableState&&t._writableState.finished,h=function(){a=!1,c=!0,s||o.call(t)},d=t._readableState&&t._readableState.endEmitted,l=function(){s=!1,d=!0,a||o.call(t)},f=function(e){o.call(t,e)},p=function(){var e;return s&&!d?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},m=function(){t.req.on("finish",h)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",h),t.on("abort",p),t.req?m():t.on("request",m)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",l),t.on("finish",h),!1!==i.error&&t.on("error",f),t.on("close",p),function(){t.removeListener("complete",h),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",h),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",h),t.removeListener("end",l),t.removeListener("error",f),t.removeListener("close",p)}}},function(e,t,i){(function(t){var r=i(86),n=i(29);function o(e){var t,i=e.modulus.byteLength();do{t=new r(n(i))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,i){var n=function(e){var t=o(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(i),s=i.modulus.byteLength(),a=new r(e).mul(n.blinder).umod(i.modulus),u=a.toRed(r.mont(i.prime1)),c=a.toRed(r.mont(i.prime2)),h=i.coefficient,d=i.prime1,l=i.prime2,f=u.redPow(i.exponent1).fromRed(),p=c.redPow(i.exponent2).fromRed(),m=f.isub(p).imul(h).umod(d).imul(l);return p.iadd(m).imul(n.unblinder).umod(i.modulus).toArrayLike(t,"be",s)}s.getr=o,e.exports=s}).call(this,i(5).Buffer)},function(e,t,i){(function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(334).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+e)}function u(e,t,i){var r=a(e,i);return i-1>=t&&(r|=a(e,i-1)<<4),r}function c(e,t,i,n){for(var o=0,s=0,a=Math.min(e.length,i),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=n,s=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&s<n,"Invalid character"),o+=s}return o}function h(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var o=e.length-i,s=o%r,a=Math.min(o,o-s)+i,u=0,h=i;h<a;h+=r)u=c(e,h,h+r,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=c(e,h,e.length,t),h=0;h<s;h++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){h(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","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 m(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;i.words[0]=a;for(var c=1;c<r;c++){for(var h=u>>>26,d=67108863&u,l=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=l;f++){var p=c-f|0;h+=(s=(n=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}i.words[c]=0|d,u=0|h}return 0!==u?i.words[c]=0|u:i.length--,i._strip()}o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);i=0!=(o=a>>>24-n&16777215)||s!==this.length-1?l[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],h=p[e];i="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(h).toString(e);i=(d=d.idivn(h)).isZero()?m+i:l[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,n),s},o.prototype._toArrayLikeLE=function(e,t){for(var i=0,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;e[i++]=255&s,i<e.length&&(e[i++]=s>>8&255),i<e.length&&(e[i++]=s>>16&255),6===o?(i<e.length&&(e[i++]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i<e.length)for(e[i++]=r;i<e.length;)e[i++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var i=e.length-1,r=0,n=0,o=0;n<this.length;n++){var s=this.words[n]<<o|r;e[i--]=255&s,i>=0&&(e[i--]=s>>8&255),i>=0&&(e[i--]=s>>16&255),6===o?(i>=0&&(e[i--]=s>>24&255),r=0,o=0):(r=s>>>24,o+=2)}if(i>=0)for(e[i--]=r;i>=0;)e[i--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this._strip()},o.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,o=0;o<r.length;o++)t=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<i.length;o++)t=(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var v=function(e,t,i){var r,n,o,s=e.words,a=t.words,u=i.words,c=0,h=0|s[0],d=8191&h,l=h>>>13,f=0|s[1],p=8191&f,m=f>>>13,v=0|s[2],g=8191&v,y=v>>>13,b=0|s[3],_=8191&b,w=b>>>13,S=0|s[4],E=8191&S,T=S>>>13,M=0|s[5],I=8191&M,k=M>>>13,R=0|s[6],A=8191&R,C=R>>>13,x=0|s[7],O=8191&x,P=x>>>13,L=0|s[8],D=8191&L,N=L>>>13,U=0|s[9],B=8191&U,j=U>>>13,V=0|a[0],F=8191&V,$=V>>>13,q=0|a[1],W=8191&q,H=q>>>13,G=0|a[2],z=8191&G,J=G>>>13,K=0|a[3],Y=8191&K,Z=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ie=8191&te,re=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,le=he>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ve=(c+(r=Math.imul(d,F))|0)+((8191&(n=(n=Math.imul(d,$))+Math.imul(l,F)|0))<<13)|0;c=((o=Math.imul(l,$))+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),n=(n=Math.imul(p,$))+Math.imul(m,F)|0,o=Math.imul(m,$);var ge=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,F),n=(n=Math.imul(g,$))+Math.imul(y,F)|0,o=Math.imul(y,$),r=r+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0;var ye=(c+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(l,z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(_,F),n=(n=Math.imul(_,$))+Math.imul(w,F)|0,o=Math.imul(w,$),r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,H)|0,r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,J)|0;var be=(c+(r=r+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(l,Y)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,$))+Math.imul(T,F)|0,o=Math.imul(T,$),r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,H)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,H)|0,r=r+Math.imul(g,z)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var _e=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,$))+Math.imul(k,F)|0,o=Math.imul(k,$),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,J)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,J)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(n=(n=n+Math.imul(d,re)|0)+Math.imul(l,ie)|0))<<13)|0;c=((o=o+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,F),n=(n=Math.imul(A,$))+Math.imul(C,F)|0,o=Math.imul(C,$),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(E,z)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(n=(n=n+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,$))+Math.imul(P,F)|0,o=Math.imul(P,$),r=r+Math.imul(A,W)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(y,ie)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(c+(r=r+Math.imul(d,ue)|0)|0)+((8191&(n=(n=n+Math.imul(d,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,F),n=(n=Math.imul(D,$))+Math.imul(N,F)|0,o=Math.imul(N,$),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(A,z)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Te=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,F),n=(n=Math.imul(B,$))+Math.imul(j,F)|0,o=Math.imul(j,$),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,H)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(O,z)|0,n=(n=n+Math.imul(O,J)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(_,oe)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Me=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(n=(n=n+Math.imul(d,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,W),n=(n=Math.imul(B,H))+Math.imul(j,W)|0,o=Math.imul(j,H),r=r+Math.imul(D,z)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(k,ie)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(E,oe)|0,n=(n=n+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(_,ue)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(g,de)|0,n=(n=n+Math.imul(g,le)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,le)|0;var Ie=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,z),n=(n=Math.imul(B,J))+Math.imul(j,z)|0,o=Math.imul(j,J),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,r=r+Math.imul(E,ue)|0,n=(n=n+Math.imul(E,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(_,de)|0,n=(n=n+Math.imul(_,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var ke=(c+(r=r+Math.imul(g,pe)|0)|0)+((8191&(n=(n=n+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,Y),n=(n=Math.imul(B,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(P,ie)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(E,de)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Re=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,Q),n=(n=Math.imul(B,ee))+Math.imul(j,Q)|0,o=Math.imul(j,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(N,ie)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(O,oe)|0,n=(n=n+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,r=r+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(I,de)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(n=(n=n+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ie),n=(n=Math.imul(B,re))+Math.imul(j,ie)|0,o=Math.imul(j,re),r=r+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(O,ue)|0,n=(n=n+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(A,de)|0,n=(n=n+Math.imul(A,le)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0;var Ce=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,oe),n=(n=Math.imul(B,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),r=r+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(O,de)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var xe=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,ue),n=(n=Math.imul(B,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),r=r+Math.imul(D,de)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,le)|0;var Oe=(c+(r=r+Math.imul(O,pe)|0)|0)+((8191&(n=(n=n+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,de),n=(n=Math.imul(B,le))+Math.imul(j,de)|0,o=Math.imul(j,le);var Pe=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(c+(r=Math.imul(B,pe))|0)+((8191&(n=(n=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,me))+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=ve,u[1]=ge,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=Te,u[9]=Me,u[10]=Ie,u[11]=ke,u[12]=Re,u[13]=Ae,u[14]=Ce,u[15]=xe,u[16]=Oe,u[17]=Pe,u[18]=Le,0!==c&&(u[19]=c,i.length++),i};function g(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var a=67108863&r,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,d=(0|e.words[h])*(0|t.words[c]),l=67108863&d;a=67108863&(l=l+a|0),n+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i._strip()}function y(e,t,i){return g(e,t,i)}Math.imul||(v=m),o.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?v(this,e,t):i<63?m(this,e,t):i<1024?g(this,e,t):y(this,e,t)},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),y(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var i=0,n=0;n<this.length;n++){var o=(0|this.words[n])*e,s=(67108863&o)+(67108863&i);i>>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=e.words[r]>>>n&1}return t}(e);if(0===t.length)return new o(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr())0!==t[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this._strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=n);c--){var d=0|this.words[c];this.words[c]=h<<26-o|d>>>o,h=d&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!=(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var a,u=r.length-n.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=r.clone()._ishlnsubmul(n,1,u);0===h.negative&&(r=h,a&&(a.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(n,l,d);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=l)}return a&&a._strip(),r._strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%e;return t?-n:n},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/e|0,i=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(h),s.isub(d)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(d)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(a),s.isub(u)):(i.isub(t),a.isub(n),u.isub(s))}return{a:a,b:u,gcd:i.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,l=1;0==(i.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var o=t;t=i,i=o}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function _(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function T(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function I(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},_.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},_.prototype.split=function(e,t){e.iushrn(this.n,0,t)},_.prototype.imulK=function(e){return e.imul(this.k)},n(w,_),w.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r<i;r++)t.words[r]=e.words[r];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(S,_),n(E,_),n(T,_),T.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new S;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new T}return b[e]=t,t},M.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(h(e,e.umod(this.m)._forceRed(this)),e)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,n),l=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=s;0!==f.cmp(a);){for(var m=f,v=0;0!==m.cmp(a);v++)m=m.redSqr();r(v<p);var g=this.pow(d,new o(1).iushln(p-v-1));l=l.redMul(g),d=g.redSqr(),f=f.redMul(d),p=v}return l},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var n=i[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],h=u-1;h>=0;h--){var d=c>>h&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[s]),a=0,s=0)):a=0}u=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new I(e)},n(I,M),I.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},I.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},I.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},I.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},I.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,i(15)(e))},function(e,t,i){var r=t;r.version=i(335).version,r.utils=i(14),r.rand=i(83),r.curve=i(173),r.curves=i(88),r.ec=i(347),r.eddsa=i(351)},function(e,t,i){var r,n=t,o=i(89),s=i(173),a=i(14).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.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 c(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var i=new u(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:i}),i}})}n.PresetCurve=u,c("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:o.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"]}),c("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:o.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=i(346)}catch(e){r=void 0}c("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(e,t,i){var r=t;r.utils=i(16),r.common=i(45),r.sha=i(340),r.ripemd=i(344),r.hmac=i(345),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,i){(function(t){var r,n=i(5),o=n.Buffer,s={};for(r in n)n.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(s[r]=n[r]);var a=s.Buffer={};for(r in o)o.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(a[r]=o[r]);if(s.Buffer.prototype=o.prototype,a.from&&a.from!==Uint8Array.from||(a.from=function(e,t,i){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return o(e,t,i)}),a.alloc||(a.alloc=function(e,t,i){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=o(e);return t&&0!==t.length?"string"==typeof i?r.fill(t,i):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s}).call(this,i(4))},function(e,t,i){const r=i(92).Reporter,n=i(46).EncoderBuffer,o=i(46).DecoderBuffer,s=i(13),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t,i){const r={};this._baseState=r,r.name=i,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};h.forEach((function(i){t[i]=e[i]}));const i=new this.constructor(t.parent);return i._baseState=t,i},c.prototype._wrap=function(){const e=this._baseState;u.forEach((function(t){this[t]=function(){const i=new this.constructor(this);return e.children.push(i),i[t].apply(i,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,i=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==i.length&&(s(null===t.children),t.children=i,i.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(i){i==(0|i)&&(i|=0);const r=e[i];t[r]=i})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,i=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(i),this}})),c.prototype.use=function(e){s(e);const t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const i=this._baseState;if(null===i.parent)return e.wrapResult(i.children[0]._decode(e,t));let r,n=i.default,s=!0,a=null;if(null!==i.key&&(a=e.enterKey(i.key)),i.optional){let r=null;if(null!==i.explicit?r=i.explicit:null!==i.implicit?r=i.implicit:null!==i.tag&&(r=i.tag),null!==r||i.any){if(s=this._peekTag(e,r,i.any),e.isError(s))return s}else{const r=e.save();try{null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(r)}}if(i.obj&&s&&(r=e.enterObject()),s){if(null!==i.explicit){const t=this._decodeTag(e,i.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===i.use&&null===i.choice){let t;i.any&&(t=e.save());const r=this._decodeTag(e,null!==i.implicit?i.implicit:i.tag,i.any);if(e.isError(r))return r;i.any?n=e.raw(t):e=r}if(t&&t.track&&null!==i.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==i.tag&&t.track(e.path(),e.offset,e.length,"content"),i.any||(n=null===i.choice?this._decodeGeneric(i.tag,e,t):this._decodeChoice(e,t)),e.isError(n))return n;if(i.any||null!==i.choice||null===i.children||i.children.forEach((function(i){i._decode(e,t)})),i.contains&&("octstr"===i.tag||"bitstr"===i.tag)){const r=new o(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(r,t)}}return i.obj&&s&&(n=e.leaveObject(r)),null===i.key||null===n&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,i.key,n),n},c.prototype._decodeGeneric=function(e,t,i){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],i):/str$/.test(e)?this._decodeStr(t,e,i):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],i):"objid"===e?this._decodeObjid(t,null,null,i):"gentime"===e||"utctime"===e?this._decodeTime(t,e,i):"null_"===e?this._decodeNull(t,i):"bool"===e?this._decodeBool(t,i):"objDesc"===e?this._decodeStr(t,e,i):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],i):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,i):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const i=this._baseState;return i.useDecoder=this._use(e,t),s(null===i.useDecoder._baseState.parent),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder},c.prototype._decodeChoice=function(e,t){const i=this._baseState;let r=null,n=!1;return Object.keys(i.choice).some((function(o){const s=e.save(),a=i.choice[o];try{const i=a._decode(e,t);if(e.isError(i))return!1;r={type:o,value:i},n=!0}catch(t){return e.restore(s),!1}return!0}),this),n?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new n(e,this.reporter)},c.prototype._encode=function(e,t,i){const r=this._baseState;if(null!==r.default&&r.default===e)return;const n=this._encodeValue(e,t,i);return void 0===n||this._skipDefault(n,t,i)?void 0:n},c.prototype._encodeValue=function(e,t,i){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(e,t||new r);let o=null;if(this.reporter=t,n.optional&&void 0===e){if(null===n.default)return;e=n.default}let s=null,a=!1;if(n.any)o=this._createEncoderBuffer(e);else if(n.choice)o=this._encodeChoice(e,t);else if(n.contains)s=this._getUse(n.contains,i)._encode(e,t),a=!0;else if(n.children)s=n.children.map((function(i){if("null_"===i._baseState.tag)return i._encode(null,t,e);if(null===i._baseState.key)return t.error("Child should have a key");const r=t.enterKey(i._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const n=i._encode(e[i._baseState.key],t,e);return t.leaveKey(r),n}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return t.error("Too many args for : "+n.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const i=this.clone();i._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(i){const r=this._baseState;return this._getUse(r.args[0],e)._encode(i,t)}),i))}else null!==n.use?o=this._getUse(n.use,i)._encode(e,t):(s=this._encodePrimitive(n.tag,e),a=!0);if(!n.any&&null===n.choice){const e=null!==n.implicit?n.implicit:n.tag,i=null===n.implicit?"universal":"context";null===e?null===n.use&&t.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(e,a,i,s))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){const i=this._baseState,r=i.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const i=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&i.args)return this._encodeObjid(t,i.reverseArgs[0],i.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,i.args&&i.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,i){const r=i(0);function n(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.Reporter=n,n.prototype.isError=function(e){return e instanceof o},n.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},n.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},n.prototype.enterKey=function(e){return this._reporterState.path.push(e)},n.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},n.prototype.leaveKey=function(e,t,i){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=i)},n.prototype.path=function(){return this._reporterState.path.join("/")},n.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},n.prototype.leaveObject=function(e){const t=this._reporterState,i=t.obj;return t.obj=e,i},n.prototype.error=function(e){let t;const i=this._reporterState,r=e instanceof o;if(t=r?e:new o(i.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!i.options.partial)throw t;return r||i.errors.push(t),t},n.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,i){function r(e){const t={};return Object.keys(e).forEach((function(i){(0|i)==i&&(i|=0);const r=e[i];t[r]=i})),t}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,i){(function(e){!function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}function o(e,t,i){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(i=t,t=10),this._init(e||0,t||10,i||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:i(370).Buffer}catch(e){}function a(e,t){var i=e.charCodeAt(t);return i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:i-48&15}function u(e,t,i){var r=a(e,i);return i-1>=t&&(r|=a(e,i-1)<<4),r}function c(e,t,i,r){for(var n=0,o=Math.min(e.length,i),s=t;s<o;s++){var a=e.charCodeAt(s)-48;n*=r,n+=a>=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,i){if("number"==typeof e)return this._initNumber(e,t,i);if("object"==typeof e)return this._initArray(e,t,i);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===t?this._parseHex(e,n,i):(this._parseBase(e,t,n),"le"===i&&this._initArray(this.toArray(),t,i)))},o.prototype._initNumber=function(e,t,i){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===i&&this._initArray(this.toArray(),t,i)},o.prototype._initArray=function(e,t,i){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var o,s,a=0;if("be"===i)for(n=e.length-1,o=0;n>=0;n-=3)s=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n<e.length;n+=3)s=e[n]|e[n+1]<<8|e[n+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,i){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,o=0,s=0;if("be"===i)for(r=e.length-1;r>=t;r-=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)n=u(e,t,r)<<o,this.words[s]|=67108863&n,o>=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,i){this.words=[0],this.length=1;for(var r=0,n=1;n<=67108863;n*=t)r++;r--,n=n/t|0;for(var o=e.length-i,s=o%r,a=Math.min(o,o-s)+i,u=0,h=i;h<a;h+=r)u=c(e,h,h+r,t),this.imuln(n),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var d=1;for(u=c(e,h,e.length,t),h=0;h<s;h++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var h=["","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"],d=[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],l=[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 f(e,t,i){i.negative=t.negative^e.negative;var r=e.length+t.length|0;i.length=r,r=r-1|0;var n=0|e.words[0],o=0|t.words[0],s=n*o,a=67108863&s,u=s/67108864|0;i.words[0]=a;for(var c=1;c<r;c++){for(var h=u>>>26,d=67108863&u,l=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=l;f++){var p=c-f|0;h+=(s=(n=0|e.words[p])*(o=0|t.words[f])+d)/67108864|0,d=67108863&s}i.words[c]=0|d,u=0|h}return 0!==u?i.words[c]=0|u:i.length--,i.strip()}o.prototype.toString=function(e,t){var i;if(t=0|t||1,16===(e=e||10)||"hex"===e){i="";for(var n=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<n|o)).toString(16);i=0!=(o=a>>>24-n&16777215)||s!==this.length-1?h[6-u.length]+u+i:u+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],f=l[e];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);i=(p=p.idivn(f)).isZero()?m+i:h[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%t!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},o.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]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,c=new e(o),h=this.clone();if(u){for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-n;a++)c[a]=0;for(a=0;!h.isZero();a++)s=h.andln(255),h.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,i=0;return t>=4096&&(i+=13,t>>>=13),t>=64&&(i+=7,t>>>=7),t>=8&&(i+=4,t>>>=4),t>=2&&(i+=2,t>>>=2),i+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,i=0;return 0==(8191&t)&&(i+=13,t>>>=13),0==(127&t)&&(i+=7,t>>>=7),0==(15&t)&&(i+=4,t>>>=4),0==(3&t)&&(i+=2,t>>>=2),0==(1&t)&&i++,i},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var i=this._zeroBits(this.words[t]);if(e+=i,26!==i)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var i=0;i<t.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,i;this.length>e.length?(t=this,i=e):(t=e,i=this);for(var r=0;r<i.length;r++)this.words[r]=t.words[r]^i.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),i=e%26;this._expand(t),i>0&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return i>0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var i=e/26|0,n=e%26;return this._expand(i+1),this.words[i]=t?this.words[i]|1<<n:this.words[i]&~(1<<n),this.strip()},o.prototype.iadd=function(e){var t,i,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(i=this,r=e):(i=e,r=this);for(var n=0,o=0;o<r.length;o++)t=(0|i.words[o])+(0|r.words[o])+n,this.words[o]=67108863&t,n=t>>>26;for(;0!==n&&o<i.length;o++)t=(0|i.words[o])+n,this.words[o]=67108863&t,n=t>>>26;if(this.length=i.length,0!==n)this.words[this.length]=n,this.length++;else if(i!==this)for(;o<i.length;o++)this.words[o]=i.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.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 i,r,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(i=this,r=e):(i=e,r=this);for(var o=0,s=0;s<r.length;s++)o=(t=(0|i.words[s])-(0|r.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<i.length;s++)o=(t=(0|i.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<i.length&&i!==this)for(;s<i.length;s++)this.words[s]=i.words[s];return this.length=Math.max(this.length,s),i!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,i){var r,n,o,s=e.words,a=t.words,u=i.words,c=0,h=0|s[0],d=8191&h,l=h>>>13,f=0|s[1],p=8191&f,m=f>>>13,v=0|s[2],g=8191&v,y=v>>>13,b=0|s[3],_=8191&b,w=b>>>13,S=0|s[4],E=8191&S,T=S>>>13,M=0|s[5],I=8191&M,k=M>>>13,R=0|s[6],A=8191&R,C=R>>>13,x=0|s[7],O=8191&x,P=x>>>13,L=0|s[8],D=8191&L,N=L>>>13,U=0|s[9],B=8191&U,j=U>>>13,V=0|a[0],F=8191&V,$=V>>>13,q=0|a[1],W=8191&q,H=q>>>13,G=0|a[2],z=8191&G,J=G>>>13,K=0|a[3],Y=8191&K,Z=K>>>13,X=0|a[4],Q=8191&X,ee=X>>>13,te=0|a[5],ie=8191&te,re=te>>>13,ne=0|a[6],oe=8191&ne,se=ne>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,he=0|a[8],de=8191&he,le=he>>>13,fe=0|a[9],pe=8191&fe,me=fe>>>13;i.negative=e.negative^t.negative,i.length=19;var ve=(c+(r=Math.imul(d,F))|0)+((8191&(n=(n=Math.imul(d,$))+Math.imul(l,F)|0))<<13)|0;c=((o=Math.imul(l,$))+(n>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,F),n=(n=Math.imul(p,$))+Math.imul(m,F)|0,o=Math.imul(m,$);var ge=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(n=(n=n+Math.imul(d,H)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,H)|0)+(n>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,F),n=(n=Math.imul(g,$))+Math.imul(y,F)|0,o=Math.imul(y,$),r=r+Math.imul(p,W)|0,n=(n=n+Math.imul(p,H)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,H)|0;var ye=(c+(r=r+Math.imul(d,z)|0)|0)+((8191&(n=(n=n+Math.imul(d,J)|0)+Math.imul(l,z)|0))<<13)|0;c=((o=o+Math.imul(l,J)|0)+(n>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(_,F),n=(n=Math.imul(_,$))+Math.imul(w,F)|0,o=Math.imul(w,$),r=r+Math.imul(g,W)|0,n=(n=n+Math.imul(g,H)|0)+Math.imul(y,W)|0,o=o+Math.imul(y,H)|0,r=r+Math.imul(p,z)|0,n=(n=n+Math.imul(p,J)|0)+Math.imul(m,z)|0,o=o+Math.imul(m,J)|0;var be=(c+(r=r+Math.imul(d,Y)|0)|0)+((8191&(n=(n=n+Math.imul(d,Z)|0)+Math.imul(l,Y)|0))<<13)|0;c=((o=o+Math.imul(l,Z)|0)+(n>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(E,F),n=(n=Math.imul(E,$))+Math.imul(T,F)|0,o=Math.imul(T,$),r=r+Math.imul(_,W)|0,n=(n=n+Math.imul(_,H)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,H)|0,r=r+Math.imul(g,z)|0,n=(n=n+Math.imul(g,J)|0)+Math.imul(y,z)|0,o=o+Math.imul(y,J)|0,r=r+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,Z)|0;var _e=(c+(r=r+Math.imul(d,Q)|0)|0)+((8191&(n=(n=n+Math.imul(d,ee)|0)+Math.imul(l,Q)|0))<<13)|0;c=((o=o+Math.imul(l,ee)|0)+(n>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(I,F),n=(n=Math.imul(I,$))+Math.imul(k,F)|0,o=Math.imul(k,$),r=r+Math.imul(E,W)|0,n=(n=n+Math.imul(E,H)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,H)|0,r=r+Math.imul(_,z)|0,n=(n=n+Math.imul(_,J)|0)+Math.imul(w,z)|0,o=o+Math.imul(w,J)|0,r=r+Math.imul(g,Y)|0,n=(n=n+Math.imul(g,Z)|0)+Math.imul(y,Y)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,ee)|0;var we=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(n=(n=n+Math.imul(d,re)|0)+Math.imul(l,ie)|0))<<13)|0;c=((o=o+Math.imul(l,re)|0)+(n>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,F),n=(n=Math.imul(A,$))+Math.imul(C,F)|0,o=Math.imul(C,$),r=r+Math.imul(I,W)|0,n=(n=n+Math.imul(I,H)|0)+Math.imul(k,W)|0,o=o+Math.imul(k,H)|0,r=r+Math.imul(E,z)|0,n=(n=n+Math.imul(E,J)|0)+Math.imul(T,z)|0,o=o+Math.imul(T,J)|0,r=r+Math.imul(_,Y)|0,n=(n=n+Math.imul(_,Z)|0)+Math.imul(w,Y)|0,o=o+Math.imul(w,Z)|0,r=r+Math.imul(g,Q)|0,n=(n=n+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ie)|0,n=(n=n+Math.imul(p,re)|0)+Math.imul(m,ie)|0,o=o+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,oe)|0)|0)+((8191&(n=(n=n+Math.imul(d,se)|0)+Math.imul(l,oe)|0))<<13)|0;c=((o=o+Math.imul(l,se)|0)+(n>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(O,F),n=(n=Math.imul(O,$))+Math.imul(P,F)|0,o=Math.imul(P,$),r=r+Math.imul(A,W)|0,n=(n=n+Math.imul(A,H)|0)+Math.imul(C,W)|0,o=o+Math.imul(C,H)|0,r=r+Math.imul(I,z)|0,n=(n=n+Math.imul(I,J)|0)+Math.imul(k,z)|0,o=o+Math.imul(k,J)|0,r=r+Math.imul(E,Y)|0,n=(n=n+Math.imul(E,Z)|0)+Math.imul(T,Y)|0,o=o+Math.imul(T,Z)|0,r=r+Math.imul(_,Q)|0,n=(n=n+Math.imul(_,ee)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,ee)|0,r=r+Math.imul(g,ie)|0,n=(n=n+Math.imul(g,re)|0)+Math.imul(y,ie)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,n=(n=n+Math.imul(p,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0;var Ee=(c+(r=r+Math.imul(d,ue)|0)|0)+((8191&(n=(n=n+Math.imul(d,ce)|0)+Math.imul(l,ue)|0))<<13)|0;c=((o=o+Math.imul(l,ce)|0)+(n>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(D,F),n=(n=Math.imul(D,$))+Math.imul(N,F)|0,o=Math.imul(N,$),r=r+Math.imul(O,W)|0,n=(n=n+Math.imul(O,H)|0)+Math.imul(P,W)|0,o=o+Math.imul(P,H)|0,r=r+Math.imul(A,z)|0,n=(n=n+Math.imul(A,J)|0)+Math.imul(C,z)|0,o=o+Math.imul(C,J)|0,r=r+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(k,Y)|0,o=o+Math.imul(k,Z)|0,r=r+Math.imul(E,Q)|0,n=(n=n+Math.imul(E,ee)|0)+Math.imul(T,Q)|0,o=o+Math.imul(T,ee)|0,r=r+Math.imul(_,ie)|0,n=(n=n+Math.imul(_,re)|0)+Math.imul(w,ie)|0,o=o+Math.imul(w,re)|0,r=r+Math.imul(g,oe)|0,n=(n=n+Math.imul(g,se)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,se)|0,r=r+Math.imul(p,ue)|0,n=(n=n+Math.imul(p,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0;var Te=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(n=(n=n+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;c=((o=o+Math.imul(l,le)|0)+(n>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,F),n=(n=Math.imul(B,$))+Math.imul(j,F)|0,o=Math.imul(j,$),r=r+Math.imul(D,W)|0,n=(n=n+Math.imul(D,H)|0)+Math.imul(N,W)|0,o=o+Math.imul(N,H)|0,r=r+Math.imul(O,z)|0,n=(n=n+Math.imul(O,J)|0)+Math.imul(P,z)|0,o=o+Math.imul(P,J)|0,r=r+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(C,Y)|0,o=o+Math.imul(C,Z)|0,r=r+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(k,Q)|0,o=o+Math.imul(k,ee)|0,r=r+Math.imul(E,ie)|0,n=(n=n+Math.imul(E,re)|0)+Math.imul(T,ie)|0,o=o+Math.imul(T,re)|0,r=r+Math.imul(_,oe)|0,n=(n=n+Math.imul(_,se)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,se)|0,r=r+Math.imul(g,ue)|0,n=(n=n+Math.imul(g,ce)|0)+Math.imul(y,ue)|0,o=o+Math.imul(y,ce)|0,r=r+Math.imul(p,de)|0,n=(n=n+Math.imul(p,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Me=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(n=(n=n+Math.imul(d,me)|0)+Math.imul(l,pe)|0))<<13)|0;c=((o=o+Math.imul(l,me)|0)+(n>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,W),n=(n=Math.imul(B,H))+Math.imul(j,W)|0,o=Math.imul(j,H),r=r+Math.imul(D,z)|0,n=(n=n+Math.imul(D,J)|0)+Math.imul(N,z)|0,o=o+Math.imul(N,J)|0,r=r+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(P,Y)|0,o=o+Math.imul(P,Z)|0,r=r+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,ee)|0,r=r+Math.imul(I,ie)|0,n=(n=n+Math.imul(I,re)|0)+Math.imul(k,ie)|0,o=o+Math.imul(k,re)|0,r=r+Math.imul(E,oe)|0,n=(n=n+Math.imul(E,se)|0)+Math.imul(T,oe)|0,o=o+Math.imul(T,se)|0,r=r+Math.imul(_,ue)|0,n=(n=n+Math.imul(_,ce)|0)+Math.imul(w,ue)|0,o=o+Math.imul(w,ce)|0,r=r+Math.imul(g,de)|0,n=(n=n+Math.imul(g,le)|0)+Math.imul(y,de)|0,o=o+Math.imul(y,le)|0;var Ie=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(n=(n=n+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,me)|0)+(n>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(B,z),n=(n=Math.imul(B,J))+Math.imul(j,z)|0,o=Math.imul(j,J),r=r+Math.imul(D,Y)|0,n=(n=n+Math.imul(D,Z)|0)+Math.imul(N,Y)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(P,Q)|0,o=o+Math.imul(P,ee)|0,r=r+Math.imul(A,ie)|0,n=(n=n+Math.imul(A,re)|0)+Math.imul(C,ie)|0,o=o+Math.imul(C,re)|0,r=r+Math.imul(I,oe)|0,n=(n=n+Math.imul(I,se)|0)+Math.imul(k,oe)|0,o=o+Math.imul(k,se)|0,r=r+Math.imul(E,ue)|0,n=(n=n+Math.imul(E,ce)|0)+Math.imul(T,ue)|0,o=o+Math.imul(T,ce)|0,r=r+Math.imul(_,de)|0,n=(n=n+Math.imul(_,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var ke=(c+(r=r+Math.imul(g,pe)|0)|0)+((8191&(n=(n=n+Math.imul(g,me)|0)+Math.imul(y,pe)|0))<<13)|0;c=((o=o+Math.imul(y,me)|0)+(n>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(B,Y),n=(n=Math.imul(B,Z))+Math.imul(j,Y)|0,o=Math.imul(j,Z),r=r+Math.imul(D,Q)|0,n=(n=n+Math.imul(D,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(O,ie)|0,n=(n=n+Math.imul(O,re)|0)+Math.imul(P,ie)|0,o=o+Math.imul(P,re)|0,r=r+Math.imul(A,oe)|0,n=(n=n+Math.imul(A,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,r=r+Math.imul(I,ue)|0,n=(n=n+Math.imul(I,ce)|0)+Math.imul(k,ue)|0,o=o+Math.imul(k,ce)|0,r=r+Math.imul(E,de)|0,n=(n=n+Math.imul(E,le)|0)+Math.imul(T,de)|0,o=o+Math.imul(T,le)|0;var Re=(c+(r=r+Math.imul(_,pe)|0)|0)+((8191&(n=(n=n+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0;c=((o=o+Math.imul(w,me)|0)+(n>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(B,Q),n=(n=Math.imul(B,ee))+Math.imul(j,Q)|0,o=Math.imul(j,ee),r=r+Math.imul(D,ie)|0,n=(n=n+Math.imul(D,re)|0)+Math.imul(N,ie)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(O,oe)|0,n=(n=n+Math.imul(O,se)|0)+Math.imul(P,oe)|0,o=o+Math.imul(P,se)|0,r=r+Math.imul(A,ue)|0,n=(n=n+Math.imul(A,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,r=r+Math.imul(I,de)|0,n=(n=n+Math.imul(I,le)|0)+Math.imul(k,de)|0,o=o+Math.imul(k,le)|0;var Ae=(c+(r=r+Math.imul(E,pe)|0)|0)+((8191&(n=(n=n+Math.imul(E,me)|0)+Math.imul(T,pe)|0))<<13)|0;c=((o=o+Math.imul(T,me)|0)+(n>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(B,ie),n=(n=Math.imul(B,re))+Math.imul(j,ie)|0,o=Math.imul(j,re),r=r+Math.imul(D,oe)|0,n=(n=n+Math.imul(D,se)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,se)|0,r=r+Math.imul(O,ue)|0,n=(n=n+Math.imul(O,ce)|0)+Math.imul(P,ue)|0,o=o+Math.imul(P,ce)|0,r=r+Math.imul(A,de)|0,n=(n=n+Math.imul(A,le)|0)+Math.imul(C,de)|0,o=o+Math.imul(C,le)|0;var Ce=(c+(r=r+Math.imul(I,pe)|0)|0)+((8191&(n=(n=n+Math.imul(I,me)|0)+Math.imul(k,pe)|0))<<13)|0;c=((o=o+Math.imul(k,me)|0)+(n>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,oe),n=(n=Math.imul(B,se))+Math.imul(j,oe)|0,o=Math.imul(j,se),r=r+Math.imul(D,ue)|0,n=(n=n+Math.imul(D,ce)|0)+Math.imul(N,ue)|0,o=o+Math.imul(N,ce)|0,r=r+Math.imul(O,de)|0,n=(n=n+Math.imul(O,le)|0)+Math.imul(P,de)|0,o=o+Math.imul(P,le)|0;var xe=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(n=(n=n+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,me)|0)+(n>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,ue),n=(n=Math.imul(B,ce))+Math.imul(j,ue)|0,o=Math.imul(j,ce),r=r+Math.imul(D,de)|0,n=(n=n+Math.imul(D,le)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,le)|0;var Oe=(c+(r=r+Math.imul(O,pe)|0)|0)+((8191&(n=(n=n+Math.imul(O,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((o=o+Math.imul(P,me)|0)+(n>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,de),n=(n=Math.imul(B,le))+Math.imul(j,de)|0,o=Math.imul(j,le);var Pe=(c+(r=r+Math.imul(D,pe)|0)|0)+((8191&(n=(n=n+Math.imul(D,me)|0)+Math.imul(N,pe)|0))<<13)|0;c=((o=o+Math.imul(N,me)|0)+(n>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Le=(c+(r=Math.imul(B,pe))|0)+((8191&(n=(n=Math.imul(B,me))+Math.imul(j,pe)|0))<<13)|0;return c=((o=Math.imul(j,me))+(n>>>13)|0)+(Le>>>26)|0,Le&=67108863,u[0]=ve,u[1]=ge,u[2]=ye,u[3]=be,u[4]=_e,u[5]=we,u[6]=Se,u[7]=Ee,u[8]=Te,u[9]=Me,u[10]=Ie,u[11]=ke,u[12]=Re,u[13]=Ae,u[14]=Ce,u[15]=xe,u[16]=Oe,u[17]=Pe,u[18]=Le,0!==c&&(u[19]=c,i.length++),i};function m(e,t,i){return(new v).mulp(e,t,i)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=f),o.prototype.mulTo=function(e,t){var i=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):i<63?f(this,e,t):i<1024?function(e,t,i){i.negative=t.negative^e.negative,i.length=e.length+t.length;for(var r=0,n=0,o=0;o<i.length-1;o++){var s=n;n=0;for(var a=67108863&r,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var h=o-c,d=(0|e.words[h])*(0|t.words[c]),l=67108863&d;a=67108863&(l=l+a|0),n+=(s=(s=s+(d/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}i.words[o]=a,r=s,s=n}return 0!==r?i.words[o]=r:i.length--,i.strip()}(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),i=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,i,e);return t},v.prototype.revBin=function(e,t,i){if(0===e||e===i-1)return e;for(var r=0,n=0;n<t;n++)r|=(1&e)<<t-n-1,e>>=1;return r},v.prototype.permute=function(e,t,i,r,n,o){for(var s=0;s<o;s++)r[s]=t[e[s]],n[s]=i[e[s]]},v.prototype.transform=function(e,t,i,r,n,o){this.permute(o,e,t,i,r,n);for(var s=1;s<n;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),h=0;h<n;h+=a)for(var d=u,l=c,f=0;f<s;f++){var p=i[h+f],m=r[h+f],v=i[h+f+s],g=r[h+f+s],y=d*v-l*g;g=d*g+l*v,v=y,i[h+f]=p+v,r[h+f]=m+g,i[h+f+s]=p-v,r[h+f+s]=m-g,f!==a&&(y=u*d-c*l,l=u*l+c*d,d=y)}},v.prototype.guessLen13b=function(e,t){var i=1|Math.max(t,e),r=1&i,n=0;for(i=i/2|0;i;i>>>=1)n++;return 1<<n+1+r},v.prototype.conjugate=function(e,t,i){if(!(i<=1))for(var r=0;r<i/2;r++){var n=e[r];e[r]=e[i-r-1],e[i-r-1]=n,n=t[r],t[r]=-t[i-r-1],t[i-r-1]=-n}},v.prototype.normalize13b=function(e,t){for(var i=0,r=0;r<t/2;r++){var n=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+i;e[r]=67108863&n,i=n<67108864?0:n/67108864|0}return e},v.prototype.convert13b=function(e,t,i,n){for(var o=0,s=0;s<t;s++)o+=0|e[s],i[2*s]=8191&o,o>>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<n;++s)i[s]=0;r(0===o),r(0==(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},v.prototype.mulp=function(e,t,i){var r=2*this.guessLen13b(e.length,t.length),n=this.makeRBT(r),o=this.stub(r),s=new Array(r),a=new Array(r),u=new Array(r),c=new Array(r),h=new Array(r),d=new Array(r),l=i.words;l.length=r,this.convert13b(e.words,e.length,s,r),this.convert13b(t.words,t.length,c,r),this.transform(s,o,a,u,r,n),this.transform(c,o,h,d,r,n);for(var f=0;f<r;f++){var p=a[f]*h[f]-u[f]*d[f];u[f]=a[f]*d[f]+u[f]*h[f],a[f]=p}return this.conjugate(a,u,r),this.transform(a,u,l,o,r,n),this.conjugate(l,o,r),this.normalize13b(l,r),i.negative=e.negative^t.negative,i.length=e.length+t.length,i.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),i=0;i<t.length;i++){var r=i/26|0,n=i%26;t[i]=(e.words[r]&1<<n)>>>n}return t}(e);if(0===t.length)return new o(1);for(var i=this,r=0;r<t.length&&0===t[r];r++,i=i.sqr());if(++r<t.length)for(var n=i.sqr();r<t.length;r++,n=n.sqr())0!==t[r]&&(i=i.mul(n));return i},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,i=e%26,n=(e-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<i;this.words[t]=u|s,s=a>>>26-i}s&&(this.words[t]=s,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t<n;t++)this.words[t]=0;this.length+=n}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,i){var n;r("number"==typeof e&&e>=0),n=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=i;if(n-=s,n=Math.max(0,n),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var h=0;for(c=this.length-1;c>=0&&(0!==h||c>=n);c--){var d=0|this.words[c];this.words[c]=h<<26-o|d>>>o,h=d&a}return u&&0!==h&&(u.words[u.length++]=h),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,i){return r(0===this.negative),this.iushrn(e,t,i)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26,n=1<<t;return!(this.length<=i||!(this.words[i]&n))},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,i=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==t&&i++,this.length=Math.min(i,this.length),0!==t){var n=67108863^67108863>>>t<<t;this.words[this.length-1]&=n}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,i){var n,o,s=e.length+i;this._expand(s);var a=0;for(n=0;n<e.length;n++){o=(0|this.words[n+i])+a;var u=(0|e.words[n])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[n+i]=67108863&o}for(;n<this.length-i;n++)a=(o=(0|this.words[n+i])+a)>>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n<this.length;n++)a=(o=-(0|this.words[n])+a)>>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var i=(this.length,e.length),r=this.clone(),n=e,s=0|n.words[n.length-1];0!=(i=26-this._countBits(s))&&(n=n.ushln(i),r.iushln(i),s=0|n.words[n.length-1]);var a,u=r.length-n.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var h=r.clone()._ishlnsubmul(n,1,u);0===h.negative&&(r=h,a&&(a.words[u]=1));for(var d=u-1;d>=0;d--){var l=67108864*(0|r.words[n.length+d])+(0|r.words[n.length+d-1]);for(l=Math.min(l/s|0,67108863),r._ishlnsubmul(n,l,d);0!==r.negative;)l--,r.negative=0,r._ishlnsubmul(n,1,d),r.isZero()||(r.negative^=1);a&&(a.words[d]=l)}return a&&a.strip(),r.strip(),"div"!==t&&0!==i&&r.iushrn(i),{div:a||null,mod:r}},o.prototype.divmod=function(e,t,i){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(n=a.div.neg()),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(e)),{div:n,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(n=a.div.neg()),{div:n,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var n,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var i=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),n=e.andln(1),o=i.cmp(r);return o<0||1===n&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,i=0,n=this.length-1;n>=0;n--)i=(t*i+(0|this.words[n]))%e;return i},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&i.isEven();)t.iushrn(1),i.iushrn(1),++c;for(var h=i.clone(),d=t.clone();!t.isZero();){for(var l=0,f=1;0==(t.words[0]&f)&&l<26;++l,f<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(n.isOdd()||s.isOdd())&&(n.iadd(h),s.isub(d)),n.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(h),u.isub(d)),a.iushrn(1),u.iushrn(1);t.cmp(i)>=0?(t.isub(i),n.isub(a),s.isub(u)):(i.isub(t),a.isub(n),u.isub(s))}return{a:a,b:u,gcd:i.iushln(c)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,i=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n,s=new o(1),a=new o(0),u=i.clone();t.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,h=1;0==(t.words[0]&h)&&c<26;++c,h<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var d=0,l=1;0==(i.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(i.iushrn(d);d-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(i)>=0?(t.isub(i),s.isub(a)):(i.isub(t),a.isub(s))}return(n=0===t.cmpn(1)?s:a).cmpn(0)<0&&n.iadd(e),n},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),i=e.clone();t.negative=0,i.negative=0;for(var r=0;t.isEven()&&i.isEven();r++)t.iushrn(1),i.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;i.isEven();)i.iushrn(1);var n=t.cmp(i);if(n<0){var o=t;t=i,i=o}else if(0===n||0===i.cmpn(1))break;t.isub(i)}return i.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,i=(e-t)/26,n=1<<t;if(this.length<=i)return this._expand(i+1),this.words[i]|=n,this;for(var o=n,s=i;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,i=e<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)t=1;else{i&&(e=-e),r(e<=67108863,"Number is too big");var n=0|this.words[0];t=n===e?0:n<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var r=0|this.words[i],n=0|e.words[i];if(r!==n){r<n?t=-1:r>n&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new E(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,i=e;do{this.split(i,this.tmp),t=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:i.ucmp(this.p);return 0===r?(i.words[0]=0,i.length=1):r>0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(b,y),b.prototype.split=function(e,t){for(var i=Math.min(e.length,9),r=0;r<i;r++)t.words[r]=e.words[r];if(t.length=i,e.length<=9)return e.words[0]=0,void(e.length=1);var n=e.words[9];for(t.words[t.length++]=4194303&n,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|n>>>22,n=o}n>>>=22,e.words[r-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var r=0|e.words[i];t+=977*r,e.words[i]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(_,y),n(w,y),n(S,y),S.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var r=19*(0|e.words[i])+t,n=67108863&r;r>>>=26,e.words[i]=n,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new _;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new S}return g[e]=t,t},E.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){this._verify2(e,t);var i=e.add(t);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},E.prototype.iadd=function(e,t){this._verify2(e,t);var i=e.iadd(t);return i.cmp(this.m)>=0&&i.isub(this.m),i},E.prototype.sub=function(e,t){this._verify2(e,t);var i=e.sub(t);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},E.prototype.isub=function(e,t){this._verify2(e,t);var i=e.isub(t);return i.cmpn(0)<0&&i.iadd(this.m),i},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var i=this.m.add(new o(1)).iushrn(2);return this.pow(e,i)}for(var n=this.m.subn(1),s=0;!n.isZero()&&0===n.andln(1);)s++,n.iushrn(1);r(!n.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),h=this.m.bitLength();for(h=new o(2*h*h).toRed(this);0!==this.pow(h,c).cmp(u);)h.redIAdd(u);for(var d=this.pow(h,n),l=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=s;0!==f.cmp(a);){for(var m=f,v=0;0!==m.cmp(a);v++)m=m.redSqr();r(v<p);var g=this.pow(d,new o(1).iushln(p-v-1));l=l.redMul(g),d=g.redSqr(),f=f.redMul(d),p=v}return l},E.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},E.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var i=new Array(16);i[0]=new o(1).toRed(this),i[1]=e;for(var r=2;r<i.length;r++)i[r]=this.mul(i[r-1],e);var n=i[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],h=u-1;h>=0;h--){var d=c>>h&1;n!==i[0]&&(n=this.sqr(n)),0!==d||0!==s?(s<<=1,s|=d,(4==++a||0===r&&0===h)&&(n=this.mul(n,i[s]),a=0,s=0)):a=0}u=26}return n},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new T(e)},n(T,E),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var i=e.mul(t),r=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=i.isub(r).iushrn(this.shift),s=n;return n.cmp(this.m)>=0?s=n.isub(this.m):n.cmpn(0)<0&&(s=n.iadd(this.m)),s._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,i(15)(e))},function(e,t,i){(function(e){var r=i(374),n=i(188),o=i(376),s=i(377),a=i(35),u=t;u.request=function(t,i){t="string"==typeof t?a.parse(t):o(t);var n=-1===e.location.protocol.search(/^https?:$/)?"http:":"",s=t.protocol||n,u=t.hostname||t.host,c=t.port,h=t.path||"/";u&&-1!==u.indexOf(":")&&(u="["+u+"]"),t.url=(u?s+"//"+u:"")+(c?":"+c:"")+h,t.method=(t.method||"GET").toUpperCase(),t.headers=t.headers||{};var d=new r(t);return i&&d.on("response",i),d},u.get=function(e,t){var i=u.request(e,t);return i.end(),i},u.ClientRequest=r,u.IncomingMessage=n.IncomingMessage,u.Agent=function(){},u.Agent.defaultMaxSockets=4,u.globalAgent=new u.Agent,u.STATUS_CODES=s,u.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,i(1))},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var i=function(){};i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e}},function(e,t,i){const r=i(36).Buffer,n=(e,t)=>{const i=r.allocUnsafe(t);for(var n=0,o=0;o<e.length;o++){const t=e[o];t.copy(i,n),n+=t.length}return i};try{const t=i(!function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}());e.exports=Object.assign({concat:n},t.BufferUtil||t)}catch(t){const i=(e,t,i,r,n)=>{for(var o=0;o<n;o++)i[r+o]=e[o]^t[3&o]},r=(e,t)=>{const i=e.length;for(var r=0;r<i;r++)e[r]^=t[3&r]};e.exports={concat:n,mask:i,unmask:r}}},function(e,t,i){var r;i.r(t),i.d(t,"v1",(function(){return m})),i.d(t,"v3",(function(){return M})),i.d(t,"v4",(function(){return I})),i.d(t,"v5",(function(){return A})),i.d(t,"NIL",(function(){return C})),i.d(t,"version",(function(){return x})),i.d(t,"validate",(function(){return a})),i.d(t,"stringify",(function(){return l})),i.d(t,"parse",(function(){return v}));var n=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)}for(var s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)},u=[],c=0;c<256;++c)u.push((c+256).toString(16).substr(1));var h,d,l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!a(i))throw TypeError("Stringified UUID is invalid");return i},f=0,p=0,m=function(e,t,i){var r=t&&i||0,n=t||new Array(16),s=(e=e||{}).node||h,a=void 0!==e.clockseq?e.clockseq:d;if(null==s||null==a){var u=e.random||(e.rng||o)();null==s&&(s=h=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=d=16383&(u[6]<<8|u[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),m=void 0!==e.nsecs?e.nsecs:p+1,v=c-f+(m-p)/1e4;if(v<0&&void 0===e.clockseq&&(a=a+1&16383),(v<0||c>f)&&void 0===e.nsecs&&(m=0),m>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,p=m,d=a;var g=(1e4*(268435455&(c+=122192928e5))+m)%4294967296;n[r++]=g>>>24&255,n[r++]=g>>>16&255,n[r++]=g>>>8&255,n[r++]=255&g;var y=c/4294967296*1e4&268435455;n[r++]=y>>>8&255,n[r++]=255&y,n[r++]=y>>>24&15|16,n[r++]=y>>>16&255,n[r++]=a>>>8|128,n[r++]=255&a;for(var b=0;b<6;++b)n[r+b]=s[b];return t||l(n)},v=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i},g=function(e,t,i){function r(e,r,n,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],i=0;i<e.length;++i)t.push(e.charCodeAt(i));return t}(e)),"string"==typeof r&&(r=v(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(r),s.set(e,r.length),(s=i(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,n){o=o||0;for(var a=0;a<16;++a)n[o+a]=s[a];return n}return l(s)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r};function y(e){return 14+(e+64>>>9<<4)+1}function b(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function _(e,t,i,r,n,o){return b((s=b(b(t,e),b(r,o)))<<(a=n)|s>>>32-a,i);var s,a}function w(e,t,i,r,n,o,s){return _(t&i|~t&r,e,t,n,o,s)}function S(e,t,i,r,n,o,s){return _(t&r|i&~r,e,t,n,o,s)}function E(e,t,i,r,n,o,s){return _(t^i^r,e,t,n,o,s)}function T(e,t,i,r,n,o,s){return _(i^(t|~r),e,t,n,o,s)}var M=g("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i<t.length;++i)e[i]=t.charCodeAt(i)}return function(e){for(var t=[],i=32*e.length,r=0;r<i;r+=8){var n=e[r>>5]>>>r%32&255,o=parseInt("0123456789abcdef".charAt(n>>>4&15)+"0123456789abcdef".charAt(15&n),16);t.push(o)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[y(t)-1]=t;for(var i=1732584193,r=-271733879,n=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=i,u=r,c=n,h=o;i=w(i,r,n,o,e[s],7,-680876936),o=w(o,i,r,n,e[s+1],12,-389564586),n=w(n,o,i,r,e[s+2],17,606105819),r=w(r,n,o,i,e[s+3],22,-1044525330),i=w(i,r,n,o,e[s+4],7,-176418897),o=w(o,i,r,n,e[s+5],12,1200080426),n=w(n,o,i,r,e[s+6],17,-1473231341),r=w(r,n,o,i,e[s+7],22,-45705983),i=w(i,r,n,o,e[s+8],7,1770035416),o=w(o,i,r,n,e[s+9],12,-1958414417),n=w(n,o,i,r,e[s+10],17,-42063),r=w(r,n,o,i,e[s+11],22,-1990404162),i=w(i,r,n,o,e[s+12],7,1804603682),o=w(o,i,r,n,e[s+13],12,-40341101),n=w(n,o,i,r,e[s+14],17,-1502002290),i=S(i,r=w(r,n,o,i,e[s+15],22,1236535329),n,o,e[s+1],5,-165796510),o=S(o,i,r,n,e[s+6],9,-1069501632),n=S(n,o,i,r,e[s+11],14,643717713),r=S(r,n,o,i,e[s],20,-373897302),i=S(i,r,n,o,e[s+5],5,-701558691),o=S(o,i,r,n,e[s+10],9,38016083),n=S(n,o,i,r,e[s+15],14,-660478335),r=S(r,n,o,i,e[s+4],20,-405537848),i=S(i,r,n,o,e[s+9],5,568446438),o=S(o,i,r,n,e[s+14],9,-1019803690),n=S(n,o,i,r,e[s+3],14,-187363961),r=S(r,n,o,i,e[s+8],20,1163531501),i=S(i,r,n,o,e[s+13],5,-1444681467),o=S(o,i,r,n,e[s+2],9,-51403784),n=S(n,o,i,r,e[s+7],14,1735328473),i=E(i,r=S(r,n,o,i,e[s+12],20,-1926607734),n,o,e[s+5],4,-378558),o=E(o,i,r,n,e[s+8],11,-2022574463),n=E(n,o,i,r,e[s+11],16,1839030562),r=E(r,n,o,i,e[s+14],23,-35309556),i=E(i,r,n,o,e[s+1],4,-1530992060),o=E(o,i,r,n,e[s+4],11,1272893353),n=E(n,o,i,r,e[s+7],16,-155497632),r=E(r,n,o,i,e[s+10],23,-1094730640),i=E(i,r,n,o,e[s+13],4,681279174),o=E(o,i,r,n,e[s],11,-358537222),n=E(n,o,i,r,e[s+3],16,-722521979),r=E(r,n,o,i,e[s+6],23,76029189),i=E(i,r,n,o,e[s+9],4,-640364487),o=E(o,i,r,n,e[s+12],11,-421815835),n=E(n,o,i,r,e[s+15],16,530742520),i=T(i,r=E(r,n,o,i,e[s+2],23,-995338651),n,o,e[s],6,-198630844),o=T(o,i,r,n,e[s+7],10,1126891415),n=T(n,o,i,r,e[s+14],15,-1416354905),r=T(r,n,o,i,e[s+5],21,-57434055),i=T(i,r,n,o,e[s+12],6,1700485571),o=T(o,i,r,n,e[s+3],10,-1894986606),n=T(n,o,i,r,e[s+10],15,-1051523),r=T(r,n,o,i,e[s+1],21,-2054922799),i=T(i,r,n,o,e[s+8],6,1873313359),o=T(o,i,r,n,e[s+15],10,-30611744),n=T(n,o,i,r,e[s+6],15,-1560198380),r=T(r,n,o,i,e[s+13],21,1309151649),i=T(i,r,n,o,e[s+4],6,-145523070),o=T(o,i,r,n,e[s+11],10,-1120210379),n=T(n,o,i,r,e[s+2],15,718787259),r=T(r,n,o,i,e[s+9],21,-343485551),i=b(i,a),r=b(r,u),n=b(n,c),o=b(o,h)}return[i,r,n,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,i=new Uint32Array(y(t)),r=0;r<t;r+=8)i[r>>5]|=(255&e[r/8])<<r%32;return i}(e),8*e.length))})),I=function(e,t,i){var r=(e=e||{}).random||(e.rng||o)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){i=i||0;for(var n=0;n<16;++n)t[i+n]=r[n];return t}return l(r)};function k(e,t,i,r){switch(e){case 0:return t&i^~t&r;case 1:case 3:return t^i^r;case 2:return t&i^t&r^i&r}}function R(e,t){return e<<t|e>>>32-t}var A=g("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var n=0;n<r.length;++n)e.push(r.charCodeAt(n))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),u=0;u<s;++u){for(var c=new Uint32Array(16),h=0;h<16;++h)c[h]=e[64*u+4*h]<<24|e[64*u+4*h+1]<<16|e[64*u+4*h+2]<<8|e[64*u+4*h+3];a[u]=c}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var l=new Uint32Array(80),f=0;f<16;++f)l[f]=a[d][f];for(var p=16;p<80;++p)l[p]=R(l[p-3]^l[p-8]^l[p-14]^l[p-16],1);for(var m=i[0],v=i[1],g=i[2],y=i[3],b=i[4],_=0;_<80;++_){var w=Math.floor(_/20),S=R(m,5)+k(w,v,g,y)+b+t[w]+l[_]>>>0;b=y,y=g,g=R(v,30)>>>0,v=m,m=S}i[0]=i[0]+m>>>0,i[1]=i[1]+v>>>0,i[2]=i[2]+g>>>0,i[3]=i[3]+y>>>0,i[4]=i[4]+b>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]})),C="00000000-0000-0000-0000-000000000000",x=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},function(e,t,i){var r=i(3);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(i(7)),o=r(i(100)),s=r(i(200));t.default=function e(t,i,r,a){if(!(this instanceof e))return new e(t,i,r,a);var u=this,c=r;u.params=a;var h=a.permission;!h&&a.info&&(h=a.info.permission),h||(h=s.default.default),u.permission=new s.default(h);var d={},l={};n.default.log("New "+(i?"local ":"remote ")+"participant "+c),this.setID=function(e){c=e},this.getID=function(){return c},this.getPermission=function(){return u.permission},this.update=function(e){e.permission&&u.permission.set(e.permission),u.params=o.default.defaults(e,u.params)},this.getNickName=function(){return void 0!==u.params.nickname?u.params.nickname:void 0!==u.params.info&&void 0!==u.params.info.nickname?u.params.info.nickname:""},this.getUserInfo=function(){return void 0!==u.params.userinfo?u.params.userinfo:void 0!==u.params.info&&void 0!==u.params.info.userinfo?u.params.info.userinfo:{}},this.getStreams=function(){return d},this.getSubStreams=function(){return l},this.getStream=function(e){return d[e]},this.getSubStream=function(e){return l[e]},this.addSubStream=function(e){if(l[e.getID()]=e,e.isSimulcast()){var t=e.getRef(),i=u.getStream(t);i&&e.setRefStream(i)}},this.removeSubStream=function(e){var t=l[e];t&&(t.dispose(null,!0),t.setRefStream(void 0),delete l[e])},this.addStream=function(e){if(d[e.getID()]=e,e.isSimulcast()){var t=e.getRef(),i=u.getSubStream(t);i&&e.setRefStream(i)}},this.removeStream=function(e){var t=d[e];t&&(t.dispose(null,!0),t.setRefStream(void 0),delete d[e])},this.dispose=function(){Object.entries(d).map((function(e){e[1].dispose(null,!0)})),Object.entries(l).map((function(e){e[1].dispose(null,!0)})),l=[],d=[]}}},function(e,t,i){(function(e,r){var n;
32
32
  /**
33
33
  * @license
34
34
  * Lodash <https://lodash.com/>