diff --git a/.editorconfig b/.editorconfig index 6e87a003..f6f117cb 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,13 @@ -# Editor configuration, see http://editorconfig.org -root = true - -[*] -charset = utf-8 -indent_style = space -indent_size = 2 -insert_final_newline = true -trim_trailing_whitespace = true - -[*.md] -max_line_length = off -trim_trailing_whitespace = false +# Editor configuration, see http://editorconfig.org +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false diff --git a/.gitignore b/.gitignore index 67e83e87..cbdaa9ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,43 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. - -# compiled output -/dist -/tmp -/out-tsc -/out - -# dependencies -/node_modules - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock -/coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db -/.sync -/archive +# See http://help.github.com/ignore-files/ for more about ignoring files. + +# compiled output +/dist +/tmp +/out-tsc +/out + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +.c9/ +*.launch +.settings/ +*.sublime-workspace + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json + +# misc +/.sass-cache +/connect.lock +/coverage +/libpeerconnection.log +npm-debug.log +yarn-error.log +testem.log +/typings + +# System Files +.DS_Store +Thumbs.db +/.sync +/archive +.npmrc diff --git a/README.md b/README.md index 129b5787..82962467 100644 --- a/README.md +++ b/README.md @@ -1,135 +1,135 @@ -
=0;t--){for(var s=l.words[t],d=a-1;d>=0;d--){var c=s>>d&1;o!==e[0]&&(o=this.sqr(o)),0!==c||0!==r?(r<<=1,r|=c,(4==++i||0===t&&0===d)&&(o=this.mul(o,e[r]),i=0,r=0)):i=0}a=26}return o},C.prototype.convertTo=function(n){var l=n.umod(this.m);return l===n?l.clone():l},C.prototype.convertFrom=function(n){var l=n.clone();return l.red=null,l},u.mont=function(n){return new E(n)},o(E,C),E.prototype.convertTo=function(n){return this.imod(n.ushln(this.shift))},E.prototype.convertFrom=function(n){var l=this.imod(n.mul(this.rinv));return l.red=null,l},E.prototype.imul=function(n,l){if(n.isZero()||l.isZero())return n.words[0]=0,n.length=1,n;var e=n.imul(l),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=e.isub(t).iushrn(this.shift),u=o;return o.cmp(this.m)>=0?u=o.isub(this.m):o.cmpn(0)<0&&(u=o.iadd(this.m)),u._forceRed(this)},E.prototype.mul=function(n,l){if(n.isZero()||l.isZero())return new u(0)._forceRed(this);var e=n.mul(l),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=e.isub(t).iushrn(this.shift),r=o;return o.cmp(this.m)>=0?r=o.isub(this.m):o.cmpn(0)<0&&(r=o.iadd(this.m)),r._forceRed(this)},E.prototype.invm=function(n){return this.imod(n._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===l||l,this)},{buffer:25}],25:[function(n,l,e){},{}],26:[function(n,l,e){var t=n("safe-buffer").Buffer;function o(n){t.isBuffer(n)||(n=t.from(n));for(var l=n.length/4|0,e=new Array(l),o=0;o>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=t?0:u-1,p=t?1:-1,m=l<0||0===l&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(i=isNaN(l)?1:0,r=d):(r=Math.floor(Math.log(l)/Math.LN2),l*(a=Math.pow(2,-r))<1&&(r--,a*=2),(l+=r+c>=1?f/a:f*Math.pow(2,1-c))*a>=2&&(r++,a/=2),r+c>=d?(i=0,r=d):r+c>=1?(i=(l*a-1)*Math.pow(2,o),r+=c):(i=l*Math.pow(2,c-1)*Math.pow(2,o),r=0));o>=8;n[e+h]=255&i,h+=p,i/=256,o-=8);for(r=r<>>=0)<0||e+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+e+" (+0) <= "+this.buffer.byteLength)}var o,r,i=e;o=d.calculateUTF16asUTF8(u(n),this.noAssert)[1],r=l.calculateVarint32(o);var a=this.buffer.byteLength;if((e+=r+o)>a&&this.resize((a*=2)>e?a:e),e-=r+o,e+=this.writeVarint32(o,e),d.encodeUTF16toUTF8(u(n),(function(n){this.view[e++]=n}).bind(this)),e!==i+o+r)throw RangeError("Illegal range: Truncated data, "+e+" == "+(e+o+r));return t?(this.offset=e,this):e-i},e.readVString=function(n){var e=void 0===n;if(e&&(n=this.offset),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal offset: "+n+" (not an integer)");if((n>>>=0)<0||n+1>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+n+" (+1) <= "+this.buffer.byteLength)}var t=n,o=this.readVarint32(n),u=this.readUTF8String(o.value,l.METRICS_BYTES,n+=o.length);return n+=u.length,e?(this.offset=n,u.string):{string:u.string,length:n-t}},e.append=function(n,e,t){"number"!=typeof e&&"string"==typeof e||(t=e,e=void 0);var o=void 0===t;if(o&&(t=this.offset),!this.noAssert){if("number"!=typeof t||t%1!=0)throw TypeError("Illegal offset: "+t+" (not an integer)");if((t>>>=0)<0||t+0>this.buffer.byteLength)throw RangeError("Illegal offset: 0 <= "+t+" (+0) <= "+this.buffer.byteLength)}n instanceof l||(n=l.wrap(n,e));var u=n.limit-n.offset;if(u<=0)return this;var r=this.buffer.byteLength;return(t+=u)>r&&this.resize((r*=2)>t?r:t),t-=u,this.view.set(n.view.subarray(n.offset,n.limit),t),n.offset+=u,o&&(this.offset+=u),this},e.appendTo=function(n,l){return n.append(this,l),this},e.assert=function(n){return this.noAssert=!n,this},e.capacity=function(){return this.buffer.byteLength},e.clear=function(){return this.offset=0,this.limit=this.buffer.byteLength,this.markedOffset=-1,this},e.clone=function(n){var e=new l(0,this.littleEndian,this.noAssert);return n?(e.buffer=new ArrayBuffer(this.buffer.byteLength),e.view=new Uint8Array(e.buffer)):(e.buffer=this.buffer,e.view=this.view),e.offset=this.offset,e.markedOffset=this.markedOffset,e.limit=this.limit,e},e.compact=function(n,l){if(void 0===n&&(n=this.offset),void 0===l&&(l=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof l||l%1!=0)throw TypeError("Illegal end: Not an integer");if(l>>>=0,n<0||n>l||l>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+l+" <= "+this.buffer.byteLength)}if(0===n&&l===this.buffer.byteLength)return this;var e=l-n;if(0===e)return this.buffer=t,this.view=null,this.markedOffset>=0&&(this.markedOffset-=n),this.offset=0,this.limit=0,this;var o=new ArrayBuffer(e),u=new Uint8Array(o);return u.set(this.view.subarray(n,l)),this.buffer=o,this.view=u,this.markedOffset>=0&&(this.markedOffset-=n),this.offset=0,this.limit=e,this},e.copy=function(n,e){if(void 0===n&&(n=this.offset),void 0===e&&(e=this.limit),!this.noAssert){if("number"!=typeof n||n%1!=0)throw TypeError("Illegal begin: Not an integer");if(n>>>=0,"number"!=typeof e||e%1!=0)throw TypeError("Illegal end: Not an integer");if(e>>>=0,n<0||n>e||e>this.buffer.byteLength)throw RangeError("Illegal range: 0 <= "+n+" <= "+e+" <= "+this.buffer.byteLength)}if(n===e)return new l(0,this.littleEndian,this.noAssert);var t=e-n,o=new l(t,this.littleEndian,this.noAssert);return o.offset=0,o.limit=t,o.markedOffset>=0&&(o.markedOffset-=n),this.copyTo(o,0,n,e),o},e.copyTo=function(n,e,t,o){var u,r;if(!this.noAssert&&!l.isByteBuffer(n))throw TypeError("Illegal target: Not a ByteBuffer");if(e=(r=void 0===e)?n.offset:0|e,t=(u=void 0===t)?this.offset:0|t,o=void 0===o?this.limit:0|o,e<0||e>n.buffer.byteLength)throw RangeError("Illegal target range: 0 <= "+e+" <= "+n.buffer.byteLength);if(t<0||o>this.buffer.byteLength)throw RangeError("Illegal source range: 0 <= "+t+" <= "+this.buffer.byteLength);var i=o-t;return 0===i?n:(n.ensureCapacity(e+i),n.view.set(this.view.subarray(t,o),e),u&&(this.offset+=i),r&&(n.offset+=i),this)},e.ensureCapacity=function(n){var l=this.buffer.byteLength;return l